Live data from Hacker News

How good engineers write bad code at big companies

seangoedecke.com

31–40 of 333 posts

Re: How good engineers write bad code at big companies

#31
I think it's more that optimizing your hiring process for leetcode savants selects developers who prioritize algorithmic practice over everything else. They also deprioritize character over raw technical skill. But it turns out you need well rounded developers who are able to work with others, communicate well, and have taste. If your hiring process deprioritizes that, don't be surprised when the software produced is shite.

Re: How good engineers write bad code at big companies

#32
post #15

It’s always a trade off between raising the bar and making a deadline. The deadline always wins since the boss doesn’t know how to read code

Sadly a lot of engineers have been indoctrinated into this mindset and I have had to fight quite many battles to conceive my fellow engineers that missing a deadline is not the worst thing in the world.

"I love deadlines. I love the whooshing noise they make as they go by." ― Douglas Adams

Re: How good engineers write bad code at big companies

#33

I worked for a company writing Elixir code several years ago. Prior to my arrival, the ignorant architect had deployed Elixir in a way that broke the BEAM (which he viewed as "old and deprecated"). Furthermore, one of the "staff" engineers—instead of using private functions as they're intended—created a pattern of SomePublicModule and SomePublicModule.Private , where he placed all the "private" functions in the SomeP…

> had deployed Elixir in a way that broke the BEAM (which he viewed as "old and deprecated")

I'd love to hear more about this!

> instead of using private functions as they're intended—created a pattern of SomePublicModule and SomePublicModule.Private, where he placed all the "private" functions in the SomePublicModule.Private module as public functions so that he could "test them."

Yeah, this is weird; you can just put your tests in the PublicModule. Or you can just solve this by not testing your private code ;)

Re: How good engineers write bad code at big companies

#34
The other reason is the volume of the code being produced combined with the constant product changes. An innocent change like mixing two close but still different concepts can easily poison the whole codebase and take years to undo and may even be nearly impossible to fix if it propagates to external systems outside of direct control

Re: How good engineers write bad code at big companies

#35
post #26

> That’s a deliberate tradeoff. In my experience, while this line is often repeated, in practice it’s rarely really a “deliberate” tradeoff. Rather it’s mostly accidental.

I can believe it is deliberate at the top, I've certainly seen first hand in several orgs I've worked at.

My sense is that unless actively managed against, any org big enough to have a financial department and financial planning will work under assumption of fungibility.

Re: How good engineers write bad code at big companies

#36
I think, sadly, that's often "the job". My career has been good so far, all things considered, but I think it would probably be better if embracing that idea came more naturally to me.

One of my first strange and unpleasant realizations in transitioning from studying computer science to "working in the real world" came in a 1:1 meeting with my manager at my first job out of school. I was complaining about code quality both in the context of some of our existing codebases and some new code one of my peers (also a junior developer) had recently written. When the light bulb finally lit up in my naive little head, the question I asked my manager with a sense of horror and outrage was "... so you're saying they wrote bad code on purpose?". The painful thought was that I, too, would (or had already) found myself tasked with pushing code that I knew sucked, for reasons entirely unrelated to architecture or design or other purely "technical" constraints.

I used to fantasize about moving into a different software niche, maybe in safety critical systems, where correctness is more highly valued. But recently I'm coming to realize that the thing I crave (and miss from my school days) is the joy of the craft— something involving elegance and taste in a way that even the strictest standards of correctness doesn't necessitate.

I think for the most part, truly excellent code isn't something many businesses perceive themselves as needing (even if many practical benefits can flow from its virtues). And, probably, for many businesses, such indifference is right. So excellent code, where it exists, is probably more often "gotten away with", half-snuck in by stubborn engineers who are productive enough to burn time injecting some extra consideration and effort into their code, than it is commissioned by a business which understands that it wants good code.

Re: How good engineers write bad code at big companies

#37
what I see alot is that the syntax and overall code architecture is text book, but its the completely wrong approach that creates extremely complicated tech debt. All the code reviews will be on the syntax, and none on the big picture of the business problem, or whether the implementation is overcomplicated.

in the short run (1-2 years) there is no repercussion for this, but eventually making changes will be extremely risky and complicated. The individuals that built the software will lord over everyone else with their arcane knowledge of this big pile of junk

Re: How good engineers write bad code at big companies

#38
post #24

You have to realise there is a almost full complete disconnect between engineering and business value

Ime, a lot of the onus falls on Engineering and Product Management failing to make a case for why certain engineering decisions (eg. Investing in continual tech debt grooming) have business value.

The point of a business is to generate revenue. The point of employees is to do work that helps generate revenue. As such, any decision needs to ensure it has a business case aligned with revenue generation.

Good engineering hygine has significant business value such as in speeding up delivery of new features as well as keeping certain customers happy, but in a lot of cases there is an inability to communicate from either direction (eg. PMs not giving Eng full visibility into business decisions, and Eng not being able to explain why certain engineering choices have business value). If you cannot communicate why this matters, you aren't going to get it prioritized.

Unsurprisingly, at big organizations, communication can take the backseat because communication is hard and at a large company, there is some amount of complacency because the product is good enough.

Edit: Unsurprisingly got downvoted.

The only reason you are employed is to make value (which generally is measured in revenue generated). You are not paid $200k-$400k TCs to write pretty or a e s t h e t i c code. You can make a case for why that matters, but if you choose to bury your head in the sand and not make that case, I have no sympathy for you.

Re: How good engineers write bad code at big companies

#39
post #30
post #27

Earlier quoted context omitted.

That is, until planes fall from the sky.

It's popular to mock aerospace engineering, but it's usually quite robust. Even if people still sometimes make bad decisions.

And move slowly. So when things turn bad, they will be bad for a decade - or more. See Boeing.
Post reply on HN