POV-Ray : Newsgroups : povray.off-topic : Software engineering : Re: Software engineering Server Time
29 Jul 2024 22:29:41 EDT (-0400)
  Re: Software engineering  
From: Mike Raiford
Date: 12 Aug 2011 08:45:55
Message: <4e452083$1@news.povray.org>
On 8/4/2011 7:22 AM, Invisible wrote:
> Imagine the unimaginable: Try to picture the worst possible software
> codebase. The kind of thing that only exists in your most darkest
> nightmares, the ones where you wake up screaming. The sort of code that
> sends people stark raving mad.
>

Welcome to my world ;)

>
> Now imagine that instead of just /one/ broken upper-case function, there
> are /sixteen copies/ of this thing, all doing upper-case conversion on a
> different subset of the Latin and perhaps Greek alphabets. Twenty five
> different functions which all incorrectly percent-encode URLs in a
> different incorrect manner. Four copies of that weird function that you
> don't know what it does yet, all of them identical.

Seen that, too.

> Best of all, during the development process, the code has changes so
> many times that large parts of the codebase are actually DEAD CODE! Huge
> chunks of it are EVER ACTUALLY RUN. They used to be, but no longer are.
> Good luck figuring out which bits those are.

Been there...

>
> The code uses pointer arithmetic to access stuff, and as such depends on
> the exact ordering of stack frames, heap placement, malloc behaviour and
> God only knows what else. Compiled code is modified at runtime. Some of
> the machine opcodes are also data constants; if the compiler ever
> decided to move the code around, it would stop working.
>

I had a friend that did a lot of that.

>
> In case you haven't come across this scenario, let me spell out the dire
> consequences of this development pattern: EVERY SINGLE CUSTOMER has a
> completely unique, one-of-a-kind variant of the software. Each one has
> its own completely unique set of bugs. Each one has different functions
> with different names in different files to do the same job in slightly
> different ways.
>

Yep. been there, too. :)

> Are you trembling in catatonic hysteria yet? Then let me tell you the
> worst part: The software is /really really popular/. Sure, it doesn't
> actually /work/ very well, but it's a completely mission-critical part
> of every customer's infrastructure, and /must/ be supported. And the
> range of functionality it provides and the complexity of the workarounds
> the customers have invented to deal with it make replacing or rewriting
> it unthinkable.

Been there, too!

>
>
> OK, so that's pretty much the work Daily WTF nightmare imaginable. Of
> course, nobody /actually/ writes software like that, right?
>
> Right??
>

I think that's rather common in business. Often the only real 
requirement is "Just get it done!"

> In a sense, what scientists are trying to do is even /harder/ than
> figuring out what a really buggy program does. They're trying to figure
> out which customer got which copy of what software from whom at what
> point in time, and what modifications were done after that. In other
> words, track Mr Incompetent's movements and figure out the linage of all
> the different copies of the software. Jesus that's hard!

Well, someone  needs to just code up a decomipler, then, don't they?

-- 
~Mike


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.