Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

To mix things up a bit, I'm going to give two very small examples of code that can be understood quickly, but studied diligently. Both are in JavaScript, which I notice you mention specifically in another comment:

[1] Douglas Crockford's JSON parser. Worth a look because it is excellently commented and is easily understandable https://github.com/douglascrockford/JSON-js/blob/master/json...

[2] Bouncing Beholder. A game written in 1K of highly obfuscated code, which the author expands upon here. Worth it because it teaches some crazy optimisation techniques that are applicable to all programming, but also includes plenty of javascript-specific trickery. http://marijnhaverbeke.nl/js1k/



Anything Javascript code from Crockford I highly recommend. Well structured and without "hacks" that could cause confusion.




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

Search: