Bob Carpenter pointed me to this wonderful presentation by Jeff Soules.
Or if you just want to read the slides, they’re right here.
These slides are just full of great advice. Here are the sections of the presentation:
– Human-readable?
– The barrier to readability
– Naming things
– Comments and documentation
– Writing better functions
– Practices outside code
I recommend you read the whole thing. It will likely improve your work and, if not, it’s still enjoyable to read and will make you think.
I really think writing python/c++ etc is going to be niche like assembly the future. My projects are now totally restructured to be easy for LLMs to work with, debug, and test. Interpreting logs and automated integration testing has become so much easier you can rely on that rather than understanding the code logic. I’ve barely written or read any code in months, and just started down this path last May. Its only going to get better from here too.
That said, looking through the slides most is good practice for LLMs to follow as well. I wonder if there will be llm-optimized languages in the future, or instead the most common languages today will become too ingrained to displace (due to the amount of training data). Eg, I largely stopped using julia because opus is just less familiar with that language.
Pascal. End of Story!. (Niklaus Wirth, RIP)
Reading the slides, these are all great suggestions. I will add one more, which is to look up some reputable style guide for your particular language. Following convention goes a long way to reducing reader surprise and reader apprehension. (“Why is this one line over 500 characters long” and “why is this the only variable in this whole suite using a hybrid `Camel_snakeName_convention`” are the kinds of thing that will make your future readers read muuuuch more slowly/warily.)
And best of all, most style guides have standard linter programs you can run cheaply and locally the way you would your unit test suites to spot and fix violations. Here’s one for Python: https://docs.astral.sh/ruff/