News for hackers. Stuff that matters.
Re:How I became a better programmer (2017) by kovac on Tuesday March 24, 2020 @09:43PM (#22681208)
Not to be rude or anything but if you continue down this road productivity might be the only thing going for you and you'll soon realise you are the only one who can work with your code.

Substitute software engineering with any other engineering descipline with "I stopped worrying about best practices" and you will be able to see what's wrong with your approach. But then again, if it's php, your domain doesn't require too much care.

Re:How I became a better programmer (2017) by readme on Tuesday March 24, 2020 @10:12PM (#22681376)
Exactly. I had coworkers like this, and their code was impossible to understand. To make a simple change to it, it would require days of refactoring just to know you weren't going to introduce a bug.

It's not being more productive, it just seems that you're getting things done faster because you're taking out a loan on the quality of your software (i.e. technical debt) with every line you write.

Re:How I became a better programmer (2017) by kovac on Tuesday March 24, 2020 @11:03PM (#22681605)
"It's not being more productive, it just seems that you're getting things done faster because you're taking out a loan on the quality of your software (i.e. technical debt) with every line you write." This. When someone does this in a hurry or because they didn't know better, it's understandable. But when someone thinks that this style of working is superior, that's a huge problem.
Re:How I became a better programmer (2017) by Drakar1903 on Wednesday March 25, 2020 @03:40AM (#22682691)
Paying down tech debt is like brushing your teeth, if you don't do it regularly, you'll end up with more pain and a higher bill at the end.
Re:How I became a better programmer (2017) by gonzo41 on Tuesday March 24, 2020 @11:02PM (#22681602)
How old is the software and what's the change that needed. If the software is past it's ROI and changes are happening due to scope creep then days of refactoring isn't refactoring it's just days of dev work against new requirements. It's just happening on an old product.

Management may be willing to spend that time and not be unhappy with what you perceive as time wasted because they have seen greater than expected ROI on the product already so it's not a loss to them.

Re:How I became a better programmer (2017) by bcrosby95 on Wednesday March 25, 2020 @01:48AM (#22682275)
I've ran into these problems with software that wasn't even released yet. Some of these practices will likely bite you in the ass in months or even weeks, not years.
Re:How I became a better programmer (2017) by fiddlerwoaroof on Wednesday March 25, 2020 @02:05AM (#22682326)
They generally get the next person to work in the code without understanding what was going through your head: and 90% of the time, that’s you, three days from now.
Re:How I became a better programmer (2017) by LandR on Wednesday March 25, 2020 @09:44AM (#22684433)
I like Joe Armstrongs 7 deadly sins.

1. Code you wrote you cannot understand a week later - no comments.

2. Code with no specifications.

3. Code that is shipped as soon as it runs and before it's beautiful.

4. Code with added features.

5. Code that is very very very fast and very obscure.

6. Code that is not beautiful.

7. Code you wrote without understanding the problem

Re:How I became a better programmer (2017) by CraneWorm on Wednesday March 25, 2020 @07:53AM (#22683704)
I agree with your point but I find the dig at programming in PHP devaluating it.
Re:How I became a better programmer (2017) by kovac on Wednesday March 25, 2020 @10:07AM (#22684623)
I apologise for that. Actually that wasn't my intention. I meant to type "May be it doesn't require too much care" but I was typing on a mobile and I missed it.

I do not look down on any programming language. What I meant there was that php is often used for Web applications. Not server side performant critical or security critical components or systems programming. There's also a practical reality that some kind of coding doesn't require too much regulation on how we need to write code. I realised that bit came out wrong but I couldn't edit it.

Re:How I became a better programmer (2017) by abiogenesis on Wednesday March 25, 2020 @02:00AM (#22682315)
Although I agree in general, a 10 line for loop is usually more readable than a clever one liner.
Re:How I became a better programmer (2017) by collyw on Wednesday March 25, 2020 @09:51AM (#22684485)
Sure but 10 lines is often more places for bugs to hide.
Re:How I became a better programmer (2017) by gryz on Wednesday March 25, 2020 @10:42PM (#22690403)
If it is decomposed one-liner -- then likely not often
Re:How I became a better programmer (2017) by yakshaving_jgt on Friday March 27, 2020 @01:31AM (#22700633)
What about a dumb one liner? Or, you know, using HOFs.