3 ms·
Remembering the core syntax and api's are like magic for productivity, you no longer think in words or variables, you think in data structures and how different
by z3t4 5y ago
Remembering the core syntax and api's are like magic for productivity, you no longer think in words or variables, you think in data structures and how different endpoints and functions interact, your hands type the code via muscle memory.
Only problem is that the code can sometimes become a bit terse if you do not have an autocomplete, a dumb autocomplete is often enough though.
- spacechild1 5y agoDoes this also work for large code bases? In my experience it doesn't, but maybe my memory is just not very good :-)
- z3t4 5y agoIt depends how you manage scope. When there are thousands of global variables it will be impossible, but if the language (like Dlang) allows local scoping of imports it's manageable... If you are very strict about what is an actual dependency or just a magic global. The rule is that if the import can be used in other programs/code-bases you can import it. But if it's just a way to get around using global variables you should rethink the architecture. ... Yes IDE's will find the definitions in your spaghetti code-base, but then they become part of a problem loop where the code-base would be unmanageable without the IDE. Namespaces are also a good solution to use instead of globals or magic globals. But it might become a category theory problem like where in the hierarchical structure you should put something. The best solution of course is to keep the code base small :)
- spacechild1 5y agoHmmm, the whole program still consists of hundreds of functions and I would have to memorize all of them... I don't just work on a single module, I work on the whole code base (open source development). > The best solution of course is to keep the code base small :) Hehe, that's the trick. Unfortunately, I came late to the party.
- iostream23 5y agoWell. Typically I review the code and say “what kind of twisted sadistic prick wrote this” and then realize that it was me 5 months ago. It’s amazing the level a detail a person can drill into when it’s the locus of focus, and amazing how quickly context is forgotten. Stream of consciousness audio notes would arguably be more useful in such settings than code completion, as the muscle memory is still there, it’s merely the “why” that disappears