Comment by kstenerud

1 year ago

Hmm... This might be where my process differs, I guess?

In my normal process (not exploratory work), I don't write a single character until I'm sure of how the thing I'm making will fit into the overall design (such as the API it will have, how it will interact with other components, its placement in the overall architecture, what its responsibilities are and how to structure it so as to minimize potential confusion and make what it is doing clear to a reader, mentally walking through code paths to make sure other components can use it as intended, etc). All of that happens in my head, not in an editor (although I might have a few notes jotted down if it's a big change or a whole new feature).

Then, once I know exactly what I intend to write, I just dump it all down into the source files. 80% of it is already "finished code" in that I won't be changing it again unless I've made a serious design error.

My process is in that case quite different. When working in Python I’ll typically write thousands of tiny snippets of code directly in the interpreter to check that simple things work as I expect. Those are gradually distilled into parts of a .py file with accompanying pytest tests. Then those are refactored into classes and separate files as needed. Overall, I think I type and edit way more than you :)