News for hackers. Stuff that matters.
Re:Reversing the technical interview (2017) by dmoy on Saturday October 10, 2020 @02:38AM (#24737071)
The more I program professionally, the less patience I have for clever code in a work setting. I used to love it, but after the nth time it caused me real, physical pain while oncall, I'm no longer a fan.

Clever code doesn't help me in a hundred million++ line repo of code maintained by thousands of people. It is actively detrimental.

Still fun to pick apart for leisure.

Re:Reversing the technical interview (2017) by ganafagol on Saturday October 10, 2020 @04:33AM (#24737488)
100x this. "Clever" code that takes mere mortals 10x as much time to wrap their heads around than just doing the boring straight-down simple thing are one of the tell-tale signs of smart but inexperienced devs. Hopefully they get the right feedback and use their smartness to write well-structured understandable and maintainable code when they are more senior. Failing that thay tend to grow up into the bitter grumpy dude who just things everybody is stupid.
Re:Reversing the technical interview (2017) by bryanrasmussen on Saturday October 10, 2020 @03:30AM (#24737214)
cleverness is closely related to wit, and brevity is the soul of wit. A sufficient amount of cleverness often allows you to say in a few lines what would otherwise be said in 100s of lines - for example switch statements or numerous ifs going through each possibility with not much difference in how each branching is handled. I find the verbose listing of each possibility gives me physical pain, so I support cleverness in such situations.
Re:Reversing the technical interview (2017) by konjin on Saturday October 10, 2020 @04:41AM (#24737526)
Until the spec changes.

The way I get around this is having a dsl no one but me sees that compiles to $lang of choice that everyone does.

Once it produced 20k lines of code in an afternoon. I didn't have to do any work for the next month and still was the top performer by commits.

Re:Reversing the technical interview (2017) by chrisweekly on Saturday October 10, 2020 @06:31AM (#24737976)
That definition of "top performer" bears scrutiny. Code is nearly always a liability, not an asset. 20k LoC, generated by a secret tool, sounds more like grounds for firing than promotion.

Or were you making a joke?

Re:Reversing the technical interview (2017) by konjin on Saturday October 10, 2020 @07:40AM (#24738260)
Have you worked at big brain dead corp inc?
Re:Reversing the technical interview (2017) by chrisweekly on Saturday October 10, 2020 @08:58AM (#24738665)
Yep. But I never used being surrounded by nonsense as an excuse not to try to make things better.
Re:Reversing the technical interview (2017) by konjin on Saturday October 10, 2020 @10:08AM (#24739099)
I was getting paid $1,800 per day for three months to do whatever they told me. Does it pay more to do things your way?
Re:Reversing the technical interview (2017) by WhaleBasketball on Saturday October 10, 2020 @04:29PM (#24741653)
If I was motivated by money I’d be on an entirely different career path.
Re:Reversing the technical interview (2017) by konjin on Saturday October 10, 2020 @05:12PM (#24741927)
That's nice for you. What would that path be?
Re:Reversing the technical interview (2017) by shadowgovt on Saturday October 10, 2020 @11:18PM (#24743499)
Investment quant, usually. If a person wants to truly maximize dollar per hour.
Re:Reversing the technical interview (2017) by chrisweekly on Monday October 12, 2020 @06:17PM (#24760099)
Yes. In more ways than one, too.
Re:Reversing the technical interview (2017) by valand on Saturday October 10, 2020 @09:38PM (#24743217)
This "clever code" is a bit misnomer for this kind of phenomena isn't it? Even overly-complex code is not an accurate term for that because overly-complex code can be caused by an overly-complex valid spec.

"Stupidly out-of-spec code" or "Stupidly prematurely abstracted code" are more fitting to describe those kind of code.

I personally feel uncomfortable calling them clever code because they are not clever at all so that they are causing physical pain.

I'm fortunate to have a complete "creative-control" over a code several times. I frequently tell people to stop writing code that we don't need for the moment. Most of them are anticipation of reuses.

Re:Reversing the technical interview (2017) by saagarjha on Saturday October 10, 2020 @03:13AM (#24737164)
Or to write about.
Re:Reversing the technical interview (2017) by layoutIfNeeded on Saturday October 10, 2020 @11:44AM (#24739697)
+1 This is why Haskell & co will never be a mainstream language.