Slashdot Mirror


'The Code Has Already Been Written'

theodp writes "John D. Cook points out there's a major divide between the way scientists and programmers view the software they write. Scientists see their software as a kind of exoskeleton, an extension of themselves. Programmers, on the other hand, see their software as something they will hand over to someone else, more like building a robot. To a scientist, the software soup's done when they get what they want out of it, while professional programmers give more thought to reproducibility, maintainability, and correctness. So what happens when the twain meet? 'The real tension,' says Cook, 'comes when a piece of research software is suddenly expected to be ready for production. The scientist will say 'the code has already been written' and can't imagine it would take much work, if any, to prepare the software for its new responsibilities. They don't understand how hard it is for an engineer to turn an exoskeleton into a self-sufficient robot.'"

253 comments

  1. yes I can by Anonymous Coward · · Score: 1

    yes I can, at least 5 times more than it took to wright the first time. Thats why I will use it myself to do research, not try to make it usable to others, I do not have that long between needing to publish. It is just not worth doing and with the joys of specialization it probably would not be worth it for someone else anyway.

    1. Re:yes I can by Anonymous Coward · · Score: 0

      that explains why your climate model is useless.

    2. Re:yes I can by Anonymous Coward · · Score: 0

      What, "wright"?

    3. Re:yes I can by Anonymous Coward · · Score: 0

      He must work in aerospace.

  2. This is so true by Anonymous Coward · · Score: 1, Informative

    I'm working on commercializing NASA software and this couldn't be more true. When talking to the inventor they inevitably say "Oh yea the software is done, anyone can write code for this, should be easy to sell." even if it's coded in Fortran,, has no Gui or documentation of any sort. It definitely is functional but hardly has any of the features consumers demand.

    1. Re:This is so true by milkmage · · Score: 3, Insightful

      "It definitely is functional but hardly has any of the features consumers demand."

      isn't this expected (or at least not surprising). if I were a NASA engineer, I'd see the program as a tool to help me accomplish the larger task. the more time I spend on tools, the less time I spend on progress to the larger objective. I'd write the program as quickly as I could.. would not care about UI, functionality, usability or anything else, I built it for me to use - as long as the output satisfies my needs, i'd consider the task done and move on.

    2. Re:This is so true by Frosty+Piss · · Score: 3, Funny

      I'm working on commercializing NASA software and this couldn't be more true. When talking to the inventor they inevitably say "Oh yea the software is done, anyone can write code for this, should be easy to sell." even if it's coded in Fortran,, has no Gui or documentation of any sort. It definitely is functional but hardly has any of the features consumers demand.

      You know, php / ruby / scripting-language-du-jur might solve many "Web 2.0" problems (Jquery, MooTools, and all the other JS libraries are seriously cool stuff), but there is a reason there is "still" a lot of scientific coding being done with Fortran (which continues to be developed like most modern programming languages), and other "niche" languages. This is not the forum to educate you on that little but notable fact...

      But really, I can't quite decide if your post is a troll or not, with lines like "even if it's coded in Fortran" and "has no Gui" and "hardly has any of the features consumers demand"...

      I mean, is NASA really writing software that might readily apeal to "consumer demand"?

      I'm leaning in the direction that your AC post is a troll, so I'll give you a few points for being able to get me to respond, but I have to subtract points for the lameness and general poor lay-up.

      You show potential for developing a good troll shtick / persona but you've got a long way to go. 2 out of 10. Work on it.

      --
      If you want news from today, you have to come back tomorrow.
    3. Re:This is so true by MacTO · · Score: 1

      Many of those people who "can't program" actually can program. They simply understand the program's requirements. Maintainable code is not always a requirement since a lot of software written in research labs is intended to be written once and run a handful of times.

      It's also worth noting that properly structured code from a programmer's perspective is not always the same as properly structured code from a scientist's perspective. "Turn(ing) problems into object models," may be the last thing that scientific code needs because most problems are procedural in nature (particularly for data analysis, and even for modelling).

    4. Re:This is so true by quietwalker · · Score: 1

      You get what you ask for, because they know how to turn problems into object models, but you have to ask VERY carefully.

      As a developer (and one in the financial industry at that), if there was one single thing I could suggest that would have the biggest impact on software development, it would be this:

                    Enforce a 'Good Requirements' only policy.

      This may require a lot of training, and a great deal of rejected requirements for not meeting the standard, and cause great grief to those who think their 15 second explanation of an 80+ man hour feature implementation is sufficient. It certainly requires that the programming team be empowered to reject bad requests.

      I think I have yet to work at a company that has not effectively told me that they would not meet their deadline if they took the time to spell out what they actually want. When I point this out, the universal response is something along the lines of a shrug and a smirk. Often followed by a "well, it's 5 o'clock, I gotta run ... let me know how that turns out tomorrow morning."

      In all honesty, I have to say that I feel it's pure laziness. When I give lessons, use SDLC software, etc, the thrill goes from "We're doing it right," to "Oh no! I have to do work!". Then they try to work around the system or believe that desk drive-bys are still okay, and then complain when someone is laid off or quits and no one can pick up their work.

      I don't know what's so hard about it. The idea is simple and applies to so many things; hard work now results in less work later, when it's more expensive and time-critical. Isn't this taught in business college, PMP certification, etc? What the heck?!?

    5. Re:This is so true by tnk1 · · Score: 3, Interesting

      We're discussing the ability to commercialize that software, not to simply use it.

      Yes, it works. It may even work quite well. It's another thing to be able to use it outside the original group that created it and another thing entirely to turn it into something that can be used by someone who wants to use the functionality for a completely different task.

      I've written code that is for a task that I need to get done for myself. This means I can use any arcane method of entering data that I feel like in any format I feel like. If I know exactly what I will be entering and in what format I will enter it, I don't need to do data validation steps in the code. If I know that it won't hurt something to just control-C out of the script, I won't bother creating a "Quit/Exit" functionality. All those things are not needed if you know your code and what it can and it cannot do. The problem is that if you want to commercialize it, you will be selling it to people who do not know what it can do.

      And yes, NASA can write code that can have commercial applications. Of course, perhaps not for the "consumer" that you are thinking of, but businesses and even other research groups can be consumers of a product. They are going to be made up of people who are not going to want to spend their time learning your arcane methods of doing things to make the program work for them. They will want an interface that can allow them to make use of the powerful capabilities of your software without having to either write it themselves or spend a huge amount of time learning it and its quirks.

      FORTRAN is great, and I have used it myself for things. I think perhaps that it is off-base to have used that as a slur against these programs. However, FORTRAN is a bit of a niche skill in this day and age. You're not going to be able to leverage the great majority of coder resources today if you insist on using it for the code base, and it will make some things more difficult to manage, like perhaps not a slick GUI, but something that is functional and makes the software easier to learn and work with.

    6. Re:This is so true by Anonymous Coward · · Score: 0

      So the troll thinks his post is generally complete.. The responder thinks that there is still a tonne
      of work to do before it is a flame-ready slashdot-grade troll...

      Isnt it ironic......

    7. Re:This is so true by Chris+Mattern · · Score: 1

      Maintainable code is not always a requirement since a lot of software written in research labs is intended to be written once and run a handful of times.

      While those of us who write programs on a regular basis know that often there's nothing more permanent than temporary code.

    8. Re:This is so true by dcollins · · Score: 1

      Isn't this short-term thinking endemic to the financial industry in the first place? I mean, programmers joke about unmaintainable code as personal job security -- but hard-charging finance guys would actually act on that.

      I assume they understand the incentives of their job, and have the training and/or personality to ruthlessly focus on that. They have bonuses and commissions to collect, yes? They get no additional income from well-written code, or something that assists their replacement next quarter or next year. They don't really give a crap if the next guy's job is feasible or not -- then he can serve as a scapegoat in the political throw-under-the-bus game. That's my impression (not involved in finance except for stories from a friend in insurance IT).

      --
      We know where leadership by an anti-intellectual "strongman" who scapegoats minorities and likes boisterous rallies goes
    9. Re:This is so true by Frosty+Piss · · Score: 2

      However, FORTRAN is a bit of a niche skill in this day and age.

      I disagree. I think you miss the point: FORTRAN was and *IS* widely used for the tasks that it excels at. Other languages are *NOT* widely used for the tasks that FORTRAN excels at.

      "In this day and age"?

      This leads me to believe that you really don't know what type of things FORTRAN (and perhaps other "niche" languages) are used for, and why it makes sense to use them. As well, you seem to be under the impression that development on the language itself stopped years ago. In fact, work on new versions of FORTRAN has never stopped, continues to this day, and is not carried out by dirty hippies in their mom's basement someplace.

      FORTRAN is not a Web scripting language, perhaps that's why you are having trouble wrapping your mind around it...

      --
      If you want news from today, you have to come back tomorrow.
    10. Re:This is so true by elsurexiste · · Score: 1

      Agreed, when I wrote HPC code for physicists, I was appalled when I saw the programs those people wrote. They wasted precious cycles doing pointless iterations and recalculating stuff. Don't bring a scientist to an engineer fight.

      --
      I rarely respond to comments. Also, don't ask for clarifications: a brain and Google are faster, believe me!
    11. Re:This is so true by Anonymous Coward · · Score: 0

      Many of those people who "can't program" actually can program.

      I'm not sure I'd agree with that generally. I took me ~2 years of industry experience before I think I started to write "clean" code, and (sorry for the lack of modesty) I'm an unusually fast learner and had a very strong CS background. People who write hacks most of the time just don't pick up the skills needed to write clean code. It's not just a matter of commenting code, avoiding magic constants, etc. It's an art that, like writing, takes years of practice to really get good at.

    12. Re:This is so true by turbidostato · · Score: 5, Interesting

      "I'm working on commercializing NASA software and this couldn't be more true."

      I don't think is just NASA. Wasn't an IBM engineer the one that said: X time for a valid prototype; 10*X for an in-house product; 100*X for a commercial packaged application?

      Given that what a scientist does for her calculations is in the "valid prototype" stage (why the hell would she be interested in anything else?) you can do the math about how much it will cost to put it on a shelf, so to say.

    13. Re:This is so true by turbidostato · · Score: 1

      "Yes, it works. It may even work quite well."

      Then the scientist developed the code exactly to the point that brings him what he needs. That's good engineering practice, isn't it?

      "It's another thing to be able to use it outside the original group that created it and another thing entirely to turn it into something that can be used by someone who wants to use the functionality for a completely different task."

      Which if any, it is your jobs, not hims, to acomplish.

    14. Re:This is so true by oursland · · Score: 0

      The fact that you continue to use the upper cased FORTRAN seems to bolster the idea that you don't know what you're talking about with respect to the language.

    15. Re:This is so true by Anonymous Coward · · Score: 0

      I'm working on commercializing NASA software and this couldn't be more true. When talking to the inventor they inevitably say "Oh yea the software is done, anyone can write code for this, should be easy to sell." even if it's coded in Fortran,, has no Gui or documentation of any sort. It definitely is functional but hardly has any of the features consumers demand.

      <troll>

      But really, I can't quite decide if your post is a troll or not, <troll>

      <troll>

      <troll>

      <troll>

      icwatudidthere ;)

    16. Re:This is so true by SomeKDEUser · · Score: 0, Troll

      FORTRAN is a horrible language. Abominable. It is ugly, inconsistent, baroque.

      People will insist FORTRAN is faster.This is a lie. Has been since about 20 years. They will tell you it is "perfectly suited" to their purpose. It is not. Simply, they have no clue, no sense of aesthetics, and the ir Stockholm syndrome is too entrenched.

      I do numerical simulations, and I consider myself a scientist. But I was trained as an engineer, And I know just what the author of TFA is talking about. Too many scientists think that once you have written the equations, your work is done.

      Basically, the numerics is just number-crunching, right? No. If you want to solve interesting problems, the code must also be efficient. And if your problem is really interesting (aka not very well defined, because you are doing research) a well-written, well architectured piece of code will save you tons of time down the line.

      And this cannot happen in FORTRAN. In theory, it could. But I never so that happen.

    17. Re:This is so true by anubi · · Score: 2

      As much as I hate to speak not-so-glowingly about the first high-level language I learned, I must admit once I dabbled in Borland C++, I was hooked big-time.

      My programming is definitely the exoskeleton. Not for display. Its for me and me alone.

      My latest programs are mostly thermodynamic equation solvers to help me with heat transfer and physical work output estimations. These programs model systems I am working on. They help me estimate heat exchangers, entropy loss, flow rates, pipe sizes, refrigerants (mostly R290 Propane), ice formation rates, heat rejection rates. This kinda stuff is meaningless to anyone else, but its exactly what means anything to me. By the time anyone else understands what I have done, they would have been better off writing their own code as I have done for myself. That way, they know exactly what their computer is doing, and would have a really good sense what's wrong when something peculiar is observed.

      When I used to work in Aerospace, I had coded lots of programs that helped me do circuit analysis, SMPS magnetics, and phase-locked-loop design. These were mostly re-iterators which would change one parameter to make some other parameter meet some specified value. I hated running someone else's code because if I didn't know exactly what was going on, I was wide open to some very embarrassing (and usually very expensive) misunderstandings.

      Even to this day, my old Borland C++ for DOS, with my assorted libraries which I have coded over the years, is my tool of choice for horsing around with computational techniques. When all is said and done, if I need graphical outputs, I can make bitmaps, and if necessary, animate a series of them as an AVI ( I got the code for that right over at SourceForge as EasyBMP,... Thanks, guys! ).

      About the fanciest I get is if I *really* get seriously worked up, I put it up as a web page (in the vein of TCP/IP Lean by Jeremy Bentham) so I can transfer data in our out via the RJ45 jack. I have a drawer of 3-Com 905 boards just in case the machine I'm tinkering on doesn't have one.

      I don't enjoy at all spending all that time gussying the code up for GUI presentation. (Neither do I enjoy getting all gussied up myself for formal dinners!). I am at the core a scientist/engineer, not at all a suit-guy. I am firmly of the camp that ranks design quality above packaging, even though I know as well as anyone that its packaging that sells a product.

      --
      "Prove all things; hold fast that which is good." [KJV: I Thessalonians 5:21]

    18. Re:This is so true by Concerned+Onlooker · · Score: 1

      "You show potential for developing a good troll shtick / persona but you've got a long way to go. 2 out of 10. Work on it."

      You were generous. I would have given him a 1 out of 5.

      --
      http://www.rootstrikers.org/
    19. Re:This is so true by Anonymous Coward · · Score: 0

      Many of those people who "can't program" actually can program. They simply understand the program's requirements. Maintainable code is not always a requirement since a lot of software written in research labs is intended to be written once and run a handful of times.

      That's a blatant lie. The only time that EVER holds true is if all the files only exist on a USB key and you chuck it in the microwave when you're done. Shitty code which "works" (for a very narrow definition of works) will always be dredged up in lieu of rewriting it properly.

      It's also worth noting that properly structured code from a programmer's perspective is not always the same as properly structured code from a scientist's perspective. "Turn(ing) problems into object models," may be the last thing that scientific code needs because most problems are procedural in nature (particularly for data analysis, and even for modelling).

      Okay, you're definitely not a programmer so are talking about things you know nothing about. A real engineer is adaptable, if he/she can't design a procedural/modular (more likely a hybrid blend) program if it's more appropriate in addition to OO then they are probably a cargo cultist who doesn't understand why OO exists in the first place. You've also apparently never seen Smalltalk where everything, including integers/floats, is a type of object.

    20. Re:This is so true by _Shad0w_ · · Score: 1

      The problem is not that it's their job to accomplish this, it's the scientists saying "but the code is already written, you don't have much work to do" when this is, in fact, not true. The further problem becomes when other people listen to the scientist and get unrealistic expectations of how long it will take for a product, which can be sold, to be ready.

      --

      Yeah, I had a sig once; I got bored of it.

    21. Re:This is so true by bemymonkey · · Score: 1

      Not to mention that engineers/scientists writing their own little programs in math languages (Matlab is used a lot around here) or even straight higher level languages are usually very problem-oriented - a few lines of code for each single problem, without much re-use going on unless the problem to be solved is always the same one...

      I actually quite like this approach in the simplified, FORTRAN based Matlab - writing a new script is incredibly fast, because everything's kept so simple - but it's just too much work in the more universal higher level languages... if I had to do all my problem solving with C I'd probably go insane because of all the background work for setting up a few simple calculations. Then again, I'm no C programmer, so maybe for those well versed in that, Matlab would be horribly slow and inefficient ;)

    22. Re:This is so true by Anonymous Coward · · Score: 0

      It's expected that the NASA engineer who wrote it wouldn't waste time on documentation or a GUI. It's not expected that he would think the software was done and should be ready to sell. It's like a race car driver thinking that he can start selling his race car to regular people, not realizing that the seat is custom-fit to his body or that it needs things like street-legal tires and turn signals.

      dom

    23. Re:This is so true by Anonymous Coward · · Score: 0

      I hope NASA engineers don't get away with writing software no one else understands. Not after Columbia.

    24. Re:This is so true by LordNacho · · Score: 1

      Many of those people who "can't program" actually can program. They simply understand the program's requirements. Maintainable code is not always a requirement since a lot of software written in research labs is intended to be written once and run a handful of times.

      It's also worth noting that properly structured code from a programmer's perspective is not always the same as properly structured code from a scientist's perspective. "Turn(ing) problems into object models," may be the last thing that scientific code needs because most problems are procedural in nature (particularly for data analysis, and even for modelling).

      This is very true. If your code really doesn't need future modification, that's fine. Often though, you start off thinking "Hmm, this doesn't have to be perfect" and uhm, it's turns out that way when it comes time to extend the functionality.

    25. Re:This is so true by Anonymous Coward · · Score: 0

      If the code is anything like mine (and NASA's Code is likely better) it takes input in the form of plain text files, whose format is either documented clearly or easy to deduce from the code (cause Fortran really, truly sucks at plain text which is why we keep it simple).

      And if you find yourself unable to write a wrapper and a GUI around that, why the fuck do you call yourself "programmers"?

    26. Re:This is so true by EsbenMoseHansen · · Score: 1

      As someone who has used both (well, Octave rather than matlab), I'd say that C would be the wrong choice for anything you'd consider matlab for. C++, on the other hand, would be an obvious choice, and given the right libraries, the code wouldn't be that much more cumbersome. What Octave/Matlab gives you is interactivity: you can stop the calculation anywhere and screw around, you can save the entire state wherever and experiment and you get a nice copy-on-write on all data elements. And, at least for Octave, you can slowly convert your program to C++ one function at a time, if you want to. This makes it a nice prototyping language.

      --
      Religion is regarded by the common people as true, by the wise as false, and by rulers as useful.
    27. Re:This is so true by xkuehn · · Score: 1

      FYI, "trolling" means that you take a stance you don't really support in order to elicit a heated response, possibly over multiple posts.

      Poking fun at someone is not trolling. Sarcasm is not trolling. In fact, anything that doesn't appear serious is probably not a troll at all. Mods take note.

    28. Re:This is so true by bemymonkey · · Score: 1

      If you're an experienced C++ programmer, sure. Matlab seems much easier to pick up for non-programmers :)

    29. Re:This is so true by Anonymous Coward · · Score: 0

      Columbia wasn't a software failure (though admittedly it was a failure of safety assessment - like Challenger - and that can occur software as well).

    30. Re:This is so true by turbidostato · · Score: 1

      "The problem is not that it's their job to accomplish this, it's the scientists saying "but the code is already written, you don't have much work to do" when this is, in fact, not true."

      Of course is not. Nor it is (usually) among the scientist's abilities to to lead and valuate a software project effort. No news here.

      "The further problem becomes when other people listen to the scientist and get unrealistic expectations of how long it will take for a product, which can be sold, to be ready."

      While not a surprise this says nothing about the scientist but about the managerial abilities about the one believing nonsenses.

      It is hardly the fault of the one obviously not knowing what's saying to say nonsenses but the fault of the one believing him when his job is to know better.

    31. Re:This is so true by Certhas · · Score: 1

      > Too many scientists think that once you have written the equations, your work is done. I became a scientist rather than a programmer because I don't care for the extra work. Once the equations are written down _MY_ work is done, and the programmers begins. I'm not so vain to think that I could do their work as well as they can and I am paid for doing what's in my range of expertise. I sucked as a coder, because to me code was always just a way to express an algorithm, an idea, I never cared about what's happening at the metal level. I hate C. If I had dabeled in coding 10 years later than I did I probably would have liked Haskell.

    32. Re:This is so true by Aceticon · · Score: 1

      I also work in IT in finance (investment banking, front-office) but I have a long background in working in other industries, including Software Products and Services.

      I agree with what you say, having seen what you describe in multiple places (I'm a freelancer, so I change often enough).

      I would say that an inability to bring in new blood is both a cause and a consequence of the inefficiency of IT in finance (in my estimation, about 3x more people are required in a finance environment that in an IT consultancy for the same kind of project).

      The vast majority of people I see around me working IT in finance have made their career from the beginning inside that environment. They never saw or learned IT industry best practices and practice IT (from coding up to architecture and process management) like they see most people around them do it - the "finance-way". This applies to management also, where the same self-selection-for-finance-industry-old-hands also applies.

      The end result is a lack strategical and tactical awareness: no sound development process, no management strategy, no design strategy, not even code-for-support practices, resulting in a lot of two-steps-forward-one-step-back coding, design and project management. This wastes (a lot of) time, in turn resulting in (as you point out) a lack of time to teach the business to any experienced software designers, developers or managers brought in from other industries.

      With little or no new blood coming in, long-standing process flaws that were already solved in other industries remain and even when best practices are adopted, they're brought in for being fashionable in the industry (Agile just recently became the fashion du jour) rather than as well understood tools to solve a known problem (for example, properly done Agile would do wonders to aleviate the development issues that come from the fast changing requirements environment in investment banking front-office).

      Since management all the way to the top is usually made up of industry old-hands, there is a lot of money sloshing around in finance (so the business is willing to spend a lot of money in hiring IT people), and most people in IT in finance believe that their top-pay must mean they're above average (they're not) this state of affairs persists.

    33. Re:This is so true by EsbenMoseHansen · · Score: 2

      Non-programmers surely shouldn't be making production code in any case :)

      --
      Religion is regarded by the common people as true, by the wise as false, and by rulers as useful.
    34. Re:This is so true by Xyrus · · Score: 1

      Here's the problem with that line of thinking: It's stupid, short-sighted, and ultimately incorrect.

      Having worked with many scientific code bases I can tell you from first-hand experience that this "just for me" code will be taken and shoe-horned into an already atrocious mess of code. That code will be used to validate research, or far worse, potentially be used as or become part of a decision aid or workflow. This makes any existing code bases or workflows your personal train-wreck of programming exercise gets included into more fragile and bug prone, and serves to exacerbate the issues that already exist.

      If you're writing code, write it correctly. Or for $DIETY's sake, at least write it in a coherent manner so someone else can come in and fix it. We don't need any more examples of how to NOT to write code in the scientific community.

      --
      ~X~
    35. Re:This is so true by Xyrus · · Score: 1

      I mean, is NASA really writing software that might readily apeal to "consumer demand"?

      Yes. Yes they are. Consumers aren't just Joe and Jane Sixpak, but research organizations, government agencies, etc. . The harder these applications are to use, the more time is wasted trying to figure out what the variable "T" really means.

      --
      ~X~
    36. Re:This is so true by plover · · Score: 1

      If you think your programs are for you and you alone, you're probably being irresponsible to your employer. Or if you're self-employed, you're probably being irresponsible to your clients.

      You are doing this work for someone else. The systems you're designing are going into a customer's production equipment. You're claiming the next person to come along should just redo the same research you already did, because he could never understand your model. Do you honestly believe the next guy is really that dumb? Perhaps the problem is not with his ability to understand, but rather with the roughness of your model. Consider if your models were constructed from much smaller modules and each module came complete with tests that both document how your models works and proof that they do work, you'd be turning over that value to the next guy without forcing your company (or client) to pay him to redo your work.

      As a benefit, you'd not only have the ability to transfer your knowledge to someone else, you'd also have the luxury of being able to hold up that model in court and say "Not only was this system calculated and designed to support these conditions, but here are the tests I ran to prove that the calculations were made correctly. Clearly the system failed due to a different cause, or to these parameters being exceeded far beyond the design limits."

      --
      John
    37. Re:This is so true by AmberBlackCat · · Score: 1

      "It definitely is functional but hardly has any of the features consumers demand."

      isn't this expected (or at least not surprising). if I were a NASA engineer, I'd see the program as a tool to help me accomplish the larger task. the more time I spend on tools, the less time I spend on progress to the larger objective. I'd write the program as quickly as I could.. would not care about UI, functionality, usability or anything else, I built it for me to use - as long as the output satisfies my needs, i'd consider the task done and move on.

      I don't know if it's related or not, but that has been the primary problem with open source projects thus far.

    38. Re:This is so true by gr8_phk · · Score: 1

      Maintainable code is not always a requirement since a lot of software written in research labs is intended to be written once and run a handful of times.

      Maintainable code is always a requirement. If you feel otherwise, you are part of the problem. In research, there is always someone trying to get a follow-up grant to continue the research - which will re-use what you created. Now if someone else is going to do the work next time, you may interpret the situation as "Maintainable code is not a requirement for this grant/project, or for me". That is a correct interpretation of YOUR requirements, not the code's requirements.

    39. Re:This is so true by enupten · · Score: 1

      I think the only reason people use FORTRAN is because of the large number of (fast, well-tested, reliable) Numerical libraries available for it - all of course in Fortran 77. I find calling FORTRAN libraries from C, to be much less mind numbing - again thinking here of Fortran 77, not its modern evolute. Then again this also what MATLAB, Octave, Maxima, SciPy do; sometimes however endless layers of abstraction can be stifling. Things however are changing; FFTW is one fine example of this.

    40. Re:This is so true by anubi · · Score: 1

      The problem I have with making fancy code is that it takes a long time for me to do all the "presentation" stuff and bounds-checking required for decent "releaseable" software.

      My employers usually have time deadlines they hold me to and I have to use my judgment on cutting corners so I can still meet deadlines and targets set by management. If I spent a lot of time doing fancy software, I would most likely be delivering poorly thought out science.

      If management found out I had time to make fancy code, they just trim the time estimates next time. And they did. I do the best I can in the time allotted to me.

      I choose to spend that time doing science, not presentation.

      --
      "Prove all things; hold fast that which is good." [KJV: I Thessalonians 5:21]

    41. Re:This is so true by plover · · Score: 1

      Actually, I wasn't talking about creating a "presentation" like a document or a powerpoint deck, or even writing fancy code. I was only talking about writing automated unit tests.

      A suite of well-written automated unit tests does several important things. First, it proves that your modules behave as expected in the test cases. The tests themselves are the documentation that provide clearly written examples of how to properly call the modules. And running the whole test suite gives you confidence that if you make a change anywhere in your code to meet new requirements that all the old tests still pass.

      Even if you never present it to anyone or if your requirements never change, if someone were to pick it up next year they could see not only that it still passes the tests, but how you originally intended for it to work.

      I'm guessing from your .signature "Prove all things..." that you're already taking the time to prove your code works in other ways. If so, you're probably spending almost the same amount of time that it would take you to write a good, clear, repeatable, automated unit test in the first place (after you're experienced in the skill, of course).

      Yes, the initial learning of how to write effective, readable unit tests does take a bit of time, but it's probably nothing you couldn't pick up in a few days. If you're interested, I would recommend asking someone experienced to coach you, as they can help you learn some of the tricks for making your tests clear and readable. And once you grok the practice and learn more as you gain experience, you may move on to even better practices like test driven development. You'll likely be amazed at how much it will help you improve your skills, your code, and your confidence in it.

      --
      John
    42. Re:This is so true by anubi · · Score: 1

      You give excellent points, John.

      Its been my experience - things like "being a perfectionist" and "exercises poor judgment"- being placed in my employment record by supervisory types made me reconsider how much I want to do what I considered a "complete" job.

      I lost my employment at an aerospace corporation over an argument over using proprietary software. I flat did not trust that software because I was ignorant of how it worked, nor did I know any of its file formats. I felt I *had* to stand my ground because the product I was designing for the government would be around for 30 years, I felt the proprietary software would be dead in two years - if that. If I can control my tools and what I write them in, at least I know I can access it anytime in the future I need to. I can still access every project I have ever done - and that's back to 1987. I have lived though numerous machines, but the software - because I used standard file formats and programming languages, lives on. To me, its like the original story referred to as an "exoskeleton". Its like my cyber home, where I know where everything is, what it does, and how to change it if I want.

      That's why I have built everything around standard C++ and simple non-DRM versions of what was once popular programs. The programs install easily via the old DOS techniques, and I guess the biggest problem would be in finding out who to send the royalty money to as by now everything I have has been either given away on magazine CDROMS or its abandonware.

      I saw on Slashdot a couple of days ago some general lamenting over his IT being in "the dark ages" and nothing talks to anything else. That is exactly what I was trying to keep from happening. The manager who was forcing proprietary software on me kept his job and got a bonus. I ended up working independently from then on. That proprietary software required special hardware and dongles to run, yet it did nothing special. It was just a moneymaker for someone who knew how to work the system.

      Well, I *did* stand up against authority. I felt they were delusionally persuaded by slick salesmen who were after the government buck. Guess I've seen too many Steven Segall movies. And probably paid too much credence to those "ethics awareness" courses. Carborundum is useless for executive bedding.

      The points you bring up are very valid. If I was working in a group that would stay together for more than a few months it would definitely be the way to go.

      --
      "Prove all things; hold fast that which is good." [KJV: I Thessalonians 5:21]

  3. I expected more by kikito · · Score: 3, Insightful

    The abstract in Slashdot is pretty much the whole text in the linked post. The other 3 paragraphs repeat the same idea.

    1. Re:I expected more by rubycodez · · Score: 4, Insightful

      The whole premise is stupid anyway. I've worked with plenty of scientists in national labs that turn out production grade, maintainable code; and programmers who didn't. The core issue is getting people who write code for reuse by others to follow guidelines, regardless of title or profession.

    2. Re:I expected more by NoNonAlphaCharsHere · · Score: 5, Insightful

      It isn't stupid at all. Lots and lots of scientific software is written by grad students worried about the results, and don't care about the quality of the code itself. Their idea of what is "good code" has no relation to what a programmer who's worked in a production environment would call "good code". And invariably they decide to include libraries from other grad students at other institutions of equal or lesser value. And don't even get me started about documentation...

    3. Re:I expected more by Nyeerrmm · · Score: 2

      The problem with that is recognizing what code is going to be reused by others and what isn't.

      I'm an aerospace engineer who writes a lot of code (and does so on the taxpayer's dime), and it is a struggle to find the right balance between getting something functional for the immediate task, and recognizing what will be useful for others later. Since its much more difficult to write the second variety (particularly if it needs to be generalized for as-yet unknown tasks,) its just as important to perform some tasks the quick way as it is to do others the right way. Otherwise I am wasting precious resources.

    4. Re:I expected more by Anonymous Coward · · Score: 0

      This is not just these two groups. I have seen the same thing come out of management meetings. "Oh that demo you have looks good lets ship it". Or my personal favorite
      "its just one button that should be easy",
      "It will be 3 weeks worth of work",
      "How can that be its just one button"
      "you want that button to do 20 things the code doesnt do yet so 3 weeks".
      "oh"

    5. Re:I expected more by icebike · · Score: 4, Insightful

      The whole premise is stupid anyway. I've worked with plenty of scientists in national labs that turn out production grade, maintainable code; and programmers who didn't. The core issue is getting people who write code for reuse by others to follow guidelines, regardless of title or profession.

      Because you can point to a few (very few) exceptions does not make the story untrue in the vast majority of cases.

      Scientist code is usually a giant JUST-SO story, sufficient to derive the results they need for the task at hand.
      They either don't have, or avoid putting in data that will crash the program so limit checking is not necessary.
      Crashes are fine if they do nothing more than leave a trail of breadcrumbs sufficient to find the offending line of code.
      Output need not be in final form, and any number of repetitive hand manipulations of either the input or the output are fine as long as the researcher does not need to spend more time writing any more elaborate code.

      This is perfectly fine. The cabinet maker makes jigs. They are designed for their own shop and no one else has exactly the same saw and exactly the same gluing clamps. When the cabinet maker sells his shop, these jigs become useless. Nobody else knows how to use them.

      The scientist who takes the time to do a full fledged, fully documented, maintainable, fail-soft package for analysis of data that is unique to their project and their apparatus is probably not doing very much science, and probably not doing their intended job. That budgets force them into this situation is not unusual.

      It happens every day in industry, academics, and research. To hand waive it away by saying you know someone who delivers the full package merely calls into question your own understanding of the meaning of a complete, fully documented, maintainable, transferable, and robust software package.

      --
      Sig Battery depleted. Reverting to safe mode.
    6. Re:I expected more by Fnord666 · · Score: 4, Funny

      The problem with that is recognizing what code is going to be reused by others and what isn't.

      One way to tell is to ask if this a temporary quick fix for something. If they say yes, assume it will be in production forever.

      --
      'The tyrant will always find pretext for his tyranny.' - Aesop's Fables
    7. Re:I expected more by rubycodez · · Score: 1

      The other half of my career dealt with in-house code writers. I can assure you they have the same problem, by and large, and worse code

    8. Re:I expected more by rubycodez · · Score: 2

      grad students != scientists

      Code by students who are actually learning to code professionally will have the same issues.

    9. Re:I expected more by Anonymous Coward · · Score: 0

      Its no different then any other experimental environment. When you are experimenting the only thing that matter is getting the result you want. When you get the result you want, you then go back and figure out how to make it work in the real world. Thats the standard workflow for any kind of experiment to production. Isnt that what engineers are for? Someone who bridges the gap between scientist and production? Either way i only mention it point out that this entire article is about perspective, nothing more.

    10. Re:I expected more by mjwalshe · · Score: 1

      yes at my first job (at a world class rnd organization) we built our of fluid dynamics software to model fluid flow and we did a ton of work back checking our code against real life.

    11. Re:I expected more by gmueckl · · Score: 4, Informative

      Exactly this! It is not about the education of the people writing the code. It's about the purpose for which it is written. I've done it all.

      As a scientist most software that I write is geared to solving the problem at hand, nothing more. Sometimes this can be 10.000 lines of C++ code, at other times a short python script or 10. Each time, the code serves as a sort of automation for something that needs to be done anyway (I could attempt to compute the simulation result myself, by hand on pen and paper, you know... if I don't die of old age first ;) ). Often, not a single thought goes into how to make this stuff reusable, robust or more generic. It works on the one machine it is ever going to run on and very likely nowhere else, because it does not matter. What matters is the program output, not the program itself.

      As a software developer I have to think differently. Software gets compiled, packaged and deployed elsewhere. It must run out of the box, never crash, give useful error message and recover cleanly if something bad happened. And amidst all this effort, there's a tiny bit of code hidden somewhere doing the actual work. All that matters is that the program behaves correctly, no matter what the concrete output is. I might not even be expected to understand what the output actually means - it's not my primary concern.

      See the difference?

      --
      http://www.moonlight3d.eu/
    12. Re:I expected more by Anonymous Coward · · Score: 0

      You don't need to write repurposable software, just maintainable and testable software.

    13. Re:I expected more by 16384 · · Score: 4, Informative

      The bulk of scientific research is done by grad students (or others like them with various kinds of scholarships). The professors whose name is at the end of paper's author list guide and oversee what is done, but don't have time for the daily grind of research. Their main job is to teach and get funding.

    14. Re:I expected more by Oligonicella · · Score: 1

      Frankly, no. Your software is used to determine conclusions. It should be as available and legible as any other portion of the output or your conclusions are suspect.

      Else wise, you wind up with "Oops! Can't find it or don't know what that part does."

    15. Re:I expected more by ceoyoyo · · Score: 1

      Research code should be written with good practices if possible but it should ALWAYS be rewritten when it becomes something more than research code.

      Research is trying things out to see if they work. The code will always be messy, confusing and convoluted to some extent. Taking that as a package and turning it into some sort of product is silly.

      I have a degree in CS and just recently helped commercialize something that came out of my PhD. The tech transfer company blew their budget hiring a development house to clean up and modify my research code for release. After six months they ran out of money without a working product. I rewrote it in a week from scratch, much faster, smaller, simpler and more maintainable than the research chicken scratch ever could have been.

    16. Re:I expected more by calmofthestorm · · Score: 3, Informative

      PhD students at tier 1 and 2 research universities are basically bottom-rung scientists-in-training (sometimes with UGs below them). For our first year or two we'll take a class or two a term, but the bulk of our time is spent doing research, writing and reading scientific papers, and presenting at conferences. For the last 3-4 years we typically take no classes and spend all our time doing research and teaching. We're professionals who make $20-$30k/yr depending on the location, plus full benefits and tuition waivers for any classes we do take. Expectations of workload are typically higher than entry level positions in industry (50-80 hours/wk, depending on the field and PI), and pay is obviously worse. The postdocs and professors do do some of the research themselves (especially when younger), but for the most part their time is spent directing the general direction of the research and applying for grants to fund it, doing the work (for free) to review and organize journals, and of course teaching. Most of us are aware we won't be going on in academia after the PhD, and I at least am okay with that.

      It's nothing like a masters or a undergraduate degree at all. We really aren't students in any meaningful sense of the word given the modern sense of college, aside from the fact that we'll get a degree in time. In Europe there are post-graduate degrees awarded after the PhD, so I guess you could call their postdocs "students" as well.

      It's completely different outside STEM, however, with PhD students typically earning little to nothing and sometimes having to pay tuition.

      --
      93rd rule of Slashdot: No matter how obvious my sarcasm is, my comment will be taken seriously by someone.
    17. Re:I expected more by Anonymous Coward · · Score: 0

      Lots and lots of scientific software is written by grad students worried about the results, and don't care about the quality of the code itself. ... And invariably they decide to include libraries from other grad students at other institutions of equal or lesser value.

      Basically what they need is a high level language limited in such a way that a compiler can generate results comparable to the best C compilers and an assembler, with a "360" capability for concurrent and parallel programming from the GPUs and FPGAs to vector machines, clusters and distributed computing.
        A better analogy for the research code could be the engine of the robot instead of the exoskeleton. The results are after all the "meat" of the code and an engine doesn't move anywhere without an exoskeleton, just like a piece of non-portable code doesn't.

    18. Re:I expected more by Anonymous Coward · · Score: 0

      Of course grad students are scientists.

      I spent 6 years doing scientific research. Do you think I
      became I scientist the day I was given a piece of parchment
      which said "PhD" on it? You've got it backwards... they gave
      me the piece of parchment in recognition of the scientific contributions
      I had made at that point.

      Oh, almost forgot... as a scientist turned professional coder, I'd say the
      original article was essentially spot on. :-)

    19. Re:I expected more by jasomill · · Score: 2

      Scientist code is usually a giant JUST-SO story, sufficient to derive the results they need for the task at hand.
      They either don't have, or avoid putting in data that will crash the program so limit checking is not necessary.
      Crashes are fine if they do nothing more than leave a trail of breadcrumbs sufficient to find the offending line of code.

      Funny — this could as easily describe how physicists often write mathematics.

      In this paper (the paper itself is here), Feynman notes that

      The mathematics is not completely satisfactory. No attempt has been made to maintain mathematical rigor. The excuse is not that it is expected that rigorous demonstrations can be easily supplied. Quite the contrary, it is believed that to put the present methods on a rigorous basis may be quite a difficult task, beyond the abilities of the author.

      Feynman's "exoskeleton" nevertheless led him to some reasonably well-respected work in quantum electrodynamics. But my point is simply that the problem isn't with "scientists," it's with intelligent people confusing 'ability, in principle to understand X' with 'actually understanding X in practice' —a fallacy that is very common in IT, and one Feynman quite consciously worked to avoid. Life is short, "all one surveys," quite long. Besides, it cuts both ways: it's not at all clear that developers who don't understand the underlying science would do a better job with scrupulous documentation, because even if they bothered to RTFM, they wouldn't have the necessary background to understand it. The net result might be a loss stemming from a "false sense of comprehension."

      Finally, it is not unusual for engineers to "understand how hard it [will be] to turn [a given] exoskeleton into [the required] self-sufficient robot" only in retrospect, thus it seems quite silly to expect anyone else to understand this at the outset —here I did not say "believe one understands."

      For "turning an exoskeleton into a robot," write "double-entry bookkeeping," "plumbing," "formal mathematical proof," "horseback archery," or "dating," and nothing much changes— it's hard to have a good working knowledge of something one has no experience doing.

    20. Re:I expected more by Anonymous Coward · · Score: 0

      The majority of "scientific" software I see written today is by grant chasers.
      In many, many instances it is just another professor looking for summer work or extra income. Its not that they dont care about the quality of the code. The issue is, quality code costs time and money and it is something they are willing to compromise on. Instead of hiring a qualified programmer, they will seek out someone from the local school that is dirt cheap if paid at all. Said grant chaser then pockets the bounty of the money after the university takes their cut.
      The second issue deals with plausible deniability. Grants are very often tied to an unspoken expected outcome. Some might call it fraud but others just blame an inexperienced programmer.

      Professor: "I want x == y"
      Student: "but x != y"
      Professor: "then fix the code until it does".

      Yes, that is the state of our university system so dont be surprised by the shit quality of the code.

    21. Re:I expected more by icebike · · Score: 1

      Well said.

      And the corollary is that you don't need to know everything about a tool to use the tool.

      Spending any significant amount of time learning even a close approximation of everything about any given tool wastes the work product of civilization, unless you are the tool maker.

      --
      Sig Battery depleted. Reverting to safe mode.
    22. Re:I expected more by Lennie · · Score: 1

      I do think he got the basic idea right:

      The end product of the scientist is the output of the program and the conclusions he/she derives from that.

      The end product of the professional programmer is the program and it will very probably need to be changed again at a later time.

      --
      New things are always on the horizon
    23. Re:I expected more by Anonymous Coward · · Score: 0

      Higher doctorates (such as the DSc) are awarded on the basis of achievement in a field. They are not awarded as a result of supervised study but a lifetime's work: note the age of most recipients. They should be considered the equivalent of the media's lifetime achievement awards.

    24. Re:I expected more by HungryHobo · · Score: 1

      "The scientist who takes the time to do a full fledged, fully documented, maintainable, fail-soft package for analysis of data that is unique to their project and their apparatus is probably not doing very much science, and probably not doing their intended job."

      that's very debatable.

      total number of citations can be a big deal in academia and some of the most cited papers in existence are tool papers.

      BLAST netted the author almost 35 *thousand* citations.

      and that's a real measure of how many other scientists were able to do work more easily thanks to the tool.

      "real science" is largely about the shoulders of giants. as such making easy to use and powerful scientific tools is just adding a nice access ramp and railings for your own shoulders.

    25. Re:I expected more by The+Master+Control+P · · Score: 1

      You know, every thread we have about HPC/parallel computing this comes up:

      "We just need a compiler that magically autoparallelizes well."

      Do you have any idea how difficult it is to write parallel code for any non-trivial application? It's hard enough to get the openmp/openmpi "magic parallel" options to work worth a damn when compiling Fortran or C. I've spent _months_ getting about 10 pages of code to not only run CFD/MHD on nVidia GPUs, but actually reach a sizable fraction of theoretical performance.

      Nvcc can't even figure out that px[x]*px[x] doesn't require two memory reads without me saying to store it in a register first. You volunteering to not only write the compiler that will do that for Nvidia's architecture, but point out to me where the speedups are, instead of me painstakingly explaining them as if to a particularly slow child? And make sure it can do the same for AMD, and Cell, and MPI machines, and hierarchial systems with multi-GPU nodes on a larger MPI network? No such compiler exists and it's not for lack of trying.

    26. Re:I expected more by Anonymous Coward · · Score: 0

      this guys blog is repeatedly stupid, and he will constantly post his crap all over news sites

    27. Re:I expected more by Chalnoth · · Score: 1

      Meh, in reality you just develop some sufficient tests to ensure that the code behaves properly, and publish the nature and results of those tests in a manner that is sufficient to convince others that the code is working properly. Then, in the event a problem still remains in the code, well, this is why science in general relies upon independent verification of results, so that even if there is an error in the end, others will find it.

      Now, for larger projects it is always better to make the code public, and therefore to enforce a degree of readability/maintainability. But for most applications people just aren't that interested in the code: it's more important to get it done than it is to worry about sharing it, because it is highly unlikely that anybody else will want to use it.

    28. Re:I expected more by Anonymous Coward · · Score: 0

      Their main job is to get funding.

      FTFY

    29. Re:I expected more by Anonymous Coward · · Score: 0

      I've written plenty of code (IAAS) which shouldn't be production grade but is in production. When you are in a competitive field the line between beta and production is vanishingly thin. Where things go badly is when beta is done on onesy-twosy (handfuls) of data and expected to work for orders of magnitude more data.

    30. Re:I expected more by tombeard · · Score: 2

      To the scientist the program is a tool, to the programmer it is a product.

      --
      The reason we subjugate ourselves to law is to better procure justice. If law does not accomplish this purpose then it m
    31. Re:I expected more by bemymonkey · · Score: 1

      "I've worked with plenty of scientists in national labs that turn out production grade, maintainable code; and programmers who didn't."

      Do you know scientists who turn out production grade, maintainable code, even if they weren't specifically asked to? If you're writing a program to solve a specific part of the problem you're working on, and are only going to use it that one time (happens often in scientific fields and engineering), why would you bother to make it neat and maintainable, or even understandable to the outside world?

      I CAN produce clean, modular code that is maintainable and can be extended easily - but that doesn't mean I should have to for every little problem that comes my way. I'm sure most engineers and scientists think that way... why spend two hours on my little script when I could be done in 10 minutes?

    32. Re:I expected more by EETech1 · · Score: 1

      Isn't Microsoft working on something to do just that (program will optimize itself at runtime for various hardware combinations) for future versions of .net? I thought I read about that (here) on Slashdot.

      ducks...

      Cheers!

    33. Re:I expected more by nerdyalien · · Score: 1

      agree for the most part....

      I had to leave grad school at the three year milestone, as funding wasn't there to continue even a semester more. So if you do not generate enough results to back up your thesis, you are toasted, you have just wasted 3 years of your life (if lucky, you will graduate with a Masters). I really wanted to produce a prototype/demo version of what I did (or at least clean up the code removing all the scaffoldings and debug junk). But time was just enough to write up my thesis.

      Also remember, researchers do not do coding all the time.. they have so many other activities to engage, such as finding relevant research material, reading books, learning new topics, work with collaborators, reverse engineer code written by others, write papers, peer-review other's work etc etc. So coding is just a minor task of the whole research experience; and you can't possibly expect them to write production level code, which professional coders get 100% of their work time to engage in.

    34. Re:I expected more by kovari · · Score: 1

      To the scientist the program is a tool, to the programmer it is a product.

      A lot of the code I write as a scientist, are essentially sums of logarithms.

    35. Re:I expected more by Anonymous Coward · · Score: 0

      In Europe there are post-graduate degrees awarded after the PhD, so I guess you could call their postdocs "students" as well

      What? I'm German, PhD student at a Max-Planck institute (which means I see a lot of scientists from all over the world) and have never heard about that (besides habilitation - basically, professorship).

    36. Re:I expected more by backwardMechanic · · Score: 2

      A lot of scientific software is run less than 10 times, often only once. It generates the result, end of story (well, go away and understand what you got). There really is no point in extensively recoding for reuse, checking all the consts are const, etc. Documentation of the form 'does X using method Y (numerical recipes page P)' is often enough - i.e. a couple of lines of comments at the top of the file. It doesn't have to look nice, it just has to be correct. And don't even get me started on optimization (spending three weeks to cut a 12 hour runtime in half is not worth the effort).

    37. Re:I expected more by chrb · · Score: 1

      Lots and lots of software is written by people worried about the results, and who don't care about the quality of the code itself.

      Fixed that for you. Programmers who are more concerned with results than code quality are everywhere.

    38. Re:I expected more by chrb · · Score: 2

      Scientist code is usually a giant JUST-SO story, sufficient to derive the results they need for the task at hand. They either don't have, or avoid putting in data that will crash the program so limit checking is not necessary.

      Welcome to the worlds of in-house, bespoke and embedded software engineering. This issue is not limited to scientists - in every company I have ever worked at, "getting it done" was more important to management than "code quality".

    39. Re:I expected more by Anonymous Coward · · Score: 0

      There it is, we can't have everything we need. ;) The problems tend to hover over storage and data movement and although it's an NP-complete problem, perhaps a "storage compiler" and a storage description language with suitable heuristics and hardware support come to our rescue one day. What I'm thinking about is one set of languages to describe the computations and the other to describe the storage hierarchy and management, the legacy be dammed.

    40. Re:I expected more by Anonymous Coward · · Score: 0

      But that's still not the same thing as producing a polished, portable, stable, maintainable product.

    41. Re:I expected more by Anonymous Coward · · Score: 0

      That fine, except...

      If the output is part of the input to a paper, rather than a throw-away result, the code and the input data needs to be published as well. Reproducibility, you know. That's the real peer-review of research, other people reproducing your results. That includes double-checking your work with your raw data, as well as the experimental procedure generating the raw data. My apologies if you already understand this, you should already understand this, but I've seen too many cases in the news where it was obvious that some scientists don't understand this.

    42. Re:I expected more by Anonymous Coward · · Score: 0

      You said "do do". Grammar Nazi cannot allow this to escape unnoticed.

    43. Re:I expected more by Anonymous Coward · · Score: 0

      Woosh...

      Look the point of the GP's post was that when writing a program for "scientific use" you don't have to write in all the error checking, and user interface amenities that you do in a program written to be "sold". The resulting program will be leaner and easier to understand than one that has been "user-proofed". It will also take less time to write.

    44. Re:I expected more by gr8_phk · · Score: 1

      Finally, it is not unusual for engineers to "understand how hard it [will be] to turn [a given] exoskeleton into [the required] self-sufficient robot" only in retrospect, thus it seems quite silly to expect anyone else to understand this at the outset —here I did not say "believe one understands."

      It is well understood how hard it will be to turn an exoskeleton into a self-sufficient robot among people who build such robots for a living. This is an analogy where the professional robot-builders are the software guys who get handed the exoskeleton. They know in advance what it takes.

    45. Re:I expected more by Mab_Mass · · Score: 1

      Actually, I disagree.

      I work in biotech, and I write a lot of scientifically-geared code. Whenever I have tried to "just bang out" a piece of code, I find that as soon as it starts to break past a few screen-fulls of code, taking the time to write more modularity will save me time in the end. Even if you don't write the general, all-purpose, completely flexible in every way piece of code, just breaking it down into smaller functions/objects that each handle a small part of the general problem makes the code more readable and easier to debug.

      Perhaps one the differences here is that I also find that almost invariably the "one-off" script turns out to be useful again and again, so if I cut corners immediately, I'll end up paying the price in time further down the road.

    46. Re:I expected more by DragonWriter · · Score: 1

      It isn't stupid at all. Lots and lots of scientific software is written by grad students worried about the results, and don't care about the quality of the code itself.

      End users rarely care about the quality of code, they always care about the value delivered by the code. So, yeah, just as lots of business software (in the form of Access databases, excel spreadsheets often with extensive custom VBA, etc.) is written by end users that don't care about code quality, so is lots of scientific software. Code quality has no intrinsic value, it has instrumental value in terms of value delivered by the code (e.g., cleaner code reduces the cost of debugging the code and adding new functions.)

      OTOH, IME, scientists who write tools that end up needing to be improved (either because they see new uses they'd like to put them to, or because they let other people use them) are no less quick than any other programmers who don't have previous experience with "productized" software to pick up on the value of taking steps to improve maintainability and flexibility.

    47. Re:I expected more by roman_mir · · Score: 1

      I'd hire you, you see the forest between all those trees.

    48. Re:I expected more by blacklint · · Score: 1

      Not necessarily. For many classes of problems, the answer is much easier to verify than it is to determine in the first place. If a giant mess of software is used to create an easily verifiable answer, that answer is no more suspect than if the software was perfectly simple and readable.

      For example, if there is a mathematical proof that the best possible routing through a graph is n units long, and a giant mess of spaghetti code finds a path that is n units long, I would be perfectly happy accepting it as a valid answer. Even though finding the path may be incredibly complicated, it is easy to check when an answer. I'd be equally as happy with a correct answer drawn by a toddler, but the spaghetti code hopefully has a better chance of finding one.

    49. Re:I expected more by Anonymous Coward · · Score: 0

      Frankly, you're being obtuse. Code that is being wrote for one single-use purpose with one data set and used by one person one time... Does not need things such as exception handling for every single case, good UI, etc. That's the difference he was pointing out.

      We're talking about software that never even gets looked at after it's first and only use. Will never be maintained again, etc.

    50. Re:I expected more by Anonymous Coward · · Score: 0

      That's part of the genome project. Money was specifically given to develop code and tools. On the projects I work on, money is given for results only. We have proposed to make tools once or twice, but we've never been funded for that. However, people still request our in house code. I'll give it to them if they really want, but when I explain it uses our own in house libraries and data formats, they decide it's really not that hard to project a few angled or add a few vectors on their own.

    51. Re:I expected more by Anonymous Coward · · Score: 0

      You summed it up. The two approaches serve two distinct objectives.

  4. Not Just Scientists.... by Anonymous Coward · · Score: 0

    Most managers think the prototype is the product.

    1. Re:Not Just Scientists.... by Anonymous Coward · · Score: 0

      I've encountered code written by plenty of programmers that think this way too. This is a general gripe and OP is simply singling out "scientists" due to some personal prejudice.

    2. Re:Not Just Scientists.... by Anonymous Coward · · Score: 0

      I would actually gripe that it is the programmers who think that prototype is the end product. They got the bits moving in the right order from place to place and they think that it has some use. Meanwhile the underlying data doesn't function in the way it's handled and any tiniest modification to the code to handle the actual data which needs to be handled involves changing code in 5-10 different places. Because, hey, the data is already moving through the "code path", so it getting the numbers aligned "should be easy."

    3. Re:Not Just Scientists.... by John+Bresnahan · · Score: 1

      Hell, I've had managers who thought the PowerPoint mockup was the product!

    4. Re:Not Just Scientists.... by SleazyRidr · · Score: 1

      So many times, I've had a project to do, and I've sped up my work with a little scripting (I won't even call it programming, it's that low level) that takes the inputs I have and give me the results I want. Then I brag to my boss that my script let me do it so much faster. Then some time later, someone else has a vaguely related piece of work to do, and my boss tells them "Go and talk to sleazy.ridr, he's got a program that'll do that for you!" Some people understand the code and can rewrite it to suit their needs (of course it's spaghetti code, but we want results) but other just get pissed off at me that I haven't done their job for them.

  5. One-off vs. Product by gomerbud · · Score: 4, Insightful

    To a scientist, their software is simply a tool, a means to an end. Their results and discoveries are what they really care about. When it comes to reproducing scientific results for verification, it is actually advantageous that another group not use existing software. Another research group using the same faulty software, with the same hidden bugs, will likely come to the same incorrect result.

    Productization of software is a completely different exercise. You have to make your software work for a larger crowd on a plethora of devices. You actually have to consider how your software fits into the larger product lifecycle. The key difference here is that you have customers that you need to keep happy.

    --
    Kan jeg få en pils, vær så snill?
    1. Re:One-off vs. Product by petes_PoV · · Score: 1

      This tells us that academics view of software is incompatible with the commercial world. So all that teaching CS in universities does is train CS graduates to think the same way - that the code is the product. This goes a long way towards explaining why there's so much poorly documented, badly explained and crappily designed stuff out there. Because the people who write it have never been educated in the importance of productising it.

      While that shortcoming can be overcome in a commercial organisation, with lots of ancillary staff to write manuals., design UIs and even correct the spelling in the user interactions, there's little chance that freeware authors would have those skills, or even care about the lack of those qualities - it explains a lot.

      --
      politicians are like babies' nappies: they should both be changed regularly and for the same reasons
    2. Re:One-off vs. Product by swillden · · Score: 5, Insightful

      There's a nice concept devised by Ward Cunningham which captures this issue nicely: "Technical debt".

      Failing to put in the effort that makes code maintainable during its construction incurs a notional "debt" which the software carries with it. Future developers working on the code "pay interest" on this debt in the form of time wasted on understanding and modifying the crappy, undocumented code, or on fixing bugs that wouldn't have been present if the code were better. Sometimes, those future developers may decide to spend time refactoring, building tests or documenting, and those cleanups pay down the "principal" on the "debt". After their cleanup work is done, future work has smaller interest payments (less effort for the same results).

      Startups often deliberately decide to incur great amounts of technical debt on the theory that if the revenue starts flowing in they'll have the money to fund paying it down, but if they don't start getting some money the whole company will evaporate.

      For scientific research, it's pretty clear that it also makes sense to incur lots of technical debt in most cases, because there's little expectation that the code will be used at all once the research is complete. Even when that's not the case, I think few scientists really know how to create maintainable software, because it normally is the case. I don't see a lot of scientists spending time reading about code craftsmanship, or test-driven design, or patterns and anti-patterns, or... lots of things that at least a sizable minority of full-time software engineers care a lot about.

      I guess the bottom line, to me, is that this article is blindingly obvious, and exactly what I'd expect to see, based on rational analyses of the degree of technical debt it makes sense for different organizations to incur.

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
    3. Re:One-off vs. Product by Anonymous Coward · · Score: 0

      I agree.. this is similar to what I call an execution debt with .NET, java and other 'managed' runtimes.. the programmer takes less time developing, but the longer execution times add up for the customer..

    4. Re:One-off vs. Product by godrik · · Score: 1

      That's a very narrow view. An artist makes painting but also know how to paint is wall white. An artist knows how to draw, but can also sketch to express an idea.

      I am an academic. And most of my code is thrown away after use. (Well, it is actually stored, in case I need it later. But I usually don't.) Moreover, most of my code is just there to tell me if a given approach work or does not work. Once I know, I don't care about the code anymore.

      Still I know how to write a proper code with a proper documentation. I just don't do it for most of my code. Still we release software. The code could be better engineered than it currently is. But we will most likely not have more than 20 users. So what is the point of paying for my time or the one of a software engineer? Still there is not a single function that does not have an explanation of what it does what the parameters are. Some corner cases might not be explained though. Error handling is "quickly done", the code should not crash but trigger an assertion (which can be user-defined).

      tldr: it is not because an academic do not use software engineering technique that he does not know or understand them and that he can not teach them.

    5. Re:One-off vs. Product by cynyr · · Score: 1

      A lot of the stuff I see/help write, is for modeling a physical product, the code is simply a way to guess how it will react in the real world within some margin. The code is not the product, it simply helps sell the product. These products might change in such a way that the model needs to be rewritten maybe every 10 years. By then the original writer is gone, 3 versions of microsoft office have come and gone, as have 6-15 versions of the company wide selection software.

      Basicly even if the old code was documented, it wouldn't matter as it would need to be re-written anyways. Knowing the limits of the model is much more important than how it works.

      --
      All of the above was encrypted with a Quad ROT-13 method. Unauthorized decryption is in violation of the DMCA.
    6. Re:One-off vs. Product by turbidostato · · Score: 1

      "the people who write it have never been educated in the importance of productising it."

      Which is only important if your goal was productising it to start with.

      Which for the most part, it is not the goal of for-academic-goals produced code.

      You know, software can be written for different reasons.

    7. Re:One-off vs. Product by Anonymous Coward · · Score: 0

      Hear Hear!

      If I make a little script to do something I'd have to do anyhow, but that thing is a waste of time and a pain in the ass for a human to do, it saves the company time and money. Benefit for the company; I'm done at this point. Maybe I'll save a copy in case I need it later.

      If somebody comes to me and says "gee, this is a pain in the ass; do you have anything that makes it faster", I will happily give them a HWIH with instructions to "take what you need and leave the rest.".

      The problem arises when some asshole says "Ooh, neat, a toy. I have no idea what it does, but it's shiny. I will now assume it does whatever I can convince a customer he needs it to do and sell, sell, sell.
      And the next call I get is "Did you know your software breaks when you do this? Here is a list of problems you need to fix and features you need to add. Please send me the user's manual. Why did you do such a half-assed job on this? Please tell me exactly what this does. Why does your code suck?"

      So, what is the result? Next time I find a way to automate my job, I keep it to myself.
      You get greedy? Then you get nothing.

  6. My dear abacus by DigiShaman · · Score: 0

    If I'm getting this right, scientists view software as nothing more than a specialized calculator. They don't want a program that spoon-feeds them information let alone set the premise for how data should be calculated and organized.

    Programmers on the other hand feel the opposite and think their users should do nothing more than input data and record the results. The research being already incorporated into the software and all that.

    --
    Life is not for the lazy.
    1. Re:My dear abacus by Brett+Buck · · Score: 1

      If I'm getting this right, scientists view software as nothing more than a specialized calculator.

          I can certainly confirm that as an engineer, that's certainly how I view it. Almost literally in most cases.

              But I have never deluded myself that our really complicated calculator programs would be appropriate for some sort of deliverable product for general use. In fact I repeatedly try to make that point and people still don't get it. And usually "Software engineers" expect a bunch of their absurd rituals to be followed anyway, even if it's never going to go anywhere or be used by anyone but me. So I would contend that the professional programmers and particularly the software process types are the ones who don't grasp the concept.

              Brett

              Brett

    2. Re:My dear abacus by DigiShaman · · Score: 1

      I though so. At least in the field of geo-science, it's the geologists who use full software suites to prepare interpretation data. However, it's the geo-science engineers whom use a half dozen obscure tiny programs specifically to crunch the numbers. If I had to make a wild guess, I'm thinking the same hold true for aerospace, automotive, and architectural design.

      --
      Life is not for the lazy.
    3. Re:My dear abacus by swillden · · Score: 2

      If I'm getting this right, scientists view software as nothing more than a specialized calculator.

      I can certainly confirm that as an engineer, that's certainly how I view it. Almost literally in most cases.

      But I have never deluded myself that our really complicated calculator programs would be appropriate for some sort of deliverable product for general use. In fact I repeatedly try to make that point and people still don't get it. And usually "Software engineers" expect a bunch of their absurd rituals to be followed anyway, even if it's never going to go anywhere or be used by anyone but me. So I would contend that the professional programmers and particularly the software process types are the ones who don't grasp the concept.

      Brett

      Brett

      Here's a tool that may be helpful to you in explaining the issue to various people: "Technical Debt". Your quick-n-dirty code that does what you need it to do carries a great deal of technical debt, but the nature of its limited use means the interest payments are small, so there's no value in paying down the debt. Start trying to turn it into a product to be used by many people, however, and you'll quickly find that the interest payments are unbearable, and that it costs a great deal of effort to pay off the technical debt, to turn the code into something that is maintainable.

      You can thank the software engineers for that elegant and powerful notion :-)

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
    4. Re:My dear abacus by Anonymous Coward · · Score: 0

      You can thank hackers & researchers for having computers.

      The notion of "technical debt" is entirely centered around the idea that code should be reused. In my experience, the transition from research to production should always, invariably, absolutely be a complete rewrite.

      The main reason is not that of convenience; research includes, by its nature, blind alleys, suboptimal approaches and mistaken assumptions. Those all will leave their trace in the program, which becomes more complex as a result. The way forward is to distill the essential mathematical beauty of the final algorithm, and use it as a spec for writing the new version of the software. And since you have a spec, you can employ all the best software engineering practices in the world - and they will deliver a great, maintainable product.

    5. Re:My dear abacus by turbidostato · · Score: 1

      ""Technical Debt". Your quick-n-dirty code that does what you need it to do carries a great deal of technical debt, but the nature of its limited use means the interest payments are small"

      You seem to forget that the basic tenet on "technical debt" is "debt". There's not debt if there's no expectancy of having to repay it.

      Which holds true for most of one-shoot code that scientists produce.

      On the other hand, it might happen that some of the one-shoot code produced is seen as something of value by something else (may it be someone in management?). Then is up to said third party to pay what he sees as debt, not the one for whom the code already produced all that has to be done. In other words: if I am the scientist one coding my dirty hack for my own purpouses don't expect being me the one doing all that needs to be done on top of the special case code around an algorithm to evolution my dirty hack into your shinny product.

    6. Re:My dear abacus by swillden · · Score: 2

      You seem to forget that the basic tenet on "technical debt" is "debt". There's not debt if there's no expectancy of having to repay it.

      I didn't forget it, I explicitly stated it.

      However, you're certainly right that this is an area where the analogy with financial debt breaks down. Another is the fact that quick-n-dirty code in the hands of the original author often appears to have no "interest" cost -- that person can use, modify and enhance the code with great speed and effectiveness.

      I think it's worth looking under the covers of the analogy to see why it breaks down. The reason is that technical debt is really just an artifact of obscurity. Well-designed and well-written code is easy to understand because it's transparent and complete, and accompanied by documentation that provides the knowledge necessary to work with it, and tests that enable modification-introduced bugs to be quickly identified and corrected. Bad code has all sorts of edge cases that simply aren't written (or are but don't work), the code is convoluted and hard to understand and the documentation and tests are missing, deficient or -- in the worst cases -- actively misleading.

      To a person that knows the code, these defects are basically irrelevant, so the debt is invisible and "interest free". Once the codebase grows to a point that no one can know it all, or gets passed onto others, then the debt raises its head.

      This is why debt isn't a perfect analogy for the original developer or (small) development team. But it is a great analogy in the common case, which is a large codebase passed down through many "generations" of developers. Well, the common case for most product and company-internal code, anyway. Not for most research code, as you pointed out.

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
    7. Re:My dear abacus by turbidostato · · Score: 1

      "I didn't forget it, I explicitly stated it."

      No, you didn't and you still don't do it.

      I'll say it again. There's no debt if there's no intention to repay it (or if, in fact, it is not repayed).

      When you incur in a debt you have to repay the principal and the interests. If the code does all that needs to be done, then there's absolute nothing you will have to repay and it is not the case that the interest rate is low but that there is no technical debt *at all*.

      On the other hand, if you -or others, happen to reuse the code in the future (but note the *if*) then there will be the case that certainly you will have to pay all you didn't pay before in the form of design or documentation *even* if it is you yourself the one modifying the original code (while certainly the interest rate for your own code will probably be less than that of a third party one, since then you'll have at least a bit of documentation: your own memories).

      And here comes the point: the referenced article was talking about "a piece of research software [that] is suddenly expected to be ready for production", that is, a piece of code that never was meant to be used in production for third parties but all of a sudden *someone* which is not the original author, decides it can produce further benefits if productized.

      Therefore there was no debt, what it is now is the need of further investment. For a different analogy, imagine you buy your home, just for you, your husband or wife and your two children and then, your boss decides that he will come to live with you and, by the way, to open a new office for ten people on the premises. Would you think you incurred in any kind of debt by buying a 300.000$ house instead of a 1.000.000$ building or is it the case that *for the new scenario* a new investment of 700.000$ is needed?

      Expending more time and effort than needed up-front just in case is not covering (or not incurring) a debt, is just throwing resources away.

      The "technical debt" concept is all well and good for productivity software (either in-house or meant to be sold away) and it is in fact a concept that quite a lot of directors if not managers should have continously present (and I purpousely am telling "directors if not managers" because I've sadly known quite a lot of managers perfectly aware of the concept but, as I said, there's not debt if there's no intention to repay it -I'll be far away when the shit hits the fan, they think) but still it is needed to understand when it's a valid concept and when it is not.

  7. Black & White by Zaphod+The+42nd · · Score: 1

    This assumes people are very clearly an engineer/programmer OR a scientist. But I would consider most software engineers to be computer scientists as well. Its a fairly nonsense distinction. The analogy to spiderman and doc ock is fun, but ultimately metaphor don't prove anything.

    "Programmers need to understand that sometimes a program really only needs to run once, on one set of input, with expert supervision. Scientists need to understand that prototype code may need a complete rewrite before it can be used in production."

    This is just an extreme generalization, to the point of stereotyping.

    --
    GCS/MU/P d- s:- a-- C++++$ UL++ P+ L++ E+ W++ N o K- w--- O M+ V- PS+++ PE Y+ PGP t+ 5- X R++ tv+ b++ DI++ D++ G+ e++ h-
    1. Re:Black & White by ETEQ · · Score: 1

      No, this is a very strong distinction in *some* fields. For example, in observational astrophysics, most scientists spend much of their actual working time writing code... but they clearly think of themselves as "scientists" and not at all as programmers, with the mindset the article notes. Occasionally people get hired to be "software support" that are clearly supposed to be engineers/programmers, and they think in very different ways.

      The end result is that despite programming as much as, if not more than, the "programmers", many of these scientists don't follow any of the rules about software readability and reuse that programmers have learned the hard way over decades. You can immediately look at code and tell who was trained to program by/as a scientist and who actually learned as a programmer: the algorithms often work just as well, but the former are impossible to understand and build on, while the latter are much more readable.

    2. Re:Black & White by Zaphod+The+42nd · · Score: 1

      Then these are still just tips that EVERYONE who writes programs should be aware of. Don't over engineer, don't worry too much about efficiency at first, premature optimization is the root of all evil. On the other hand, be aware that readability and maintainability can be very important in code if it is going to be used more than as a one-off, or if it is going to be used by a team.

      --
      GCS/MU/P d- s:- a-- C++++$ UL++ P+ L++ E+ W++ N o K- w--- O M+ V- PS+++ PE Y+ PGP t+ 5- X R++ tv+ b++ DI++ D++ G+ e++ h-
    3. Re:Black & White by plover · · Score: 1

      The point is that it's a one way street. Software engineering is a specialization of engineering science, but most scientists aren't software engineers. A scientist can create the embodiment of an algorithm representing a solution to their problem, but don't think of it in terms of the qualities of reusability, modularity, interface, coupling, cohesion, exception handling, security, data integrity, etc. And they aren't supposed to: they're trained to understand biology, botany, physics, or whatever their field of expertise is, and never studied software engineering.

      Think of it in terms of chemistry. A research scientist may create a test tube of a unique compound in the lab, and she would say she's solved the problem. But she would turn it over to a chemical engineer to figure out how to make the stuff in tanker truck quantities. The engineer would understand the performance and limitations of the pumps, mixing tanks, heaters, and catalysts needed to scale the problem up to a factory environment. It's a different job, requiring different knowledge.

      All the software engineers I know are perfectly capable of emitting a dense chunk of spaghetti code to solve one task one time, the same as the scientists, but they generally don't because they know spaghetti code is difficult to prove that it will behave correctly, even just the one time it's needed. Unlike non-computer-field-related scientists, they also know better than to call such code "production ready."

      --
      John
    4. Re:Black & White by Anonymous Coward · · Score: 0

      I wouldn't consider most software engineers computer scientists. You don't think a mechanical engineer is a scientist, so why a software engineer?

      Computer scientists are those that design the programming languages we use, the compilers and the hardware they run on.

      Disclaimer: I'm a software engineer, not a computer scientist.

  8. So everybody starts out as a scientist? by Anonymous Coward · · Score: 1

    When I learned to program, my programs would only run for me. Every program would only do something useful if the user (me) adhered to one "obvious" way of interacting with the program. Then I observed that other people would not understand the obvious way of using my programs. I believe that over time, experience teaches programmers to avoid this problem - first by retrofitting existing programmers, then by looking for ways of writing less personal programs from the start. Eventually this leads to an appreciation for design guidelines, standards and generally programming in the large concepts.

  9. This is a new idea? by Anonymous Coward · · Score: 0

    Most "software engineers" in the comercial world are exactly the same. As soon as its written and minimally functional its off to production. The idea that software in the comercial environment is engineered is a pipe dream.

    1. Re:This is a new idea? by Kenneth+Stephen · · Score: 1

      Maybe this is your experience, having come from working on applications that serve mom and pop shops, but don't assume that your experience is the same as everyone else's. Mine is the opposite of yours. Most applications are engineered for maintainability and very often, when compromises are made in shipping things out the door, it is often the function points that are left on the floor, rather than shipping function points backed by unmaintainable code.

      The only exceptions to this that I have seen have been in shops which are so small that the development team lacks an architect who can enforce this discipline, and you have a team consisting of prima donnas. I'm not saying that small teams can't deliver good code. Just that most of the screwups that I've seen come from small teams operating without any discipline (and they typically lack the discipline because they think they are small enough to operate in that mode).

      --

      There is no such thing as luck. Luck is nothing but an absence of bad luck.

  10. Dealing with that now by Anonymous Coward · · Score: 1

    Posting anonymously for a reason... The software we use to manage data flows from a certain big experiment in Switzerland (Globus, Bestman) are excruciatingly bad. Software gets promoted from version N to N+1, not because they have made major bug fixes or functionality upgrades, but because it's grant-writing time again and they need to show progress.

    Software written by scientists often barely works, and heaps misery upon misery upon the hapless admins who have to maintain the service. Exposure to Grid software, in particular, should be regulated by OSHA.

  11. Physicist Speaking Here by digitrev · · Score: 4, Interesting

    I work with Monte Carlo code and statistical analysis software. I use CERN's ROOT package for the stats analysis, CERN's GEANT4 for the MC code, and *nix scripting when I need to handle multiple files. Every single piece of code I write is written for a purpose. That purpose is generally to generate data and then analyze it. The only other people who are going to see it? Maybe my supervisor, and, if I'm just in on a contract, maybe the guy who has to work on my code later. But to be blunt, that doesn't matter. All that matters is that I know what's going on.

    That being said, sometimes I write software for my own personal use. There, I tend to write more robust code, trying to follow various programming standards. Because I figure, if I write something for myself that turns out to be fairly useful, someone might want to use it, or adapt it. But professionally, all my code needs to do is get out that table or prepare that figure. Is it sloppy? Yes. Does it get the job done? Also yes. Fortunately, not only is my field esoteric, it's also government work, so it's practically a guarantee that my code will never have commercial release.

    --
    Cynical Idealist
    1. Re:Physicist Speaking Here by Anonymous Coward · · Score: 0

      Every single piece of code I write is written for a purpose.

      I should certainly hope so. Otherwise, it would just be a complete waste of time.

      [...] so it's practically a guarantee that my code will never have commercial release.

      This is exactly how unmaintainable code gets foisted on someone. Sure, statistically speaking, it's completely true and these pieces of code don't need to be maintainable or modular. But someone later decides that a one off program that was never meant to be maintained is useful and needs to be maintained, improved, and expanded. Nobody ever sits down and says, "I'm going to write a piece of commercial software, only I'm going to make the code base an complete mess so that nobody can ever understand it."

    2. Re:Physicist Speaking Here by ETEQ · · Score: 1

      This is exactly the attitude I encounter very often when I talk to other physicists and astrophysicists (I'm the latter). But I think this actually is partly a self-fulfilling prophecy. While it's true that many of the codes we write will never be re-examined by anyone, a few of them will. But many scientists write totally inscrutable code, so no one bothers trying to re-use code in that way, because it's easier to just start over from scratch. Thus, no wonder everyone thinks no one is going to look at their code - if they wrote more readable code, perhaps someone would!

      That being said, I certainly have had to take code from someone and build upon it or make it work properly for a slightly different instrument or something like that, and I can definitely say that I'm biased, because those experiences are invariably the most frustrating work I find myself doing! Part of it is that a lot of scientists seem to say "if I add comments everywhere, that's all that's needed to make it easy/readable," but they then don't follow indentation rules, or consider their code structure before they implement, or consider possible extensions of their code when they are writing it. So it wouldn't take that much more work, but some scientists just don't realize that in fact it probably is worth the effort for the sake of future work.

    3. Re:Physicist Speaking Here by Anonymous Coward · · Score: 0

      Nobody ever sits down and says, "I'm going to write a piece of commercial software, only I'm going to make the code base an complete mess so that nobody can ever understand it."

      Hmm, you never had to deal with somebody who was in job-protection mode?

    4. Re:Physicist Speaking Here by Anonymous Coward · · Score: 0

      With that kind of attitude to the differences in programming, it's no wonder people question climate models generated by 400 year old tree rings.

    5. Re:Physicist Speaking Here by zrbyte · · Score: 1
      Based on my experience, the amount of work that I put into creating quality code is dependent on the task at hand. When I know that the script, software will only be used once or twice (prepare the graph, etc.) it's not worth it to put a great amount of work into it to make it usable. In these circumstances I mostly adhere to the Klingon coding rules: "A TRUE Klingon warrior does not comment his code!"
      Now, it should be noted that, sloppy code means: usability is utter shit and should not be confused with errors in the algorithms, maths and implementation of these.

      In general, the more scientific value a piece of code will have, the further it will be developed (not necessarily by scientists).

    6. Re:Physicist Speaking Here by burgundy · · Score: 1

      Yes, but if you work in a large collaboration then your analysis ought to past muster with a larger audience than just your supervisor. And don't dismiss "the guy who has to work on my code later" so blithely. It depends where your code sits in the analysis chain, but it might have quite a long life ahead of it. I've seen (and had to deal with) plenty of code written by long-gone graduate students.

    7. Re:Physicist Speaking Here by Anonymous Coward · · Score: 0

      Many of the codes? You sound like one of those people that bug forums asking for the "codez" to do things way beyond their capability. It is "much of the code we write". I'm not being a grammar nazi. It just sounds stupid.

    8. Re:Physicist Speaking Here by Anonymous Coward · · Score: 0

      I also do a lot of work in ROOT and Geant4. Over time, I've increasingly learned the value of starting off by making cleaner, more idiot-proof code --- because I'm the idiot that'll have to re-learn how my spaghetti code works 6 months from now, and I'm constantly frustrated by the blithering idiot who wrote my code 6 months ago (i.e. me). It's even worse when I have to inherit code written by a third-rate Fortran programmer trying to use C++. I can certainly say that I've learned "the hard way" how true criticisms of "physicists' code" can be, and always wish in retrospect that I'd spent more time setting things up cleanly in the first place.

    9. Re:Physicist Speaking Here by Anonymous Coward · · Score: 0

      At CERN most valuable people are physicists with well developed programming skills. The physics there requires a lot of coding, and then there is service work which, in my case, amounted to building a few critical detector applications. And I can't make unmantainable code there, especially when I have to fix bugs after already forgetting details.
      OTOH, analysis code that I built looks much like spaghetti, although I try to make it readable, but no significant effort is built into abstractions and structure when I see that it is code that will be used for short term. I don't waste time on it.

    10. Re:Physicist Speaking Here by Anonymous Coward · · Score: 0

      Similar background and environment here. I'm doing data analysis after an experiment at REX-ISOLDE @ CERN. The experiment in question was nothing groundbreaking in the methods used, and the institutions involved have done carbon copies of the experiment just years before. Still, much code is rewritten, by people with little to no training and little to no interest in programming. It's a mess. In the beginning of my time, the code was a patchwork of C++ snippets from ~1998 and forwards. "Oh, it's easiest to get it compile on gcc 3.x", "Oh, yeah, you have to change some stuff to make it work on [insert commonly used system here]" and so on. There was a very solid code base for the detectors (though undocumented, "of course"), but on top of that was a pile of generations of cowboy coding. Revision control? Nope. Just .tgz:s floating around on different computers, different versions installed at CERN computers and so on.

      If I make a further career as a physicist and get to make decisions about new experiments, I'll definitely value programming experience high. There are so many hours that could be spared, is the code just written in a portable way from the beginning. Large scale physics is always "get enormous amounts of data, discard irrelevant data, do a lot of standard plots". From what I've seen so far, much of this is a problem that gets solved again and again by stressed PhD/MSc:s instead of just _solving it once_ and spend the time doing physics.

      I've also seen a serious attempt by a co-worker to do this, more or less on his own (several years of experimenting). I just hope he can get some traction at a big institution so his code can be implemented in many experiments. Since all detectors have quirks, but in the end should generate similar data trees, all data formats have to be defined on a detector basis (unless the detector logic adheres to existing standards). After that, his code normalizes the data structures into a standard format, from where one can plug in general analyzers, plot generators, etc, so even if the detector techniques evolve, it shouldn't be more than to write a data format specification. All large institutions could share the same code. Imagine a world where physicists spend their time doing physics...

    11. Re:Physicist Speaking Here by Anonymous Coward · · Score: 0

      The plural "codes" is standard usage in scientific circles. This minor fact is yet another indication that scientific programmers have their own culture that is only loosely connected with computer science.

  12. This is so true by LordNacho · · Score: 5, Insightful

    You can often tell whether someone is "programming as a means to an end (of your own)" versus "programming to build a tool for someone else". For instance, I have experience in the financial industry. Quite a lot of traders see coding as a means to implement their cool new model. Looking at their code, you can often tell. It's as if everything was built to just exactly fulfil the requirement, with no thought to the fact that those requirements might change. But of course, they do change. So you get hacks and workarounds, and cut'n'paste cargo cult code. Kinda like what those Orks in Warhammer 40K might make. And of course the problem with spaghetti code is that if you write it, nobody can ever help you solve problems/improve it. It's the coding equivalent of painting yourself into a corner. There's loads of smart traders out there with an excel spreadsheet that actually is an extension of their personalities (In fact it's their Magnum Opus. Everywhere they go, they try to take this quirky little file with them). Every little hack is something only they can explain (comments, yeah right. Do your body parts have explanatory comments?) and only they can fix if wrong.

    On the other hand, you sometimes hire a guy who is a programmer, but knows nothing about the domain. Very good with OO models and that kind, but you have to teach them everything about finance. What's a settlement date, what kinds of options exist, etc. You get what you ask for, because they know how to turn problems into object models, but you have to ask VERY carefully. And teach. Unfortunately, not everyone has time for that, and so you end up with something that still doesn't quite do what it's supposed to.

    So you often end up gettings guys who understand the problems, but can't program, programming. And guys who can program, writing the wrong program.

  13. Hardly surprising by Inf0phreak · · Score: 1

    This is hardly unexpected. The code needed to process data from science experiments can be years in the making by one or few persons sculpting it to do the job they need done. It might be a bit much to say that it's throw-away code, but once the paper is out the door it probably won't see much use again.

    All of this combined with the fact that the coders are scientists and thus aren't concerned with UI issues and whatnot make it so it may take a lot of manual intervention at various steps to use the software, but in the end the science gets done... and you make a neat gun for the people who are still alive </portalroll>.

    --
    ________
    Entranced by anime since late summer 2001 and loving it ^_^
    1. Re:Hardly surprising by maxwell+demon · · Score: 1

      More importantly: As scientist, you expect to be able to change the code at any time if needed. Therefore if some branch of your code isn't entered by your problem at hand, it's absolutely acceptable to not put any effort into it, and just make sure that you don't run it unknowingly (e.g. by adding a message and an abort). Then, if a future problem happens to get into that code path, you still can work on that part of the code. But in the mean time, you have produced useful results which you might not have produced if you had spent your time on that not yet used code. And not being able to publish those results timely might in the end render your whole work useless because someone else was faster, published the results you would have gotten, and for lack of genuine results your grant wasn't renewed.

      The point is: For the scientist, the program is a tool. It's not the end product. The difference is similar to the one between doing an analytic calculation to get a result, and writing down the same calculation for a text book. The calculation you do for a result has just enough written down to get at the result and convince yourself that you didn't calculate wrong. It's almost certainly not ready to be published in a text book.

      --
      The Tao of math: The numbers you can count are not the real numbers.
  14. I've been in that position, more or less by 93+Escort+Wagon · · Score: 1

    And I gotta say - the linked blog post makes me think the author just got in an argument with his scientist boss, and he lost.

    --
    #DeleteChrome
    1. Re:I've been in that position, more or less by calmofthestorm · · Score: 1

      *shrug* different tools for different purposes. I'm a graduate student, and writing good, scaleable, maintainable code would take far more time than I have, and is not what I'm paid to do. I'm paid to produce results. I've worked in industry before building huge infrastructure systems with many other people, and it calls for a completely different product. I'd go so far as to argue different skill sets. But speaking as someone who knows how to write "good" code, it's a waste of time for most academic applications, particularly outside CS.

      If the software is the product, write it well, if not, get it done fast and right.

      --
      93rd rule of Slashdot: No matter how obvious my sarcasm is, my comment will be taken seriously by someone.
  15. Not so true by giuseppemag · · Score: 1

    As a university researcher in applied game development I pretty much work on abstracting and generalizing *finished* software.

    I usually do this: I spend between six months and a year building a game according to some technique, framework or new language I am researching. The game is then finished, published and even sold. Then a paper is written describing the technique and its inpact. Lather, rinse, repeat.

    This is just anecdotical experience, but in this day and age of shrinking research budgets it is not uncommon to find scientists who also package and sell their research.

    So this whole "programmers are cool, they develop finished stuff while the other a-hole scientists quit halfway" is just a stupid generalization based on a superficial stereotype of academia. Also, THIS IS NOT NEWS, and even if it were it wouldn't matter.

    --
    My book: Friendly F#, fun with game development and XNA; my game: Galaxy Wars by VSTeam; my gamedev language: Casanova.
    1. Re:Not so true by prefec2 · · Score: 1

      With scientists they do not mean engineers. They mean only mathematics, physics and its derivatives.

    2. Re:Not so true by giuseppemag · · Score: 1

      Computer scientists? I'm a programming languages guy, type systems and declarative/functional programming. I hardly see myself as an engineer and I've never published at an engineering conference...

      --
      My book: Friendly F#, fun with game development and XNA; my game: Galaxy Wars by VSTeam; my gamedev language: Casanova.
  16. Some truth to this by Anonymous Coward · · Score: 0

    I recently worked with two software companies on the same project. One wrote software for any old client, the other was a specialised scientific software house.

    The scientific software house wrote some really appalling code, but boy, did they care that they understood what the software was supposed to do, and that it delivered the right results.

    The generic software house wrote clean, maintainable code using industry best practices... and wrote code that was almost useless, as they gave no thought to what it really needed to do. They billed us for a huge number of changes just to get it to functional (as opposed to well written) status.

  17. Does it matter? by Chemisor · · Score: 1

    The days of long-lived software are pretty much gone. There are a handful of companies that still maintain the programs they've written a long time ago, but most programs written today are written quickly and dirtily, to spring up one day and fall into oblivion the next. "Apps" are little more than short fads that come and go, easy to implement due to having little functionality, and just as easy to discard for the next one.

    1. Re:Does it matter? by Anonymous Coward · · Score: 0

      Industrial programs are a very strong counter point - if there's money in it then there will be support for it. The socftware required to communicate with and configure 10, 20 or even 30 year old hardware exists (I work with some of it) and will continue to exist while the companies that use these systems need it.

      If we say "We don't support that any more, buy something new." they say "Okay, do you have 's phone number?", and buy our machines again. Naturally there's a limit, but in the oil and gas industry if equipment is working then it tends to get left alone - very much a case of "If it is not broken then there is no need to repair it.".

    2. Re:Does it matter? by swalve · · Score: 0

      Only because software has been so universally bad for so long that people no longer respect it. If the delicate geniuses currently writing software had any pride, they would do it right the first time, and then it wouldn't have to be so commoditized. Every time I see someone call programming an art, it makes me want to shit. Art??!

      If programmers want their product to be taken seriously, start having some damned standards. When I read the lists of outstanding issues and bugfixes in various releases, my mind boggles at the ridiculousness of it. How did someone write code that's supposed to do that thing, but it doesn't?

    3. Re:Does it matter? by sjames · · Score: 1

      I have dealt with a number of HPC programs on a regular basis that are old enough that they still refer to the input data as a "deck". They will never be completely rewritten and even small changes are few and far between because of the nightmare of re-validation. Unfortunately, because they started life as one-off research code, they are also fantastically sensitive to changes in the compiler due to accidentally depending on implementation quirks rather than the standards.

    4. Re:Does it matter? by rubycodez · · Score: 1

      Maybe you overlook the longer lived stuff because it's everywhere and we're used to seeing it. What about the operating systems, languages and utilities your computer are using? your office applications? the major database management systems? What about the webserver software? what about commerce, banking, healthcare, MRP, ERP systems?

    5. Re:Does it matter? by Anonymous Coward · · Score: 0

      You're blaming the wrong people.

      Programmers want to write high-quality code with damn good standards. Unfortunately, the ones who insist on this end up looking for a new job because management demands something more akin to "shit something into the compiler this weekend and release it!"

      It takes long enough for the drawbacks of this approach to show up that management never really seems to get a clue.

      On another note, have you ever written any software? You sound like just another asshole armchair quarterback.

  18. No duh by Anonymous Coward · · Score: 1

    Scientists write software to do science. Programmers write software because they've spent their lives learning how to perfect the art..

    1. Re:No duh by agm · · Score: 1

      Programming *is* a science - one that deals with the abstract. The scientists referred to in the article deal with the physical. I'm a software engineer. When people ask me what I do, I say that I design, architect and build things that are not real. The sad thing is that most of it is for companies to find better ways of extracting money from people.

  19. Excellence takes teamwork by yesterdaystomorrow · · Score: 1

    It is indeed true that code written by scientists often needs polish. But the other truth is that it's often necessary for a scientist to write the code. Too many programmers think that all they have to do is write code to spec. But when you're writing code that supports the needs of a subject that takes a decade to master, only someone with that mastery can understand what the specs mean.

    Often, the best results emerge when a scientist writes the code, and a programmer reviews and polishes. But that can cause a lot of friction: scientists don't like criticism, and programmers would rather program than review and polish. It's a challenge for project management.

  20. This isn't true for just scientists. by BitterOak · · Score: 1

    This has nothing to do specifically with scientists, this is more about the difference between code you write for your own use versus code you write for others to use. Scientists aren't the only people who write code for their own use!

    Conversely, scientists often do write code that needs to be shared, sometimes among large groups. I used to work in the field of experimental high energy physics, which typically have collaborations of hundreds or even thousands of people. Some of the software I worked on was to be used by the wider collaboration, and there were many coding practices we were expected to adhere to, in order to ensure the code worked properly on all the different systems in use. (We supported about 6 different OS's: VMS and several flavors of Unix.) Other software was written for my own personal analysis, and it wasn't meant to be shared, although it was expected that I at least run some consistency checks to ensure the code was giving reasonable results.

    On the other extreme are general purpose tools, written by scientists for use by scientists on many different collaborations, such as CERNLIB, Root, Minuit, GEANT, etc. And lets not forget, the World Wide Web was created at a high energy physics lab (CERN) to facilitate online collaboration! It seems to have proven robust enough for a somewhat wider use!

    --
    If I can be modded down for being a troll, can I be modded up for being an orc, or a balrog?
  21. This is a real problem by smcdow · · Score: 4, Insightful

    The issues surrounding transitioning research S/W written by scientists into honest-to-goodness production systems are ones I'm very familiar with.

    At my company, a lot of energy has been put into bridging the gap over the years with varying results. I believe that the root cause of the problem is that research S/W is not an end-product; typically for scientists the end-product is a research paper, white paper, proposal paper, etc., for which the S/W is only a tool for getting to the end-product. As soon as the experimental (or proof-of-concept) S/W returns the desired results, the software is considered "done".

    In contrast, production S/W is often THE end-product for developers, so a lot more attention is given to robustness, re-usability, etc. All the standard thinking that you want to go into your production S/W.

    One big issue for us is that the research S/W is almost always written in Matlab, while the production code is written in C++ and Java. The single largest source of bugs in our systems is porting S/W from Matlab to C++ or Java. (As an aside, please let's not talk about the Matlab 'compiler', nor Octave. -- we've already tried them both, and they're both performance hogs and also create SCM and CM nightmares).

    We experimented with requiring that the research S/W be written in C++, but it was a disaster. The scientists couldn't get anything done, and the code was just awful. So, back to Matlab it was.

    And, my experience is that people who I have a great deal of respect for, who I consider brilliant in their fields, holding PhD's, etc., have produced the crappiest Matlab code I've ever had the sorrow to read. My favorite instance was the use of these local variable names within a single function of research S/W that was considered "done" (true story):

    i
    ii
    iii
    iiii
    iiiii
    iiiiii

    And, of course, little documentation as to the mechanics of the code. And believe me, it gets worse from there. Bear in mind that the code does indeed work for its particular purpose, and may well be ground-breaking in that particular research domain. But "done"? Ready for production? Not without a major porting effort (which is really a re-writing effort). The most mysterious thing to me, though, is that the scientists, for all their intellectual firepower, don't understand that it's a problem.

    The solution we've converged on is to require our bizdev to be responsible for funding efforts to rewrite the research code and get it integrated into the product baseline. And, the bizdev types can't proclaim a particular capability "done" (eg., sell it to customers) until they've funded and executed those efforts. It took years of education to get to this point, but things are moving along much better then before.

    --
    In the course of every project, it will become necessary to shoot the scientists and begin production.
    1. Re:This is a real problem by JazzHarper · · Score: 1

      The solution we've converged on is to require our bizdev to be responsible for funding efforts to rewrite the research code and get it integrated into the product baseline. And, the bizdev types can't proclaim a particular capability "done" (eg., sell it to customers) until they've funded and executed those efforts. It took years of education to get to this point, but things are moving along much better then before.

      A couple of thorough re-orgs should be sufficient undo all that.

    2. Re:This is a real problem by Titoxd · · Score: 1

      Have you considered using Fortran? Matlab is much closer to Fortran than C (arrays start at 1 instead of 0, to pick a rather annoying bug), has plenty of libraries available (just like C) and the newer versions of the language standard are not the spaghetti-laden soup they used to be.

    3. Re:This is a real problem by Anonymous Coward · · Score: 0

      I don't think it's just scientists who can't get anything done in C++. The language is way too difficult... you have to spend years on it to get a level of proficiency where you don't leak memory and crash constantly. Have you considered Python + Numpy/SciPy as a Matlab replacement?

    4. Re:This is a real problem by Anonymous Coward · · Score: 0

      You just reminded me of a much funnier variable naming problem.

      iiiiii? That's nothing. Scientists vs. software engineers? Meh. How about admins vs. software engineers?

      The story was related to me at an ISP that had just been acquired by our corporate parent. It seems that a network admin had taken it upon himself to write some production code as is often the case. The variable names were all variations on an "ass" theme. ButtServer. AssCrack server. ButtFucking clients, that kind of thing. I imagine that doing a global search and replace on these names was the least of the problems.

    5. Re:This is a real problem by Anonymous Coward · · Score: 0

      Sheesh, everybody knows that local variables in Matlab should be named:


      i
      ii
      iii
      iv
      v
      vi
      vii
      viii
      ix
      x

    6. Re:This is a real problem by WizzardX · · Score: 2

      I've worked with maths/science types before to integrate their formulas into linux-compatible production code.

      It's usually been pretty small formulas (a couple of screens full of code at most), and I don't understand most of it, being a programmer and not a maths guy. Also, we're a pretty small business, and these haven't been under any major deadlines (it fell more under R&D), so I had time to do this properly.

      Anyway, what I've done in the past is these steps:

      1. When their matlab version is done, ask them to make a representative table of expected inputs and outputs.

      2. Port their matlab version to Octave, so I can run it under linux on my workstation. Usually only minor changes are needed.

      3. Check my Octave results against their tables, and also confirm that version with the maths person.

      4. Port that over to the final version (Python+numpy in this case. Performance isn't a major issue, and I can always use something like Cython to get C-like performance if needed for this type of code), and do a lot of testing and checking with the maths person. The testing part also includes writing automated tests cases against the "known good" inputs and outputs.

      And in other cases, the maths guy knows a fair amount of C (an embedded/maths/hardware guy, but not an experienced coder), so they've worked directly with me to port their code over from algorithm to Python, fix issues and test it (where I again don't understand most of the formula), and I've made it more maintainable (added a lot of comments, error checking, etc), and forwarded a very tidied-up version to other coders in my team to work with.

    7. Re:This is a real problem by Thatmushroom · · Score: 1

      Check out Armadillo, it's goal is to make dealing with matrices in C++ nearly as simple as Matlab:
      http://arma.sourceforge.net/

      There's even a handy-dandy conversion chart: http://arma.sourceforge.net/docs.html#syntax

      --
      You zap the moderators with a wand of humor! The moderators resist!
    8. Re:This is a real problem by Anonymous Coward · · Score: 0

      Do you mean that the scientists do not understand that it is a problem, or that they do not understand it to be /their/ problem?

    9. Re:This is a real problem by smcdow · · Score: 1

      Thanks! I'll be looking closely at Armadillo.

      --
      In the course of every project, it will become necessary to shoot the scientists and begin production.
    10. Re:This is a real problem by Anonymous Coward · · Score: 0

      That you experienced bad results from having scientists migrate from Matlab to C++ for their research code is not surprising to me. In terms of speed of development, C++ is too much of a dog compared to Matlab or Python scripting, especially if they aren't already familiar with C++ and its minefield of gotchas. A better solution would have been to encourage the scientists to develop in Python. Porting from Python to a compiled language would go more smoothly.

  22. No wonder by prefec2 · · Score: 1

    Most scientists (e.g. physicists, chemists, mathematicians, geo-*) solve their problems with formulas. Then they code these formulas in a coding language which is most likely C, Fortran, Algol68 (not really) or Mathlab. While programmers often also only code, software engineers try to design software and have to incorporate different aspects. This is even true when writing software for the sciences. However, the same apply to all the other fields we write software for.

  23. People constantly misuse the word 'Programmer' by Assmasher · · Score: 1

    There are programmers and there are Software Engineers.

    The two things are different, and people who don't know any better equate them.

    There's nothing wrong with being a programmer at all, but programming is a subset of Software Engineering.

    It's akin to the difference, imho, between a construction worker and an architect. One can be a hack or a craftsmen, but tends to have a smaller overall picture of the where/what/when/why behind decisions that often seem unimportant or superfluous. The other can be incompetent or a good engineer and tends to have (or is supposed) the background of understanding to know why things are or should be done a certain way - at the very least being able to understand the impact of short term decisions on the long term.

    There are, of course, exceptions to everything.

    --
    Loading...
    1. Re:People constantly misuse the word 'Programmer' by Anonymous Coward · · Score: 0

      There are programmers and there are Software Engineers.

      The two things are different, and people who don't know any better equate them.

       
      In my decades of experience in many industries, working in just about every job description in IT, I have to say that nearly everywhere, the only difference between your vaunted "Software Engineers" and lowly "programmers", is that some of the people who sling code take offense at not being identified as the former, while all the decent ones don't care which term you use to describe them.
       
      It's like the difference between "Trekker" and "Trekkie". If you need to insist on being referred to by the "better" term, you probably suck as a progra... er, Grand Exalted Software Engineer.

    2. Re:People constantly misuse the word 'Programmer' by im_thatoneguy · · Score: 1

      I think that's because a lot of programmers are software engineers.

      I will readily admit I suck as a programmer. I'm not a programmer. But I would say I'm a pretty good software engineer. I can design software to accomplish a task. I've helped design the structure and implementation of software but when it comes to solving the details I will readily admit that I'm an artist not a developer.

      Programming is a language. It helps when software engineers/architects can speak 'computer' but it's not necessary. I think the Architect/Builder analogy is actually more apt. I know a lot of architects who are excellent carpenters. But when I think "software engineer" I think of someone who can see the big picture layout of an application, not necessarily know how to nail two boards together or weld an I-Beam. Architect says "put a wall here", builder or engineer says "it'll need to be 1' thick to support the weight."

    3. Re:People constantly misuse the word 'Programmer' by swillden · · Score: 1

      I don't think it's possible to be a really good software engineer without also being a really good programmer. http://users.rcn.com/jcoplien/Patterns/Process/section16.html

      In my experience, most people who perform the role you describe aren't software engineers, they're technically-minded business analysts, good at extracting requirements and perhaps painting the broadest strokes of an architecture, but need someone who really understands code to refine their architectures and turn them into good designs, and then good code.

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
    4. Re:People constantly misuse the word 'Programmer' by Assmasher · · Score: 1

      You sound like the kind of person who always looks for vilification in what has been written or said.

      I don't hold any disdain for someone who is a programmer, I am simply pointing out that there is a difference between the training of someone (as an example) who has a Computer Science B.S. and a guy who hasn't. If you read that in a manner I did not intend, it could come across as 'snooty.' That's not my intention at all.

      As I pointed out in my original post, there are gifted programmers who learn much of what it means to be a software engineer and there are CompSci graduates who are crap software engineers and useless programmers.

      Being a software engineer is a superset of being a programmer. To be a good software engineer you must have good programming skills, but you must also have more, you need to have the dedication to do the crap parts of the job that nobody enjoys and most programmers ignore (writing test cases, building test harnesses, documenting your code thoroughly, writing your code with a clarity of purpose where you can and carefully documenting when you have to be 'clever' or non-obviously efficient/fast. You have to write/assist/evaluate technical documentation. You have to think like an architect when practicable. There are a myriad of other things that make an effective and valuable software engineer. Programming is a small part of it.

      Now, you don't need a degree in Computer Science to be a good software engineer, I personally know a few engineers who are really good and they have degrees in something else, and I had a guy working for me who never finished his degree and he was/is great. It's also no guarantee of ability because I have worked with a few people who have had P.h.Ds in Comp Sci (usually they had math backgrounds) and they were worse than useless (how do you get a P.h.D in CompSci and not understand thread synchronization...?)

      Anyhow, most CTOs separate the field the same way I do, between 'programmers' and 'software engineers' and consider them very different.

      --
      Loading...
    5. Re:People constantly misuse the word 'Programmer' by Assmasher · · Score: 1

      I would have to agree.

      If you don't understand the nuances and impact of technology choices (such as platform, language, deployment target) you will be a limited (if perhaps very valuable) software engineer.

      Knowing when/how/why to use Java over C++ or C over C++ or C++ over (insert language here), or when to use .NET and what the differences between Mono's support for .NET and versions of .NET, et cetera, ad nausuem - these are the things that really help you provide valuable input and guidance to a company about managing cost/time to deliver/support and all the rest of the lifecycle.

      I would also recommend a strong aversion to zealotry (whether language, operating system, or other) because it will only hurt you in the long run. Everything is a tool in the toolbox. Don't be King of the Hammer.

      --
      Loading...
  24. Computer Science and Engineering by prefec2 · · Score: 1

    In software development things become more and more planned and predicted and tested over the last decades. Something which was more or less an art is becoming a set of established techniques. So software development becomes more and more and engineering task. On the other hand. Software developers and designers are always trying to use new stuff because the problems of today cannot be solved with the technology from 10 years ago.

    I was on an software engineering workshop on modeling and domain specific languages. After my presentation I said that I think we are not engineers. As of the above situation. However, we use engineering methods/techniques to handle complexity and to get the information we need to model, write and deploy software.

  25. Exception handling is the challenge by SpaghettiPattern · · Score: 1

    Punching down the logic was the easy and fun part. Exception handling is the main challenge. Then come middleware issues.

    It's easy to disassociate yourself and to become a patronising git and to claim to have done the hard work. Making software maintainable, supportable and well performing is never a matter of course.

    Generally speaking it is hard for a non-programmer to imagine a programmer's job. The tedious thing is that scientists will always have significant influence and may not appreciate the hard programming work. This is even more so with clueless manager.

    --

    I hadn't the slightest objection to his spending his time planning massacres for the bourgeoisie... (P.G. Wodehouse)
  26. I concur by goombah99 · · Score: 4, Interesting

    I always like the Numerical recipes quote: Scientists solve next years problem on last years computer. Computer programmers solve last years problem on next years computer.

    I've lived on both sides of this divide but mainly on the scientific side. I become apoplectic with software engineers who just don't vest themselves in the science. The perpetually want a set of requirements. And they get upset if a new requirement is added later. I see software as a way to explore a space. Model it. Determine what more modeling is needed. You are constantly trying to do something that usually is beyond what is computationally possible so you have to figure out what approximation is going to work. What has to be done at full scale and what can be done at lower resolution. Mock up stuff.

    The engineers who don't see it as a process just are impediments. Scientists want lots of simple things fast then see what is working and add new simple extensions. They don't want to wait 4 months for some delivered code based on specs it took 2 months to write.

    Hence scientist tend to write their own code.

    --
    Some drink at the fountain of knowledge. Others just gargle.
    1. Re:I concur by RKBA · · Score: 1, Insightful

      You seem to overlook the fact that computer programmers usually have tight schedule and budget constraints enforced by their supervisor or other management they report to, instead of by the customer (the scientist in this case). Get a computer programmer a gig as sweet as a scientist who can take his or her sweet time to do their research and give the programmer that same open ended time frame with decent equipment and no schedule constraints and you would have a much happier, involved, and more responsive computer programmer.

    2. Re:I concur by SageMusings · · Score: 2

      The [sic] perpetually want a set of requirements. And they get upset if a new requirement is added later.

      Yeah, pretty much. I think that sums it up quite nicely. I'm guessing you have not written much commercial software.

      --
      -- Posted from my parent's basement
    3. Re:I concur by jmac880n · · Score: 2

      The perpetually want a set of requirements. And they get upset if a new requirement is added later.

      I agree that this is a good, if terse, summation of the basic conflict.

      Poorly named, most "Computer Scientists" are NOT scientists. There is no application of the Scientific Method to solve unknown problems. Instead, they are Software Engineers trying to adapt known problems to solution by a versatile tool (the computer). No Science. Just Engineering.

      I see software as a way to explore a space. Model it. Determine what more modeling is needed. You are constantly trying to do something that usually is beyond what is computationally possible so you have to figure out what approximation is going to work. What has to be done at full scale and what can be done at lower resolution. Mock up stuff.

      This sounds like Science. Very indeterminate. And, not easily estimated. Business managers that employ Software Engineers demand estimates. And schedules. And progress reports.

      Also, users of developed software often have - shall we say - hazy views of what is really needed. This can lead to disappointment when the software does not meet expectations.

      Thus, to avoid being placed in a bad position, Software Engineers demand detailed requirements, so that they can make accurate estimates and avoid end user disappointment.

      You live in a different world, pal... Not necessarily better or worse, but different.

    4. Re:I concur by aXis100 · · Score: 1

      Upgrading Computer Scientists to Software Engineer is an equally large leap, and is doing a disservice to other engineering feilds.

      The majority of the time, there is simply not enough rigour exercised in the design and development of most software. Many programmers are successful because of their paricular personal flair - something closer to a craftsman / artisan.

    5. Re:I concur by _Shad0w_ · · Score: 1

      We only get upset about people adding new requirements when we have a deadline to work to and adding the new requirement forces us to exceed our deadlines. We're the ones who get the blame, not you for adding a requirement and thus increasing the amount of work that needs to be done. If the deadline was automatically extended when new requirements were added we really wouldn't care.

      And there's a world of difference between research code and production code; you don't want engineers to write your research code, you're perfectly capable of doing that yourself, as you've stated. Engineers only need to get involved when that research code needs to be taken and formed into production code which can be used for something beyond your research. The requirements for research and production are entirely different.

      --

      Yeah, I had a sig once; I got bored of it.

    6. Re:I concur by JasterBobaMereel · · Score: 1

      "...a gig as sweet as a scientist who can take his or her sweet time to do their research .."

      Which reality do you live in, Scientists research needs funding, to get funding you have to get results and publish, you are under extreme pressure to get results yesterday do you can get enough funding to continue your research ...and keep your job ...

      Most research programming is done as part of the research, it is considered just another tool, to file in case something similar is needed, but is essentially thrown away once done, this is a temporary tool to get a job done, and one were the spec is changing dynamically as it is written ...

      --
      Puteulanus fenestra mortis
    7. Re:I concur by Anonymous Coward · · Score: 0

      Get a computer programmer a gig as sweet as a scientist who can take his or her sweet time to do their research and give the programmer that same open ended time frame with decent equipment and no schedule constraints and you would have a much happier, involved, and more responsive computer programmer.

      Scientists are under huge pressure to get results out quickly. Given that myself and my colleagues spend most of our evenings and weekends working to meet impossible deadlines, its not as cushy a life as you think. The code we write is written hastily, under enormous time pressures and is never designed for non experts to use.

    8. Re:I concur by John+Betonschaar · · Score: 1

      The perpetually want a set of requirements. And they get upset if a new requirement is added later. I see software as a way to explore a space. Model it. Determine what more modeling is needed. You are constantly trying to do something that usually is beyond what is computationally possible so you have to figure out what approximation is going to work

      Which is exactly why you should leave the science part of the work to scientists, have them prototype a solution, work it out along the way and improving it, until it meets its scientific requirements. Then, at set points, you should leave it to the software engineers to productize the prototype based on the set of scientific requirements currently implemented, and keep those fixed as long as possible. If the target is moving, settle on a release schedule for the productized code that allows planned functional updates. This way the science work and the software engineering work can be done independently and both sides can be happen.

      In reality, this often means you will end up with 2 implementations, which implies you need capable software engineers who know how to do regression testing and qualification of the software probably.
      Where I work, we have physicists, mechanical engineers and construction engineers prototype solutions in Matlab, they love that tool, they can try out new ways of solving their problems quickly, prototype the hell out of them, graph and plot the results, etc. It's a great tool for scientists really. When it comes to productize the resulting solutions (simulation models, mainly) and integrate them in the (extremely expensive) hardware they will be used in, the software engineers (me, amongst others), get a functional specification, a test specification and a test report, all based on the QA'ed Matlab code, and we re-implement it in the target language best suited for the application (C++ or Python, mostly). This usually involves isolating the 'meat' of the algorithm and designing a maintainable, flexible software architecture around it, that allows deployment for other applications, adding scripting interfaces on top of the models, better regression testing, etc.

      It may sound like a stupid idea to keep 2 implementation of the same idea around, but it's not, trying to productize a moving target and having two sides of the problem implemented in one piece of code will take more time, more risks, and more annoyances between the involved parties.

      The way we solved it for my job works great for everyone, the only annoying thing here is middle management, who like to think they can do a better job at both the science and the software engineering work, and sometimes decide we 'have to have to productize the Matlab code', we 'have to have 1 implementation only', or 'we don't need to allocate a lot of time productizing because if the functionality is done, translating it to a usable software component is easy'. :-/

    9. Re:I concur by Anonymous Coward · · Score: 0

      That's not a bad way to describe it. Scientists tinker with code, software engineers design it to spec.

      When I've written code for some science projects, the former is exactly what I've done: written something up on paper using pseudocode and diagrams (I guess this is the specification stage), tried to convince myself it will work, implemented the corresponding code, and then thrown tons of test cases at it to validate whether it works or not (either the code or the algorithm I formulated). If it doesn't work, then I either extend the algorithm to deal with the cases that I hadn't thought of, or scrap the whole approach and try again. When I start, I *don't*know* whether the specification is correct or achievable. On one project I did that process 3 or 4 times before I finally got something that worked. And the code is so messy and extended in so many different ways that turning that code into something releasable would be a lot of work. I doubt whether it is even close to an optimal solution, but it does work for the job at hand -- many times faster than a human doing it manually -- and that's it. I haven't decided whether to release the code yet. But I shudder at the thought of releasing it as-is and letting someone else figure it out how to use it, even though it is thoroughly commented throughout. It's not pretty.

    10. Re:I concur by Vasheron · · Score: 1

      And they get upset if a new requirement is added later.

      Not us Agile programmers. We don't get upset if a new requirement is added, we expect it, and then we give you an estimate for how much longer the project will take.

    11. Re:I concur by Anonymous Coward · · Score: 0

      It's not really an upgrade, at least not for a half decent degree program. A good CS and a good SE degree will differ only very slightly and usually towards the end of the degree when the CS students learn to be Scientists and the SE students go learn to be engineers. Prior to that they should be learning all of the same fundamentals. Going from CS to SE or vice versa is a lateral move.

      However, I do agree that calling a Computer Scientist a Software Engineer is stupid and devalues the title of Engineer. Just the same as calling an Engineer a Scientist does the same. That's not to say either of them can't learn the others discipline though, even just through experience.

    12. Re:I concur by Anonymous Coward · · Score: 0

      Scientists solve next years problem on last years computer.

      This really varies from scientist to scientist. I've seen so many "scientists" reinvent the wheel over time that it's frightening. About a year and a half ago I met someone who had reinvented the low pass filter in a very convolved fashion. Seriously though, it was a terrible implementation of a low pass filter and he insisted that it was better. This is however my worst example though. It's often the Not Invented Here Syndrome at play. I understand that sometimes you need to have your own implementation of certain algorithms for very specific things, but reinventing the low pass filter (and doing a terrible job at it) is a bit too much.

      Scientists are (for the most part) great at science and writing code for scientific purposes, but when their code needs to be integrated into a larger system you'll often have to spend quite a bit of time optimizing their code for performance and/or stability. I can't tell you how often I've stumbled upon the problem where the scientist says "Well, it worked on my small (20Kbyte) dataset, so it should work on that 4 Gbyte dataset too." Mind you, this is of course a generalization. I've also been handed quite a bit of code that performed admirably well from the start.

      In general though, I find that scientists are more focused on solving their problem, and aren't too concerned with the performance of that solution. Most of the time it's a form of ignorance into how computers and operating systems work (which you can't really blame them for), but sometimes it's a lack of programming skills and loads of bad habits picked up along the way, and sometimes it's just plain old nonchalance. At times I'd rather have the list of equations in a mathcad file, than dig though hundreds of lines of Fortran/C/C++ to figure out what the hell is going on.

      To make matters worse, there's often an attitude from scientists towards programmers that at worst is condescending. I've been laughed out of a meeting once when suggesting a particular approach for a problem, only to have them go that route half a year later out of necessity. If you speak on a subject that is somewhat advanced (say for example wavelets), you'll get looked at "What would a mere programmer know about wavelets?". In certain environments it's very easy to whip out your degree and say "Mine's bigger than yours, therefor your argument is invalid." It's a very counterproductive attitude that you'll often encounter in academics and research.

      Having said that, I tend to love my job. I get to do exciting things both in IT and science, and there's quite a few scientists that are very driven and a joy to work with. I like to think that my choice to go into research as a programmer has been one of the better ones in my career and has paid off well in terms of job satisfaction.

    13. Re:I concur by Xyrus · · Score: 1

      Scientists solve next years problem on last years computer...

      Scientists solve next years problem using last year's computer using programming techniques from 20-30 years ago. Hence, why a lot of scientific code bases are near indecipherable unless you can manage to find out who wrote the original code and you can track them down.

      I become apoplectic with software engineers who just don't vest themselves in the science.

      They don't need to. The science is your job. It is the engineer's job to translate your science into coherent software. It doesn't matter if your computing thermal dynamics or fluid dynamics. Solving non-linear systems isn't unique to any branch of science.

      The perpetually want a set of requirements. And they get upset if a new requirement is added later.

      Yes, because you can't build a house if you keep changing the blueprints. Software with enough forethought will allow for a lot of flexibility, but if you keep changing what you want then there is a good chance that they'll miss the deadline. Programmers don't get angry when you change requirements, they get angry when you change requirements and the deadline doesn't change with it.

      I see software as a way to explore a space. Model it. Determine what more modeling is needed. You are constantly trying to do something that usually is beyond what is computationally possible so you have to figure out what approximation is going to work. What has to be done at full scale and what can be done at lower resolution. Mock up stuff.

      That's not software engineering. That's hacking. Messing around.

      The engineers who don't see it as a process just are impediments.

      If you're trying to use engineers in this regard, you're doing it wrong. You bring in software engineers when you want to build a solid maintainable piece of software. Using them as you're own personal hacking group isn't going to be very productive as they don't have your domain knowledge. Nor is it fair to expect them to. Just like it wouldn't be fair of them to expect you to have full knowledge of all Web 2.0 technologies and be able to roll out a full interactive website, for example.

      Think of it this way. You don't go to an architect and tell them to start building a house when you haven't even figured out the blue print yet.

      Scientists want lots of simple things fast then see what is working and add new simple extensions.

      Which invariably fails, as most scientists don't have the programming background to do this effectively. What usually happens, is some cobbled together barely tested, fragile as hell piece of code gets created and is then added to a larger project which itself is poorly tested and fragile. This usually results in weeks to months of integration issues, compiler and compiler setting issues, bug chasing, MPI race conditions and errors, and other such activities.

      If you really are doing something quick and dirty and will only be used for your personal little pet project, you don't go and get a group of software engineers to do it for you. If you're working on something that will eventually be used in a production system, whether it is stand-alone or part of a larger system, that's when you want to bring in the engineers.

      They don't want to wait 4 months for some delivered code based on specs it took 2 months to write.

      Which explains the spaghetti-coded train-wreck status of most scientific code bases today. You can do it quick, or you can do it right.

      Hence scientist tend to write their own code.

      And it shows. Any software engineering student writing code like the science code bases I've seen would be flunked out.

      I've got no problems with scientists prototyping their own code. In fact, that serves as a good starting point for engineers to build a more robus

      --
      ~X~
    14. Re:I concur by Bucky24 · · Score: 1

      Working with a moving requirements target is something that we, as software developers, just have to learn to live with. There will always be another requirement (sometimes even after the launch of the product) that wasn't anticipated and needs to be added.

      --
      All the world's a CPU, and all the men and women merely AI agents
  27. Code unnecessarily reengineered by amightywind · · Score: 1

    Yes, I have seen some bad code come from scientists and engineers. I have also seen simple but ugly code, unnecessarily reengineered by OO design zealots and broken and ruined with complexity. It depends on who did the writing and the rewriting. The best policy is for software engineers to give scientists simple interfaces to write to and then stay out of their way.

    --
    an ill wind that blows no good
    1. Re:Code unnecessarily reengineered by darenw · · Score: 1

      Yeah, I have suffered a job working on code like that, very over-done OO. While it is common to observe that scientists/whoever write messy unmaintainable code, the very worst I'd ever seen was written by CS majors fresh with a degree, or others new into the career of software development, and eager to harshly apply all those design patterns and rules of thumb.

      Funny, how ideas meant to make software work go better has the opposite effect in eager young hands.

  28. Mhmm Weird Scientist, by Maxhrk · · Score: 0

    "The Code Has Already Been Written" sound like Scientists don't believe in evolutionary while Programmers do. Really?

  29. This is also true in medical devices and in biolog by Anonymous Coward · · Score: 0

    This is also true in medical devices and in biologics (medicines) - i.e., with respect to scientific and engineering knowledge, not just computer programs.

    As an engineer and manager in product development and tech transfer roles, I'm continually amazed at how little R&D biologists know or care about tech transfer, manufacturing, marketing, logistics, etc.

    I started in R&D, and was guilty of that once, but still ...

  30. meyers briggs.. by Anonymous Coward · · Score: 0

    the old INTJ vs INTP battleground...

  31. Optimism by dcollins · · Score: 1

    "All programmers are optimists. Perhaps this modern sorcery especially attracts those who believe in happy endings and fairy godmothers... But however the selection process works, the result is indisputable: 'This time it will surely run,' or 'I just found the last bug.' So the first false assumption that underlies the scheduling of systems programming is that all will go well, i.e., that each task will take only as long as it 'ought' to take. The pervasiveness of optimism among programmers deserves more than a flip analysis..." [Fred Brooks, Mythical Man-Month, p. 14-15]

    So really this observation is really just a slightly-different flavor of something that is characteristic of all programmers.

    I had one job where I was assigned a particular game feature. So I took a week and I did it. My technical manager took it and played with it and came back to me completely shocked: I couldn't find any bugs! he says. (Also: I was continually being chastised for long schedules, and having my estimates arbitrarily cut in half by the manager.) That job convinced me I had to get out of the industry.

    --
    We know where leadership by an anti-intellectual "strongman" who scapegoats minorities and likes boisterous rallies goes
  32. "Software Carpentry" by bgoffe · · Score: 1

    The site Software Carpentry aims to teach scientists and engineers key programming tools and approaches to write better code. There are many, many resources to help non-programmers write better code. The fellow who runs it, Greg Wilson, has done yeoman work in this regard. I was so impressed that I invited him to an academic conference and we were really pleased.

    My entry into this problem is "Where's the Real Bottleneck in Scientific Computing?" (from the American Scientist). It says everything that the article here does and much more. Highly recommended.

  33. gui-y it up gui-y it down by smoothnorman · · Score: 1

    In all the (big-pharma) shops i worked at, i'd write and test the command-line number cruncher inside (until my boss could get a paper or two out of it) then hand it to "two guys" that would slap on a stunningly restrictive (in terms of functionality) GUI (itself a third party tool set based on Qt) and it'd sell just fine ...no sweat [shrug]

  34. I always write for someone else by Anonymous Coward · · Score: 1

    I write all my code for someone else: me a year from now.

    I'm proud to say I can pick up something I wrote ten years ago and be quickly up to speed. The basic principle is this: something that is obvious now will not be so a month from now. Writing robust software now will save a whole pile of misery later. It isn't just a case of having to re-write a piece of software; when it comes time to write a paper, you have to go back through your software and figure out precisely what you have done.

    The other thing is that, these days, you may face an FOI request. You really don't want crap programming exposed for public ridicule.

  35. But things are getting better by Anonymous Coward · · Score: 0

    This issue is actually getting less bad in some cases. In my area of biology, there is a strong trend towards journals requiring that analysis code be archived along with data, as a condition for a paper being accepted. Also, grant proposals are looked upon more favorably when they promise to develop, document, release, maintain, and support software that implements their new ideas. These requirements make me plan more for future use and clean up my code so that it's not an embarrassment when others see it. I think this is all contributing to a healthier scientific and software-ific environment.

  36. Is it really news? by 140Mandak262Jamuna · · Score: 1
    It is like saying:

    "DIY fixers do a hack job of wiring their routers in their home basements to their computers in second floor bedroom. They drill a hole and take the cable clearly marked "indoor use only" outside the home hanging in a lazy lopsided catenary curve up to the bedroom window, take it through the window into the house. The window sash does not close properly and allows bugs to get inside.

    Professional electricians on the other hand use flexible drills to make nice access holes, wire the cables, patch up the dry wall, clean up all the debris, and charge you 90$ an hour. "

    P.S: Exercise to the reader: Make it a car analogy.

    --
    sed -e 's/Chuck Norris/Rajnikant/g' joke > fact
  37. Been There Done That by anorlunda · · Score: 1

    I've experienced almost the same thing, but with engineers instead of scientists. I attributed the engineer's disdain for software quality to a different motivation. Namely, the disparity in status and pay between engineers and programmers. I believe that they felt that spending extra time on making the software readable, maintainable and all those other ables was beneath them.

    The proof of the pudding came when I happened to hire an inexperienced guy as a programmer. He was so smart that he soon learned not only to program but even to be a better engineer than the real engineers. The company culture turned against him viciously. They ran him out of town on a rail. Fortunately for him, he move to Santa Clara, got a job with a software company not involved with engineering, and soon earned 600% more than those engineers.

    Is that little story off topic? I think not. I believe that engineers and probably scientists feel very threatened when they write software in the presence of lower paid programmers who might be able to do it better. Their defense is to downplay all aspects of the software other than it's ability to calculate the right answer in thier own hands.

    The cure? In scientific or engineering cultures, give non-science non-engineer talented tech people as much pay and status. In hospitals some nurses should earn more than doctors. When will that happen? Not in my lifetime.

  38. leverage debt by epine · · Score: 5, Insightful

    That's a great post, of the kind that saves me a lot of typing. You covered the first-order considerations brilliantly.

    What you missed was technical debt blindness, which has been around since forever. Books I read around the time of the Mythical Man Month talked a lot about maintenance syndrome: that the original development team would be regarded as brilliant for producing working functionality at tremendous speed (undocumented, with no error handling for edge cases), then the first maintenance team would all be fired as underachievers for adding hardly any new functionality in the first year or two.

    Turns out it's hard to erect a machine shop over top of adobe mud brick construction without adding some reinforcement to the structure, which usually takes a lot longer than the entire original edifice.

    You can instead take a wrecking ball to the first iteration, but this rarely works out as well as hoped. You end up with far more ambitious adobe mud construction built with a whole new generation of unproven tools. At some point you have to bite the bullet and ferment what you began with.

    People hide debt blindness behind widely divergent construals of simplicity, where "simple" usually turns out to be a euphemism for any decision that sidesteps paying down debt in the short term.

    For professional software engineers, there is one true simplicity to rule them all: generativity and compositionality. Can you build the next layer on top with any hope of having it work and able to support an ongoing stack? For us, it's a long term game of pass the baton. For everyone else (management, scientists) the endgame is to cash out, and take credit elsewhere (e.g. publication biography).

    Unfortunately, a citation is not a formal linkage that the compiler either accepts or rejects. By the standards of compositionality, citation is payment in dubious coin. Citation is not falsifiable. Scientists still count their citations even when they come from papers that are full of crap, peer review notwithstanding. For a professional software engineer, when you start instantiating objects from one library inside an abstract expression template library, you come face to face with compositionality in a way that few scientists can even imagine, having weened at the outrage of being improperly cited.

    Technical debt blindness on the part of management quickly turns a software engineering shop into a highly non-linear fiasco. We've all seen this.

    Somehow this game works out better (for the participants) when played by bankers with leverage debt. But now it's my turn to pass the baton, since that deserves a whole lot more typing and I've done my bit.

  39. The distinction is poorly phrased by Anonymous Coward · · Score: 0

    The real distinction has nothing to do with "Scientist" vs. "Programmer". It is actually "Researcher" vs. "Engineer"/"Maintainer". When I'm in complete investigative mode (aka researcher) I don't care much about the code quality, so long as I can get it to do what needs to happen to collect information related to the problem I'm investigating. Not "the answer" because if the answer was already known and understood, I wouldn't have to research it. When I'm developing product, it _has_ to be maintainable by someone who comes after me. And also has to be maintainable by _me_ even after a hiatus. If I'm spending 100% of my time maintaining the same code over the course of a year, it means I was completely inept. Perhaps this is a bit of a pride issue, but I want to be able to move forward and not be a "Wally" type engineer (as in Dilbert.com)

  40. Programming from scientific field to commerce by Anonymous Coward · · Score: 0

    I had a similar experience when one of the Engineer from an Architectural company told me to edit the program from Fortran to CBASIC. When I explained to him I have to rewrite it for all users to use it successfully, he disagreed. It took 10 months an d 10K for for him to accept the reality.

  41. Not just the domain of scientists/programmers... by CAIMLAS · · Score: 1

    This problem is not just present in these two domains. You see this dichotomy elsewhere, specifically in IT.

    I do IT in a scientific research-oriented organization, having taken over for previous staff members who were very much of the "IT should be done like research" school of thought. The result was that each problem was addressed quickly and without any consideration for the whole. Being as they were working with physical assets and not just software (though there was a lot of that, too), the end result is similar to a large, monolithic application with plenty of places where it can break, being almost completely unmaintainable in its current incarnation without a complete overhaul.

    I consider them to sysadmin like programmers. From my experience with the programmers I've worked with (people who are self-ascribed programmers, both good and bad at their job), the quick fix or solution is the most desired result. Documentation? What's that? Don't do something elegant and atomic, looking at the larger picture: kludge it to work with what's there currently pull from misc. other things you're aware of, etc. since you built the original and are aware of its intricacies. (Again, by no means document these inter-relationships, why they're important, and what something disappearing might do somewhere else. Don't use common topology/framework practices for your designs/implementations, just make a giant fucking spider web. Don't, by any means, be consistent. "Ship it, it's done".)

    I've seen the same thing in IT as a whole. There are entirely too many 'administrators' who are basically glorified technicians who make well above their performance grade. They are negligent in their responsibilities to plan roll-outs. No, a "complete rebuild and reorganization, trash the original' is no more a viable option in most cases than "a complete rewrite" is due to the time (and money) it'd take to do so.

    --
    ~/ssh slashdot.org ssh: connect to host slashdot.org port 22: too many beers
  42. The license has already been written by j_f_chamblee · · Score: 2

    This is a really common problem in the academy. So common in fact, that one particular academician has come up with a special license, the Community Research Academic Programming License (aka, the CRAPL). It's worth a look and good for a chuckle:

    http://matt.might.net/articles/crapl/

    --
    The first principle is that you must not fool yourself - and you are the easiest person to fool. -Richard Feynman
  43. why go outside for this?? by RobertLTux · · Score: 1

    better would be to find a good common vertical point and then

    1 drill into the floor of the second floor and drop the cable down
    2 drill into the floor of the first floor (and repeat)

    bonus points if you can do a wall fish (tape a poker chip to a cr2032 and an LED then attach that to fishing line)

    --
    Any person using FTFY or editing my postings agrees to a US$50.00 charge
  44. doesn't anyone know what scientists do ? by cinnamon+colbert · · Score: 1

    The job of a scientist is to come up with new ideas and test them.
    In that job, code is a tool, like a hammer or a mass spectrometer. If the tool works well enough for the job at hand, why on earth would you spend time making it work better ? It is just crazy.
    The other problem is that scientists are arrogant (so they think what works for them is ok for others) and non scientists are stupid, as they expect scientists to do their work for them - in this case, production code.
    sigh
    It is not a scientist job to make a product, which, roughly speaking, is something that works more then twice, and can be used by someone without extensive training.
    It is a scientist job to produce enough data to test their idea; you only have to do this once (ok, twice if you want to be a stickler about reproducibility). The code destructs on the 3rd run, you don't care, cause it aint your job, and your boss ain't gonna be happy, you doing something that ain't your job.

    1. Re:doesn't anyone know what scientists do ? by Anonymous Coward · · Score: 0

      I wonder what peer review thinks of unintelligible code without documentation. I would hope it would tell the coder to go away and come back again once they have produced something that is publishable and not just a clumsy hack that appears to work, but in reality may not.

  45. no different to a prototype by Anonymous Coward · · Score: 0

    We have all come across prototypes - they work well enough for the 1 use case (the same as the science scenario) - but when you go to productionize it - it is a pain in the ass. If anything is written for a single purpose it will be hard to turn into a product and become generic.
    Scientists are not professional programmers - they are like intermediate / junior programmers:- just as we are not scientists - I would not expect a professional programmer to be able to analyse a set of scientific data.

  46. In other words.. by Anonymous Coward · · Score: 0

    We're right and they're wrong.

    BTW I didn't RTFA.

  47. Open source problem by reason · · Score: 1

    This is true, and starting to become a problem given the increasing expectation that as much as possible of our scientific work should now be open source. While this is great in theory, in practice, it means I (as a scientist) am under pressure to make my scientific "exoskeleton" code publicly available. I'm not qualified (and don't have the time) to polish it up into a product that is really suitable for distribution, and my employer doesn't have the funds to hire programmers to do this for every piece of code that I and my colleagues write. If half-baked scientific code is released, though, there is a real risk that it will be misunderstood and misused by others.

  48. "It works for me" syndrome by alispguru · · Score: 2, Insightful

    I work for a group at NASA. One of our group's tasks is to take scientist-written code and wrap it for distribution to hundreds of remote sites around the world. We try our damnedest to run the code as-is, but fairly often have to modify it to remove stuff like:

    * Hard-coded input and output file and directory names
    * Small and arbitrary length limitations on file pathnames - I've run into buffers that were declared as 53 characters in length, probably because that was what they needed on their system
    * Large arrays being allocated on the stack - Linux distros have different default stack sizes

    Most of the problems stem from the picky crap that C makes users go through for simple stuff like string manipulation. Both the scientists and the downstream developers like me would be MUCH happier if the scientists worked in something more forgiving (Matlab/IDL/Mathematica, or a flexible scripting language with a decent interface to heavy duty math libraries).

    --

    To a Lisp hacker, XML is S-expressions in drag.
    1. Re:"It works for me" syndrome by Anonymous Coward · · Score: 0

      Then tell the scientists that they don't have to write in C. They'll be happier for it; the main reason many scientists are using C / C++ is because when they were students entry level programming courses targeted those languages (or occasionally Pascal or Fortran, which is why those are relatively popular among scientists). People use what they know, but if you show them a way out of the pain, chances are they will follow.

  49. My 25 years of programming in science says... by mapkinase · · Score: 1

    Bullshit. False issue. Move along. There is nothing interesting here.

    --
    I do not believe in karma. "Funny"=-6. Do good and forbid evil. Yours, Oft-Offtopic Flamebaiting Troll.
  50. Same problem with... by BlindRobin · · Score: 1

    actuaries engineers accountants and anyone else that does code as a process component rather than as an end product. I've dealt with this for 30 years...

  51. Simply non-sense... by Anonymous Coward · · Score: 0

    As a computational physicist who has written plenty of research oriented code, as well as a principal programmer I can say that this is simply bogus. I've worked with plenty of scientists that generate excellent software, and many computer scientists and programmers who do not. This is just the standard BS against scientists...

    Mark this article as bogus BS...

  52. I wish it were this simple by drdrgivemethenews · · Score: 1

    I wish it were as simple as this thread implies. The truth of the matter is that most commercial developers who are paid to worry about maintainability don't understand how to do it much better than their academic counterparts. Managers notice this and put all kinds of process in place to enforce good practice--requirements and design docs that are practically books, compile-time coding standard tests, smoke tests, regression test suites, automated tests and so on and on and on. These do not, however, turn developers into good programmers. They only turn them into safe ones.

    Another thing the thread ignores is that 90% of all robust mission-critical code is in error paths. Academics rarely put those in, and great developers count on great code structure to save themselves much of that trouble. Let a few mediocre-but-safe programmers at that great well-structured code though, and the error paths multiply and must be addressed (usually by more mediocre-but-safe programmers). So for large systems, the starting point doesn't matter very much.

    See, 2,000 safe programmers can write systems that enable a company that writes mission-critical applications to reach billions in sales, regardless of whether the initial code base was academic or extraordinarily good. Twenty genius programmers cannot do that, as a rule, even if they are 100 times as productive as the worker bees. Managers and executives understand this and go with it. At some point the weight of poor-but-safe code overwhelms the system's ability to grow and evolve, and it's time to start over.

    ------------

    A hundred buggy lines in the code, a hundred buggy lines.
    Fix a line and recompile, a hundred one buggy lines in the code.

  53. Same can be said about actuaries by darthlurker · · Score: 1

    Seen far to many Excel spreadsheets macros. Please make the hurting stop.

    Actuarial specs are the other hand are sweet. Pure math.

  54. Re:I expected more....I cal BS on this post. by Anonymous Coward · · Score: 0

    BS! name the university where a PhD student only takes 4 classes. Most universities require that u r enrolled, even if that enrollment is only research credits.

    U must be talking about credits beyond the MS requirements...but it still sounds slim to me.

  55. Re:I expected more....I cal BS on this post. by Anonymous Coward · · Score: 0

    At Caltech, my sciences PhD program requires a whopping whole 6 classes (which does indeed work out to 1-2 a term for the first couple years). Exceptions are occasionally made for students who have already pioneered new fields of study during their undergraduate years in particular areas. The GP poster is certainly not out of line in describing the typical program of top-tier universities --- might I venture a guess that "u r" not personally familiar with the operations of higher-end educational institutions?

  56. This works both ways by badbart · · Score: 1

    I've seen this problem go both ways in trying create commercial scientific software. For every scientist who can't believe that the code needs to be re-written, there is a software engineer who has read a survey paper and thinks they don't need to consult the domain experts. The reality is somewhere between--both groups have spent years learning their own craft and a little time picking up enough of the other's craft to get by. As I've told many scientists, "I wouldn't let them loose in the lab to do research, why would I think I can write commercial software?" (For background, I'm a former computational/structural biologist turned non-coding software professional.)

  57. Different Mindsets Observing Different Mindsets by darenw · · Score: 1

    "You can immediately look at code and tell who was trained to program by/as a scientist and who actually learned as a programmer"

    Would a scientist and a professional programmer be equally good at detecting the difference?

    In my own twisted career started out in physics, electronics and math, then got into video production, photography and fine art, but for most of my life, software work paid the rent despite flat zero formal education in software/CS. I'm not quite either category, scientist or programmer, but really in a third category - artsy creative - and of course there are many other styles of thinking.

    Looking at a scientist's code and professional software engineer's code, they'd be just "different kinds of messes" to my right-brained spatial-artsy-impressionistic way of mentation. I certainly don't see professional programmer's code as any more "readable" than other code. OTOH I'd expect anyone with a real software/CS education to see a big difference.

    Maybe it would be a good career-fit test to ask a candidate if they discern any difference between the work of talented people in their desired field and the work of talented practitioners of other fields who must attempt work in that field. Someone who doesn't see a difference should look for work in different field...

    Although, no matter what else, I will agree, most physicists write atrocious code!

  58. In a robot world it helps to have an exoskeleton by rlseaman · · Score: 1

    It's naive to consider either class of software as being sufficient, or either kind of programming to be superior. Like most problems there is a strong management component to assigning resources to each in appropriate scales.

    A computer scientist/software engineer delivered a well-phrased summation of half of this discussion during a 5-minute talk at a recent lightning software session at a science meeting. (Note that there are rarely science sessions at software meetings.) A domain scientist/software engineer then delivered a well-phrased summation of the other half of this discussion. Both were right and both were wrong.

    My five minutes? Pointing out that the real issue was that management rarely supplies sufficient resources to coherently accomplish software projects of any type. Typically projects are underscoped by a factor of three or more, whether the particular project is to build a robot or an exoskeleton. This is true whatever software process is followed, but in terms of the Mythical Man Month, it's like omitting the nurses and anesthesiologist from the surgical team.

  59. Generalizations by Device666 · · Score: 1

    As pointed out by others examples of the reverse can also be found in practice. However I agree with this generalization to be true for coding practices. I also like to add another related generalization. Autodidact developers tend to code quick and dirty (with a lot of experience how the actual code run in daily practice under heavy loads etc), people with a heavy academic background (also depends on the specific university) tend to code slower and cleaner.

    That said, in business I often hear some developer is very skilled, "he had written software X on his own faster than three others combined". Always makes me very skeptic, because 9 out of 10 times, the coder coded so quick and dirty that it is still alpha quality and will probably take a lot of extra work to get it maintainable after three years, when the this coder is already working somewhere else (and having a lot of referrals being so good). While the guy that has to make it maintainable and fix would say something completely different.

    Ofcourse, generally speaking, business people are to blame themselves also as they have nonsense criteria to evaluate the productivity of software developers (counting lines etc). In the other cases, both autodidact and academic, there is some really good developer who also has "The Art of Computer Programming" on his desk or has a good background in functional programming.

  60. They should make them maintain their code by Anonymous Coward · · Score: 0

    They should oblige those said scientists to maintain and extend their code, they will immediately learn what does it mean to look at one year old code and try to debug a problem occurring in a case that was not previously envisioned. Or to extend the functionality to work on different data. The abstract is right, scientists don't see the code as something reusable. For them is just a mean to an end

  61. Um, no kidding by __aayuzx6098 · · Score: 1

    I'm a programmer who spent the last 8 years developing a commercial language tutoring AI. The original prototype was written in Prolog, consisting of about 5,000 lines of code in a Hypercard-like environment. The current system contains back-end authoring tools in C++ (15,000 lines), various tools and utilities in C/C++/Java/SQL (20,000 lines), Java/JSP web application (75,000 lines), a 50,000 word dictionary, 500,000+ entry grammar/morphology, plus 5,000 audio and video clips. The original software was developed by 2 people; we've had 20 contractors and contributors (graphic designers, voice talent, audio engineers, GUI designers, testers, programmers, editors and linguists) involved for a total of 40,000 man-hours. So, yeah, the academic version was a bit simplistic.

  62. Program vs script by Anonymous Coward · · Score: 0

    All the software engineers I know are perfectly capable of emitting a dense chunk of spaghetti code to solve one task one time, the same as the scientists, but they generally don't because they know spaghetti code is difficult to prove that it will behave correctly, even just the one time it's needed. Unlike non-computer-field-related scientists, they also know better than to call such code "production ready."

    They probably wouldn't even call such code a program. We all write scripts for one-off tasks when that seems less expensive than doing things manually and there's no readily available preexisting application for it. But after completing the task, we either throw the script away or refactor it into something maintainable. People who don't code for a living won't even know what refactoring means -- unless they have experience in collaborative coding. Maybe when more scientists realize the power of Open Data and github that might bring the two worlds closer together?

    1. Re:Program vs script by plover · · Score: 1

      For scientists who do important things other than coding, I don't think it's a good use of their time to learn software engineering best practices. They're sequencing genomes and trying to cure cancer, or discovering the particles that make up the particles that make up the gluons. I'm in favor of letting them focus on that work, and if they knock out some hacked code to support their research, that's good enough. Turn it over to a software developer (or development team) and let them turn it into production code. It's a better use of everyone's time, as everyone is working on the things they do best.

      I'm still not sure why there's still such a love of FORTRAN when they could be knocking most of this stuff out better and more rapidly in a 4GL tool such as Mathematica. There seems to be some kind of engineering machismo that prevents people from evolving past the "My prof learned FORTRAN as a kid, and it was good enough for him" stage. They're totally missing parallels in the evolution of technology. Just like they're now using advanced technology like scanning tunneling microscopes instead of optical microscopes, the computer scientists have evolved our tools far beyond punch-card languages.

      I totally understand there would be no benefit to them to make a sideways leap to a different 3GL like Java or C#, but seriously, they shouldn't be in the business of structuring code and fighting syntax. They are in the business of higher level thinking and problem solving in a specific domain. Use the higher level tools already!

      --
      John
  63. Plus ça change by frisket · · Score: 1

    Same as the difference between the developer and the end user. The developer reckons the program is done when it executes without segfaulting, regardless of the fact that the interface can only be understood by another developer. Making a system correct and maintainable is only part of the job; making it usable by the rest of the world is a whole other business, and requires a knowledge of cultural linguistics and human-computer interaction which are not yet part of most developers' skillsets. Writing stuff for other developers to use is only a start.

  64. The code is a codification of the science by Anonymous Coward · · Score: 0

    And the code isn't the science. You're meant to do the code yourself from the science displayed in the paper.

    And, really, for much the same reason as you have three different coding teams writing FBW systems for commercial jets: it's more certain that good (but not provably correct) code will disagree on obscure pathways when the chance of another different program doing the same job will be accurate. And then the programs vote. Sigma clipping in signal processing does the same thing.

    For a scientist, the code is just to do the numbers. The paper shows the science and the result of the number-crunching. Do your own program and if it disagrees, then there's something worth looking at in the disagreement. The code isn't really important, the results are.

  65. Twain by Anonymous Coward · · Score: 0

    The part between the twain is the taint. ;) It t'aint here and it t'aint there.

  66. Re:I concur (sorry for posting anonymous) by Anonymous Coward · · Score: 0

    Having done both i just want to say. Its not as simple as that. In academia you are more doing code for yourself, you also have a lot more time and resources at your disposal. Sure in a company you have more money for the really important stuff, but more often than not that leaves much to be desired elsewhere. Both tasks are similar in may ways, albeit at different levels.

    The reason why i went back to academia for a while is the same that leads to wanting more requirements lists. In a company your expected to perform a certain task, you quite often loathe the tasks but nevertheless they need to be done. Now the bosses set up these tasks and the bosses might not even understand what it is they set up as a task. The requirements list is a way for you to shift blame, you need it because a lot of corporate culture is about covering your ass. Otherwise you'll notice quite quickly that you will be sucking up all the mistakes of others into yourself.

    Example:

    A quick implementation for code is needed, the company knows that the code needs to be changed later but takes the money up front with a easy implementation. It gets implemented by a guy that isn't all that good at engineering code so its not readily compartmentalized. Said person decides engineering is not for him so he gets a MBA instead of his MScE that he planned. Said person moves to management. The code works but badly, the client has constant problems with it.

    So the client says now its good time for phase 2, an contract is drawn out. This contract includes tasks that MUST work. The code goes around for a while untill eventually the company has burned 2 engineers with this code. The problem lands on my table, at which point is say "ok i can do this because you have nobody else going for it, but dont expect it to get spectacular results". I work for it 3 months (18 months past deadline by the way so presure is up). To discover what the actual problem is:

    1. Original coder is now boss of the division, and has sold his code as the best code the company has ever done. So requirement is to keep as much of the orignal code as possible. However the original code doesn't do at all what the client wants, no matter how good or bad it is its the wrong tool.

    2. Original contract contains a logical error, one can not under any circumstances fulfill the contract, I can mathematically prove this fact. As a consequence something has to give.

    So you'd now think that since i wasn't the original author of any of these i would be off the hook. No, way, The original architecture screw up, deadline blowing and the contract is suddenly my fault. Even if i inherited all these problems. And this is why for many the answer is if it isn't in the requirement list its not going to be implemented, case closed. Its a way to formalize where the blame lies.

  67. i HATE passive voice by AP31R0N · · Score: 1

    The code hasn't "been written", someone WROTE IT. Someone is responsible for it. It didn't materialize out of the ether. Someone wrote it!

    Subject... verb... object.

    What did it, what was done and what did they do it to.

    Passive voice obfuscates and deflects responsibility.

    "The decision has been made."

    BULLSHIT! "We/I decided...." Someone made the decision, that someone should be the SUBJECT of the sentence.

    How is it that i remembered 5th grade English class but journalists and so many other supposed adults can't?

    --
    Utilizing the synergization of benchmark e-solutions to pre-workaround action items!
    1. Re:i HATE passive voice by DragonWriter · · Score: 1

      The code hasn't "been written", someone WROTE IT. Someone is responsible for it.

      Actually, while someone wrote it, often the problem is precisely that no one is, in fact, responsible for it.

  68. engineer coding by SandFrog · · Score: 1

    My first coding job was at NIST (then NBS). I took code written by engineers, and made it usable by someone other than the engineer who wrote it. In most cases the input UI consisted of a '?' prompt at which you were to enter a comma separated list of floating point numbers, and the output UI consisted of a block of comma separated floating point numbers. The more interesting part of the assignment was eliminating inputs that could be derived from other inputs. You would have thought that an engineer would have done that without thinking about it - mostly not.

    --
    Contentment is the greatest wealth
    - Sukhavagga Dhammapada
    Contentment is the goal behind all goals.
  69. the difference between profession and amateur by doug · · Score: 1

    My personal observation was that when I got my BS way back in 1990, I knew everything that I needed to succeed in the software world except for handling non-sunny day cases. Sure, we talked about stuff like error handling, validating user input, and so forth in various classes, but it didn't really sink in. It wasn't until I had a job and worked on a system that had to stay up and run for months at a time that I learned those lessons. Most school projects only last one semester, and really only have to work once, so no one really gets much exposure to the necessity of bullet proof code.

    Those scientists seem to have the same mind set. It works in a few sunny day cases, so it must be ready to ship. Management can think like that too, especially if some other group is tasked with support and bug fixes. But those of who have had to pick up the pieces know better than that. Isn't that part of the value-add that profession software people add to a project? Coding really isn't that hard to anyone who can handle the symbolic manipulation (mostly algebra) and can pay attention to details. But there is a world of difference between toys and serious applications.

    As a software engineer, if you find yourself in that situation, your road is simple: look at the source, find a few corner cases that will break it, and then you can demonstrate that the code is not production ready. Then you should be able to get the green light to harden it. If you do it right, you can earn the respect of whomever cobbled together the original code, and then you can work with them next time. That is kinda the Holy Grail, isn't? You get to add your software experience and they get to add their domain knowledge.

    And if they are jerks about it, at least you get to rub it in their faces how bad they are at writing code. While that isn't really a "win" of any sort, it can be amusing to knock someone down who has put himself on a pedestal that he hasn't earned.

    - doug

  70. From the lab to the real world by RogueWarrior65 · · Score: 1

    The problem is fairly common. What works in the lab would at best be cost-prohibitive in the real world. Here's a classic example: In Solidworks, you can design anything but you can't build it because the tooling prevents it. You can also design stuff but it's impractical to assemble. You can design stuff that could be built but would cost so much that the market can't support the price tag.

    Lab-based software rarely has a user-interface that works for the general population. Embedded systems are fairly easy to design and cheap to prototype but packaging it for production is a major expense. Making plastic molds is still cost prohibitive for very small quantities.

  71. power of 3 rule by mmogilvi · · Score: 1
    From http://ask.slashdot.org/comments.pl?sid=169033&cid=14088668 :

    > 1 UOW = program for yourself
    > 3 UOW = give it to someone else
    > (you install, you copy, etc)
    > 9 UOW = give it to local group
    > (howto, platform change)
    > 27 UOW = shareware/open source
    > (configure/make/make install)
    > 81 UOW = product
    > (real docs, slick UI, support teams)
    > 243 UOW = business
    > (lawyers, CEO, sales, marketing)

  72. Inventory system by minstrelmike · · Score: 1

    I wrote an inventory system for my govt agency that didn't actually need it.
    Because I was an employee/analyst instead of a contractor, I could say, "No," and force them to explain why the other 5 inventory systems we had did not meet their needs (lack of data entry was not a suitable reason for me.)
    When they finally convinced me they needed two pieces of info for tracking computernames on the local wan, I built them one but since we only buy certain types of machines each year (maybe 3 or 4 different models), I built no way to enter new machines. Call me and I do it by inserting new vals into an array in the source code.
    That seems sort of silly but think of what's involved in creating a new item_entry_screen, validating the input, restricting it to a few users, handle editing of poorly entered records. It's a lot of work. It's only worth doing under certain conditions. Right now I meet their needs within a 24-hour turnaround that takes me about 15 minutes of work/year

  73. Two anecdotes... by Anonymous Coward · · Score: 0

    Twice upon a time...

    Once - I shared an office with a PhD physicist. Our shared task was to implement some very complex Einsteinian physics into a very large system. He developed the algorithms, I designed the software to be an integral part of the other 500K+ lines of code being developed, using the C++/OOP/Programming by Contract model of our large software development effort. He developed FORTRAN "pseudo-code" that actually ran using his PC FORTRAN compiler, then demanded I implement it exactly as written at the preliminary design review. At the CDR, when I showed him the actual code framework and how I'd had to divide up his code modules to meet our standards and actually reuse some of the libraries other folks had written, he threw a fit - ended up complaining up the chain of command until I was justifying my design to senior management. I won :)

    Another time - I was asked to review code. 4.5 million lines of code. Written over 15-20 years by a variety of scientists, grad students, and other "subject matter experts." Over 10 languages, no standards, duplicated data repositories, obscure libraries, hand-rolled interfaces... there was a even library someone had written to allow FORTRAN programs to draw maps using XLib. Some hard analysis, and I figured that the whole system of systems could be reduced by over 50%, and down to 4 languages, and if we standardized on some open-source tools, we could save millions in maintenance.

    Domain scientists are supposed to be the experts. Let them design algorithms and do their jobs. Computer scientists are supposed to turn these things into robust, maintainable, extensible, supportable systems. Let's do ours right and keep our jobs.

  74. You nailed it by gr8_phk · · Score: 1

    The most mysterious thing to me, though, is that the scientists, for all their intellectual firepower, don't understand that it's a problem.

    That is the core problem. They feel the problem is solved, which leads to something even worse - they feel the software guys are idiots because they keep fucking up their work. We use a lot of Matlab and Simulink too, and the Mathworks uses this to absolutely drive a wedge into the organization. If it can't be done in Simulink, you use the "legacy code tool" to hook in some of that antiquated C-code. They also preach that a "model" is self-documenting, so those guys don't have to write docs or explain anything. And I'm with you on the SCM issues. Management of course listens to the expensive guy with the PhD who wants a $30K tool chain that doesn't work with anything else. All this because of ignorance (a word which unfortunately carries negative connotations).

  75. Fixing a Scientist's Code Can Be a Nightmare by rhalstead · · Score: 1

    Often in a large corporation code may end up being used at many sites around the world and have to interface with other programs. Other programmers are likely to have to write programs that work with the original code and may even be incorporated into the original software. Without internal documentation they can take many times longer to write due to the shortsightedness of the original programmer. Writing a program to do one thing, or a piece of science is fine *IF* there is no likelihood of that software ever being enhanced or integrated with or into other software. I spent months deciphering undocumented code written by people who thought they knew how to code. To give them credit the code did do what they wanted, but there were major problems when it had to interface with a commercial program, Unfortunately the code was written by those located far up the food chain and word was, "It will not be changed" as the whole corporation used it. My only comment was "It will, sooner or later. Some years later the whole corporation went to a commercial database. They had to assign a team to convert the data and thought they'd simply export the original data into a spreadsheet and then import it into the new system. Unfortunately when they tried this they ended up with hundreds of thousands of non unique records. My guess would be it cost them a minimum of several million dollars to do something that would have only taken minutes had the original program been written following good programming practices... IOW Non professional programmers such as engineers and professionals in other fields that learn how to write a program approach from an entirely different perspective. What they do, works... usually, more or less, but they write to do a specific job, period with no thought as to future use of the code. They rarely follow good programming practices, write spaghetti code... lack of documentation, ... Earlier I saw a comment about not having time to do all that which is not normally considered a valid excuse, but a programmer in that field would be able to write good code that would do the job, be adaptable, do it faster, AND once finished others would be able to follow and understand the code. To top it off the programmer would likely get the job done in far less time.

  76. Intesting -- Computer Science Majors = Scientists by lpq · · Score: 1

    That could partly explain the difference between the passion I felt for computer science, and what I felt was the 'lack of caring' about software' of 'many programmers around me'....(its just a job).

    I was always horrified at the increasingly horrified at those who did coding just
    to churn it out and hand off to others, whereas I'd be regarded as overly
    cautious or slow to call something 'finished'....

    Definitely caused a crimp, as those who like to throw things 'over the wall', don't take it as personally when things don't work 'just right'....

  77. UK global warming code by jcaren · · Score: 1

    is a perfect example of how scientific code should not be written. Mad rush, tweaked to get the results they wanted and no way to replicate results.
    Furthermore many of the tweaks to gain the expected results made no sense whatsoever - they were simply fudges.

    Writing software is a science not an art form. If you treat it as some form of black art - as the UK folks did then you deserve the ridicule you get.

    If you reply with but non-deterministic systems are non bounded and hence cannot be proven, Then you need to read Dijkstra's A Discipline of Programming - this puts forward a very simple seven state bounded model for ND systems mathematical provability and if you canot understand this book then dont try and build modelling systems.

    IMHO Unless you apply a the science of programming all you are doing is hacking something together - and if it does what you expect that is more luck than anything.

  78. Requirements, Requirements, Requirements by Anonymous Coward · · Score: 0

    The example is a stupid set-up. The scientist has one set of requirements, "test theory" this proves successful, and therefore it is decide to produce a product from this. This is probably less than 10% of research work (just a guess from working in a research to first of a kind product development lab)
    Tell this scientist that he has hit pay dirt, but these are the requirements for the product solution.
    A sufficently well written set of requirements should convince the scientist that there is more work to be done, maybe get him to review the requirements too.
    Inform programmer the current state of the software, the requirements, the understanding of the scientist.
    If you really needs the buy in of the scientist to complete the project write the tests first, fail the existing software and productise it!