Live data from Hacker News

Ask HN: What source code is worth studying?

news.ycombinator.com

31–40 of 176 posts

Re: Ask HN: What source code is worth studying?

#31
post #23

== Vim or Emacs == Just pick one and force yourself to use it to the exclusion of other editors. Future you will thank you later, because you'll still be using it 20 years from now. "We are typists first, programmers second" comes to mind. You need to be able to move chunks of code around, substitute things with regexes, use marks, use editor macros, etc. == 6.824: Distributed Systems == http://pdos.csail.mit.edu/6.8…

How long does it usually take to get a reply from Matasano. I have sent a mail couple of days ago, but no reply yet.

It's a manual process, so can take a while.

Re: Ask HN: What source code is worth studying?

#34
post #21

[deleted]

(You say the 'naive' way; how can it be compressed better?)

Reference based compression! We create a set of reference sequences and simply record the start location of each identified subsequence - of course this relies on the assumption we can correctly recognise all genes and their variants... ahem.

Re: Ask HN: What source code is worth studying?

#35
Slight tangent to your question, but one thing I have noticed recently is that having to deal with really crap code inspires me to do my own better.

I inherited a colleagues work after she left, and it was horrible. But I thought about why it was horrible, and how to make it better. What would it look like if it was done well?

Even with my own code, if I look at something I did 6 months ago, and it doesn't make sense straight away, the it can usually be improved.

Re: Ask HN: What source code is worth studying?

#36
post #2

C -> Varnish PHP -> Yii Ruby -> Merb Scheme -> Arc Clojure -> Core JavaScript -> Multeor Any languages in particular that you're interested in not covered above?

Thanks for this list. I was mostly looking for Python, Javascript, Haskell and C#. Any help regarding that? Also, as I believe this thread will also help others, you can go ahead and post about any other code-bases for other languages.

requests module is very well written

Re: Ask HN: What source code is worth studying?

#37
post #34

Earlier quoted context omitted.

(You say the 'naive' way; how can it be compressed better?)

Reference based compression! We create a set of reference sequences and simply record the start location of each identified subsequence - of course this relies on the assumption we can correctly recognise all genes and their variants... ahem.

You mean reference to another copy of the genome?

Or you mean trying to find long repeat sequences that are slightly mutated in a way that is low-entropy?

Re: Ask HN: What source code is worth studying?

#38
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/

Re: Ask HN: What source code is worth studying?

#39

== Vim or Emacs == Just pick one and force yourself to use it to the exclusion of other editors. Future you will thank you later, because you'll still be using it 20 years from now. "We are typists first, programmers second" comes to mind. You need to be able to move chunks of code around, substitute things with regexes, use marks, use editor macros, etc. == 6.824: Distributed Systems == http://pdos.csail.mit.edu/6.8…

>Do not identify yourself as "an X programmer," or as anything else. Yet every single programming job post these days is basically looking for someone with X years of experience in a long enumeration of specific technologies. The usual reason being "They need to be productive. Now."

In my experience, best jobs you get aren't posted — as best candidates don't send out resumes.
Post reply on HN