Slashdot Mirror


Software Aesthetics

cconnell writes: "Most software design is lousy. Most software is so bad, in fact, that if it were a bridge, no one in his or her right mind would walk across it. If it were a house, we would be afraid to enter. The only reason we (software engineers) get away with this scam is the general public cannot see inside of software systems. If software design were as visible as a bridge or house, we would be hiding our heads in shame. This article is a challenge to engineers, managers, executives and software users (which is everyone) to raise our standards about software. We should expect the same level of quality and performance in software we demand in physical construction. Instead of trying to create software that works in a minimal sense, we should be creating software that has internal beauty." We had a good discussion on a related topic half a year ago.

10 of 748 comments (clear)

  1. Beauty for beauty's sake makes crappy software by GusherJizmac · · Score: 5, Insightful
    Software has to:
    1. Meet user requirements
    Which doesn't necessarily mean it has nice and pretty code. If you have time, you are doing yourself a favor by designing it, but you can't lose track of the purpose of what you are doing, which is to get something working.

    Most techniques for designing or building software (e.g. patterns, processes) all serve to help you avoid bugs, which is to say more efficiently build software that meets user requirements.

    --
    http://www.naildrivin5.com/davec
    1. Re:Beauty for beauty's sake makes crappy software by Jerf · · Score: 5, Insightful
      Ever designed a bridge? Do you know how long it takes? Did you know you only get one chance to get it right during the implementation stage?

      While your reaction is understandable, and it's easy to overstate software complexity, it is not entirely untenable to maintain that software is an unusually complicated beast, by most any useful metric.

      "Useful metric" is where the standard falls down. What metric can we use that makes sense? Can one person understand the design of a bridge? I daresay yes. Can one person understand all of Windows to the same level? I daresay no. Is that a fair comparision? What is a fair comparision?

      We lack a metric of complexity. So I'll submit this: By the rule of mediocrity, "on average, everybody is equally stupid", we must say that software is more complex then bridge-building, because we know how to build good bridges. It's been a while since I've heard of a bridge honest-to-goodness failing from something other then lack of designed maintenence. Software, on the other hand, is still problematic and we've been trying to figure out how to build it for years.

      Self-flaggelating (or, if you are not a programmer, flaggelating others whom you don't really understand) is not really useful. Attributing bad software to extra stupidity on the part of the software authors is quite disingenuous. Odds are, if a lot of very smart people have been working on the problem and haven't come up with a solution yet that seems to work, it's because it's a hard problem, not because the smart people are extra stupid.

      (It's also worth pointing out that the few software team structures that do seem to produce useful, reliable, etc. code also require truly massive expenditures on design, testing, testing, and more testing. Without proof, I'm willing to claim that the amount of money spent developing the software for, say, the Space Shuttle in this manner grossly exceeds the design+labor of any bridge you care to name. (Discount materials for the bridge, there's no clear equivalent in software.) And that's just Space Shuttle software... that doesn't help you email Granny.)

  2. His analogy doesn't work by whjwhj · · Score: 5, Insightful

    Attempting to compare software engineering to building a bridge or constructing a house is flawed. The reason bridges are built to such exacting standards is because if they aren't, they FALL DOWN. They cease to function. 100% failure. Poorly built software, on the other hand, can still work well enough to be usuable. It may imperfect at some tasks, but perform adaquately at others. If it were true that anything less than a perfectly engineered piece of software would simply fail to compile, then we'd all be writing perfectly engineered software.

    An additional flaw in the analogy is this: The function, or use, of a bridge is quite clear: Extend a roadway over an otherwise impassable divide, such as a river. Simple as that. But deciding what the function or use of a piece of software is much more difficult and complex. Software is told to do many things, and the things it's supposed to do changes over time.

    I'm all in favor of well designed software. But his vision is more utopian than useful.

  3. Planning and review save time and money by tim_maroney · · Score: 5, Insightful

    Every extra day that I take to plan, every minute I spend thinking about design, and every extra line of code I write to make my software more pleasing is another line that could add more functionality, another minute wasted not producing something tangible, and another day that I need to be paid.

    That is an absolutely absurd statement. Every moment spent in planning, review, consideration of potential problems, creation of general-purpose solutions, and documentation of architecture pays for itself many times over later in the development, validation, release and maintenance cycles. Failure to undertake sensible planning activities early in a project leads to massive schedule delays from forced late-game rearchitectures that would have been headed off by early consideration, review and communication.

    Software engineering is the only engineering discipline in which the practitioners are permitted to indulge themselves in work without planning or review, and that's the #1 reason that software sucks.

    Tim

  4. Re:Not this stupid 'programming is art' BS again! by Glock27 · · Score: 5, Insightful
    What pretentious bullshit. Software is NOT art. It can be closely compared to bricklaying, or cabinet making, it is a CRAFT.

    Very perceptive...coding software is like crafting a cabinet. However, designing a cabinet is art...and so is designing software.

    Try expressing an emotion in C++. It cannot be done.

    jesus->loves(you); // Sarcasm, for the humor impaired

    Regardless, art doesn't just express emotion, it inspires emotion. And trust me, I've had (mostly other people's) C++ code inspire some pretty horrific emotions. ;-)

    Good design and coding, on the other hand, can truly be things of beauty, regardless of language.

    Please think before repeating these banal opinions that software is art. It just isn't. Deal with it, and if you want to be an artist, learn to paint.

    Spoken like someone who just doesn't really comprehend software design, or why one design might be more elegant than another. I suppose you don't think mathematics is beautiful either...

    186,282 mi/s...not just a good idea, its the law!

    --
    Galileo: "The Earth revolves around the Sun!"
    Score: -1 100% Flamebait
  5. Re:complexity by oddjob · · Score: 5, Insightful

    Your argument rests on the assumption that something you don't know how to do is simple. The reason software quality is low is not because it is more complex than building a bridge.

    -- We've been building software for decades, but we've been building bridges for centuries.

    -- There are natural structures that resemble bridges that we have learned from. For most software, this is not the case.

    -- When a bridge fails, there is a good chance someone is going to die, so you'd better get it right. Software is rarely that critical, and when it is, it is usually better written.

    -- Also, when building a bridge, if you are sloppy about it, you're going to have a lot of dead workers. For coders, caffine overdose and sleep deprivation are seldom fatal.

    -- When building a bridge, it is difficult or impossible to correct mistakes after the fact. With software, just release a patch.

    -- When building a bridge, you have the contract before you start construction. With software, there is always the worry that a competitor will get a product out before you.

    -- If you build a bad bridge, you will get sued. Try and sue Microsoft.

  6. Re:nice, but welcome back to the real world by Myopic · · Score: 5, Insightful
    I've seen this comment a lot in this discussion: "well, my software works, so it's good enough". You even say that you don't get paid to make pretty software; just usable software.

    I suppose that might be true, but I would venture that not everyone is in the same boat. I, for example, AM paid to write pretty code. My job is to come up with relatively simple perl scripts (modules) to solve various problems that Dartmouth's website users have. (For example, I wrote a quota module to help people verify that files they want to write to disk will fit within their alloted disk quota.)

    I have NEVER turned in to my boss anything but well-documented, well-commented, readable code. I don't do this out of respect for my users; frankly, I know how to use the software and if they don't they can read my docs and try to figure it out. No, I do it for the other schmucks like me. At some point, my boss will probably tell his next lackey to add some little feature to one of my modules, as he's asked me to do with some older programmer's works. And it's DAMNED IMPOSSIBLE to wrap my head around code which is all mixed up. I comment for other programmers. People who might need to sink their hands into my code.

    Paying me now to write comments and format things well is worth it for the added speed with which the software will be maintained in the future. So for me, and I'm sure most of the code jockeys on Slashdot, the "real world" is one where software is written, THEN MAINTAINED. Beauty is part of maintanence.

  7. Re:software is incredibly complex... by BWJones · · Score: 5, Insightful

    Its messy if you do not know what you are doing. Just like coding or debugging.

    Biological systems are actually incredibly beautiful well structured, and in many cases optimized for their environment to a level unmatched in artificial systems. (I study vision and I see this sort of stuff all the time)

    At any rate, the analogy to biological systems sort of works and sort of does not. Biological systems are not planned, rather they evolve (valid arguments accepted for religion. However, in human experience, biological systems evolve as we do very little in the way of planning outcomes unless one is making transgenics or cross breeding. Even then we are often simply along for the ride). Software too evolves, but well designed software is thought out and planned in advance with lots of end user input, subject matter expert input, and testing of code and interface to meet the users needs. In my experience with others code and commercial products, most software goes right into the writing phase with very little forethought or planning. "We'll get to that later" is the phrase I have heard again and again. The programmers that stay and get rewarded are the ones that can plan, work with subject matter experts, and listen and implement ideas and suggestions successfully. The ones that will not work long for me are the Prima-donnas that try and force their code down everyone elses throat saying nothing else will work. The reality is that either they are too lazy, or not talented enough and are unwilling to work hard enough to become excellent programmers.

    I am seeing this more and more with the Microsoft way of writing code which is timeline driven rather than product driven. While being good enough for many, in reality it is third rate stuff without a commitment to excellence.

    --
    Visit Jonesblog and say hello.
  8. Re:software is incredibly complex... by Anonymous Coward · · Score: 5, Insightful

    That's about the most naive blanket statement I've ever read. "its always best to have good code, not code that looks good."

    Consider a project that lasts 5+ years. Over the life of the project, there will be dozens of developers added and cut from the payroll. Assume your "good code" gets executed once or twice a week and instead of taking 2sec it takes 1sec. You've saved 1sec (possibly 2sec) per week which adds up to 52secs (or 104secs) per year.

    Let's compare that to the human maintainer. Assume one person has to look at that code 1 time every 6 months and it takes them 30 minutes to understand it. That's 60 minutes that someone is getting paid to understand that code.

    If the person earns $80,000 US, that's about $4 (assuming 4 week vacation) that was spent on the human. It's actually less when you consider that a person's salary is not their labor rate. Over the life of the project (5 years) you've spent $83 on your "enhancement".

    Now, if the cost of up'ing the Mhz on your CPU is greater than $83 then it may make sense to implement the "enhancement". However, when you consider the price differential between a 900mhz processor vs a 933mhz processor (the argument being that a 933mhz processor could run the slow code and keep up with the 900mhz processor running the fast code) you won't find an $83 difference. It'll be more like $20.

    That being the case, humans are more expensive than computer CPUs these days. Maybe they weren't in the past, but they are today.

    Another argument for clean easily-readable and understandable code is that, if you take your argument, the entire system will become "enhanced" and no one will understand how it works. That will add on an additional overhead in the form of lack-of-enthusiasm for a project and will have financial implications.

    All in all, I've worked on XP projects where code formatting and understanding was important. And I've worked on government contracts where people hack'ed their way through to save a couple of cycles. Maintainability speaks volumes... And I'd go with readability and understandability in a heartbeat...

  9. Re:complexity by StevenMaurer · · Score: 5, Insightful

    That's an easy one to answer. Software companies don't back their products because their customers don't expect them to. Instead they expect low prices.

    Bill Gates is a billionare because he was one of the first people to realize that given a choice between a $200 program that works flawlessly and a $99 program that fails 5% of the time, most people (and businesses) will choose the cheaper product (while moaning how bad software is).

    Note that this isn't the case in all software markets. Banking and T.V. are both industries which I've worked in, in which customers actually demand quality. If it's crap, they won't buy it no matter how cheap it is.

    Funny enough, Microsoft is not in either business - and not for lack of trying.