tag:blogger.com,1999:blog-4396453438559203731.post9082310696809786182..comments2023-03-30T10:21:15.464+02:00Comments on Working Software: Sometimes Rewriting is the Only OptionMartin Whttp://www.blogger.com/profile/06183869229751711572noreply@blogger.comBlogger10125tag:blogger.com,1999:blog-4396453438559203731.post-15459816478943356772010-11-25T03:26:46.474+01:002010-11-25T03:26:46.474+01:00Yeah i had a lot of legacy code in C# and other te...Yeah i had a lot of legacy code in C# and other technologies. My only option was rewrite each part of code.Gerardo Gonzalez Cruzhttps://www.blogger.com/profile/07689414894006157864noreply@blogger.comtag:blogger.com,1999:blog-4396453438559203731.post-17867796768648855372010-11-23T06:06:29.308+01:002010-11-23T06:06:29.308+01:00Can you please let us know the consulting company ...Can you please let us know the consulting company so that we never would hire them for anything? Also did you fire the manager who drew up the contract to pay them per line of code? Seriously, who does that these days. I run a consulting firm and I have never encountered anybody who wanted to pay me by the number of lines of code that we wrote.Anonymoushttps://www.blogger.com/profile/07174754039645505638noreply@blogger.comtag:blogger.com,1999:blog-4396453438559203731.post-65759676369875219332010-11-23T04:14:27.915+01:002010-11-23T04:14:27.915+01:00usually this happens when their wasn't third p...<a href="http://www.adobocode.com" rel="nofollow">usually this happens when their wasn't third person to review the code. code review is essential to avoid re-writing in the future. just make sure too that the third person is wise enough to think of complexities in terms of the written code in the future. :-) </a>paulhttp://www.adobocode.comnoreply@blogger.comtag:blogger.com,1999:blog-4396453438559203731.post-33999410996473391132010-11-22T18:15:59.214+01:002010-11-22T18:15:59.214+01:00Huh... "paid per line",
"unrolled ...Huh... "paid per line", <br />"unrolled all loops and added switch cases instead"<br /><br />I think that the buyer can sue them for robbery....SABhttp://www.serveradminblog.comnoreply@blogger.comtag:blogger.com,1999:blog-4396453438559203731.post-4790267319814142522010-11-22T17:33:04.501+01:002010-11-22T17:33:04.501+01:00I was in a similar position with an embedded syste...I was in a similar position with an embedded system and a home-grown "real-time" OS that was cooperative (i.e. not preemptive) with the stupidest message-passing algorithm that computer science has ever seen. The workaround to that became to directly call entry points in other processes (euphemistically called "quick message"). The embedded system had been in integration test for a year and showed no signs of slowing down in its ability to generate bugs. I recommended replacing the OS with our standard (also home-grown but sane) real time OS and showed how this could be done fairly quickly (2-3 months). Didn't manage to convince *anyone*. Another year later the whole project got canned. Not saying that following my recommendation would have save it, but it was a mess just plain beyond repair.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-4396453438559203731.post-82618468805061708582010-11-22T17:30:06.494+01:002010-11-22T17:30:06.494+01:00@Anthony: No, not any details, except everything w...@Anthony: No, not any details, except everything was outsourced completely to a bunch of programmers who did everything paragraph-by-paragraph from the spec. Always adding more code... copy paste, never refactoring. They didn't even use arrays in for() loops, they unrolled all loops and added switch cases instead! <br /><br />But you are certainly right, the code quality should have been reviewed regularly instead of... well, never. :)Martin Whttps://www.blogger.com/profile/06183869229751711572noreply@blogger.comtag:blogger.com,1999:blog-4396453438559203731.post-37442129069296919532010-11-22T16:13:23.358+01:002010-11-22T16:13:23.358+01:00It is all fine and dandy until the rewrite does no...It is all fine and dandy until the rewrite does not work the same as the original. Then you are SOL.Maintenance Manhttps://www.blogger.com/profile/11251164494419993264noreply@blogger.comtag:blogger.com,1999:blog-4396453438559203731.post-13529551622038711432010-11-22T16:03:19.922+01:002010-11-22T16:03:19.922+01:00Very interesting post, to me this seems like more ...Very interesting post, to me this seems like more of a project management screw up than technical (to start with), signing a contract where you pay per line just encourages poor reuse! Do you know much about the conditions around signing off on this project? I do wonder if this whole mess could have been avoided with more knowledgeable stack holders who drove the initial project...Anthony Shttps://www.blogger.com/profile/13796474546326648818noreply@blogger.comtag:blogger.com,1999:blog-4396453438559203731.post-8645188124813992712010-11-22T15:48:20.232+01:002010-11-22T15:48:20.232+01:00I have never understood the huge bias against rewr...I have never understood the huge bias against rewriting. In your case, it seems a perfectly clear option. I think the bias comes from underestimating the cost of figuring out the requirements to get the system where it is now, and overestimating the cost of rewriting it. It seen as a complete "do over" when in reality is is far less than that. <br /><br />In your case, you have a system that meets the requirements, but is non-functional on the back end. It takes time to get there, and none of that work has to be re-done if you rewrite. You just make the same system again with a better back end.<br /><br />I have personally rewritten my own systems on a number of occasions and they always come out much better -- cleaner design, more efficient, more elegant, more scalable, etc., because I am able to leverage all that I learned the first time. You will never get that clean break with refactoring.Alex Kilpatrickhttp://www.tacticalinfosys.comnoreply@blogger.comtag:blogger.com,1999:blog-4396453438559203731.post-57276066155984572792010-11-22T15:27:02.853+01:002010-11-22T15:27:02.853+01:00I couldn't agree more. Anyways first step to r...I couldn't agree more. Anyways first step to refactoring is to write tests and when you have tests it's relatively easy to rewrite the application when cleaning would take too much time, especially when existing code is tightly coupled spaghetti.zosohttps://www.blogger.com/profile/14830037330948699165noreply@blogger.com