3 ms·
I have the same impression. Reading the code, he uses global variables [1], obscure variable (k, bw, fw, x) and module names ("pal.py" instead of "palindromes.p
by hk__2 3y ago
I have the same impression. Reading the code, he uses global variables [1], obscure variable (k, bw, fw, x) and module names ("pal.py" instead of "palindromes.py"), doesn’t respect conventions about naming in general (uppercase arguments [2], which even the GitHub syntax highlighter is confused about). This feels like code you write for yourself to play with Python and don’t plan to read later.
Some parts of the code feel like what I would expect from a junior dev who started learning the language a couple weeks ago.
[1]: https://github.com/norvig/pytudes/blob/952675ffc70f3632e70a77a5c529fec95dc380bc/py/pal.py#L24 https://github.com/norvig/pytudes/blob/952675ffc70f3632e70a7...
[2]: https://github.com/norvig/pytudes/blob/952675ffc70f3632e70a77a5c529fec95dc380bc/py/sudoku.py#L14 https://github.com/norvig/pytudes/blob/952675ffc70f3632e70a7...
- fsociety 3y agoWhen your code is under 200 LOC and not expected to be maintained for the next 10 years.. then a lot of the things you just mentioned don’t matter as much. This is not for running in an enterprise but for exercising the brain.
- hk__2 3y ago> When your code is under 200 LOC and not expected to be maintained for the next 10 years.. then a lot of the things you just mentioned don’t matter as much. This is not for running in an enterprise but for exercising the brain. The things I mentioned do matter in any situation. If you don’t take good habits when you exercise your brain, you won’t take them when you code "for real". In addition to that, this repository is not just to exercise the brain of the author, but to serve as example code for others to read it; it has a README and most functions have a docstring.