News for hackers. Stuff that matters.
Re:Thy code shalt be boring by mattpallissard on Thursday April 27, 2023 @04:37PM (#35734192)
> think for thyself

Ok.

> Resist the temptation to be creative, stylish, or (worst of all) clever.

I've spent a good chunk of my career coming in and cleaning up and optimizing codebases, avoiding complete re-writes . Coming across a genuinely clever and novel approach to a tricky problem that someone else wrote is something I enjoy immensely.

I'm tired of hearing from the "is unneeded complexity" bandwagoners. There is a difference between clever and convoluted. I'll trade a few more minutes of grokking for more performance, less boiler plate, etc, all day.

That and in my experience with large codebases, most time spent understanding code is spent on the business logic anyway.

Re:Thy code shalt be boring by xedrac on Thursday April 27, 2023 @09:20PM (#35736489)
I don't encounter overly clever code too often. But I do see excessive levels of abstraction all the time. Occasionally I'll see someone that doesn't use enough abstraction.
Re:Thy code shalt be boring by nyarlathotep_ on Thursday April 27, 2023 @09:43PM (#35736625)
This is mostly what I encounter. An aim for simplicity with presumably the goal of clarity via abstraction that ends up with layers of layers of design pattern'ing that makes it damn near impossible to find where _something_ actually happens that isn't invoking another 3 line method.

Debugging is often a nightmare too, as you're trying to determine which abstract class is calling implementation of a given method, on top of a callstack 43 frames deep to accomplish nothing but code bloat.

Re:Thy code shalt be boring by jsrcout on Saturday April 29, 2023 @06:58PM (#35758109)
It's my personal nemesis. I've finally just gotten to the point of memorizing "oh here's where the /real/ code is for this subsystem" after doing the interminable traceback enough times. Not a fan.
Re:Thy code shalt be boring by just3ws on Sunday April 30, 2023 @06:34AM (#35761285)
IME convoluted is often mistaken for clever. I've seen systems where the author was proud of how complicated their knots were but the reality was just a tangle to everyone else. Personally I guard for when I need to solve a problem but am having too much fun. It is usually a sign I'm too invested in the code than the goal, it helps me write but my next goal will be to edit it so future me won't say such awful things about now me.