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

Unfortunately I can't see the pseudo code you are criticizing. But I have a degree in CS and I'm familiar with the notion of pseudo code and the way it's usually written in academic papers.

I agree with you that the way code is written matters a lot in practice. But in academic papers, usually the idea, the runtime and the correctness of algorithms have a higher priority than implementation details. Sure, you can write more readable pseudo code, but I haven't come across an algorithm in a paper that I wasn't able to understand. In fact, I do often like the way it is written.

Who says that computer scientists are necessarily great programmers? That's not the case. Universities (at least in Germany) doesn't teach you how to be an "elite grade developer", as you said. They teach fundamental concepts in computer science.

Why recursion? If you approach a problem with mathematics then thinking in terms of functions and recursion is very natural. Recursion is a fundamental mathematical concept and it's often easier to reason about recursive functions (inductive proofs).


I noticed http://en.wikipedia.org/wiki/Binary_heap had a (slighlty) improved version of the binary Heap copy pasted from the same book.


Well, it's opt-in. So unknowing access is (at least without further actions) not possible.

getUserMedia: "Prompts the user for permission to use their Web cam or other video or audio input." [1]

By the way: The example doesn't work for me either.

[1] http://dev.w3.org/2011/webrtc/editor/getusermedia.html


Sure, but I am asking if this can be modded to gain unauth access to the webcam.


The 'allow getusermedia' policy is handled by the browser, not javascript.

It's possible that some day there will be a browser bug for bypassing it, but you can't just write javascript code that says "don't ask for permission".

Nowadays the majority of webcams also hard-wire their 'on' light, so the user would at least get an indication that the webcam is suddenly recording.


Possibly if someone managed to include it on a page you had already given permission.

I don't know if how you'd sent it somewhere with the same origin policy in place.


>Possibly if someone managed to include it on a page you had already given permission.

nope, the "use webcam" permission is per "getUserMedia" call, so 2 getUserMedia calls = 2 allowbar popups.



There is no zelda.prototype. It should have been:

  Game.prototype.heartIt = function() { 
    console.log( "I heart " + this.title ); 
  };
See: http://jsfiddle.net/a9asJ/1/


Thank you, corrected!


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

Search: