- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
An apology on this site is a yoyoyoyoyoyo (oops, stuck in obsessive-compulsive behaviour) absurdity. I hereby apologise double, which by co-incidence is half my name.
It's nice to know that you've drunk enough coffee to spot that, for once in the last month or so, there's an actual elegance to the WTF. I mean, that ellipsis was pretty cool. No unicorns, no panning over endless Amazonian forest, no cutting a pissed-off Harrison Ford giving the speech of his life while he thinks he's just walking along the sea-front whilst fulfilling a Contractual Obligation. Just Art.
I'm in love with that ellipsis. Three tiny dots, just leading to the future of TDWTF ...
Which doesn't include friggin pod-casts, unless you live in a pod and/or have a limb in a cast. But that's Another Thread.
... so I can't accept your apology. But I'd be happy to buy you a cup of Yo next time we meet in the code zone.
(For any real Nazis out there, that's a phonetic joke in extremely bad taste. The drink I'm actually proposing is squeezed from huge overhanging fronds by fairies in the early morning.)
(And for any homophobes out there...
Well, y'all are on the Pink List. We know where you park your pickups.)
Admin
In Communist Russia, INSANE LOW PRICES own you!
Admin
On a serious note, there is something to be said for trying to fix this mess piecemeal instead of starting from scratch, but it's a business reason, not a software reason.
Yes, starting over is the most efficient way, it's the quickest, cheapest path to good code. But it's a path you can't use because it involves going bankrupt before reaching the goal. The clients are just about ready to wash their hands of you, they won't wait six months for the grand unveiling, your only hope is to keep the code running and show improvement starting now.
I had a gruesome project a while ago under a couple of bosses (alarm phrase right there) who didn't understand this. As a hard deadline grew steadily closer they spent their time dreaming up ever-more-perfect architecture and ignoring all my warnings while I worked like a bee on meth. In the end they showed their true talent: being elsewhere when things hit the fan. The fact that such cretins can rise to managerial positions is a strong clue to the prevelance of WTF projects (and maybe the bad American reputation).
Admin
Gah! I'm working with the exact same thing-- except instead of str it's @sql, and the block is followed by EXEC(@sql)
Admin
I don't know about that... I worked on a project for one of the VERY big U.S. banks and I told my manager daily that the "India Team" was delivering crap. He diligently passed the info up the chain and was regularly reminded that the company was saving a ton of money by outsourcing some of the work.
After 2 years, and literally millions of dollars, the project was scrapped.
You can't save people from their own stupidity.
Admin
Ah, the old one million responsibilities per class.
Admin
I was wondering that; the .NET framework even uses IDictionary for moving configuration options about in the Remoting namespace (the documented example is using a Hashtable).
I find using a similar approach works well sometimes; otherwise you can end up having a configuration options class representing a hideous number of mutually exclusive options to cover different possible configuration scenarios.
One case I had was configuring a connection, where the underlying connection type could either be old school FTP or shiny SFTP. There are options for SFTP that just aren't relevant to FTP; sometimes you just don't need to include a set of options, e.g. for configuring a proxy.
You lose your strongly typed goodness and sometimes bugs can be hard to pick up (if your keys are case dependant strings, for example), but you make up for it by not having a huge ugly classes most of which might not be used and some of those problems can be designed away.
Admin
Reminds me of an app that was outsourced by a company I used to work for. The lab that originally maintained the code was in the habit of adding small features and never updating the specs. If they thought the feature was needed, it was dropped in whenever the developer was 'in that area'.
The entire lab was outsourced and sent overseas to a company with a relatively good reputation. They got the specs and the source code.
The first thing they did: Reviewed the specs and removed every undocumented feature.
It took months to get the specs (and program) updated to fix the dozens of problems that was caused by the cleanup.
Admin
Admin
Admin
The original submission I wrote was much too long to include on the mainpage, but I've posted technical details about this application on StackOverflow:
http://stackoverflow.com/questions/434414/what-is-the-most-evil-code-you-have-ever-seen-in-a-production-enterprise-environm/434562#434562
Seriously, read that. The application was a beast from start to finish. It was written in C#, but it looked like it was written by a bunch of developers whose latest programming experience didn't go beyond VB5.
To fill in some of the missing details: a few years ago my company wanted to produce a new product for our banks. The project management triangle states "you can have a product that's done well, cheap, and quick -- choose two". We went with fast and cheap at the expense of quality, so we offshored developed to the lowest bidder.
Of course, that's not why this project spiraled out of control. We were an agile shop, so we didn't produce requirements on any kind of permanent medium. Requirements were community by whiteboards, notecards, email, and word of mouth. So, when we passed the project off to India, we didn't provide them with any requirements. Strike 1.
Even without requirements, India's turnaround time was amazing. They were able to produce an executbale within days of us requesting a change, the turnaround time was amazing. However, India developed pretty much unsupervised, its not clear to me whether there were any code reviews. We never saw any of the code until it became a crisis. Strike 2.
We started selling eTeller 1.0, with the minimal functionality it had, to our customers and they really enjoyed it. We expected bug reports, feature requests, and so on as part of the normal lifecycle of product development. India was quick to fix the bugs for the first few months, but after a while their turnaround time began to really slow down. The bug queue increased from a few dozen bugs to quadruple digits, and each new release of the application spawned an entirely new set of bugs.
The application became so unstable that it was crashing 40-50 times a day. It got to the point where bank presidents were putting the president of my company on speed dial just to report bugs. We were on the verge of losing a number of customers.
It got to a point where we said "alright India, if you can't hold up your end of the bargain, we'll do it ourselves". We decided to add some of our own manpower to the programming effort, essentially going through the code and fumigating bugs. When we saw the code for the first time, it became immediately obvious why India was unable to attack bugs: the code base was 130,000 LOC of spaghetti code, as described in the link to SO above. The entire application was written using the "just do what it takes" FAD methodology.
We were reluctant to make any sweeping changes to the application because, in an effort to save time, India has skipped all form of documentation, QA, and above all else: no unit tests. Strike 3.
We terminated our contract with India immediately and moved the project in-house. Since the application was already in production, my dev team had to work very carefully to untangle the code. Over the course of 12 months, and maybe a few WTF's committed by our own team (yours truly included), we were able to pare down the code base to a slim 36,000 LOC without losing any functionality (and more than that, we added a lot of functionality too!).
I left the company in Oct 2008, just as the eTeller code was starting to become palatable. But, at the very least, this WTF has a happy ending: my team and I rescued the application from oblivion, saved the company potential lost customers (and lawsuits!), and the application now has the most solid code out of all of our products.
Admin
I run an offshore software company in Thailand. I also spent 15 years working as a developer in the US, Switzerland and the UK. I also employ some highly skilled western trained developers. I don't employ half-trained monkeys. Our code is exactly the same high quality stuff I wrote while working onshore. Just because we write it in SE Asia doesn't make it crap.
Admin
Having seen Bank software in person, this is actually not far from the general case.
Admin
Perhaps "you don't get what you don't pay for" is more accurate because powerful, important customers (e.g., the UK, Canada) have paid millions to E*S or Acc*****e or <prestigious producer of egregious crap> and received garbage. There are few bargains but many swindles.
Admin
It's hot gay sex. http://en.wikipedia.org/wiki/Male
Admin
Admin
That all depends on other things like SLOC.
Admin
I suppose it could also be, but then you could to do away with the clearly illustrated double-sided dildo. If the objects naturally came with base methods, why would Alex slip in this clearly superfluous interface ? I think he's a better architect than that !
Admin
I want to clearly delineate my argumentative structure here, including its implicit requirements because, try as I might to be clear, sometimes people miss what is clearly spelled out in this limpid and straightforward argumentation.
Either
I think it is about time that we clearly and definitely establish the basics here.
(I am presuming here that Alex isn't a fan of agile development, but I could be wrong)
Admin
This is why I fully support offshoring....fixing their shite keeps competent developers in work for YEARS....LOL
Admin
This is exactly my experience with offshore development.
Admin
Wipro and Tata are just the same. A tiny competent minority put up a prototype taster to suck in the customer then guys who bought their degrees at the local vegetable market do the rest.
Admin
You might want to listen to Radio WTF all day, every day. And Radio WTF may narrowcast to you and only you, because after all you're clearly an idiot and will buy anything they advertise.
Generally, this is not considered a sound business model. I believe the official term for it is "Tin Foil Hat syndrome."
Admin
I recognize the specific details of this story, and was on the same development team as Steve. The code we inherited was truly as bad as described, but I'd say our problems were greatly compounded by programmer overzealousness for making the code "beautiful", without putting in the necessary effort to make sure the new code didn't break stuff that was already working.
Yeah, that takes time and a lot more effort to try to understand the old code. But by throwing out old code as "incomprehensible" instead of wading through it and trying to make sense of it first, a lot of stuff tended to break. Lots of details that had spent over a year being refined (and the code messier for it) tended to get lost in these rewrites. And several months later, finding out that some obscure feature that only a few customers used was broken because of that.
There are definite long term advantages to making the code more maintainable, and the code base has come a really, really long way in that regard. But when paying customers are depending on software for their business, it's business suicide to ignore the short term "this has to be in a working state the next time we send it out, with all the functionality they depended on in the last version".
Admin
so you're suggesting a Wiki?
Admin
Admin
Admin
Admin
does this smell like a 90's comeback, or what?
Admin
All I can say is that the assumption is proven in reality. While I see my opinion changing in the future as the US shifts away from its' core founding principals that made the country so great, I still don't see another country that I would rather live in (OK, maybe New Zealand). The country I think is better than all others was created by....Americans....The countries that I would never live in were created by.....not Americans.... Does the fact that a certain group of people created something like a country better than another group of people make them better, maybe not. But it should cause one to at least consider that maybe it does. There must be something that the US has been doing that other countries do not that has made it so successful.
Admin
[quote user="Code Dependent"][quote user="Some American"]I'm thoroughly ashamed of what the Bush administration has done, and of the perception of Americans in general by the rest of the world as arrogant, isolated in their views and out of touch.[/quote]
Maybe it is the rest of the world that is arrogant, isolated in their views and out of touch with reality? I know it's trendy for us all to blame the US for the world's problems. Even our president has hopped on the bandwagon.
Hey, Europe, Africa and Asia. You have been screwing up the world since history began. The US has only been around for a couple hundred years and only been a major player in the international scene for less than a century. Don't blame the US because you have not been able to get your act together over many millennium while we have been able to do it in a fraction of the time. Get past your jealousy and start putting blame where it belongs....yourselves.
Admin
Me and my ex colleague got some serious flashbacks while reading this article, having to support a Delphi application of similar size, with all the code being kept in user interface forms. It is over a year ago now since we resigned and we keep thinking (its not unlike like Posttraumatic stress disorder, having the occasional nightmare on returning back to work), what could we have done to tame that beast? A month ago I came up with the idea of off-shoring it too India for refactoring... Now I understand that this would have made things only worse! So yes, the application was doomed - and resigning was the only good option.
Sympathy to all those people suffering right now maintaining applications like this one! Our thoughts are with you...
Admin
Right. Don't lie. Tell people you're an American, and then don't act like an ass. Maybe the rest of the world will start thinking that not all Americans are rude and ignorant!
Admin
Not bad, only three grammar/spelling mistakes that I see.
Admin
Are you counting the four dot elpises as one error? 'Cause there's four of 'em.
Admin
Nothing inherently bad, however, it does depend on how you're passing it. A Class (Model) helps you organize related data and specifies how that data should be accessed. Throwing around data is a recipe for disaster. Whoops...too late!
Admin
Admin
First, you are not just moving data around. You are moving it around for a reason. That reason is usually better served with the assistance of abstraction barriers.
Second, if you wrap the collection and then move all of the behaviour that is relevant into the wrapper, then you don't have a degenerate 'wrapper' but a very semantically rich class.
Third, we don't define structures for their structure, we define them for the behaviour that is associated with that structure.
Admin
Can you post the rest of your submission, your stack overflow was great, however I read that first.
Admin
UI depends on business logic. Not the opposite. If your business logic depends on the UI then you get the mess described in this article.