3 ms·
Writing boring chores or repetitive code is amazing. Need to handle all cases in a case in pretty much the same way but changing only one thing? Write the first
by fermuch 5y ago
Writing boring chores or repetitive code is amazing. Need to handle all cases in a case in pretty much the same way but changing only one thing? Write the first one, the rest is auto coded perfectly.
- nsoonhui 5y agoBut isn't much better to just manually code it into reusable function and use it repeatedly, instead of letting AI generates all the boilerplate code and causes maintenance headache down the road?
- tobr 5y ago> boring chores or repetitive code > manually code it into reusable function and use it repeatedly Refactoring every place where you do x into a reusable function that does x is a boring repetitive chore.
- Jensson 5y agoSounds like a technical debt generator. I feel for the devs who will have to clean up the legacy from this in 10 years.
- bserge 5y agoSounds like a job creator :P
- cube00 5y ago> Need to handle all cases in a case in pretty much the same way but changing only one thing? Write the first one, the rest is auto coded perfectly. As someone who has suffered though inheriting a code base of excessive copy/paste with things done "pretty much the same way but changing only one thing" it's a nightmare to take it to diff and try and refactor out the common code. In my case I had to fix a bug in their copy/paste mess and found six separate copies of a whole functions worth of code duplicated. I suspect part of the reason is for the initial developer it's a great feeling to churn out tons of code and it all kind of works without having to think how you make a block of code generic (avoiding temptation to just pass in a global state struct and dealing with function pointers in the worst cases etc) but having suffered the after effects, I implore you, PLEASE don't repeat yourself (DRY)
- jrochkind1 5y agoCan you clarify if this is from your personal experience using copilot, you are using it to do those things, successfully, in your routine work?
- pharmakom 5y agoSounds like a really limited programming language if there aren’t smarter ways around this in the code.