What is Legacy Code?
I’ve always thought LEGACY it was the correct terminology for old fashioned RPG source code. For years I’ve been focused on refactoring old column based RPG “legacy” code into new “modern” RPGLE code. But it seems that I’ve been guilty of using the wrong words all this time.
I just read an interesting article over at http://www.mcpressonline.com/rpg/stop-saying-legacy.html which is basically saying – Stop using LEGACY to describe programs, because really its simply an earlier version of the current program code.
As soon as you promote your program code into production, it’s immediately the legacy version of that code.
Programs should be living things and should be gently evolving at all times. Calling it legacy promotes a negative image of the program code itself.
/me purses lips and gently nods his head in agreement
There is another great comment after the article that says:
“There should never be legacy code. All code should be living, breathing; meaning, it should be modernized as part of it’s lifecycle. This is not necessarily a very frequent refactoring, rewriting…rather an on-going refinement every few years (situation depending), in order to keep the technical-debt wolves at bay. This is not to say an app should be completely rewritten, no I am talking about a piece here, a piece there, maybe you normalize the files this pass, in a few years you isolate some logic into sub-procedures, perhaps in another pass you convert the DDS to DDL, still later you isolate all DB I/O into DAO’s (data access objects written as stored procedures), etc. Those that write it, and forget it are those that will wake up one day to an antiquated system. Additionally, not having a policy of constant modernization means a vendor’s skills get stale, in-house developer skills get stale. The lifeblood of a code stack is constant improvement….keep the code stack living, and breathing!”
— Dan Lovell
Well said Dan – I couldn’t agree more!
I will refactor my brain and reconfigure my usage of the word legacy from here on out.
It’s never too late to learn a new way of doings things or to change the way we think about established software descriptions.
In the words of one of my personal heroes and mentors:
“Thing with me is that, I am smart and I’m self smarted basically, by myself. Basically from nature and smokin’ drugs and doin different things I was self uhh….. self learned myself. And that’s the whole difference I guess, is that I don’t need the books, the schooling type things. I just get everything on my own. Because of that, I’m alive right now. I mean, if I read more books or tried to go onto collage or doin things like that, I’d be dead right now, because people say books and collage are for to make you smarter but they can also be for to get you dead. Which is what could happen to me! My brain doesn’t use enough oxygen cause I don’t have the whole thing filled with the different stuff. If it was full, it’s only part full, and that’s why I’m alive right now. The guards are in here like, here read this book, try to get smarter, I’m like, alright I’ll pretend to read it but I’m not gonna really read it, cause then my brain would get more full, if I have another heart attack, I’m gonna die!”
— Ricky (Trailer Park boys)