Live data from Hacker News

Software engineers hate code

dancowell.com

31–40 of 235 posts

Re: Software engineers hate code

#31

This is like writing “mechanics hate bolts”. Yea, mechanics love to complain about metric and imperial sizes and when they don’t thread in correctly, but at the end of the day a good mechanic loves seeing a smooth running car. Similarly, a good software engineer loves it when they have a smooth running service. Updates work without hiccup and the system can be inspected to see how things are running. Having clean and…

"I hate writing. I love having written"

https://www.goodreads.com/quotes/57688-i-hate-writing-i-love...

Re: Software engineers hate code

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

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.

I love rehabbing legacy code. It's like furniture restoration for apps.

Re: Software engineers hate code

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

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.

I'm one of the persons who loves refactoring existing code. It's much easier to get started than writing something from scratch. I change a few bits, then I get more ideas on how the code can be further improved. I always try to consider the business value - is the a maintainability problem? Does the code need upgrades to reduce tech debt? Etc. Hard to sell this sort of work to PMs who just keep pushing for new features.

Re: Software engineers hate code

#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, perfecting it.

Re: Software engineers hate code

#35
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 consultants hate code. I've never ever seen one recommending the reuse of existing code - not once.

And it's understandable: They have nothing to gain from recommending reuse of existing code.

In the best case the code is good and everything else goes well and the client saves some money. If the consultant can not pull this of repeatedly their benefit will still be limited. The praise will be with the programers.

On the other hand, if the old code is bad or anything else goes wrong everyone will blame the consultant for the recommendation.

For the consultant it's a risk-return tradeoff that just always favors a rewrite from scratch.

[1] https://www.joelonsoftware.com/2000/04/06/things-you-should-...

Re: Software engineers hate code

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

[flagged]

Re: Software engineers hate code

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

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.

I always apply Chesterton's fence when working on existing systems. You don't get to add, remove, or change things before you understand what exists. That discovery is inherently exciting to me.

Re: Software engineers hate code

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

[flagged]

What use is this sort of pedantry? No project is greenfield unless you hand made the silicon?

Re: Software engineers hate code

#40

> Don't write new code when you can use, improve or fix what already exists. If you must write new code, write only what you need to get the job done. While the article resonates with me alot, I would like to, in the best spirit of the article, propose an addendum to that line: When modifying existing code, do a very careful cost-benefit analysis; On the one side is the cost of a rebuild. On the other side is the pro…

> when the predictions say, that, forseeably, the company will lose money down the line because we waited to long for a rebuild, it may be time to pitch that to whoever allocates resources.

Only developers who love greenfield or need a new framework on the CV would suggest a company could lose money by not rebuilding.

If the developers are not competent enough to write maintainable code or maintain existing code, then you will have exactly the same difficulties after the rebuild.

If they are competent enough to write maintainable code and maintain existing code, then you have no need for a rebuild. Just adapt and extend the existing code to meet the new requirements.

Post reply on HN