Ative at Work

Agile software development

Ative at Work

Don't Port the Dead Code

Once upon a time when Gildenpfennig and I were porting a mainframe to .NET we received specifications for one of the integration points - to another mainframe that would still be running.

So we set forth and started implementing. More and more "protocol" ("services" in modern lingo) specifications came in - they took quite some time to dig out since the mainframe was not very well documented - in fact, the existing specification was so wrong that they had to have one of the mainframe hackers reverse-engineer the existing implementation.

Anyway, the overall project structure was quite waterfall’ish with the customer driving the specification process and the development team consuming it.

Needless to say, that approach did not work.

We found out soon enough.

Basically they got so hooked on reverse-engineering the mainframe that they spent quite some effort writing up all the possible query responses it implemented in the integration point.

However, when we asked, "well, uh, about this latest LU62 protocol... which query triggers it?" there was no good answer... In fact, after some searching it turned out that a lot of the protocols that existed in the legacy system were no longer in use - the queries that used them no longer existed. It was just a lot of dead code left in the mainframe.

So we learned an important lesson again:

When refactoring - remove code that is no longer in use.

And don't port the dead code.



Søren Lindstrøm said:

Hmmm... dead code is just a question of treating your code like a house you must live in - keep it clean. Perhaps your mainframers should be sent on a "Code Hygiene 101" course. Now the real question is why mainframers insist on proting the sick and jurasic naming-convensions of the underlying database (most likely DB/2).

The tyranni of the DBA's must come to an end! ... Or is it just a perveted way of encrypting code, thus rendering an obsolete technology indispensable, by making it appear more vital than it actually is?  

oktober 3, 2006 9:20

Jan D. Andersen said:

The dinosaurs were killed by a huge meteor! Why did mainframes go free ?

oktober 4, 2006 2:57

About Martin Jul

Building better software faster is Martin's mission. He is a partner in Ative, and helps development teams implement lean/agile software development and improve their craftmanship teaching hands-on development practises such as iterative design and test-first. He is known to be a hardliner on quality and likes to get things done-done.
© Ative Consulting ApS