Hacker News new | past | comments | ask | show | jobs | submit | q_no's comments login

Thank you!


Digital Ocean doesn't offer additional IPv4 adresses :(


I totally agree with all the other answers. I'm working home office for about 2 years now and I also love it, but sometimes it's too easy to get distracted. When you find something that distracts you, remove it. Also, it helps a lot to shower and get dressed in the morning as if you were leaving the house. Don't work in a bathing robe ;)

My gf is working in shifts and hence sometimes she's here when I'm working and I have to remind her that I'm working, although I'm around.


I'm not a native english speaker, what are "coat hangers"?


The thing where you "hang" your "coat" on: https://www.google.com/search?q=coat+hanger&tbm=isch


LOL, and I was wondering what kind of cable it was supposed to be, of course I know coat hangers but didn't get it in the context. Thank you! :)


This blog is hilarious :D Thank you!


I bet not even NASA would deploy such expensive cables on a spaceshuttle.


Essentially same type of four pair cable that is used for SpaceWire and Ethernet on-board of ISS is readily available and generally costs less than 10EUR/meter.


In Asia Facebook isn't that big, they also have other social services


Is it just me, or is programming more than one elevator buggy?

I used a for( var i =0;i < elevators.length;++i) statement to apply my code to each elevator, but people only keep using the last one. Could someone give me a hint? ;)


You're probably hitting an issue with the way that closures work in javascript (and many other languages).

    for(var i = 0; i < elevators.length; ++i) {
        elevator[i].on("floor_button_pressed",
             function(floorNum){ elevator[i].goToFloor(floornum)});
    }
Doesn't do what one might expect. When the anonymous function is invoked, it looks up the value of the 'i' identifier, which will have changed it's value to elevators.length by the end of the loop. To get the behavior you want, I've seen people do

    for(var i = 0; i < elevators.length; ++i) {
        (function(i){
            elevator[i].on("floor_button_pressed",
                function(floorNum){ elevator[i].goToFloor(floornum)});
        })(i);
    }
This creates a new scope, which ensures that 'i' has the value that was passed in. I'm afraid I'm a little too tired to look up the parts of the spec that make the semantics clear.


Thank you! Your suggestion makes sense indeed and works fine!


You can also use:

  elevators.forEach(function(elevator, elevatorNumber) {...});
This will provide each elevator with its index in the elevators array.


Thanks for the details! It makes a lot of sense.

Now I wonder how node 0.11.x compares to iojs :)


I've been using Marionette for about a year know for one project and in the past weeks I became a bit insecure if my decision was correct. It feels like Marionette is moving slowly, compared to other similar projects which have a bigger community. Is this a false impression? It's not that I'm missing any bigger features, but I'm afraid it might be discontinued sooner than other projects.


Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: