3 ms·
The simplest version (and by my yard-stick is the de-facto measure of "readability") I've seen was at Pycon 2012 (http://azd325.github.com/Python/2012/03/23/pyc
by agentultra 15y ago
The simplest version (and by my yard-stick is the de-facto measure of "readability") I've seen was at Pycon 2012 (http://azd325.github.com/Python/2012/03/23/pycon-2012-stop-writing-classes/ http://azd325.github.com/Python/2012/03/23/pycon-2012-stop-w... around 17:30). The main take away that is demonstrated is that classes aren't necessary to write this program but it's the first thing most programmers reach for when implementing it.
Another thing I find a lot these days are an abundance of comments that explain what the code already explains. Some of the comments are good in this example, but many of them explain what I would know if I just read the code.
However, I do like the use of color! A great demonstration. Good work. :)
- gsabo 15y agoI took your comment to heart and removed most of the comments in the source. I found the video inspiring (and infuriating) - just more proof that I'm a long way from unlearning my OO design tendencies. To start, I made the Neighborhood class a function instead. Thanks for sharing.