To others, the demo question on the home page is a divisible by 5 or 7 problem. This is one of the guest challenges and is that the number contains the digit '7'.
201 karma · joined April 18, 2009
To others, the demo question on the home page is a divisible by 5 or 7 problem. This is one of the guest challenges and is that the number contains the digit '7'.
function jsChallenge() {
return 1;
return 2;
return 3;
}
Returns 3It's true. I think there is just some mind-body-editor connection that develops with vi(m) usage (and emacs, I don't know). When you really start thinking in vim, your mind starts describing what you need to do in vim commands, that magically flow out of your fingers, and vim responds.
In other editors, for any task I need to do, instead of telling my editor to do something, I have to show my editor how to do it by selecting text and menu items with the mouse, it just feels clumsy.
Once the keystrokes are muscle memory, it's impossible to beat with point and click in terms of speed.
That's just an opinion from a vim novice that can never go back.
It only took a few weeks to reach the efficiency I had with TextMate, and every week since I've become more and more efficient. I haven't hit the point of diminishing returns in learning about my editor, and judging by other vim users I've seen, I probably won't for a long, long time.
The biggest mental leap for me is that you are using JSON objects to define sequential code. JSON defines an object as unordered. Obviously your compiler maintains order properly, however it just "feels wrong".
Like I said there is no way you can convince me to write code in a browser (unless there is an absolutely magical benefit), so writing fjson manually looks difficult both in the amount of extra syntax, as well as trying to connect the data to what it's doing.
The last thing that would hold me back is the debugging experience. Will i get back which lines im my documents are causing runtime errors, is there any static checking in place to make sure the strings of code are syntactically correct?
It's a big leap for me, but that being said, I definitely applaud you for developing something new and experimenting. I'm interested in seeing where this evolves.
I just can't see giving up my text editor to click around a web interface to write code. It just seems orders of magnitude slower to me.
It looks cool and I appreciate the effort, I just have a hard time figuring out the benefit of fire to me as a developer.
It may not be quite the same thing, and I can't really parse the website very well for how it really works. I do remember it holds a copy of the DOM server side then manipulates it over HTTP.
So if you want it in Java, there's that.
Of course a lot of people on HN are going to be people who taught/teach themselves everything, but a lot of people want some hand holding, and that's what we aim to provide with Treehouse.
For example, say your portal needs to collect info from 3 sources A, B, and C. In a synchronous system, you would have to request service A, wait for a response, then request B, wait, and so on. This means your request is utilizing the system for all that time, unable to serve other requests, without extra threads or processes.
Node, and other async systems, when they call for IO, like a service, a callback is registered for the result. So instead of having to wait for the result, the system becomes available for other actions, like other requests. So in this case you could request service A, B, and C all at once, and while you are waiting for the responses, the system can be handling other requests. When any of those services completes, it calls back to your code so you can handle the results, and give a response to the client.
So the advantage is that instead of a request taking A + B + C + extra time, it can take max(A, B, C) + extra time to serve the request, while serving other requests concurrently.
Node is not the only way to achieve this, many async systems exist like Tornado for python, EventMachine for ruby, and many others. But the JavaScript in node can be particularly fun to work with especially if you are also doing the front-end JavaScript, as it pretty much brings the context-switching in your brain to almost nothing.