News for hackers. Stuff that matters.
Re:What will programming look like in 2020? (2012) by fermuch on Saturday September 25, 2021 @09:24PM (#28657584)
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.
Re:What will programming look like in 2020? (2012) by cube00 on Sunday September 26, 2021 @01:35AM (#28658669)
> 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)

Re:What will programming look like in 2020? (2012) by Jensson on Sunday September 26, 2021 @01:15AM (#28658588)
Sounds like a technical debt generator. I feel for the devs who will have to clean up the legacy from this in 10 years.
Re:What will programming look like in 2020? (2012) by bserge on Sunday September 26, 2021 @05:56AM (#28659615)
Sounds like a job creator :P
Re:What will programming look like in 2020? (2012) by nsoonhui on Saturday September 25, 2021 @11:47PM (#28658238)
But 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?
Re:What will programming look like in 2020? (2012) by tobr on Sunday September 26, 2021 @01:17AM (#28658595)
> 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.

Re:What will programming look like in 2020? (2012) by jrochkind1 on Sunday September 26, 2021 @01:57AM (#28658745)
Can you clarify if this is from your personal experience using copilot, you are using it to do those things, successfully, in your routine work?
Re:What will programming look like in 2020? (2012) by pharmakom on Sunday September 26, 2021 @04:17AM (#28659257)
Sounds like a really limited programming language if there aren’t smarter ways around this in the code.