News for hackers. Stuff that matters.
Re:Is Clean Code Necessary? by maze-le on Tuesday August 09, 2016 @06:04AM (#12253550)
> If you do backend, the user doesn't give a shit about your clean code

It's not about the user. Coding in a 'clean' way is something you do for your colleagues and maybe future colleagues, who will have to maintain and upgrade your software in the future.

> so sometimes it's a trade-off in deciding your approach knowing the lifetime requirements and maintability

I have seen quite some hacks that were intended as 'one-time-only' and 'we-refactor-this-later' solutions. I don't think any of these trade-offs payed out in the end. The proper work to refactor crappy code and reintegrate it into the system took a whole lot of time longer than implementing it correctly in the first place.

The only situation where hacks like this are acceptable in my opinion are 'one-time-only' prototypes (where the prototype code does not find its way back into the codebase), where certain features are shown to a customer, and the rest are mockups.

Re:Is Clean Code Necessary? by warcode on Tuesday August 09, 2016 @06:15AM (#12253589)
Often I find that clean code is something I do for my future self too. Having some external factor break your algorithm and coming back to multiple nested loops and "i,j,k,l,x,y" variable names makes it take way too long to fix.
Re:Is Clean Code Necessary? by DonHopkins on Tuesday August 09, 2016 @08:56AM (#12254143)
Oh cringe. Please don't use "l" as a loop index! Don't use it for anything! Make it go away!
Re:Is Clean Code Necessary? by exclusiv on Tuesday August 09, 2016 @03:13PM (#12257054)
Yes it is about the end user. They don't care about your backend code. They want it to work and for it to perform. Your cleaner code means nothing to the user.

Sometimes you have to put more time into frontend and you're up against a tight deadline. I'd opt for the UX in most circumstances.

You're assuming that there are colleagues to work on it and that it will live indefinitely.

Many projects, esp. those related to marketing, have a definite lifetime.

You also mention prototypes as another use-case.

Cleaner code as directed by the article is not always necessary.