201 karma · joined Jan 27, 2016 (10y ago) · 45 submissions
comment 9y ago · link · parent
1. Write some JS code in chrome and verify expected behaviour.
2. Add a debugger statement.
3. When the debugger pops up, go down a few frames and add debug point.
4. Right click the frame and select restart.
5. In the new break point, write some code in the console to modify the state.
6. When you step through the code, it now does something else.
Now imagine if the language allow you to do this programmatically in the code by passing the frame around as an argument similar to functions.I leave the rest to imagination.
comment 10y ago · link · parent
http://www.goodreads.com/quotes/309485-nobody-tells-this-to-...
And for a different perspective. This was posted 5 days ago.
https://neilonsoftware.com/books/personality-patterns-of-pro...
comment 10y ago · link · parent
1. Fingers are sensitive.
2. paper has a saw like edge.
3. paper cuts tears up skin so nerves are exposed to the world.
Not really a lot of substance to this article.
Speaking of saw like edge.... https://www.youtube.com/watch?v=rYfkhdKcEiE
comment 10y ago · link · parent
https://github.com/petkaantonov/bluebird/wiki/Optimization-k...
comment 10y ago · link · parent
This text editor gets it. Such a contrast to some of the editors we have today where anything over a few megabytes is an edge case not worth fixing.
comment 10y ago · link · parent
They recently made a change with the node sdk recently so you don't need the apiKey for public access. Not sure about the web version, You would probably have to use the Browserify or something.
https://firebase.googleblog.com/2016/07/firebase-react-nativ...
That said, If I were you, I would stick with V2 sdk since I don't think hacker news has actually updated yet. An easier way is to just use the rest apis, That is still clearly working.
comment 10y ago · link · parent
I mean if I didn't have the option of using promises, I would have probably written something like this.
function handler(callback){
var state={};
function logic(step,err,data){
if(!step){
connectToDb("somedatabase",logic.bind(state,1))
}
if(step==1){
if(err) callback("error1")
state.dbInstance=data
state.dbInstance.query("someQuery",logic.bind(state,2))
}
if(step==2){
if(err) callback("error2")
csvExporter(data,logic.bind(state,3))
}
if(step==3){
if(err) callback("error3")
callback(data)
}
}
logic()
}10.
Ask HN: Is callback hell exaggerated?
11 points · by tonyle · 10y ago · 17 comments
comment 10y ago · link · parent
The idea is the company saves money by loading a secure workspace to your personal device instead of paying for a corporate device.
Companies setup a mdm server such as blackberry, good, airwatch, etc that basically send a remote wipe command. You would then download an app to activate it.
It depends on the company but check if there is an opt out clause or demand the company to provide you a corporate phone as you don't have a personal device.
It's ok in most cases since the company is paying for your phone bill as compensation so you can just get a second personal device.
I'm not sure about the legal issues, especially if you can't opt out of it.
comment 10y ago · link · parent
A pivot table will do exactly what you want and more. If you hate excel, You could load it into a database and do a groupby query. I suspect most JSON in that data structure were auto generated from CSV files or database anyways.
Another option is to just convert that JSON to another JSON keyed by name with Lodash then inspect it.
var anotherJSON=_.keyBy(oldJSON, 'name');
comment 10y ago · link · parent
For the most common cases, I just copy and paste the string into the chrome console if I need to inspect some random JSON file really quick.
If it is too big to copy and paste, pipe it into a html file as a global variable and view the object in the console.
You can also just open a node repl and load the JSON into memory. node lets you auto complete property names by pressing tab, this is great for inspecting some unknown object.
comment 10y ago · link · parent
Halfway down, I realize it's just like any other big company tactics. Some upper management suggest all employees practice positive thinking, offering a course on how do deal with stress, forced laughter, etc.
Then I wondered how common this practice was for a company to offer this to their employees in the same way a company would offer free massages or therapy.
Seems to be a common, even competitive business in Korea.
Now I'm not sure how I feel about it. It could be some big new spiritual trend, but it could also be some shady business taking advantage of the depressed.
comment 10y ago · link · parent
btw here is a size comparison of various mecha, guess which one is the biggest. https://www.youtube.com/watch?v=7XbeVosPszo
comment 10y ago · link · parent
Also,take a look at http://createjs.com/. It is pretty familiar if you come from a flash background. The latest version of adobe flash/animate exports to createjs so you can keep using your old flash authoring skills for your assets.
However, If time is your major constraint, unity might not be as overkill as you might think.
comment 10y ago · link · parent
http://devdocs.io/offline is a great resource if you want to code offline.
comment 10y ago · link · parent
When I was in school, there was always some acceptable use policy for accessing the internet. While it didn't prevent some people from watching porn on the network, etc, It was implied that you should only use it for educational purpose and I doubt there is much urgency to fix something that is not school related.
If I were in your shoes, The best way to get it fix is simply raise an issue to someone in IT that you can't access a certain website/app and ask them to fix it. Bonus points if you can find a website/app that you need for school.
If there is a mitm in place, I doubt you can get them to remove it. However maybe you can get them to whitelist gmail, banking sites, etc.
comment 10y ago · link · parent
return Promise.map(arrayOfUrlsToDownload,downloadAndParseFunction,{concurrency:1})
One line for all your basic scraping/parsing needs.
comment 10y ago · link · parent
Where will you be tomorrow?
Where will you be in a month?
Where will you be in a year?
Now as yourself where you will be if you made the choice to spend an hour a day on task X. Where will you be?
Repeat every time you decide to open a new browser tab. It is a very slippery slope every time you unconsciously go to youtube, forums, etc. The first step is to become conscious of the time sucking activities.
comment 10y ago · link · parent
The user created the question and answered it immediately with a link to his goto library.
The issue is not answering your own question, but more about posting your own question to answer.
Suppose everyone who creates a startup, posts a question & answer to advertise their own project.
comment 10y ago · link · parent
http://stackoverflow.com/questions/9751207/how-can-i-use-got...
comment 10y ago · link · parent
sms, not encrypted.
pin messages/BBM, "scrambled"
BBM protect, encrypted
BES (corporate device), encrypted with a key that BlackBerry is not suppose to be able to access.
Originally bb devices could send messages to other bb if you knew their pin. The data was compressed and encrypted, but a moot point since all bb devices had the same key. Pin messages,BBM and their bis infrastructure was never really considered secured, their main offering was BES with offered end to end security.
I used the term scrambled since that was the term everyone was using years ago since people get confused between encrypted, vs encrypted with shared key, vs not encrypted, etc. It quickly becomes a pointless conversation.
As far as I'm concerned, This isn't really surprising if you think about it. BlackBerry's only claim to security was BES for end to end communication.
comment 10y ago · link · parent
Most customers would rather speak to an agent who knows what they are doing. For this situation, we can help the tier one agent troubleshoot much faster. Call centres save money by reducing training time. Small companies can scale up by outsourcing the technical support to call centres with the confidence that they will not lose out quality.
There is a group of users who are frustrated with going through all the levels to get an issue fixed. They realize that the person doesn't know more then the manual and they are wasting their time. They only call in when self serve is not sufficient. Over time, more people who would bypass the phones when they can use the same system directly.
Instructions are like a side scroller, This is a more visual tool that lets people bypass the linear troubleshooting scripts we see too often. Not everyone has to start at the beginning.