News for hackers. Stuff that matters.
Re:Going Fast Slowly by pdonis on Wednesday September 18, 2019 @02:20PM (#21008340)
From the article: "I no longer think about code lines as an asset to be accumulated, but rather as an expenditure to be avoided."

The obvious Edsger Djikstra reference:

[I]f we wish to count lines of code, we should not regard them as “lines produced” but as “lines spent”: the current conventional wisdom is so foolish as to book that count on the wrong side of the ledger.

http://plasmasturm.org/log/linesspent/

Re:Going Fast Slowly by lucideer on Wednesday September 18, 2019 @03:20PM (#21008948)
Chiming in to say I agree with the sibling (dead) comment (not sure why it ended up dead).

Djikstra's words (and the article's) are clearly correct, but hardly revolutionary or contrary to modern belief today.

The real question is: why, despite a prevailing belief in modern software software engineering that red diffs are beautiful and cathartic things to be celebrated, and that the great spectre of technical debt is something to be excised, why do complex overengineered systems still prevail despite all this?

Re:Going Fast Slowly by thaumaturgy on Wednesday September 18, 2019 @05:02PM (#21010159)
Software-as-art has lost a lot of ground to software-as-business, and in software-as-business, somewhere up the chain there is a management-level individual who isn't really sure how to measure either progress or code quality.

There are myriad tools designed for these people though, and they all chose the simplest (and wrong) solutions to the problem: progress is SLOC added and bug reports clsoed per day.

The height of the software-as-art era was the shareware days of the late 90s. Development certainly moved a lot more slowly overall, but there also tended to be better relationships between developers and their users and developers were not yet all working for people who tried to measure their progress by the only metrics they could understand. The entire industry has been a victim of Goodhart's Law.

Re:Going Fast Slowly by icebraining on Thursday September 19, 2019 @03:56AM (#21014236)
> There are myriad tools designed for these people though, and they all chose the simplest (and wrong) solutions to the problem: progress is SLOC added and bug reports clsoed per day.

Is the SLOC counting still a thing nowadays, though? I've worked at companies ranging from 4-person startups to an old worldwide behemoth (all in the EU, though) and nobody even tracked SLOC, let alone evaluate developers on that; all the dumb metrics came from the issue tracker. Though I have the impression your real evaluation is based on how well you work with others, assuming you clear a low technical competence bar.

Re:Going Fast Slowly by jamesb93 on Wednesday September 18, 2019 @05:31PM (#21010451)
Do you have any suggested reading around software as art vs business? You pretty much began to articulate the things I've been thinking about lately.
Re:Going Fast Slowly by thaumaturgy on Wednesday September 18, 2019 @07:01PM (#21011378)
I wish! If there's a good book out about it, I'd love a recommendation too. I lived it though, writing my first "software" as a youth in the mid-80s. I've seen a lot of change in computing. And not all "get off my lawn" bad, just different.

I see software now as having three different faces: software-as-art, software-as-business, and software-as-engineering. The 80s and 90s had a lot of activity in software-as-art. I was mostly following Mac culture at the time, so I saw this through Bungie, Ambrosia, BareBones, and hundreds of smaller indie developers. The environment at the time enforced the software-as-art discipline, because downloading a program happened over 14.4kbps or slower, or 28.8kbps if your parents had good jobs, and came along with yelling that often sounded like, "get off the phone!" "But I'm downloading!" Installation media was 700K or 1.4MB, and that had to have all your code, art, sound, and other resources.

That's mostly all gone now. Bungie of course got married to Microsoft, which pissed off Mac enthusiasts way more than when Jobs announced a partnership with MS to get Office on the Mac. They've done well. Panic are the only old-school indie commercial desktop software developers I can think of off the top of my head that are still pretty true to their roots.

A lot of software of course just became free. I enjoy so much more high quality software at no cost now, which is really only possible because of the massive benefits of scale that have come from all the tools that have trickled down from software-as-business.

Software-as-business really took off. Apple, Microsoft, Sun, Oracle and others were always kinda big, but not the impossibly large megacorps that they are now. Most of them were still vulnerable to serious mistakes, and that was good, because it meant the users still had some power. Now, mistakes in software development don't really matter to these companies unless they impact 8 figures of quarterly revenue, and that's a process that has zero room for software-as-art.

Software-as-engineering is mostly stillborn, languishing in academia or a few places with rigorous standards (like NASA) or still finding its footing in modern DevOps. I still hold out hope that eventually this aspect will get some love too. I think it will be necessary, eventually, but maybe not until after I've written my last line of code.

Re:Going Fast Slowly by openfuture on Thursday September 19, 2019 @03:16AM (#21014032)
Masters of Doom about John Carmack and John Romero is in big part about the shareware days and the art vs business of programming.
Re:Going Fast Slowly by PavlovsCat on Wednesday September 18, 2019 @06:35PM (#21011137)
> there also tended to be better relationships between developers and their users and developers

Besides postcardware ("if you like the program, send me a postcard"), I have to think of Phone Me NOW!!!:

http://www.apollo-core.com/bringup/v3003_x15_SysInfo.jpg

Re:Going Fast Slowly by jacquesm on Wednesday September 18, 2019 @05:40PM (#21010529)
Two things: lack of having a clue and perverse incentives. The first leads to endless piles of barely functional code; the second rewards that.

The 'real' programmer that spends a month on a long term maintainable chunk of code with a well defined API and some documentation to go with it in a few hundred lines of craftmanship will be at a disadvantage to the person that creates an unmaintainable mess half the time and that is promoted away for being so great at 'getting things done' before they have to deal with the mess.

Re:Going Fast Slowly by NotATroll on Wednesday September 18, 2019 @05:07PM (#21010219)
> why do complex overengineered systems still prevail despite all this?

Well for one, IDE's help hide a lot of the complexity by offering rapid auto-completion for even the most complex of systems.

For two, it's not something you can read and truly grasp. Complexity doesn't necessarily have an objective measurement. Even the attempts we have of measuring it, such as cyclomatic complexity, don't really tell a full story.

You could reduce a somewhat complex string manipulation down to a regex replace. But that regex replace may be far harder for someone to understand what it actually does, even if they're experienced with that particular flavor of regex.

To be blunt, 100 lines of code could be easier to understand than 25 lines that do the exact same thing. It just depends on the reader & the task at hand.

Re:Going Fast Slowly by soneca on Wednesday September 18, 2019 @04:48PM (#21010011)
Regarding the sibling dead comment, it is not uncommon that comments are dead from start, not because they were downvoted in this thread.

I don't know, but I imagine it is one of the HN automated moderation actions, based on previous downvotes of that user comments.

There is "vouche" feature to minimize unfairness in these cases. If you do not agree that a particular comment should be dead from start, you can click on the timestamp (to go to the permanent link of the comment) and click on vouche. I do this sometimes. I did now for the mentioned comment (from draw_down ) because I agree with you that it is a valuable comment and it is not dead anymore.

Re:Going Fast Slowly by jpalomaki on Thursday September 19, 2019 @01:53PM (#21018706)
“I didn't have time to write a short letter, so I wrote a long one instead.” - Mark Twain

I think this applies to software as well. It’s easier to come up with complex solution, harder to create something simple that still meets the requirements.

Re:Going Fast Slowly by edmundsauto on Wednesday September 18, 2019 @04:25PM (#21009729)
IMO, it's due to the Action Bias. Human psychology prefers to take action rather than wait around. Making new code feels more active than deleting code (at least to me).
Re:Going Fast Slowly by swsieber on Wednesday September 18, 2019 @04:39PM (#21009904)
Oh, I love deleting code. I'm just scared of Chesterton's fence.
Re:Going Fast Slowly by mathgladiator on Wednesday September 18, 2019 @03:35PM (#21009123)
I can answer from experience. The reason is that generally people can find success by doing one or two things at a time, and then polish them through testing and bug reports. This often means that the wrong things are done for the right reasons, and the debt gets bigger and the value of the system increases. This makes big rewrites really hard.

This locks in the complexity, and inertia makes change expensive. I experienced this when I built a tcp socket over a request response library, and the reason was to capture the investments made in the library and suffer the pain of building tcp. This made the code complex, but it was reasonable to sell to stakeholders and achieve success on. Now, I wanted to just use a socket, but this took 1.5 years to do by slowly iterating on the right value proposition. I'm a big fan of slow massive rewrites, but it requires consistent and solid leadership to pull off.

Re:Going Fast Slowly by bovermyer on Wednesday September 18, 2019 @03:35PM (#21009130)
Because technical beauty is not the only metric measured by businesses.
Re:Going Fast Slowly by zbentley on Wednesday September 18, 2019 @07:55PM (#21011817)
> technical beauty is not the only metric measured by businesses.

technical beauty is not the only^M^M^M^M^M^M^M^M a metric measured by businesses.

Re:Going Fast Slowly by jcelerier on Wednesday September 18, 2019 @04:58PM (#21010123)
because in the end, people use your software for its features
Re:Going Fast Slowly by frankosaurus on Wednesday September 18, 2019 @03:54PM (#21009347)
survivorship bias?
Re:Going Fast Slowly by haberman on Wednesday September 18, 2019 @06:22PM (#21010992)
There's also this from Bill Gates: "Measuring programming progress by lines of code is like measuring aircraft building progress by weight."
Re:Going Fast Slowly by quickthrower2 on Wednesday September 18, 2019 @06:50PM (#21011291)

    /**
    I'd agree

    that counting the occurrences of 0x0a

    can be

    misleading

    */
Re:Going Fast Slowly by kube-system on Thursday September 19, 2019 @02:02AM (#21013705)
Of course that would be misleading! ...because Bill Gates would count “0x0d 0x0a” instead. :)
Re:Going Fast Slowly by 0xCMP on Wednesday September 18, 2019 @07:03PM (#21011403)
I like lines-spent as a measure, but I wish I could figure out a hybrid measure which didn't hurt lines which confirm/narrow the state space (such as the "unnecessary asserts to show programmer intent").

Somehow being able to distinguish this would help avoid insanely complicated code (of which usually can be much, much simpler), but doesn't encourage anyone to literally ignore all error checking and do everything as some kind of chained-single-line-expression abomination [1].

[1] Something I often see in functional JS and regular python from time to time.

Re:Going Fast Slowly by bch on Thursday September 19, 2019 @02:06AM (#21013718)
Or Bill Gates -

“Measuring programming progress by lines of code is like measuring aircraft building progress by weight.”

Re:Going Fast Slowly by intenseagile on Thursday September 19, 2019 @04:06AM (#21014277)
Any line of code you write is a line of code you have to maintain and support.
Re:Going Fast Slowly by emmelaich on Thursday September 19, 2019 @02:26AM (#21013803)
all code is debt

all code is investment

only time will tell

Re:Going Fast Slowly by draw_down on Wednesday September 18, 2019 @02:48PM (#21008627)
Dijkstra wrote that in 1988. Things change. The prevailing wisdom changes over time.

Is anybody really proudly counting lines of code at this late date? Is there anyone out there who doesn't love an all-red diff? Is there anyone who really thinks the prolix version of a function is better than the concise one, all else equal? Who is getting paid by line of code, or has to meet a a quota of LOC?

Re:Going Fast Slowly by jacquesm on Wednesday September 18, 2019 @05:42PM (#21010555)
The hell it does. Dijkstra's words are as important, if not even more important than when they were first written. The whole problem is that we keep re-inventing the wheel and all associated problems over and over again. We never put the lessons learned the hard way to practice in the long run. New generation -> rinse, repeat.
Re:Going Fast Slowly by draw_down on Wednesday September 18, 2019 @06:56PM (#21011334)
I get that you have axes to grind, but that all doesn’t actually have anything to do with what I was talking about, which is essentially that nobody thinks “lots of lines of code” is a good thing anymore.

I work in a startup full of twentysomethings. None of them have read “Mythical Man Month” but they all know the bit about how adding engineers to a late project makes it later. It takes time, but these things find their way into the conventional wisdom.

It’s not 1988 anymore. Not everything changes, but some things do.

Or do you think we all still need to be reminded that “goto” is bad and we shouldn’t use it?

Re:Going Fast Slowly by jacquesm on Thursday September 19, 2019 @02:44AM (#21013886)
Consider that your personal experience is no match for what we have encountered in about 140 tech reviews of companies in various industries. I'm super happy to hear that you and your crew are clued in and doing well, and that this is all 'old hat' to you.

Even so, there are lots of other companies out there, some older, some newer, both large and small in regulated industries, e-commerce and so on who could very well use some of the common sense that pervades you and your team.

It's definitely not 1988 anymore. Contrary to popular wisdom the programmers from back then usually were clued in, rather than that they went to javascript bootcamp and started churning out reams of low quality code. Plenty of the software from back then is still around today. The Mythical Man Month writes about a team of reasonably competent professionals and the pitfalls they encounter, not about a bunch of clueless newbies.

That adding engineers to a late project makes it later is now an established fact, you would hope. And yet, not a month goes by without encountering exactly that proposition.

So yes, maybe we do need that periodical reminder that 'goto' is bad and that we shouldn't use it too, fortunately the number of languages that support that construct is dwindling, and in those cases where it is used it is hidden quite well without the nasty side effects that an uncontrolled jump into them middle of a bunch of conditionals could cause.