| Semi-related thought~ I find myself often dreaming about the AI-assisted development processes of the future. I'll frequently be writing code and start thinking "this task I'm doing is pretty formulaic and constrained-- it should be automatable someday, even if we haven't figured out how yet." Examples: 1. I memoized the arguments for a util function. Repeat this on the very similar functions defined alongside it. 2. I need to put a wrapper component around six similar components. Just do it for me after seeing me do it once. 3. I imported a new logging mechanism and called a specific method from it in one of my class's methods. Repeat for four similar classes. Basically I want a "repeat after me" functionality that can intelligently infer which part of thing I just did is generic and can thus be replaced with the next item in the series. In a dream future it would also infer what the next items in the series are. I haven't a clue how such a thing could be created though, or I would already be on it myself. It would have to understand the code not just syntactically but conceptually. God it would make development less tedious though. The difference between today and that future is the same as the difference between today and the days of punchcards. |
The things you mentioned all seem to yield to the decorator pattern.
Creating the right abstraction (instead of using autocomplete) would benefit future collaborators who may not have access to the same autocomplete functionality.