Live data from Hacker News

How terrible code gets written by sane people

chrismm.com

81–90 of 151 posts

Re: How terrible code gets written by sane people

#81
post #38

Honestly, I think the best developers are not the ones that write beautiful code and put quality above everything else. The best ones are the ones that can push out a solution given too little time and given a (maybe self inflicted) bad code base. Because that's real life, and not the pony farm. Money trumps everything else in capitalism. Getting money means paying your bills today. And even more so than skill, quali…

> The best ones are the ones that can push out a solution given too little time and given a (maybe self inflicted) bad code base. If every open source project was developed by those principles, all high and mighty web companies would collapse. Good work is being done , but it's for free. EDIT: You're right of course about the reality in the parasitic companies.

Sorry to disappoint. But despite the rare exception here and there most open source development is either paid or quickly forgotten. If I put into google "Linus Torvalds income" the first sentence reads:

"Finnish-American software engineer and hacker Linus Torvalds has as estimated net worth of $150 million and an estimated annual salary of $10 million"

Money.

Re: How terrible code gets written by sane people

#82
post #38

Honestly, I think the best developers are not the ones that write beautiful code and put quality above everything else. The best ones are the ones that can push out a solution given too little time and given a (maybe self inflicted) bad code base. Because that's real life, and not the pony farm. Money trumps everything else in capitalism. Getting money means paying your bills today. And even more so than skill, quali…

I mostly agree with your top line. Code "beauty" and "quality" are not objective measures, and there are plenty of devs out there who are obsessed with their own interpretation of those ideals to the point that it inhibits their ability to ship. However there is an existential danger for management to embrace this philosophy. The problem is the incentives are already naturally aligned to ship today, and problems disc…

The funny thing though is that tomorrow will resolve itself by itself. If the next guy finds the code too unworkable it will get replaced or the company dies out. Either event is not really a problem. Somewhere money is found to pay the replacement, people find new jobs, new companies take up space opened by other companies dying.

Everything else comes from the need to pay the bills. What does your landlord say if you don't pay your rent? What do you say if your boss doesn't pay you? It's not a management philosophy it's people trying to pay you and themselves. And even that may fail one day. You're probably doing the same, when you are like most people going to work every day despite having other quality ways to spend your time, e.g., reading a great book.

Re: How terrible code gets written by sane people

#83

I like the article but I found the implied solution a little humorous. Just hire devs who are great coders, great communicators, stubborn enough to push back against upper management, good hearted enough to sacrificed their own KPIs to focus on the success of their project, and massochistic enough to stick it out at an obviously poorly run project. Good luck Side note, for 15 years of experience the project doesn't s…

> Just hire devs who are great coders, great communicators, stubborn enough to push back against upper management, good hearted enough to sacrificed their own KPIs to focus on the success of their project, and masochistic enough to stick it out at an obviously poorly run project. This is a pretty close description of the positions I find myself in as a dev and I don't think this combination of qualities makes me more…

Also makes you a target for layoff rounds. The yes men are always safe. You should have your finances sorted out if you plan to stick to your principles.

Re: How terrible code gets written by sane people

#84

I like the article but I found the implied solution a little humorous. Just hire devs who are great coders, great communicators, stubborn enough to push back against upper management, good hearted enough to sacrificed their own KPIs to focus on the success of their project, and massochistic enough to stick it out at an obviously poorly run project. Good luck Side note, for 15 years of experience the project doesn't s…

The irony is that some of those qualities are probably more likely to get you fired rather than valued.

Re: How terrible code gets written by sane people

#86
post #51

It feels like people are focusing on bad conditions and unreasonable deadlines, and not the idea that in the real world smart people under execellent conditions do this very, very frequently. I've worked for long periods of time in 3 codebases that were over 2 million loc in my career, all had great conditions, all had very smart people. Those are not huge codebases by any standard, and yet all 3 had people talking a…

> My theory is that all software eventually becomes difficult to maintain and full of warts, regardless of smartness, regardless of conditions. I agree. I think there's a lot of emphasis on preventing bad code from existing. But if you believe some bad code is inevitable, then it's more important to make it easy to fix when it happens. By default, good code tends to be modular and easy to replace, while bad code is e…

> I agree. I think there's a lot of emphasis on preventing bad code from existing. But if you believe some bad code is inevitable, then it's more important to make it easy to fix when it happens.

Indeed, what matters isn't writing bad code, but doing so in a way that affects the whole codebase (whether through coupling or by volume). Accepting that bad code happens helps a lot in locking it down behind containment measures, both in space and time. I can liberally accept bad code as long as it doesn't imply bad architecture, so that it's easily removable and understandable, but I'm hell bent on refusing any form that means we can't dig ourselves out of a hole we've dug ourselves into (this includes slowly drifting yourself into a hellhole by accretion, bad code must come with an expiration date, which means immediately creating an issue in your favourite bug tracker upon commit/merge). Decoupling is key, and duplication is often needed to see the true generalisation patterns emerge, not the ones you expect to be there sometime in the future[0].

[0]: noop-noop-noop maneuver (video+slides) http://www.thedotpost.com/2016/10/katrina-owen-the-scandalou...

Re: How terrible code gets written by sane people

#87
post #64

Earlier quoted context omitted.

It probably won't, because most of that isn't predictable (by the interviewer) at interview time. It could make you more valuable in your current job, though.

invaluable, but they won't kick me more money. I asked.

Then, not invaluable. :-/

Re: How terrible code gets written by sane people

#88
post #81

Earlier quoted context omitted.

> The best ones are the ones that can push out a solution given too little time and given a (maybe self inflicted) bad code base. If every open source project was developed by those principles, all high and mighty web companies would collapse. Good work is being done , but it's for free. EDIT: You're right of course about the reality in the parasitic companies.

Sorry to disappoint. But despite the rare exception here and there most open source development is either paid or quickly forgotten. If I put into google "Linus Torvalds income" the first sentence reads: "Finnish-American software engineer and hacker Linus Torvalds has as estimated net worth of $150 million and an estimated annual salary of $10 million" Money.

The man's name is "Linus" and outliers aren't good examples. Also, he has mostly been merging other people's work for quite some time.

CPython for example is mostly developed for free.

Re: How terrible code gets written by sane people

#89
post #84

I like the article but I found the implied solution a little humorous. Just hire devs who are great coders, great communicators, stubborn enough to push back against upper management, good hearted enough to sacrificed their own KPIs to focus on the success of their project, and massochistic enough to stick it out at an obviously poorly run project. Good luck Side note, for 15 years of experience the project doesn't s…

The irony is that some of those qualities are probably more likely to get you fired rather than valued.

"It is difficult to get a man to understand something, when his salary depends upon his not understanding it!"

- Upton Sinclair

I've experienced this firsthand. Pushing for better development tooling and fixing problems instead of pushing features gets you a pink slip. Part of the reason I run my own shop now.

It turns out the people most involved in estimating don't like it when you say that most estimates don't deliver any value.

Re: How terrible code gets written by sane people

#90

Earlier quoted context omitted.

invaluable, but they won't kick me more money. I asked.

Then, not invaluable. :-/

They fired my whole team except for me. They would rather have fired me too, I'm sure.

I get what you're saying though.

Post reply on HN