Ask HN: What are some great examples of well-written, clean, and minimal code?
1–7 of 7 posts
Looking for some inspiration to improve my programming skills, figured looking at clever ways people approach problems might be a good start
Re: Ask HN: What are some great examples of well-written, clean, and minimal code?
#2Try reading your language's standard library.
You don't want to be clever when writing code. Clever is hard to read. You want to be readable.
Re: Ask HN: What are some great examples of well-written, clean, and minimal code?
#3[deleted]
Re: Ask HN: What are some great examples of well-written, clean, and minimal code?
#4System V /bin/true (after a fashion) [1]
[1] http://trillian.mit.edu/~jc/humor/ATT_Copyright_true.html
Re: Ask HN: What are some great examples of well-written, clean, and minimal code?
#5http://lambdaway.free.fr/lambdawalks/?view=coding
just kidding, of course.
Re: Ask HN: What are some great examples of well-written, clean, and minimal code?
#6"Well written" is hard to demonstrate, because (aside from being somewhat subjective) it's something that might only play itself out over a long period. For example, can you take one feature and completely remove it, without creating a nightmare for yourself? Can you add a new feature without needing to re-write and rearrange a million other things? And then on the opposite end of the spectrum, is everything so de-coupled that it adds needless structural complexity?
I think my biggest lesson as a programmer was returning to large projects I hadn't touched in a few months, needing to implement big changes. Nothing else has developed my sense of where, when, and how to separate concerns.
I'd recommend toying around with "design patterns", which forces you to think about different approaches. But I might be answering this at a different scale than you're asking. Personally I've found my biggest challenges have been structural... rather than coming up with tight little algorithms for things.
Re: Ask HN: What are some great examples of well-written, clean, and minimal code?
#7Have you considered Knuth's Art of Computer Programming?