3 ms·
One of my favorite simple examples of what clean and elegant code can be is Peter Norvig's spellchecker: http://norvig.com/spell-correct.html http://norvig.com/
by dangoldin 10y ago
One of my favorite simple examples of what clean and elegant code can be is Peter Norvig's spellchecker: http://norvig.com/spell-correct.html http://norvig.com/spell-correct.html
It's in Python and a single file but it comes with a wonderful description and shows how a complicated task can be broken down into a few small and powerful functions.
- rimliu 10y agoBut small systems are easier to get nice. Once they are not small it is there where all the hell begins. Alas, it is a big systems where nice code helps most.
- dangoldin 10y agoDefinitely true! You also have the luxury of tweaking every line of code for a small system to get it perfect. It's also the reason for trying to break down larger systems into smaller, elegant components.