Show HN: Life4.py – visualizes John Conway's Game of Life in a command terminal(github.com/jazzfan2)
2 points by robtoscani 7 hours ago | 2 comments
- zahlman 6 hours agoIt's good that you've come back to the project, but you might want to do something about your project tooling, since every commit has the message "First commit".
As a style hint, also consider breaking the code into functions, instead of using triple-quoted strings (these are generally not docstrings!) to label "sections" of the code. (Even where you don't extract a separate function, that's what comments are for; the otherwise-blank lines with a # are also strange.)
Using a separate shell process for the camera control is inconvenient, and as written isn't going to work on others' machines (in the Python code, you've hard-coded an absolute path to the script in your home directory). I guess this is to avoid thinking about unbuffered I/O in Python; it's really not hard to do that on Linux (there's a curses binding in the standard library; or you can do just the "switch to raw mode" part using https://docs.python.org/3/library/termios.html and call sys.stdin.read (or perhaps sys.stdin.buffer.read) directly.)
[-]- robtoscani 3 hours agoThanks for your comments, Iĺl try to implement these suggestions in a next version of this program, I appreciate your input!