Live data from Hacker News

Software engineers hate code

dancowell.com

141–150 of 235 posts

Re: Software engineers hate code

#141
post #8

> This is the best-kept secret of the software engineering profession: engineers hate code. Especially code written by other people. It's why they love working on greenfield projects so much. No code, no maintenance, no headaches! Except that I've met lots of engineers who were the opposite. They hate greenfield projects and prefer maintaining existing code. I noticed this broad division of personality early in my ca…

Yep I have a hard time with a blank page and love the flywheel of incrementally iterating on a working baseline. I didn't realize this until very recently; I think I had internalized "well everyone loves greenfield projects, so I must too".

Re: Software engineers hate code

#142
post #105

Using a house analogy, I don't hate other people's houses. I hate it when other people blow a hole in the side of my house to put in a new window. They blasted a hole through two walls because it was the quickest way. Then just taped some plastic over the second hole. The project manager said it's still summer and we don't really need that wall at the moment. I know who will have to fix the wall when the winter comes…

A follow up analogy is more typical in my experience. The foreman says that we should reinforce the walls. The PMP certified 6 sigma ninja Project Manager insists that the reinforced walls aren't necessary because no one is going to put anything on the wall. We will revisit the wall later when we the city tells us to enforce new wall codes. No more than 6 months later a contractor tried to add a shelf to the unenforc…

this is also not a good analogy because building codes will often just require 20" O.C or 16" O.C studs and those are in the plans- drafted by a person that designed the home (self, architect, drafter). Reinforcements for shelves or cabinets are also part of the code for kitchen walls. Those are not to be expected in every location in the house.

The framers are locked into the house plans as far as stud distances and special framing members that are specified. County inspections will make sure that's all there.

House construction is far, far more standardized and strict that programmers coding crap code. It's not a good analogy.

Re: Software engineers hate code

#144

Earlier quoted context omitted.

But do they actually want to read the code on the existing project, or just write new code adding to it? Nothing is universal, but I think often the latter.

Well, I'm currently trying to reverse engineer something done by an open source SaaS offering, to patch a tool written by another person which works with that part I'm trying to reverse. I just wanted to use the tool without any effort, but I have to understand the interface and patch the tool to make it work again. I'm not complaining. Just wanted to add a data point for the former part of your comment.

And you enjoy and prefer this kind of work? OK! I guess occasionally I enjoy this kind of work too, when I'm in an environment with reasonable expectations of how challenging it will be/long it will take, when I have room for it.

Re: Software engineers hate code

#145

Using a house analogy, I don't hate other people's houses. I hate it when other people blow a hole in the side of my house to put in a new window. They blasted a hole through two walls because it was the quickest way. Then just taped some plastic over the second hole. The project manager said it's still summer and we don't really need that wall at the moment. I know who will have to fix the wall when the winter comes…

it's not a good analogy when it's not realistic. How often are people walking down the street blasting holes in peoples houses to add windows?

My house has a hole where a cable tv contractor inserted a coax line that they ran all the way around the house, from the service drop to right outside the living room. This despite the house being wired with coax internally, including between these two points. There was a disconnect where someone had replaced a tee with a coupler some years ago, but this was easy for me to find and fix.

Years later I spoke with an ISP about an install and they proposed exactly the same thing. I think people do this a lot.

Re: Software engineers hate code

#146
post #77

I'm not so sure about software engineers. We often value working solutions even if the code base is not perfect. I certainly do and I very much agree with Joel Spolsky in his classic: " Things You Should Never Do, Part I "They did it by making the single worst strategic mistake that any software company can make: They decided to rewrite the code from scratch." [1] (Emphasis his.) Where I'm 100% sure is that consultan…

Im a big advocate of rewriting code from scratch. Because on a rewrite you have a much better starting point. You have a (mostly) working solution, you understand the problem much better than on the first attempt, you have some tests and some data. Most of the time you don't rewrite it 100% from scratch, often you can copy a lot of code from the old solution. To utilize all those benefits you can't rewrite everything…

What you are describing is called "refactor" not "rewrite". Incremental changes that use existing code don't allow for great changes in the architecture.

I'm not against rewrites, sometimes the company grew so much that you need to start from scratch and rethink given your current knowledge. Or you started with a low fidelity prototype and you rewrite to create a production ready feature, without the crufts in the design you had when you started.

Re: Software engineers hate code

#147
> The more code that gets written, the more things there are to break, and more of those precious hours will be taken up by maintenance

Can definitely relate - PRs with lots of new code immediately trigger alarm bells for me, and while reading through all that new code ain't necessarily fun, coming up with ways to reduce it is a worthwhile and rewarding challenge - unfortunately you're then stuck with the thankless task of convincing the author why they should throw away all their hard work.

Re: Software engineers hate code

#148
post #34
post #8

> This is the best-kept secret of the software engineering profession: engineers hate code. Especially code written by other people. It's why they love working on greenfield projects so much. No code, no maintenance, no headaches! Except that I've met lots of engineers who were the opposite. They hate greenfield projects and prefer maintaining existing code. I noticed this broad division of personality early in my ca…

I am one of those who prefer working on existing code. I like making things better, understanding how a code works is thrill, adding new features on existing premises. I am also an amateur fiction writer, and I notice the same thing in it. I like planning, but the first draft writing is a chore to me. An effort to vomit all my ideas as words. Then, I love rewriting. Revisiting what I wrote and improving it, fixing it…

Some people are editors, some people are authors.

Some authors really need an editor.

Re: Software engineers hate code

#149
I love code (similar to how an artist might love a type of paint brush), but what I don't love is code that's designed to impress or an attempt to show off hOw SmArT i Am. More often than not, that code isn't the most efficient or the cleanest, it's just a contraption that looks impressive to an untrained eye. That type of code is guaranteed to turn a code base into a mess—all for the sake of someone's ego.

My preferred heuristic is: "will I or any other developer be able to understand this—quickly—in six months (preferably without comments)?" If the answer is "no," refactor using a different approach.

Re: Software engineers hate code

#150

Using a house analogy, I don't hate other people's houses. I hate it when other people blow a hole in the side of my house to put in a new window. They blasted a hole through two walls because it was the quickest way. Then just taped some plastic over the second hole. The project manager said it's still summer and we don't really need that wall at the moment. I know who will have to fix the wall when the winter comes…

it's not a good analogy when it's not realistic. How often are people walking down the street blasting holes in peoples houses to add windows?

It's a good analogy if the reader understands it, and it is accurate.

Both are true here. People don't get away with quite that level of nonsense with buildings because even laypeople can see all the essentials, why it would be bad, who to blame if it did happen, etc. So it never happens and doesn't need any kind of illustraing analogy to explain it to anyone.

That DOES happen all the time in software and it's invisible to almost everyone including your own bosses, and does need some kind of analogy to illustrate what's wrong about it, and how wrong, and the nature of the wrongness.

Any other example that actually ever happens, would just be some other equally opaque phenomenon from some other esoteric field, and would by definition be useless as an analogy.

The whole point is so that anyone can see it and conclude "that would be crazy, outrageous, intolerable". Of course it never actually happens.

Post reply on HN