4 ms·
Ask HN: What are some great examples of well-written, clean, and minimal code?
Looking for some inspiration to improve my programming skills, figured looking at clever ways people approach problems might be a good start
- samsquire 5y agoTry 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.
- deleted 5y ago[deleted]
- 0xcde4c3db 5y agoSystem V /bin/true (after a fashion) [1] [1] http://trillian.mit.edu/~jc/humor/ATT_Copyright_true.html http://trillian.mit.edu/~jc/humor/ATT_Copyright_true.html
- martyalain 5y agohttp://lambdaway.free.fr/lambdawalks/?view=coding http://lambdaway.free.fr/lambdawalks/?view=coding just kidding, of course.
- BallCramp 5y ago"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.
- brudgers 5y agoHave you considered Knuth's Art of Computer Programming?