tonyle
Joined 10 years ago
Joined 10 years ago
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.
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...
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
https://github.com/petkaantonov/bluebird/wiki/Optimization-k...
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.
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.
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()
}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.
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');
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.