2 ms·
> You will organize the codebase in a way AI can handle it, make architectural decisions and organize the workflow around AI doing the actual coding. This migh
by KronisLV 2y ago
> You will organize the codebase in a way AI can handle it, make architectural decisions and organize the workflow around AI doing the actual coding.
This might sound silly, but I feel like it has the potential of resulting in more readable code.
There have been times where I split up a 300 line function just so it’s easier to feed into an LLM. Same for extracting things into smaller files and classes that individually do more limited things, so they’re easier to change.
There have been times where I pay attention to the grouping of code blocks more or even leave a few comments along the way explaining the intent so LLM autocomplete would work better.
I also pay more attention to naming (which does sometimes end up more Java-like but is clear, even if verbose) and try to make the code simple enough to generate tests with less manual input.
Somehow when you understand the code yourself and so can your colleagues (for the most part) a lot of people won’t care that much. But when the AI tools stumble and actually start slowing you down instead of speeding you up and the readability of your code results in a more positive experience (subjectively) then suddenly it’s a no brainer.
- DJBunnies 2y agoYou could have done all that for your peers instead.
- KronisLV 2y agoI already do when it makes sense… except if you look at messy code and nobody else seems to care, there might be better things to spend your time on (some of which might involve finding an environment where people care about all of that by default). But now, to actually improve my own productivity a lot? I’ll dig in more often, even in messy legacy code. Of course, if some convoluted LoginView breaks due to refactoring gone wrong, that is still my responsibility.