Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×
Software Programming

The Collapse of Complex Software 317

Nolan Lawson, writing in a blogpost: Anyone who's worked in the tech industry for long enough, especially at larger organizations, has seen it before. A legacy system exists: it's big, it's complex, and no one fully understands how it works. Architects are brought in to "fix" the system. They might wheel out a big whiteboard showing a lot of boxes and arrows pointing at other boxes, and inevitably, their solution is... to add more boxes and arrows. Nobody can subtract from the system; everyone just adds. This might go on for several years. At some point, though, an organizational shakeup probably occurs -- a merger, a reorg, the polite release of some senior executive to go focus on their painting hobby for a while. A new band of architects is brought in, and their solution to the "big diagram of boxes and arrows" problem is much simpler: draw a big red X through the whole thing. The old system is sunset or deprecated, the haggard veterans who worked on it either leave or are reshuffled to other projects, and a fresh-faced team is brought in to, blessedly, design a new system from scratch.

As disappointing as it may be for those of us who might aspire to write the kind of software that is timeless and enduring, you have to admit that this system works. For all its wastefulness, inefficiency, and pure mendacity ("The old code works fine!" "No wait, the old code is terrible!"), this is the model that has sustained a lot of software companies over the past few decades. Will this cycle go on forever, though? I'm not so sure. Right now, the software industry has been in a nearly two-decade economic boom (with some fits and starts), but the one sure thing in economics is that booms eventually turn to busts. During the boom, software companies can keep hiring new headcount to manage their existing software (i.e. more engineers to understand more boxes and arrows), but if their labor force is forced to contract, then that same system may become unmaintainable. A rapid and permanent reduction in complexity may be the only long-term solution.

One thing working in complexity's favor, though, is that engineers like complexity. Admit it: as much as we complain about other people's complexity, we love our own. We love sitting around and dreaming up new architectural diagrams that can comfortably sit inside our own heads -- it's only when these diagrams leave our heads, take shape in the real world, and outgrow the size of any one person's head that the problems begin. It takes a lot of discipline to resist complexity, to say "no" to new boxes and arrows. To say, "No, we won't solve that problem, because that will just introduce 10 new problems that we haven't imagined yet." Or to say, "Let's go with a much simpler design, even if it seems amateurish, because at least we can understand it." Or to just say, "Let's do less instead of more."
This discussion has been archived. No new comments can be posted.

The Collapse of Complex Software

Comments Filter:
  • by phantomfive ( 622387 ) on Thursday June 16, 2022 @03:33PM (#62625968) Journal

    It's how we maintain our employment. [zerobugsan...faster.net]

    • I disagree with the article where it says engineers love complexity. Most engineers hate it. Now on an economic side, engineers who are contractors love it as it's job security for them. But fundamentally the complex design is a broken design and most engineers have their internal idea of Occam's Razor that states that the simpler design is the better design.

      My beef is the ever added features, and never once a removed feature. Even when there is literally no more memory available, people are still resista

      • by narcc ( 412956 ) on Thursday June 16, 2022 @06:20PM (#62626402) Journal

        Programmers aren't engineers.

        There are engineers that are also programmers, but programming is not engineering. It may even be illegal in your area to call yourself an engineer if you're not properly certified.

        • by gweihir ( 88907 ) on Thursday June 16, 2022 @11:23PM (#62626850)

          Programming is engineering. Some legal fiction does not matter for that. Engineering is solving problems with technological means. That almost all programmers do not even remotely qualify as engineers is quite true though.

          • by gTsiros ( 205624 )

            engineers give _guarantees_

            coders give _liability waivers_

            when an engineer designs a bridge, they say "if anything weighing under x tons goes on it and the bridge collapses, come sue me"

            when a coder designs a program, they say "i am not responsible no matter what this piece of code does or does not do, under any conditions whatsoever"

          • Programming is engineering.

            No it isn't, not necessarily at any rate. Constructing a house is not necessarily (and in all likelihood not) engineering. Just a bog standard building project.

            Some legal fiction does not matter for that.

            100% agree. Protect the term "chartered engineer" or whatever. By this stupid legal fiction, Brunel wasn't an engineer.

            Engineering is solving problems with technological means.

            Then all of the usual trades are engineering too.

            That almost all programmers do not even remotely qualify

        • Engineer or Licensed Engineer.

          Engineer - Having an engineering degree.
          Licensed Engineer - An authority has given license to work as an engineer wirh responsibilities, rights and protections.

      • I once reduced (I was forced to print it to paper to quantify it to management) over 380 pages of source code to 75 after being fed up with the endless bug fixing (regression upon regression) and the sheer madness that new feature requests entailed. I got a stern talking to. It turns out that it was a big business fixing all those captive corporate clients with what was called "maintenance" and the simplicity of what I had created had pissed them off. Even a few developers chewed me out. They loved garbage
        • Sure, that's a gaol for some people. However I would hesitate to call this the "engineer's viewpoint". Everyone has multiple personalities inside them, so someone may have a business personality or a make-money personality that can override their engineer personality.

        • Buddy, you were on the wrong team.
          Start your own software company, and compete against this team. From what you are saying, it will be an easy win.

      • by theshowmecanuck ( 703852 ) on Thursday June 16, 2022 @07:50PM (#62626574) Journal

        Now on an economic side, engineers who are contractors love it as it's job security for them.

        Fuck off. As a contractor I ripped out a piece of shit overly complex system developed over years ruled over by some guy who was an employee and treated it as his empire. I replaced it with a far simpler reactive architecture in place of a Tibco fiasco that was brittle as fuck and when it invariably broke no one could figure out why except the little ruler, and even then it usually took a week to get it back on line. And if they wanted to add an extra data field to one of the upstream system's output, it would take 9 months or more to get it done. After my redesign it took one two week sprint to implement and one more for UAT sign off; and really it should only take one sprint, but 'procedures'. It was what architecture there wanted for years, but the empire owner employee had some pull because people believed he was a essential as he told them. Moral of the story: contractors like building cool stuff, and that means they like building stuff that works properly and is only as complex as needed. Employees are the ones who build shit. Them and vendors. Don't mistake vendors for independent contractors. Independent contractors have to rely on having a good reputation. Vendors have teams of marketers that can bullshit extremely well. Independent contractors don't.

        • There are bad and good contractors and employees, just because you can cherry pick an example of a bad employee, it proves nothing.

          • by tragedy ( 27079 )

            There are bad and good contractors and employees, just because you can cherry pick an example of a bad employee, it proves nothing.

            It's actually a bit tricky to say that it proves nothing. Given that the point was to disprove the statement: "Now on an economic side, engineers who are contractors love it as it's job security for them." Then you could argue that it absolutely proves that ."... engineers who are contractors love it as it's job security for them." That's an absolute statement about all engineers who are contractors, therefore a single counterexample proves that it is a false statement. The tricky part is that qualifier: "N

        • Same here. When I was contracting (in banking and phone arenas), my specialty was going in and figuring out stupid-ass systems and then redesigning and cleaning them.

          The most memorable was at SW Bell, where they had one guy, Silver, who had staked out and camped out on one system long enough that no one else could understand it.

          Done in COBOL, his functional main chunk (is about all you can call it) was FORTY green-bar pages long with NOT ONE PERFORM, only go to's. Standards insisted on descriptive
      • by caseih ( 160668 )

        Mozilla constantly removes features from Firefox. Yet the browser is as complex and fragile as ever.

        Gnome developers also have no qualms about removing large chunks of old code and configure-ability. Doesn't seem to help the complexity or usability either.

    • by tomhath ( 637240 ) on Thursday June 16, 2022 @07:17PM (#62626510)

      Most systems grow in complexity because of all the nuances of handling inconsistent/dirty data, business rules that exist just because, etc., etc.

      The new guys want to design a nice clean system that does only what's needed. Until they're told it doesn't do everything that's needed. So they start shoehorning in new features.

      • The new guys want to design a nice clean system that does only what's needed.

        They won't succeed. IMO the best way to learn to design a nice clean system is to spend time cleaning up an old system. Then you'll have a good understanding of what works and what doesn't.

        If they just build a clean system from scratch (without developing the skill), it will be readable but inflexible, and new features won't fit (as you pointed out).

      • It really is a failure to capture all the requirements, or even extract them from the old project.

        Guess what, complex software is complex for a reason.

  • by sinij ( 911942 ) on Thursday June 16, 2022 @03:36PM (#62625978)
    The era of unmaintainable overly complex systems must end as they are impossible to secure.
    • by AntiQtard ( 7668752 ) on Thursday June 16, 2022 @04:22PM (#62626130)
      That's a very easy (and naive) statement to make. How do you propose this? Every subsequent tool to reduce complexity of software brings new and interesting levels of complexity... Microservices? Well, now you've just introduced several layers of complexity that are outside of the developers hands... Come back in 20 years and you'll be scratching your head too... And you'll accept that complexity as inherent.
    • by dwywit ( 1109409 )

      I'd be keen to your exploits for Z/Os.

    • by narcc ( 412956 )

      The question to ask is how systems became so complex. The answer is obvious, but very few are willing to accept it.

  • by careysub ( 976506 ) on Thursday June 16, 2022 @03:40PM (#62625994)

    Anyone who's worked in the tech industry for long enough has been tech bloggers write blog posts that contain no real insight into anything.

    Yeah, complexity exists because architects and engineers love it! Not because real world problems are complex, and require solutions that tend to be complex, especially as needs change over time.

    A rapid and permanent reduction in complexity may be the only long-term solution.

    Wow! He's done it! He's found the silver bullet! I am so relieved.

    • by dmomo ( 256005 ) on Thursday June 16, 2022 @03:48PM (#62626034)

      Yeah. This blog post shows a lot of naivete. The word "haggard" was the first clue. For most engineers that have to hold down the fort for aging software:
        - a sunset is welcome, engineers prefer to create new things. They are not mindlessly drawn to complexity the way the blogger insists.
        - old software stays around because it's low maintenance. It might be crappy, but old bugs have been seasoned away. So there are few bugs. The difficulty comes in expanding the functionality for new use cases. That's when old software becomes maintenance Hell.
        - Old systems hang around not because of some crazy gate-keeping mentality, but because of a lack of resources. Again. Most good engineers welcome the shake-up because it brings in new resources

      • by vlad30 ( 44644 ) on Thursday June 16, 2022 @04:48PM (#62626198)
        All Correct and add newer and younger engineers programmers, etc come in at least 4 varieties,

        1) Totally clueless - will never learn and maintain any system unless overseen by a senior,There are many of these

        2) Inexperienced - Need a few years to learn the ideas and methods they have actually have been tried by another name and don't work. There are many of these

        3)Genius - Will actually see whats good and how to rewrite and do a good job in a timeframe that is useful, These are extremely rare.

        4) Contracted Consultant - appears to be a 3 but is actually a 1 and will cost the company a fortune before he goes on to the next company saying the team which has been hollowed of all real talent is told you can finish this now

        please add varieties as you see fit

      • by Darinbob ( 1142669 ) on Thursday June 16, 2022 @04:51PM (#62626204)

        Old systems also stay around as they make money. The bread and butter that keeps the company alive is the legacy product that used the lumpy burlap sack design pattern. All the new products that everyone inside the company loves don't sell so well, or not in a big enough volume to retire the legacy golden goose.

      • [Engineers] are not mindlessly drawn to complexity the way the blogger insists.

        Agreed. The summary sounded to me like the author was working backwards from a premise, rather than making a convincing argument towards a conclusion. This line

        \"Admit it: as much as we complain about other people's complexity, we love our own."

        ... seems like straight-up projection. Reminds me of one of the Simpsons Halloween episodes where Bart says to his monster doppelganger: "You're crazy!", to which monster-bart replies "Aren't we ALL a little crazy? I know *I* am."

      • by spitzak ( 4019 )

        A huge reason the complexity keeps increasing is back-compatibility. If the software has some kind of saved state or setup or scripts, it is almost impossible to rewrite it, as those old setups will not longer work.

        I agree with most of the posters here that engineers actually very much dislike complexity. But they don't see any way to get rid of it without breaking compatibility.

    • Maybe it's not that engineers love complexity but that, like everybody else except home improvement sales people, they favor simpler solutions, what we call "hacks". You don't demolish your house just because the roof has sprung a leak. Instead you "patch" the roof. Of course, if your house has turned into a hell house not just of drips, but of flood water, termites, and collapsing floor boards, you'd be well-advised to rebuild it and start afresh.
    • Wait till he sees millions of lines of COBOL or millions of lines of PL/SQL for the first time. He'll age fast.

    • by Brain-Fu ( 1274756 ) on Thursday June 16, 2022 @04:08PM (#62626090) Homepage Journal

      On the one hand, I agree with you: the primary driver of complexity is the real-world needs that the code must solve. Time is also a factor, since the original system WAS simple, and solutions to more complex problems had to be tacked-on over time, and that tacking-on has made the code a lot more complex than it would have been if the features were part of the original design (but time travel is not an option so when that kind of complexity-sediment has accumulated the full re-write is often the only option).

      BUT, on the other hand, there ARE software developers who have no tolerance for simple designs. They have got it in their head that inversion-of-control coupled with dependency injection is the one-size-fits-all solution to every single problem that exists, and that the flexibility that this pattern introduces means they will be able to solve any unknown future problem without very much effort (and without an increase in complexity), so they must design anything and everything they code that way, even when it is excessive overkill for the problem being solved.

      I have met developers like this, and they are really adamant. They insist with religious zealotry that the upfront investment in introducing this more complicated pattern will save enormous costs in the long run, make everything better in every way, with no downsides. And, the vast majority of the time, they are dead wrong.

      The actual changes that the real world throw at the project are 90% of the time "cross-cutting," requiring you to change your interfaces and carve a path of changes through all your layers, which in turn require you to make code changes to basically all of your unit tests. The dev costs of such changes increase exponentially, and this starts happening almost immediately after the coding is finished.

      There ARE problem spaces where such patterns fit like a glove, but most aren't such a problem space, and forcing this kind of complexity into code that does not need it winds up causing far more problems than it solves. And there is a simple way to tell if this is happening to your code: if 90% or more of your interfaces have only one implementation, then your code is brimming with needless versatility (all of which has cost you a fortune and provided you with no benefit).

      So, it can and does happen that a developer's love of complexity ruins or at least harms a product. But even if you have a team of developers that all love simplicity, the project will eventually attain a state of ruin (albeit much more slowly) as the real world's moving targets cause the layers of technical debt to accumulate.

      • Time is also a factor, since the original system WAS simple, and solutions to more complex problems had to be tacked-on over time, and that tacking-on has made the code a lot more complex than it would have been if the features were part of the original design

        I think that this is a key factor in software complexity. Designing software / object models to deal with future features, many of which cannot even be guessed at today, is hard. Object orientation itself has given us a good tool to separate functionality and hide complexity in layers, making it fairly easy to add features... if we got our object model more or less right.

        But even a good object model might need tweaks when you add things. How do you address such changes? All too often I've seen change

        • by narcc ( 412956 )

          Object orientation itself has given us a good tool to separate functionality and hide complexity in layers, making it fairly easy to add features...

          This is mostly a myth. It's what you've been taught, sure, but it was never really true. There are two basic sources of complexity in any software project: Flow control and dependency. OOP makes both things worse.

          if we got our object model more or less right.

          An important caveat. I'll assert that all non-trivial object models are wrong. I'll futher assert that building software around a model is doomed to fail. See, software actually needs to do things. When you start with an object model, the natural thing to do is adapt your processes to fit

          • by serviscope_minor ( 664417 ) on Friday June 17, 2022 @03:19AM (#62627124) Journal

            An important caveat. I'll assert that all non-trivial object models are wrong.

            Counter example: I've coded a number of GUIs (mostly for internal tooling) in FLTK over the years. It's based around classic OO style ye olde C++. Basically... it works. While the code style is distinctly old fashioned, I never found the object model of that library to be a hindrance. It's pleasant and straightforward to use.

            I'll futher assert that building software around a model is doomed to fail. See, software actually needs to do things. When you start with an object model, the natural thing to do is adapt your processes to fit that model. This necessarily leads to needlessly complex processes.

            This rings true. But I think this is a case not of OO is bad and always a problem it's that OO is a tool or structure and misuse to inappropriate problems is bad. And if there's one thing programmers love beyond all else it's believing their shiny new toy solves ALL the things.

            The design patterns book is one of the most widely misunderstood books ever written in our domain. It was meant to be a nomenclature giving a common naming scheme to a number of, well, patterns that crop up quite frequently. That's all. It was however taken as a mandate to use every single pattern listed in the book as much as possible where remotely conceivable.

      • by narcc ( 412956 )

        They insist with religious zealotry that the upfront investment in introducing this more complicated pattern will save enormous costs in the long run, make everything better in every way, with no downsides. And, the vast majority of the time, they are dead wrong.

        This is the most insightful thing this thread is likely to see. Also, good on you for slaughtering a sacred cow. That thing has been blocking the road for far too long.

    • Problem solved!
    • by narcc ( 412956 )

      Not because real world problems are complex, and require solutions that tend to be complex, especially as needs change over time.

      Most software is dramatically over-complicated. Few problems are as complex as the software used to solve them.

      By all means pretend things are more more complex than they are if it means a pay rise / job security, but at least be honest here.

  • by david.emery ( 127135 ) on Thursday June 16, 2022 @03:43PM (#62626006)

    For some, it's just "program structure". For others, it's a much more holistic discipline, trying to understand the system -in its context- and what's important to the full set of stakeholders (including the bill-payers, as well as developers, maintainers, users, corporate managers, IT managers, etc.) An "architect" who draws 'boxes and arrows' without understanding what the system is trying to do within its environment (technical, business, financial, etc) is NOT doing you any favors.

    Now the decision to "replace, migrate, fix" is not simple. Often it's the non-functional requirements that are the hardest, such as availability ("we can't afford the downtime to replace the system")

    A better sense of 'architecture' could help, but it will not fix problems with requirements instability, funding shortfalls or management impatience. But a better practice of 'architecture' would definitely help.

    "What about DevOps or DevSecOps?" Well, is that an architectural approach, or just an approach to prioritize the band-aids? I'm not sure, I've heard examples where it was just 'software triage' and where it actually took an 'architectural approach' of "What are we trying to do here, and how can we do it better?"

    The one thing I'm convinced, though, is that most of what gets called "Agile" is a box of band-aids.

    • Kind of sounds like you're describing so called "enterprise architects". Now I'm speaking from personal experience only, but I don't think I have ever seen a profession about which I got so exited, seeing the potential, and about which I got so deeply disappointed in the unbelievable lack of value they added. I've also not ever seen a profession with its head so far up its own arse. As Greg Fullard (a consultant working in the EA space) put it:

      Somewhere along the line the meaning of Enterprise Architect changed from “someone who understands OUR enterprise from a variety of perspectives and who can provide guidance to ensure that our systems can support our plans for the future” to “someone who understands tools and techniques that could possibly, if applied correctly, help you to understand YOUR enterprise from a variety of perspectives”. EAs have (d)evolved from being a knowledgable and responsible consultant to a tool pusher.

      • The specific notion of "architecture" I advocate and have used on multiple projects comes from ISO 42010-2011: "architecture: fundamental concepts or properties of a system in its environment embodied in its elements, relationships, and in the principles of its design and evolution" see http://www.iso-architecture.or... [iso-architecture.org]

        I know some in the enterprise architecture community have used that definition, but a lot of what I've seen hasn't really aligned with how I've used 42010. And I can definitely understa

  • I say "no" to new boxes and arrows. I say, "No, we won't solve that problem, because that will just introduce 10 new problems that we haven't imagined yet.".

    But then the PHB etc do not care because when those problems do happen, I'm the one that has to be on call to fix them.
  • by sapgau ( 413511 ) on Thursday June 16, 2022 @03:44PM (#62626010) Journal
    Mythical Man Month by Fred Brooks (circa 1975) "Brooks's observations are based on his experiences at IBM while managing the development of OS/360. He had added more programmers to a project falling behind schedule, a decision that he would later conclude had, counter-intuitively, delayed the project even further. He also made the mistake of asserting that one project—involved in writing an ALGOL compiler—would require six months, regardless of the number of workers involved (it required longer)."
    (Wikipedia)
    https://en.wikipedia.org/wiki/... [wikipedia.org]
  • by oldgraybeard ( 2939809 ) on Thursday June 16, 2022 @03:46PM (#62626026)
    The better an IT system operates without issues. The faster the technical people will be let go. Because of the cost. Until no one in house knows anything about the systems.
  • Once you write software, it's written and you can copy it as many times as you want. People keep re-writing it to stay relevant and to make money. But I don't go out and buy a new hammer every time I need to pound a nail, and I shouldn't have to do the same thing with software either. In the short term the money is slanted toward paid for software, but possibly in the future people will write most of the paid for software and maybe in the long term most software will be free. I think one thing that is prev

  • by Tablizer ( 95088 ) on Thursday June 16, 2022 @03:48PM (#62626030) Journal

    > One thing working in complexity's favor, though, is that engineers like complexity. Admit it...

    No, many of us appreciate parsimony. The problem is that owners and bosses want something when they want something and don't care about long-term consequences. "I don't wanna hear flack, just make Addition X work!". If you want it badly enough, you can get it "badly".

    A lot of people with power are petulant. It may work in marketing and public relations, but you can't spin to computers. Shortcuts will accumulate cruft over time regardless of sugar coating the justification. Lying only works on (some) humans, but the liars are so used to it that they want techies to somehow translate their lie into code. You're right, it doesn't make sense, but it's what the petulant do.

    Most stake-holders have to care about parsimony to have a parsimonious system. It's not just the engineer's job.

    • Rewrite it in Javascript, please.

    • Exactly. The "holy" trinity of software complexity comes from:

      * Feature Requests
      * Security Fixes
      * Performance Increases

      These ranges from good ideas and mandatory requirements to total nonsense from users, product management, legal, or marketing. There are always edge cases that are never in the "spec".

      Software, like Art, is never done. The trouble is most of the time management never wants to take responsibility for the Project Management Triangle [wikipedia.org] of time, resources, or features it will take.

    • by khchung ( 462899 )

      A lot of people with power are petulant.

      Spot on!

      Over the years, I have found that for most managers, the higher up they are promoted, the more childish they became, simply because they can get away with it and it became a habit. The managers who grew more mature as they go up the ladder is not common.

    • No, many of us appreciate parsimony.

      Do we? I mean I do, you do, and a few people I know do, but my experience is that we are the exception.

      The problem is that owners and bosses want something when they want something and don't care about long-term consequences. "I don't wanna hear flack, just make Addition X work!". If you want it badly enough, you can get it "badly".

      No this is wide of the mark. I've worked at places that don't do that. They suffer exactly the same problems. You end up with "core teams" who

  • by rapjr ( 732628 ) on Thursday June 16, 2022 @03:50PM (#62626036)
    One main thing that adds complexity is features. Everyone always wants more features. Then developers want their work to be simpler and less boring, so they tack on libraries and frameworks which add complexity. Layers get added to layers, until the whole thing is beyond comprehension. The real cause of complexity is nature though. Developers are trying to map software on top of reality (e.g., a human workflow, a physical process, a desired human outcome, human ease of use) and reality is perverse, made of many interlocking different things, some of which only exist in the mind. The more accurate the mapping of the software onto reality the greater its complexity and the longer it takes to get it right. Changing it all to wedge in a new feature becomes more difficult with time. Finally someone new comes in and says this is way too complex! They simplify it and everyone loves how fast and simple it is, but they'd like one little feature added... I see this happening over and over with programming languages.
    • by quantaman ( 517394 ) on Thursday June 16, 2022 @04:33PM (#62626158)

      One main thing that adds complexity is features. Everyone always wants more features. Then developers want their work to be simpler and less boring, so they tack on libraries and frameworks which add complexity. Layers get added to layers, until the whole thing is beyond comprehension. The real cause of complexity is nature though. Developers are trying to map software on top of reality (e.g., a human workflow, a physical process, a desired human outcome, human ease of use) and reality is perverse, made of many interlocking different things, some of which only exist in the mind. The more accurate the mapping of the software onto reality the greater its complexity and the longer it takes to get it right. Changing it all to wedge in a new feature becomes more difficult with time. Finally someone new comes in and says this is way too complex! They simplify it and everyone loves how fast and simple it is, but they'd like one little feature added... I see this happening over and over with programming languages.

      There is one additional and fixable source of complexity (that the blogger obviously missed). Obsolete technology.

      You start building the solution on framework X v2, then framework X v3 comes out and in order to be secure you need to update the code to v3. Problem is it wasn't built with v3 in mind so some of those elegant designs aren't so elegant anymore.

      And then framework Y emerges which turns out to be a better solution all around, but you're still on X v3.

      I think the key to legacy systems is that once in a while you need to invest in them like a new project so that they're no longer legacy. If that requires a massive refactor then go for it. Sure you're going to spend forever wondering what the old code is doing with a bunch of weird edge cases, but those edge cases either represent real things you need to avoid or obsolete requirements that can be taken out behind the wood shed.

      • by narcc ( 412956 )

        The problem there was building the project on the latest wiz-bang framework. A project shouldn't turn 'legacy' before it's old enough to start preschool, but that's the bizarre world we've found ourselves in.

        The oft maligned "Not Invented Here" syndrome may cause a few problems, but far worse is the "Nothing Invented Here" syndrome that burdens so many...

  • by Dutch Gun ( 899105 ) on Thursday June 16, 2022 @03:59PM (#62626060)

    The best engineers I know of love the elegance of simplicity. They're the ones who figure out they can reduce overall complexity by splitting up that app into larger components using properly designed and well thought out interfaces. Then when requirements inevitably change, as they *always* do, those requirements hopefully aren't baked into unrelated parts of other systems.

    Within a single library / module, it's far too easy to generate a nightmarish N-squared complexity matrix, as each component can be used by every other component in that same module. It's important to use a multiple levels of abstraction to limit this complexity, such that if you eventually need to, you can replace a higher-level module completely without rewriting the entire beast from scratch.

    But of course, there's a fine line between building reusable modules and creating a ridiculously over-built / over-complex system that's 10x more code than needed to do something fairly simple. Moreover, it's also very difficult to design proper high-level interfaces between modules unless you have a firm handle on the problem domain, since you often don't recognize a bad interface until you're well into the project and realize "shit, this isn't working at all, because I didn't anticipate how x needs to interact with y". And your boss is not going to like hearing that you want to rewrite a chuck of code that's already working just fine...

    No one ever said this was actually *easy*.

  • by ahodgson ( 74077 ) on Thursday June 16, 2022 @04:02PM (#62626068)

    .. where rewrites don't actually work, so then you get 2 big messes of code that you have to run forever.

    • by kwalker ( 1383 )

      Or the one where the rewrite fails, so they start another rewrite (Possibly after disposing of the team and getting another) which may fail, then possibly a third.

      Or the one where the rewrite doesn't "fail", but takes 3-5x longer than planned for, double to 10x the resources, runs twice as slowly, and ends up reaching feature parity with the old one about the time a management reshuffle happens and the company begins sliding into obscurity.

      In either case, the company's best bet is acquisition or merger... T

  • by NicknameUnavailable ( 4134147 ) on Thursday June 16, 2022 @04:02PM (#62626070)
    Plenty of code I wrote a decade ago is still in use. That's the benefit of not being a web developer changing between other people's broken libraries every other month: having a brain to write stuff which works. Are there things that get deprecated or change with tech, definitely, but barring an actual change to hardware or other externalities which prohibit your application from working: that IS how you measure if you're a competent developer or not. This isn't to suggest maintenance code isn't a great way to make money for the industry and keep people employed between interesting projects.
  • engineers like complexity. Admit it: as much as we complain about other people's complexity, we love our own. We love sitting around and dreaming up new architectural diagrams that can comfortably sit inside our own heads

    I think you have this all wrong. What it seems like most engineers I've ever known really love is SIMPLICITY.

    Because any real world program is dealing with complex problems you can't really ever have simplicity, what you strive for is minimum complexity. You do not love the complexity, bu

    • From my experience, the degree of what counts as 'simplicity' is dependent on the technical background of the person assessing it. Complexity can come from the design, or from the environment. Sometimes people want simplicity so they can comfortably understand it when the complexity naturally arises from the environment, itself. There's also the perceived complexity on the backend versus how it actually operates. Sometimes for things to be simple on the front, you need to be more flexible on the back, so it
  • How long ago was the Empire State Building built, or the White House, or the Ford Rouge Plant? Sure, they are aging, but if something is built to last it has a long life. Software does not need to be different. There is no reason that business applications cannot have a very long life cycle. Existing cloud services, languages and operating systems are perfectly suitable.

    Software developers love new technology to a fault. When it comes to line of business software, rarely does the latest new framework make for better applications. Newbs always think it is better to start from scratch, throw away a ton of money, and reinvent another wheel because they are too lazy to understand the original. Frankly I find the hubris of ignorant people without experience disgusting.

    Build great maintainable software designed to last. Business is complex, and its support software is necessarily complex as well. If you don't understand large complex systems, maybe you need to consider a new career instead of making stupid decisions replacing functional legacy systems..
  • Complexity exists not only for the sake of complexity.

    It is a MUST when you're looking at other variables (for example time).

    Example: can you sort 3,000,000,000,000 items comparing one by one against the others (simple)? Yes. Should you? NO.

  • I work on a large complex monolith mostly written in C++. It's being replaced by an even more complex system with numerous Java micro services.

  • Management pushed everyone, who knew anything, about their IT systems out of the company to save money.
  • If a system needs to be complex to do its job - so be it. Unfortunately, modern software development methods (cough, Agile, cough) actively promote poor code quality practices, lack of ownership, and the blatantly stupid idea that you can split a complex systems into infinitely small tickets, hand them out to anyone, and then put the programming humpty-dumpty back together again and end up with good quality.

  • by yoey ( 247125 ) on Thursday June 16, 2022 @04:35PM (#62626162) Journal

    "[Netscape] did it by making the single worst strategic mistake that any software company can make: They decided to rewrite the code from scratch.... It’s harder to read code than to write it."

    https://www.joelonsoftware.com... [joelonsoftware.com]

  • For most business software (not things like missile guidance systems, etc) the desire to handle every possible case that could happen ultimately overwhelms the system with costs and complexity. I would much prefer a system that handles 99% of the logical transaction volume flawlessly and that simply kicks out a request for human intervention for that last pesky percent that ends up costing 50% of the development budget and makes the system unmaintainable in the long run. Mileage may vary; it may be more or
    • that won't work in the legacy 20+ year old code that handles then thousand to millions of transactions a day, there aren't enough humans to handle those 1 percent.

      The development budget is nothing for big companies, really. A few million for a system that handles tens of millions or billions of dollars a year? pffft, chickenfeed.

  • by Murdoch5 ( 1563847 ) on Thursday June 16, 2022 @04:49PM (#62626202) Homepage
    The reason people don't understand old systems, stems from the fact that developers, usually, suck at adding meaningful comments. I've been a professional developer / engineer for nearly 10 years, and I've worked on a fairly large array of projects from RTOS's, through to Web Platforms, and even simple embedded projects that just toggle a LED on / off. If I was to take one of the RTOS's I've worked on 7 years ago, and read through the code, I would have complete and total understanding of what's going on, why, what I was thinking, why I was thinking it, and the outcome of my logic.

    The reason I would have total insight is because I comment the code in a meaningful, and complex manner, that outlines everything I'm thinking, while I'm writing it. Good code, should contain anywhere from 20% - 500% lines of comments against lines of code, and comments should be classified into different categories. If you wouldn't feel comfortable having someone look at your code in 10 years, having no documentation available, and no former knowledge of what the software was doing, it's not commented properly.

    I've talked about this on my blog: https://andrewmurdoch.ca/ [andrewmurdoch.ca] under "Comment your code!", and I fully support the view that comments are what's missing from today, and yesterdays development. I shouldn't have to puzzle through your code, I shouldn't have to guess, wonder, run, debug, or look up document to understand it. I should be able to sit down, and get up to speed almost instantly, because no matter where I end up, I'll have enough comments to clarify everything!

    Obviously a "Hello World" program, written in C, or JavaScript, probably doesn't need comments, but much beyond that, and it's commenting time. Another way to think about the problem, if you've been up for 72 hours, could you understand the code? If a new guy has been up for 72 hours, and has never seen the code, could they get up to speed quickly? If no, then the code isn't comment well enough (probably).

    In my current project of nearly 100k lines of code, I have 56k lines of comments, bringing the total to 156k total lines. I understand what the code is doing without the comments, but if I leave will the next guy?
    • In my current project of nearly 100k lines of code, I have 56k lines of comments, bringing the total to 156k total lines. I understand what the code is doing without the comments, but if I leave will the next guy?

      Have you tested all of the comments to make sure they (still) work?

      • Yes, I review them on a regular basis to make sure they properly explain the code. It might be overkill, but I know I'm leaving behind code that other people will be able to easily work on. I never want to be the developer who is known by swear words, and laziness.
    • Problem is 95% of the time the sum total of knowledge imparted to a function AddWidget goes like "function to add a new Widget" or this line of code "i = i + 1" will have the the comment "add one to i". Virtually all comments I've ever seen by others add nothing of value to any code base I've ever seen. Which is why I don't bother unless there's going to be some value added insight which you cannot get directly from the code.
      • Very fair point, so assuming I had a regex, I might do:

        /* REGEX_GROUP: (?:[eE]([+-]?\d+))? -> Look for special characters
        REGEX_NOTE: This matches string condition such as '5e-6', etc...
        REGEX_NOTE: This will be stored in match[2]

        REGEX_EX: '5e-6' -> Match e-6, this will return -6
        NOTE: ?:\[eE] -> Find an e or E character, ex: '5e-6'
        NOTE: ([+-]?\d+) -> Find all digits with a +/-, keep looking until termination */

        const regex = /(?:[eE]([+-]?\d+))?$/
  • Actually, no (Score:5, Insightful)

    by mark-t ( 151149 ) <<markt> <at> <nerdflat.com>> on Thursday June 16, 2022 @04:52PM (#62626214) Journal

    One thing working in complexity's favor, though, is that engineers like complexity.

    No, actually... we don't. What we like is not working our asses off to do stuff that we aren't actually being paid to do.

    In my experience, the suits don't really give a shit if asking for features A,B, and C, will make the software more complex, or wasn't part of the original feature specification, they just want it to work, and they want it on schedule. This means that energies are focused on implementing those features, because the expenditure of energy required to offset the complexity they will introduce is not financially justifiable in the time frame permitted to implement the features.

    In a nutshell complexity arises as software evolves simply by virtue of the 2nd law of thermodynamics, and requires a non-trivial expenditure of energy to avoid unless the new features are entirely orthogonal to existing system functionality Software engineers don't *like* complexity, but have usually become highly adapted to working with it. The additional effort to avoid complexity increase may be justifiable in the long run of a software lifecycle, but the people who pay our salaries often don't care about what the software will be like in 3 or 4 years time, let alone 10.

  • by maiden_taiwan ( 516943 ) on Thursday June 16, 2022 @04:53PM (#62626224)

    MediaWiki [mediawiki.org], the software behind Wikipedia and thousands of other sites, seems like a great example of complex, robust software that's been well maintained for ~20 years. Kudos to Wikimedia Foundation.

  • We also see a lot of decision to toss something that works just because it is not modern. The newer alternative is usually more appealing, but sometime it is immature, or it does not fit.
  • The problem with these arguments is they are hopelessly abstract and non-specific. Complexity by itself is neither good nor bad. Whether simpler is actually better depends entirely on particulars of the endeavor. There is no universal truth to the assumption less complex solutions are magically better or ultimately the one that proves to result in cheaper to maintain solutions.

    There are no universally correct approaches yet we have entire disciplines like Agile incentivizing piecemeal implementation of d

  • What about complexity's cousin, bloat? That seems to be alive and well.

  • "a fresh-faced team is brought in to, blessedly, design a new system from scratch." Except, if the company is like Google, the new team doesn't manage to do all the features of the old team. It also turns into a monolith that still isn't as good as the thing it replaced, and is itself shut down after a few years.
  • I've been attached to systems as a part-time administrator. Where local management gave me enough leeway to document the system, add comments and even do some software revision (bug fixes, adding new features, etc). But the scope of my job was poorly defined enough to allow me to refactor poorly written modules and port them from one system to another.

    Eventually, we had a well documented, easy to maintain system that we were able to quickly add features when needed. And the company IT department got pissed

  • Till the last
    Of the first
    Depart,
    And the least
    Of the past
    Is dust
    And the dust
    Is lost.
    Hold fast!
    Gormenghast.

  • It's about knowledge.

    Until the value in preserving the tribal institutional knowledge expressed in the complexity of code base "A" is recognized, we'll continue to build complex systems, and let them dead end.

    People restart things because they're built to run, not to be learned, not to be shared. Companies will use one great coder to get a bunch of work done, but won't spend the time necessary to have that one great coder teach 20 other people what they did. And indeed, it might be difficult to find a cod

  • It seems to me that software typically gets more complex over time because of feature requests. It has nothing to do with engineers "liking complexity" or any of that. It's just that the more a company really uses an application and employees rely on it, the more they come up with wish-lists of additional things they'd like it to do.

    I see developers, even at my current job, putting some effort into "optimization" of existing code. But that doesn't really mean they're trying to subtract features and reduce

  • When will that join the list of complex software being removed for something like inet

  • "You never cure structural defects; the system corrects itself by collapsing". Nissam Taleb

    Taleb must work in my department

  • Two things (Score:5, Insightful)

    by Traf-O-Data-Hater ( 858971 ) on Thursday June 16, 2022 @07:34PM (#62626540)
    35 years as a code monkey here. Maybe 40, who cares.
    Two things annoy me in software:

    1) lack of comments. Not useless comments that say "this adds one to x". Rather, comments that detail the rationale for this thing. What uses it.
    I shouldn't have to use a tool (or a brute-force grep) and ten minutes just to get an appreciation of what I'm looking at. I want to know WHY this code exists, not how it works. Maybe give me an extra line of your thoughts at the top if there are any gotchas

    2) the phrase "Code Smells". Whoever came up with that stupid condescending arrogant put-down had better be the smartest rockstar developer that ever lived. I've seen a lot of code. Good stuff, not-as-good stuff. I marvel at the clever stuff but I don't diss the imperfect stuff.
    Everyone writes and thinks differently. Someone wrote that code and it solved a problem at that time. Maybe they weren't aware of this or that technique, or library. Or didn't handle an exception. So what.

    Everything else I can live with.
  • by Gimric ( 110667 ) on Thursday June 16, 2022 @07:52PM (#62626584)

    There are two different kinds of complexity in software - architectural complexity and business rule complexity. I'm not sure the author distinguishes between the two.

    One of the problems is that business rules are created in the software but not documented (the code is self-documenting, dontcha know!) so when the software needs to be replaced, nobody actually knows what the actual business rules, with all the edge cases and obscure requirements.

    Blaming developers for business rule complexity (and for the business not knowing its own business rules) is just shooting the messenger.

  • FTA "Admit it: as much as we complain about other people's complexity, we love our own"
    NO I DON"T! I hate the complexity that creeps into my code. I try hard to keep it simple, but it's a futile effort. It may turn out to be like the law of entropy. Software complexity increases even when the creator tries hard to avoid it

  • by Targon ( 17348 ) on Friday June 17, 2022 @11:04AM (#62628250)
    There is a basic approach when it comes to software, you have the stuff you want to be in the initial release, and hopefully, the program design will incorporate those features fairly cleanly, with a good design. Over time, new features get added, things change, and eventually, the initial design, which may have been good initially, just isn't designed to handle all the new stuff that has been added. You now have a big bloated mess because of how the new features sometimes need to be shoehorned into the design of the program. Now, at some point SOMEONE should decide that a fresh design is needed, with all of the features in mind, so, a design that can handle it all well and neatly. The "mess" goes away since the program design has them in mind. At least, that is in an ideal world. With people with a business degree and zero real understanding of technology or development, that doesn't happen as often as it should due to just trying to adhere to a budget. Microsoft Outlook is a great example of this, where it should have gotten a proper full overhaul with a multi-threaded design(checking for new messages or doing a search shouldn't get in the way of other things for example). So, you end up with a big, bloated, beast of a program that is difficult to maintain or to add/update features in. There is also an additional complexity, this love of phones/tablets has encouraged a move to, "apps", which generally are smaller and, "lighter" in terms of their features. So, we now have developers pushing APPS into the computer space. Sure, you have an 8-core CPU, 16GB of RAM, plenty of storage, and these developers are pushing things that will run on a phone with only 512MB of RAM, 32GB of storage, and a tiny little screen. The idea of having a program with full features and the ability to do whatever you want them to goes right out the window, just so people with a low end phone can run an app that doesn't do a lot, but provides very basic features. Oh, don't run it on your device, make it run "in the cloud", just so the apps don't need to have any complexity. This is also why a number of devices require a phone/tablet, and won't allow you to set them up with a computer, because the developers can't be bothered to write for multiple platforms. The entire software industry is a mess, and people with a business degree but zero understanding of technology only make it worse when they are put in charge.

Marriage is the sole cause of divorce.

Working...