Live data from Hacker News

How terrible code gets written by sane people

chrismm.com

61–70 of 151 posts

Re: How terrible code gets written by sane people

#61
post #28
post #26

Earlier quoted context omitted.

I sympathize with this, but perhaps it is really more economical to write software like this in your company's case (?)

It appears that way short term, but long term, having a bad codebase can retard a company's growth through lack of scalability and maintainability (read easily add/remove/change features). Companies spend a hell of a lot of money for growth. If they don't know how to manage software development, then the software will nullify all that cost spend on growing, because the system can't handle it. I am truly amazed at how…

> It's simply old fashioned thinking. CEOs are typically older, and the current crop were trained before computers really proliferated business.

It's really not this at all. It's not a generational thing and it's not an old-fashioned thing. The ultimate rule of workplace dynamics is whether your position is seen as a cost center or a profit center. In software, most often your job is treated as a cost center.

My company is the third tech company from a repeat founder who is younger than me (he's 29) and was previously acquired by a huge tech company. He absolutely sees the work as I do as commodity and doesn't understand what I do or what its value is. I've built rock-solid, scalable systems, envisioned and built tools that will bring us more (and better clients) and saved my company hundreds of thousands of dollars in a year. If I don't fight for the projects I want to do and push back against bad ideas, I get tasked with essentially pointless "tech janitor" work.

I've encountered non-technical executives well into their 60s who deeply understand the value of tech. You just have to find people to work for that aren't idiots.

Re: How terrible code gets written by sane people

#62

Earlier quoted context omitted.

I think a lot of this sentiment overlooks the fact that in most cities the number of software companies is very limited - perhaps allowing one switch in a career if there are huge problems or conflicts, but certainly not enough to allow switching due to e.g poor development practices. What's worse, in these places the poor devs tend to stick around while talented ones leave because they either accept moving or they c…

you are removing a lot of personal responsibility from the guy who is looking for the job. If you are born in a 'bad' place (regardless of the reason for it being 'bad' - a violent/poor neighborhood, a city without hope for jobs, a small country-side town with no tech industry at all, etc. etc.) - you should be responsible for improving your life/moving to a better city/etc. to analogize from soccer: Messi plays at B…

I think a lot of what you are saying makes sense, but also at some age and family status (kids in schools etc) moving doesn't make sense any more, or has more downsides than one is trying to avoid.

Obviously one could have thought of this before marrying and putting kids in school in the town with one tech firm - but that doesn't make it any less a reality for a lot of people.

Saying "kids we have to move because dads colleagues refuse to do proper peer reviews" just doesn't taste right :)

Re: How terrible code gets written by sane people

#63
post #52

Earlier quoted context omitted.

What I've learned is that most companies that are really not in it for the long haul and just want to exit will pass the technical debt off to a much larger company that can supposedly shoulder the burdens of technical debt. The M&A process at large companies really don't look at how sustainable the codebase or infrastructure is - they only look at regulatory liabilities like super bad security practices and that's o…

Thanks, that was an insightful reply. It's like when the banks pushed off mortgage risk to the public market before the great recession. Companies accrue massive technical debt (risk), but push it on the buying company who either isn't competent enough to DD the software, or simply doesn't care. In the end, someone has to pay for that negligence, but it's like playing hot potato or musical chairs.

In hindsight, I think that the M&A process of companies is actually correctly aligned with their true costs. For most big enterprise "tech" companies, their biggest operating expenses aren't technologists at all - it's sales commissions (stock options are as a rule terrible for engineers at every old hat tech company). So instead of paying $4.2MM to acquire a customer or two, you acquire a tech start-up that already has the customers and the product people are mostly cogs - the technology itself is an afterthought. For the few companies where engineers are compensated like the sales folks in enterprise tech (about $300k+ up) it is now cheaper to acquire technology faster than to pay for engineers in-house to develop it - market fit is not a big deal because the growth model is easy to scale with minimal sales staffing costs (a luxury in business through and through).

As for the question of whom pays for the negligence of M&As in the tech sector, it's mostly shareholders rather than the US taxpayer at least. With HP, IBM, and others laying off employees faster than Macy's and Sears the negative outlook is baked into Wall Street's prognosis of increasingly lowered expectations.

Myself, I just wish I could slightly tweak index funds to exclude specific tech companies I know are complete garbage long-term (similar to cable unbundling trends). I know Vanguard probably won't do it for me but maybe the transaction costs will be low enough that excluding the junk companies that literally only exist on an index for being big and being a market leader is a net win.

Re: How terrible code gets written by sane people

#64

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…

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.

Re: How terrible code gets written by sane people

#65

Earlier quoted context omitted.

you are removing a lot of personal responsibility from the guy who is looking for the job. If you are born in a 'bad' place (regardless of the reason for it being 'bad' - a violent/poor neighborhood, a city without hope for jobs, a small country-side town with no tech industry at all, etc. etc.) - you should be responsible for improving your life/moving to a better city/etc. to analogize from soccer: Messi plays at B…

I think a lot of what you are saying makes sense, but also at some age and family status (kids in schools etc) moving doesn't make sense any more, or has more downsides than one is trying to avoid. Obviously one could have thought of this before marrying and putting kids in school in the town with one tech firm - but that doesn't make it any less a reality for a lot of people. Saying "kids we have to move because dad…

> Obviously one could have thought of this before marrying and putting kids in school in the town with one tech firm

this was going to be my response, but then you said it yourself :)

The more intelligent and self-responsible act (which is hard, i know) would be to move to a better place before making extremely serious life choices such as marrying and having kids. same goes for partner finding - don't marry a crazy partner and then say 'I married a crazy partner and now we have 2 mutual children. i cannot leave, i am stuck with this crazy person who is also the parent of my children.'

and i know it is hard to find a non-'crazy' employer and a non-'crazy' partner- but this should be your goal and target, shouldn't it ?

also, you get better as time goes by, even if you don't want to (as long as you are a bit intelligent) - bad companies/life partners will present themselves as red-flags on an interview/date . and it is your responsibility to detect those red flags .

(edit: refactor the last paragraph)

Re: How terrible code gets written by sane people

#66

One thing I've been thinking about more and more is code that's easy to delete. For example, we recently built a data pipeline that did a bunch of processing and wrote data to a SQL database at the end. For various reasons, there was an unscalable, quick way to implement the write, and a scalable, slow way to do it. We wanted to get the product to testing ASAP, so we chose the quick way initially. In order to make su…

I would agree with that goal and extend with a different anecdote that the articles "project knowledge" section should include documenting the weird requirements and unusual interfaces to other projects.

Many times I've run into five year old program logic, pondered why in the world anyone (me) would had done something that weird, and realized the project or tool requiring that weirdness was cancelled three years ago long enough that I've forgotten about it.

Its not as simple sometimes as just baking into the single function that talks to the API, sometimes it gets baked into weird corners of the application logic.

Re: How terrible code gets written by sane people

#67
post #64

Earlier quoted context omitted.

> 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…

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.

Re: How terrible code gets written by sane people

#68
"The authors created their own framework..."

I cannot say this was an issue here, but I can say that some of the worst messes I have seen have followed from this decision. In all such cases in my experience, it was not a technically justifiable decision, and I strongly suspect it was driven by developer ego and overconfidence.

The very worst included a roll-your-own language.

Re: How terrible code gets written by sane people

#69

"The authors created their own framework..." I cannot say this was an issue here, but I can say that some of the worst messes I have seen have followed from this decision. In all such cases in my experience, it was not a technically justifiable decision, and I strongly suspect it was driven by developer ego and overconfidence. The very worst included a roll-your-own language.

Eh, DSL scripting languages have a right to exist.

Re: How terrible code gets written by sane people

#70
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.

Find another employer. Then negotiate from strength.
Post reply on HN