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.

50 of 748 comments (clear)

  1. Beautiful software by quartz · · Score: 3, Funny

    My software is so ugly it's beautiful. I'm coding in Perl these days. :)

  2. software is incredibly complex... by swagr · · Score: 3, Funny

    kind of like the innards of a biological organism.

    Ever disected anything? It's MESSY.

    --

    -... --- .-. . -.. ..--..
    1. Re:software is incredibly complex... by Blue+Neon+Head · · Score: 3, Interesting

      I think that's a pretty good comparison. Organisms are also buggy creatures with security holes, serious design flaws and legacy code (e.g. the appendix). But hey, life is proprietary. You know, if God/Allah/(insert your Creator here) would just release the source code ...

    2. 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.
    3. Re:software is incredibly complex... by sharkey · · Score: 3, Funny

      Well, there IS an ephemeral beauty in the sight of the innards of a luser splashed about the bottom of an elevator shaft. Or on the wall. Or in ... Hell, it's just beautiful.

      --

      --
      "Outlook not so good." That magic 8-ball knows everything! I'll ask about Exchange Server next.
    4. 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...

    5. Re:software is incredibly complex... by Fortmain · · Score: 4, Insightful

      Beauty isn't really the issue here, it's maintainability. The current project I'm on, I 'inherited' someone elses butt-ugly code. It did the job fine, but I spent the first six months reading, re-reading, and testing, just so I could understand what the thing was doing. All told, I spent over a year just getting comfortable with the program. Meanwhile, I'm also supposed to be updating this thing for a new release every six months! Every chance I got I did 'code clean-up', fixing things that worked, but were difficult to understand the logic of, or just plain stupid (take a long, often-used routine, and make it in-line everywhere rather than use a function!?).

      Finally, after two and a half years, I get the chance to re-write the whole thing into Java. (I know, it wouldn't be my first choice, but ANYTHING beats Powerbuilder!)

      The point is, unless you are writing 'throw-away- code, your program may exist for many years, and have many people maintaining it. We need to do ourselves a favor and make sure that we can understand what we all write. Memory is cheap, so there is no good reason not to write good, clean, easy to follow code.

      And don't give me the argument that "we're up against deadline". I've been playng this game for twenty years, and I know that every minute I spend in the design phase is like an hour saved in the coding phase. Design the thing first! Make sure you know how it is going to break down into the various modules you will use. If you design it right, the code will flow, and you will make your deadline easily.

      I know, all you young hotshots out there won't listen to an old fart like me, but eventually you will either learn the hard way that I am right, or you will burn yourselves out and never want to code again. Meanwhile, _I_ get stuck trying to maintain the crap _you_ wrote!

      --

      We gotta make democracy safe for the world! -- Pogo
  3. 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 Telek · · Score: 5, Informative

      I totally disagree. Well, maybe not totally. "Beauty for efficiency's and future usage and many many other reason's sake" is always a good idea, however not usually practical.

      In how many cases do you end up spending more time and effort in the long run debugging shitty code because it wasn't written properly in the first place.

      For those who know how to write good clean code it's not that big an issue. Writing clean code takes the same amount of time as writing sloppy code, and in most cases it actually takes less. The only difference is that you need to know what you're doing and have enough experience to know how to code properly.

      Also notice that you take away accountibility and responsibility because not everyone can see your code. It's like walking around inside your house in your boxers when noone's at home. And this problem isn't limited to software. Anything that people can't see inside isn't usually pretty.

      Bah, bring me back to the 8086 days where you HAD to code efficiently because you had no choice. Man, anyone remember Wordstar? Everything you needed in a word processor (ok, maybe not everything) in 80kb. DAMN!

      --

      If God gave us curiosity
    2. Re:Beauty for beauty's sake makes crappy software by Andrewkov · · Score: 4, Insightful
      This article is demeaning to programmers. The reason quality is poor is due to unrealistic deadlines, the reason projects are over budget is due to poor planning.

      Most good programmers are capable of creating high quality, elegant code, but are not allowed to because of external pressures that are out of their control.

      And with all due respect to engineers, most software is a lot more complicated than building a bridge.

    3. Re:Beauty for beauty's sake makes crappy software by Slide100 · · Score: 3, Insightful

      Software has to:
      1. Meet user requirements


      Unfortunately, in a great majority of cases, the user doesn't know what he/she needs.

      I can't count the number of times I have installed a system in a hospital (communications systems), made it run exactly to spec, and then have the staff say: "Why does it do that, we have absolutely no need for that! It should do this however".

      Generally, the specs are made by managers, not the people who actually use the device (program, etc). This causes the spec to be what management perceives to be the need, not the actual need.

      Granted, in an software situation, you are supposed to go through everything and find out what they need. How often does this happen? In most cases, a programmer is given a spec and told to write the software to it.

      --
      >B2 Spirit, radar contact......
    4. Re:Beauty for beauty's sake makes crappy software by jfunk · · Score: 5, Informative
      And with all due respect to engineers, most software is a lot more complicated than building a bridge.


      ...and you know this how?

      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?

      Yours is the attitude that spawns crappy software.

      You might tolerate a Windows BSOD, but what if your TV started crapping out on a daily basis? Do you know how involved the TV design process is? There's a hell of a lot more to it than you think and there's a lot more thought put into it than 90% of the code out there. Then you have such things as life-support systems and critical automation, which are a *lot* harder to do than any software out there.

      Oh, and I'm saying this as someone who does both, BTW.
    5. Re:Beauty for beauty's sake makes crappy software by jafac · · Score: 3, Insightful

      basically, you're talking about the problem being that the product is being designed by people other than the engineer.

      Marketroids designing projects and setting schedules will get you an end product that does not appear to be well engineered. Because the engineer didn't design it. The Marketroids did.

      You want software that works? Put the engineers back in charge.
      But then the company that does that will be out of business by the next development cycle. Because their product won't look nice on the comparison matrix.

      Ease of use and word-of-mouth doesn't cut it anymore in this industry. You need the trade rags sucking up. And that takes marketroids.

      --

      These are my friends, See how they glisten. See this one shine, how he smiles in the light.
    6. 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.)

    7. Re:Beauty for beauty's sake makes crappy software by harvardian · · Score: 3, Insightful
      Can I amend that to:

      1. Meet user requirements quickly

      When you build a bridge you have plenty of time to design and implement it. And that bridge will last decades, if not centuries.

      Software, however, isn't meant to last. It's meant to take advantage of cutting edge technology RIGHT NOW. You don't write a program to last for 100 years. You write it to last a maximum of 5 (longer for sparse exceptions). That's why software is often so ugly.

      Maybe after 30 years we'll have an OOPL that will eventually take the cake, and some sort of system where we don't change APIs every month. Then maybe people will be able to write code for the long term, knowing it won't be obsolete in short order.

    8. Re:Beauty for beauty's sake makes crappy software by Keeper · · Score: 3, Interesting

      I believe that it cost about $8000 when all is said and done for each line of code placed in the space shuttle software.

      That's an expensive "{"

      :)

  4. complexity by radish · · Score: 5, Interesting


    The bridge analogy you mention is frequently quoted. And I agree, standards in software design & implementation need to improve - particularly in the shrink-wrap world (I happen to think that in-house bespoke systems are generally better). But the standard response to your standard analogy is that any non-trivial application is hugely more complex than a bridge.

    The design of a bridge is basically the extrapolation of a few well known engineering principles to the scale you want. It has 2 requirements : (1) It must reach from one side to the other and (2) it must not fall down. You may have noticed that software is not like that ;-)

    I remember reading a quote from a famous software scientist (I forget who, maybe Turing?) who said (and I paraphrase here) that we shouldn't be teaching our your computer scientists maths, physics, engineering etc, but rather art and biology. Because programming is an art, it's the creation of something from your own imagination, not like engineering which is simply applying rules. And once created, any large application behaves far more like a living organism than a machine, it grows, it evolves and (often) it gets ill. I always liked that idea :-)

    --

    ---- Den ene knappen er powerknapp, den andre er Bender voice knapp "Bite My Shiny Metal Ass"

    1. 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.

    2. Re:complexity by Keeper · · Score: 3, Insightful

      There is a lot of complicated math involved in civil engineering; I believe the knowledge required is much more than the knowledge required to program a computer.

      One of my best friends in college just finished their masters this weekend. She most definately did not slack off for the last 6 years; I can't count the number of times she pulled all nighters to get things done.

      The difference between engineering a bridge and writing software is that all of the major problems with building bridges have been solved. There is a lot of math and a complicated series of steps and tons of engineering work involved, but the problems have been solved. We already know how to build bridges. We may not know the particulars on how to build a bridge that spans 2000 feet and can hold 500 tons, but the basic theory on how to do this is known.

      Additionally, the application for civil engineering projects are very well defined. They have a small task that they need to perform.

      I think that the most interesting work being done in civil engineering these days is materials research.

      Software on the other hand doesn't have all of the problems already solved. We've come a long way in the last decade or two, but we've come far from solving all problems. I think it's safe to say we've solved all of the simple, basic problems, but the more complicated problems still exist.

      The other problem with software is the scope. The scope of most software packages today is HUGE.
      It involves problems that havn't been solved a 100 times already. And they are non-trivial problems. Sometimes the problems are actually hard to understand -- how do you approach a compression or encryption problem for example.

      Another problem with software that makes it hard to compare with civil engineering is that it only takes one mistake to bring the whole thing crashing down; on a bridge, odds are if a bolt is misplaced the bridge will not fall -- there is built in redundancy; this is not a feature possible to have present in software (not unless you write the software 3-5 times, and have an agreement between routines about the result of a function call).

      There are tons of differences between traditional engineering and software engineering that makes comparing the two fields difficult if not impossible.

    3. 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.

    4. Re:complexity by sterno · · Score: 3, Insightful

      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.
      BINGO! I cannot recall at any point in my 4 year career as a software developer that any given project had concrete and immutable goals before beginning of development. On the best projects we'd have good documentation of requirements, etc, but EVERY time those requirements would change.

      To compare software design to bridge building or most feats of industrial or civil engineering are ludicrous. To put it in perspective imagine this scenario:

      The city planning commitee has contracted to have a bridge built. Original bridge specifications called for four lanes of traffic. The city planning commitee now has decided it must have 8 lanes and the bridge is already halfway done. Do you think the bridge builders are going to stop construction and re-engineer on the fly? If they did, you can bet that bridge would collapse. No, they won't do that, they'll build the bridge, collect their check and go home.

      That sort of scenarios ALWAYS happens in software. Why? Because everybody knows they can get away with bugs, that patches can be released, that ultimately getting it right the first time isn't 100% critical. So they don't worry about it, and why should they? It would be inordinately expensive and arduous to design all software to the tolerances associated with civil engineering, and it would provide questionable benefit in the end.

      The big problem with software engineering principles is that we keep trying to find physical world metaphors for the way software should be designed and they all fail. Why? Because the physical is, for the most part, immutable. So how can you apply those same design methodologies to something that is infinitely mutable? The simple answer is, you cannot. Sure, some aspects may be adaptable, but ultimately accepting that building software is completely unlike building a bridge will make life much much easier.

      --
      This sig has been temporarily disconnected or is no longer in service
  5. nice, but welcome back to the real world by room101 · · Score: 3, Interesting

    I don't get paid to create beauty, especially not internal beauty. I need it to work, not look good.

    The bottom line is, software isn't a bridge or a house, people don't trust their lives to my software. If I made software for the medical field or something like that, yes, I would have a different view. But the fact remains that you should only make it bullet-proof when you need to, because you never have time to make everything bullet-proof.

    --
    room101 -- how much can you stand before they break you?
    (they always break you eventually)
    1. 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.

  6. some suggested resources by Satai · · Score: 5, Interesting

    Personally, I found Donald Knuth's Literate Programming as well as the Practice of Programming to be wonderful resources for writing better, more beautiful code.

    This article is very interesting; the idea of code as an art form isn't new, but this article certainly is aggresive in encouraging it.

    But what about "Extreme Programming" - doesn't it encourage the same thing, in terms of self-commenting code? Or does its specific nature essentially negate that aspect?

  7. And How!!! by Telek · · Score: 4, Insightful

    I can't tell you how many software packages I've looked at that are ABSOLUTELY HIDEOUS on the inside (and open source isn't exactly immune to that either. Anyone taken a look at the code of SSLeay? Good package thou).

    The problem being, however, that once you have money entering the picture, and/or time, then the first thing to go is code quality. Mind you, combine that with the fact that a few years ago anyone who had the patience to sit down and read "How to program in java in 21 days" suddenly became a programmer. Here at work we have a very large codebase that we originally contracted out someone else to do, then took over once we got more funding. They preferred the "copy/paste" approach to doing loops, and tonnes of other hideous hideous things. I've done things like cut down 2500 lines of code to 1100. In fact, the company here could save money in the long run by hiring me to do nothing but optimize, by the cost of additional hardware that they would have had to buy to support this. ugh.

    Unfortunately, in the land of "80% complete is good enough" and where "as long as it works" is a good philosophy, and in a land where "visual basic" is a professional programming language, we're not going to see this improve any time soon. Even Java works squarely against the goal of "efficient". Give me C++ any day.

    I think that another part of the problem is people just not caring about their code, not having pride in what they accomplish. That and people simply not knowing what the hell they're doing. (Not that I know ANYONE like that around here... nope nobody...)

    Argh. Ok sorry, I'll end my rant now.

    --

    If God gave us curiosity
  8. flawed analogy by funkapus · · Score: 4, Insightful

    Typically, the user interface to software is supposed to look good. This corresponds to the visible stuff in a house: the walls, floor, fixtures, etc.

    But does the wiring look pretty? Or the plumbing? Or the unfinished basement/garage? Or any of the stuff that actually makes the house work?

    Hell no.

    Does the engine of a car look pretty? It's covered in grease and all kinds of crap is sticking every which way, and it doesn't make sense to the non-initiated. Function is more important than form when it comes to making the car go.

    I'm getting tired of these calls for purty code. I like an elegant piece of software as much as the next guy, but my manager could give a crap as long as it works, and in fact won't be willing to give me extra weeks to make it look nice on the inside. Particularly when you consider that I'm probably the only person who's really ever going to look at my code.

  9. Re:Open Source, of course by CrosseyedPainless · · Score: 3, Funny

    That's the truth. I know every time I have to show someone my working code, I have to do a parental-visit-strength clean-up before letting them see anything. Of course, we should keep it clean as we go....

  10. 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.

  11. Not CS fault. by Capt_Troy · · Score: 3, Interesting

    It's because managers seem to think that any computer related degree means you can design and write software. I'm not being mean here, but if you have a degree in maintaining networks or creating circuit boards, that does not mean you can design software.

    I would hate to buy a cpu designed by a software engineer. But apparently buying software built by non-software engineers is ok.

    I have found that very few software companys hire only CS majors for software jobs, you look on monster and it says, "Computer related degree required". That's bullshit people.

  12. XP! by Proud+Geek · · Score: 4, Insightful

    That is why we have advanced software engineering techniques like eXtreme Programming. Through it's constant refactoring it makes sure that code is always the best it can be for the task at hand, and constantly improving.

    The only reason that so much code is ugly is that most people do not know about and adopt XP. XP closely resembles the reality of Open Source programming in its implement-now mentality and constant addition of features. If everyone used XP, the software world would be a better place!

    --

    Even Slashdot wants to hide some things

    1. Re:XP! by Lumpish+Scholar · · Score: 3, Insightful

      The only reason that so much code is ugly is that most people do not know about and adopt XP.

      Extreme Programming (still abbreviated XP, despite Microsoft's attempt to dilute the abbreviation) may have a lot to offer many software development projects. But Kent Beck and Ward Cunningham and Ron Jeffries were capable of writing beautiful software before XP was codified, and programmers in XP projects are capable of writing ugly software.

      Refactoring backed by unit tests (two XP practices) can help reduce software entropy, and keep software from becoming ugly; granted. But XP extremism helps no one.

      --
      Stupid job ads, weird spam, occasional insight at
    2. Re:XP! by chipuni · · Score: 3, Informative
      This is not a blast against XP. I think that XP has a number of good ideas. However, XP is not a silver bullet .

      If you're interested in learning to be a better programmer, learn from many methodologies. The following are some of the books in my collection:

      Journey of the Software Professional: A Sociology of Software Development by Luke Hohmann (Prentice Hall, 1997) goes through many of the ideas that make up Extreme Programming, and lets you pick the best choices for your own team.

      201 Principles of Software Development by Alan M. Davis (McGraw-Hill, 1995) is a collection of 201 very simple principles, short-short essays, and links to other books. It's an easy afternoon read that will change your world.

      The Unified Software Development Process by Ivar Jacobson, Grady Booch, and James Rumbaugh (Addison-Wesley, 1999) is a software development book that I trust far more than Extreme Programming.

      Constructing Superior Software edited by Paul C. Clements (Macmillian Technical Publishing, 2000) is an excellent collection of essays about constructing software.

      Regardless of whether you choose the books in my collection or other books, I strongly suggest that you read more than one methodology.

      --
      Never play leapfrog with a unicorn. Or a juggernaut.
  13. Re:Not this stupid 'programming is art' BS again! by servo8 · · Score: 3, Insightful

    I think a problem here is getting to a common definition of art. If a master craftsman pours his soul into a work, how is that not art? Just because the emotions a work may convey cannot be easily categorized and labelled does not mean they are not valid feelings. There are many pieces of "craftsmanship" out there that evoke such feelings. I have felt them myself. Would you deny me that?

  14. 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

  15. 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
  16. A better look by Lumpish+Scholar · · Score: 5, Interesting

    The cited article doesn't say anything profound. (I got particularly worried when he said, "global variables and GOTO statements ... may be exactly what the software needs to marry form with function," and when his example of beautiful software turned out to be a fragment of Visual Basic. "It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration." --said, tongue at most partly in cheek, by Edsger W. Dijkstra, in "How do we tell truths that might hurt?")

    Richard P. Gabriel (whose essay on "Mob Programming" was recently discussed on Slashdot) has a far more profound take on the subject. He has a summary of Christopher Alexander's work on architecture and "The Quality Without A Name," and how it relates to software; you can read the PDF version on his Web site, or Google's cached text version.

    Excerpts: "there are programs we can look at and about which we say, 'no way I'm maintaining that kluge' ... and there are other programs about which we can say, 'wow, who wrote this!'" He suggests how you can recognize software with The Quality: "every part of the code is transparently clear -- there are no sections that are obscure to gain effciency; everything about it seems familiar; I can imagine changing it, adding some functionality; I am not afraid of it, I will remember it." There are even suggestions, not how to make more beautiful software, but how to learn to do so.

    Gabriel helped start the "patterns movement" in the object-oriented community. Aside from the Design Patterns book, patterns (and especially generative pattern languages) have yet to make a significant inpact on software development. Maybe someday, maybe not.

    --
    Stupid job ads, weird spam, occasional insight at
  17. True, but code maintainability can be critical... by Richard+Steiner · · Score: 3, Insightful

    One can certainly succeed in meeting the user's initial basic requirements by writing a pile of spaghetti, but that doesn't make the writing of such sloppy code the preferred approach, at least in the general case.

    Unless you're writing one-off programs for your customers (and how many of those end up being used over and over again?), the long-term maintainability of your code must be kept in mind at all times.

    There's (usually) no guarantee that *you* are going to be the one maintaining the code in the future, at least many settings, and the people who will have to figure out how it works in order to maintain or enhance it will be extremely grateful if you lay your code out clearly.

    So will your users, as they will have to wait a shorter amount of time before that bug is fixed or the new feature added.

    --
    Mainframe/UNIX Bit Twiddler and long time Windows/Linux Hobbyist.
    The Theorem Theorem: If If, Then Then.
  18. Re:Not this stupid 'programming is art' BS again! by jazman_777 · · Score: 3, Funny
    Now now. Art can be seen in any type of medium, even coding.


    The key is to format the code so it looks like an ASCII figure of a bug. The viewer, if he is hip, will appreciate the irony.

    --
    Slashdot: Failed Car Analogies. Amateur Lawyering. Anecdote Battles.
  19. If bridges were programmed... by An.+(Coward) · · Score: 5, Informative
    • Project managers would see the balsa mockup and tell the construction crews to just put the mockup in place because it's good enough to use as is.
    • Somebody would stop the project halfway through construction to insist that it be changed from a simple truss to a suspension bridge.
    • Somebody else would stop the project to insist that it be changed from a suspension bridge to a tunnel, and furthermore, to demand delivery of a tunnel for simple truss prices.
    • Massive traffic jams would occur as users stop at each end and call for help because they can't figure out how to drive across.
    • Architects would be sent out to tow cars and fill potholes.
  20. When it's done. by verbatim · · Score: 3, Insightful

    It comes down to time and person-power. I think the biggest failing (from personal experience ;) )of most software/system design comes from either a lack of time or a lack of planning for time. The promise of "Technology" is here and now, but the bedrock is a sandy beach.

    The other important consideration is person power. It's not necessarily a lack of intelligent and capable people, but rather poor management of their time (either by themselves or from project managers). For example, working long hours in "crunch time" or being forced into the 9-5 cycle. Unfortunatly, my brain does not work on the 9-5. Sometimes I'll work for hours on end in an outpouring of inspiration while other times I'll be staring blankly at an equally blank screen.

    Another thing that corrupts software is the idea of "catch-all" systems. That is, does your web-browser _really_ need an IRC client? or, for that matter, an e-mail client? I think it would be helpful to break software down into individual, streamlined components that does one job - and does it really well, instead of doing a lot of jobs poorly.

    Just my 2 cents.

    --
    Price, Quality, Time. Pick none. What, you thought you had a choice?
  21. management and interns by Sebastopol · · Score: 4, Insightful

    DISCLAIMER: this is not a cheap shot at interns: it is a shot at managers failing to properly groom young hackers into veteran hackers with the humility to focus on the what's best for the project, rather than deft coding tricks.

    i've seen dozens of interns and new hires come in with 1 or 2 semesters of C, and write lots of code, sometimes important pieces of code. management seems to think that if you throw enough newbies at a problem, it's the same as one or two really good programmers. this is a huge management oversight. interns and new hires need good solid mentors and time to develop and hone their skills, and project management needs to enforce design rules. unfortunately, newbies are very reluctant to code to design rules, I know because I always wanted to do stuff my way as an intern (eight years later I'm writing design rules... irony). the result is like a meatgrinder on full speed: code spewing everywhere that all looks different, and is not being tested, regressed or reviewed.

    I've seen projects with strict design rules and rule checkers plus a technical guru/godfather for the project owner: results, fewer bugs and fewer people needed to support the code, and i'm talking about million line simulators.

    solution: mentoring by veterans with large program experience (the really mean veterans, they are the best people to surround yourself with); and a strict adherence to design rules and revision control; and regression/coverage testing!

    --
    https://www.accountkiller.com/removal-requested
  22. You've never seen how a house is built, have you? by skoda · · Score: 3, Interesting

    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.

    You've apparently never seen how a house is built. While the exterior finish looks very nice to the final occupants, the construction process and actual "code" (if you will) of a new home is quite sloppy; easily the equal to typical ugly code.

    Tract housing, in particular, are built as quickly and cheaply as possible. Wires are run rapidly, without much care to particular placement. Builders leave lunch trash inside wall interiors. Finishes are half-baked, details are of little concern. The materials used are the cheapest possible.

    Just like a program, what the buyer sees is the outside finish, and that's basis for their purchase decision normally. But look at how they are actually built, and you'd be afraid.

    People cut corners if they think they get away with it, be it bridges, houses, or programs.

  23. What a complicated question! by gelfling · · Score: 3

    Gee that's a very tough problem. I'm sure I could say something meaningful about but I can't cover it in the allotted time or using the money you're paying me to do it.

    Why does quality suck? Why does performance suck? What kind of quality are you talking about? Functional, aethetic (I guess you mean elegant though), fixable, manageable? Those are all different axes of quality that represent different things, having different values and are achieved through different means and methods. The reasons they fail are myriad:

    1 Management doesn't have a clue
    2 Programmers don't have the skill
    3 No one cares if it's shit
    4 The customer is insane
    5 The customer is cheap
    6 There are too many changes
    7 There is no difference between success and failure
    8 The technology is crap
    9 Poor program/project management
    10 Cult of the hero
    11 A preference for predictable mediocrity over accidental brilliance
    12 The arrogance to believe that what you do is art but what everyone else does is 'engineering'
    13 No accountability for problems
    14 No time for design
    15 Thinking a packaged solution can be installed as-is
    16 Inability to create useful requirements
    17 Scope creep
    18 No test plans
    19 No QA
    20 Poor cost and time estimates

    Those are just the ones I saw today.

  24. Two problems by The+Pim · · Score: 3, Insightful
    There are two problems with this guy's approach:
    1. You can't learn to write good software by talking and reading about it in general terms. The best way to learn to write good software is the same as the best way to learn almost anything: practice, and get feedback from better programmers. Even though I think I understand where this guy's coming from, and I basically agree with him, I think his essay is basically pointless. I think the reason that so many of the posts here are critical is exactly that he is not specific enough to sway anyone who doesn't already look at the issue the way he does.

    2. To the extent that we do understand how to write beautiful software, we don't stand up for it. Although many posters make the obvious point that we are under pressure to get software done, this is not sufficient excuse for ignoring the values espoused in the essay, for two reasons: One, software that merely provides the required functionality may let the user get his job done, but typically requires him to learn the concepts used in the program and put up with its ideosynchracies, because the program doesn't work in terms of the concepts he already uses. This frustrates and alienates the user, and ultimately contributes to the low regard people have for computers. Look around you--almost every object pays some passable respect to usability and form. We shouldn't make (and sell) stuff that's ugly, cumbersome, confusing, and surprising, because it's dehumanizing.

      Two, software that is not conceptually clean is hard to extend. People often talk about maintainability, but it rarely gets priority during implementation. Why did Netscape's browser finally lose? Not because they didn't have good ideas for new features, but because it was internally such a mess that they couldn't improve it fast enough. This is not uncommon.

      So, even when we feel the very necessary pressure to get our code out the door, we need to push back in order to give more attention to beauty. We will benefit.

    --

    The evaluation of an action as 'practical' . . . depends on what it is that one wishes to practice.
  25. Check your premises, something is wrong by eschasi · · Score: 3, Interesting
    michael says:


    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.


    I'm sorry, Michael, but I must disagree. This weekend I had two wonderful counterexamples.


    We had our house built, in fine detail. That included making decisions about such seeming trivia as the knobs on the closet doors. It was a pain in the ass. But we got a helluva well-built house out of it.


    One part of this detailed process was selecting a builder. We knew from wandering thru unfinished houses that there were some real corner-cutters out there. It wasn't that their houses didn't meet code or fell down, but there's the letter of the rule, the spirit of the rule, and (best) is the urge to do it right. Our builder did it right.


    But he's the exception, not the rule. Open up the drywall on any house (or better yet, try to install some paneling) and you'll be surprised how much your house is out of true. We all get it, we all live with it.


    Even as well-done as ours is, tho, there are still some things that are hard to do. Like the pain we had this weekend running 10-baseT cable and coax to my teenagers rooms. Too damned many solid things in the way. Yeah, we didn't think of it in advance -- and twenty years ago, who did? Is this a design flaw? Nope, even the best of houses has errors.


    The other example from this weekend is building a computer for my sister. She doesn't need much; an older system will do the trick. So I went down into the Eschasi's Basement of Dead Computers and started scrounging stuff together.


    You know what? The mechanical design on most legacy PCs is light years ahead of their more `advanced' cousins, the workstation. My SS-10 is much harder to work on than the average PC. And let's not think about some of the other old systems out there...DECStation 3100, anyone?


    Why are PCs relatively good? Because they're designed to be cheap to assemble, and because economies of scale have helped made components standardized. So you get simple parts that plug together simply. For a counter-example, look at any automobile. It doesn't use standard components, so parts are custom-designed for ease of assembly.


    A modern PC, in spite of idiocy like the BIOS and DOS's legacy, is a thing of technical beauty. And so is some of the software we write.


    What distinguishes the good from the bad is (as so many have pointed out here) is (a) what you have to work with, and (b) what you're incented to do. With good tools and good standards and an environment where the software lifecycle is understood, good code is written. I do it damned near every day.

  26. Excellent book by Phrogz · · Score: 4, Insightful

    For a particularly good book describing the problem and situation (fabulous for understanding the flaws in most businesses software design methodology, and more importantly for convincing managers that this is the case) then you should read The Inmates are Running the Asylum by Alan Cooper, the 'Father of Visual Basic' and also author of About Face: The Essentials of User Interface Design .

    It's light on concrete solutions (although the foreward addresses why that is the case) but still a useful primer to read even if you want to solve the problem, since the first step to solving a problem is properly understanding it. It's so fabulously refreshing to see in print a rather respected person describing the problem as I know it to be true, and especially providing big-business, big-name, concrete examples to point to and say, "SEE! IT REALLY DOESN'T WORK TO SET ARBITRARY DEADLINES AND TO START CODING WITHOUT PROPER SPECS!".

    This issue is just a little bit important to me :)

  27. Perl Software Pet Peeve: not using warn and strict by linkyours · · Score: 3, Informative

    I just started a job recently where the previous developer of software that I'm modifying did NOT use warn or strict!!! How the hell do people justify that? I just don't get it... Not only do these tools speed debugging, they make your programs less succeptible to bugs.

    If anyone reading this does NOT use warn (invoked by putting a '-w' after your perl interpreter call, ie: #!/usr/bin/perl -w ), or strict (invoked by putting this after your perl interpreter call or package definition:

    use strict;

    then please do!

    You'll have to make sure your variables are scoped correctly (ie: my $scaler = 'whatever';), which may seem like a bitch but is HELPFUL!

    hehe, ok, enough of this. Hope you all are having a fun day.

    -japh

    p.s. I don't have a tv either, I recommend this if you don't like being brainwashed/desensitized, ;-p

  28. development price... by anshil · · Score: 3, Interesting

    Hmm I fear posting so late nobody might read this, but well I'll post eitherway ahead.

    The fundamental goes about development costs. The article descripes the problem very well in software people can't see inside like in houses or bridges. Okay with OpenSource they can, but still most users won't :)

    The matter is as a project making super stable software is far to expensive to be compatitive. Software for airplanes and for nuclear powerplants is tested with other means than 'normal' software. These software is usually tested with a kind of profiler support, until it is taken sure that -every- branch of the software has at least been taken once, and every loop has at least looped 3 times during the test. This requires high qualified testers, beeing able to read and understand the source, and more important time, time, time, time, which is a lot of money. For high security systems this pays of course of. But again people cannot see how the bridge is constructed, say you will be buying a bridge, and it's a black box for you, you can't see it's fundament, you can't see how it's pillars are constructud, it's just a path from one shore to the other. Now for which of the two will you decide? Okay you'll evaluate both, and ran on both bridges a few times up and down, maybe send or two a cars over both. They're stand you're test, and you can't see the one that's build with super high quality means, build of concentrate and secured with steel cables, and the one that's a chaotic assembly of wood added and added to it until it did no longer break if the builders tried to walk over it. Now the first costs 10 times as much, which one will be bought? (remember you can't see the wood vs. steel)

    So for software, everybody wants graphics, GUIs, 3d, easy click and features, and features, and features, nobody wants a plain but constructed very carefully but boring/simply interface. Your costumers will need the features, are at least think they can't live without and leave you for featurefull wood bridge.

    OpenSource at least eases a little, since people -can- look how the bridge or the house is constructed, but really take yourself, did you ever looked in example at the sources of xfree, gcc, bash or any of the applications you use each day?

    In example when exploring the sources of the linux kernel I've a subjective of course safe feeling, most of the stuff looks nicely constructed, and is not super complicated. On the other hand other (opensource) software I looked at, you shudder, but think, well it runs aster all so I just better wont touch it. I'll not call names for this catagory since this would be just a flame, and maybe only because I didn't understand some stuff. But trust me for a quite some closed applications if you could look at the source (supposing you know C(++)) you would never want to start that application again :o) With source comments allied to the bridge example, /* we added this plank here, since if not the bridge will always fall down when poked 3 times in 1 second distances, we don't know why, but with it vanished. */
    In this case the construciton engineer would investigate and proparly discover it's some kind of harmonic vibrations that cause it to fall down, but for the (commercial) software enginner there is no time or money for this, he couldn't explain his chief they used up 6 weeks to find out why a plank more changed the harmonic oscillations, he just adds a plank and the problem vanished, so the problem is finished within the available resources.

    --

    --
    Karma 50, and all I got was this lousy T-Shirt.
  29. On the contrary, bad design is often visible by Ukab+the+Great · · Score: 3, Insightful

    But you have to know what to look for. I've often found a badly designed user interface to be a real tip off that other parts of the software are crap. I'm not talking about pretty pictures and cute icons (which, unfortunately, is what a lot of people in the free software community think constitutes usability), I'm talking about whether widgets are laid out in an unambigous manner and whether operation of the interface is efficient and cognitively sound. If a company designs one part of the system in a very half-assed manner, they'll most likely do the same with the other part, too.

  30. What unadulterated rubbish by Performer+Guy · · Score: 3, Interesting

    If software were a bridge you'd use it to cross an otherwise unpassable gap between two points, and NOTHING else. There would be 2 or three basic designs which nobody deviated from and nobody would have seen much innovation in decades if not centuries.

    Software is in better shape than this dumb article suggests. You can get better software, but you have to pay for it and folks don't want to. Pay in open source terms means have less software around than you need with developers concentrating their efforts on fewer projects.