Hacker Newsnew | past | comments | ask | show | jobs | submit | anc2020's commentslogin

Last login: Fri Aug 5 18:11:19 UTC 2011 from dc4-arm-01.cam.broadcom.com on pts/0

http://www.raspberrypi.org/?p=78#more-78


hi, feedback here:

when I got to 100 lines and then clicked "Compile", I needed to select text to scroll down, your lightbox needs something like overflow:auto to bring up scrollbars.

likewise, google account means a bounce for me even though I've got one, try to delay showing that

was a bit disappointed with the end result - just shows two green boxes, when I really wanted to see the metrics page from your promo video (http://www.interviewstreet.com/recruit/) (that demo is also too well hidden imo).

A little more in the program description would help, specifically IRL I'll know a rough target time and how this thing is likely to be used (eg. repeatedly, with mostly small numbers, etc.)

Also, the UI is annoying, split into 3 vertical panes: Problem | Code editor | Compile Output

Also randomise the test cases...

  int getNumberOfPrimes(int N) {
      return N == 100 ? 25 : 78498;
  }


Ah. okay, got it. That was just to give an idea of how compile & test, etc. looked, didn't think it would have an impact on the site, my bad. Would put up a proper sample test. Thanks so much for your feedback.


Could do, but the aim of my answer was to keep it short and simple and not a full reference to closures (there are some good links on this page with more detail for that).


I'm not sure your code does as intended, won't the function be called only once the element is clicked?

This should work okay:

  for (var i = 0; i < 5; i++) {
    $(DOMelement:eq(i)).click((function(i) {
     return function() {
      console.info(i);
     }
    }(i)));
  }
Also surely DOMelement.eq(i) as opposed to DOMelement:eq(i)?


I think you're correct. His interior function is still just another closure around the original var i.

Also, this feels like piling on, but I think the original (intentionally erroneous) example would print '5' repeatedly rather than '4'. var i ends up with the value 5.


Yes, you are correct (I can't edit right now). You need to return a new function, and a reference actually.

for DOM part, I didn't understand your question. However, the right way to do it is

  $(DOMelement:eq(i)).each();
to iterate through each element.


Hi, I wrote the accepted answer and welcome changes or suggestions (it's community wiki).


The conclusions of this article are a bit hasty.

Firstly there are other reasons politicians could want to save face other than that they think they are the best candidate, and secondly the outcome of a football game is much much less determined by the support of its fans than the success of RoR. The analogies aren't particularly useful.


This totally changed how I used git, wish I'd known about it from the start. Also emacs users should check out magit, which has a good 'add -p' and 'checkout -p' style of working


blech. this is an alright recipe to being a standard nerd/web developer and reads far too much like a list of things the author has done, especially the hobbies part which imo has bugger-all to do with being a hacker.

my personal idea of a hacker is someone who knows _everything_ and is not afraid to take advantage of that knowledge. of course it's impossible to know everything, but the best hackers I know do a very good job of approximating that :)


If you don't want to burn out while you try to know everything, you'll get a side hobby.


Sure, but it's just standard practice to do so, and taking a hobby doesn't really get you any closer to being a hacker. And putting "womenz" and "drinking" as hobbies is just lame.

Also not wanting to give the wrong impression, the folks I'm thinking of are not "know-it-alls", they don't tell you random crap to sound smart, but I can learn a lot from talking to them normally.


As far as I can guess, any networking implementation would have to pass low level requests through a proxy on the server, which would end up making things pretty slow even on an unburdened server.


Awesome

    cd /
    rm -rf ./*
    echo *


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

Search: