News for hackers. Stuff that matters.
Re:Things I’ve learned in my 20 years as a software engineer by nonima on Friday October 08, 2021 @06:44AM (#28797738)
Software is whatever you want it to be. I can write software that is not for other humans. That's the most fun part of software engineering to me, when you don't care about the users and just do it just for the fun of doing it.
Re:Things I’ve learned in my 20 years as a software engineer by goto11 on Friday October 08, 2021 @09:06AM (#28798794)
Almost any advice is useless if you write code purely for your own enjoyment. This is why the context is so important. If you enjoy writing convoluted unmaintainable useless code then who is to stop you? Just understand most advice does not apply to your context.

Most software development advice tacitly assume you want to write code which works and is long-term maintainable (potentially by someone other than yourself) and which fulfills some purpose beyond just the fun of writing the code.

Re:Things I’ve learned in my 20 years as a software engineer by matheusmoreira on Friday October 08, 2021 @02:58PM (#28802790)
> If you enjoy writing convoluted unmaintainable useless code then who is to stop you?

Does anyone actually do this? I think it's the opposite.

I've spent truly absurd amounts of time thinking about how to do things properly. I read books, read other people's code, read programming language implementations, I just read and learn as much as I possibly can before I even start doing anything. I want my code to be right. I want it to represent the truth of how the world works.

In a professional context where people actually have deadlines, working code is usually enough to satisfy them. How complex and maintainable it is tends to be a lesser concern, to be addressed at a later time or never.

Re:Things I’ve learned in my 20 years as a software engineer by warkdarrior on Friday October 08, 2021 @04:18PM (#28803714)
> > If you enjoy writing convoluted unmaintainable useless code then who is to stop you?

> Does anyone actually do this? I think it's the opposite.

Code style, structure, and design are more of an art than a science, so different people will have wildly different opinions (extreme examples notwithstanding).

Re:Things I’ve learned in my 20 years as a software engineer by goto11 on Saturday October 09, 2021 @06:47AM (#28808682)
I don't think anyone deliberate writes unmaintainable code except as a joke. Hard to maintain code happen when some other objective takes priority - performance, abstractions, architectural purity, DRY or whatever else a developer might enjoy focusing on.

The most maintainable code tend to be the least clever. But developers enjoy being clever, so without any outside pressure to deliver maintainable code, developers will tend towards less maintainable code.

Re:Things I’ve learned in my 20 years as a software engineer by mattcwilson on Friday October 08, 2021 @06:55AM (#28797796)
And, as the article says, your advice and the GP’s are contextual.

If you’re interested in creating software that makes people happy, solves their problems, gets cherished and recommended - then work hard to not lose sight of that goal in the thick of crafting a massive code edifice.

If you’re interested in pushing the limits of your own creativity, and building a technical structure capable of handling domain complexity with ruthless efficiency - then sure, don’t worry too much about how it looks, how it reads, or how others respond to it.

If you’re lucky, you might get to do both in the same body of code. But not likely.

Re:Things I’ve learned in my 20 years as a software engineer by boffinAudio on Friday October 08, 2021 @07:01AM (#28797833)
Even if YOU are the only user, you're still writing software for a human.

Hopefully.

Re:Things I’ve learned in my 20 years as a software engineer by Jensson on Friday October 08, 2021 @07:28AM (#28798012)
With that argument you could say that everything humans ever did was for humans. So either it is a platitude or it is wrong.
Re:Things I’ve learned in my 20 years as a software engineer by boffinAudio on Friday October 08, 2021 @07:35AM (#28798071)
You could say that, but my cat thinks you'd be wrong.

However, I'm yet to see my cat boot up the computer.

Re:Things I’ve learned in my 20 years as a software engineer by Jensson on Friday October 08, 2021 @07:51AM (#28798172)
Ultimately pets are for humans, whatever you do for your cat you do for humans. The same logic works there.
Re:Things I’ve learned in my 20 years as a software engineer by bloak on Friday October 08, 2021 @08:17AM (#28798361)
With cats it's the other way round: the humans for cats.
Re:Things I’ve learned in my 20 years as a software engineer by Jensson on Friday October 08, 2021 @08:20AM (#28798382)
And from a computers perspective all human work is ultimately for computers. Either making them or feeding them data. The purpose of the cat is to generate cat pictures for the computer etc.
Re:Things I’ve learned in my 20 years as a software engineer by ta988 on Friday October 08, 2021 @09:48AM (#28799257)
My cat would often turn the computer on or the tv off, and I swear he did it on purpose because that's when he was complaining he didn't got enough attention.
Re:Things I’ve learned in my 20 years as a software engineer by SketchySeaBeast on Friday October 08, 2021 @09:44AM (#28799203)
My cat has turned off my computer on me - does that count?
Re:Things I’ve learned in my 20 years as a software engineer by ninkendo on Friday October 08, 2021 @08:39AM (#28798514)
You’re writing software for all of your future selves.

http://www.catb.org/~esr/writings/unix-koans/prodigy.html

Re:Things I’ve learned in my 20 years as a software engineer by pksebben on Saturday October 09, 2021 @12:47AM (#28807137)
Thank you for posting this. I feel understood.
Re:Things I’ve learned in my 20 years as a software engineer by dynamite-ready on Friday October 08, 2021 @08:28AM (#28798432)
But then we can also go the other way, and forget how crazy and diverse humans are. So you will still, eventually, end up facing the same challenge, framed differently.
Re:Things I’ve learned in my 20 years as a software engineer by lucumo on Friday October 08, 2021 @07:06AM (#28797866)
Well, you could create software as art. Basically to create it for the fun of creating it, not to use it.

But yeah, the end result is useless then, and can be thrown out.

Re:Things I’ve learned in my 20 years as a software engineer by lazide on Friday October 08, 2021 @09:48AM (#28799264)
Or, like some art, of variable degrees of folks caring about it based on other interesting properties - and made for some purpose other than maintainability.

Demoscene, obfuscated coding contests, etc. seem to fall under that category.

Uselessness in the eye of the beholder or something like that.

Re:Things I’ve learned in my 20 years as a software engineer by lucumo on Friday October 08, 2021 @12:04PM (#28800795)
But in those cases you are creating for other people. The point was made about software that didn't have any use for any people.

In those cases, only the creation itself has a use, not the end result. By definition.

Re:Things I’ve learned in my 20 years as a software engineer by nkssy on Friday October 08, 2021 @09:47AM (#28799248)
Don't forget to write for future you. They'd appreciate some consideration as well. Mostly along the lines of "wtf does this module do?"
Re:Things I’ve learned in my 20 years as a software engineer by throwaway14356 on Friday October 08, 2021 @11:11AM (#28800185)
The best one for me was documentation to complicated for me - by me.
Re:Things I’ve learned in my 20 years as a software engineer by nkssy on Friday October 08, 2021 @11:56AM (#28800660)
You seem to have a complicated relationship with your past self. I foresee further trouble in your future. Its best if you take a torch or you'll be eaten by a grue.
Re:Things I’ve learned in my 20 years as a software engineer by matheusmoreira on Friday October 08, 2021 @02:54PM (#28802745)
> when you don't care about the users and just do it just for the fun of doing it

Yes!! That makes me so happy.

Re:Things I’ve learned in my 20 years as a software engineer by koonsolo on Friday October 08, 2021 @07:04AM (#28797853)
So you write code in machine language? Or are you writing in a language that tries to be readable by English speaking humans?
Re:Things I’ve learned in my 20 years as a software engineer by schwartzworld on Friday October 08, 2021 @07:07AM (#28797874)
Or they write it for themself and not _other_ humans.
Re:Things I’ve learned in my 20 years as a software engineer by j7ake on Friday October 08, 2021 @07:28AM (#28798010)
Your future self can be seen as “other” humans given a long enough time frame.

Anybody who has looked at their own code done more than 5 years ago can surely attest.

Re:Things I’ve learned in my 20 years as a software engineer by SketchySeaBeast on Friday October 08, 2021 @09:44AM (#28799216)
5 years is optimistic. A lunch break can be enough.