Rewrote {big number} of lines of {old language} in {small number} of lines of {hip new language}

LMAX Exchange

There’s lots of projects these days moving from one language to the next. Whether that’s a good idea or not varies but let’s accept that it was the right choice and the world is a better place for it. One thing really bugs me: inevitably justifications of how successful that move has been includes a claim that the number of lines of code were so significantly reduced.

We rewrote 1.5 million lines of Java in just 6,000 lines of haskell!

The old system was 200k of tangled Java but the new system is just 4000 lines of clojure!

There are two things about these claims that bug me:

  1. Lines of code is a terrible metric – how have we not learnt that yet?
  2. Its incredibly rare to do a complete system rewrite and actually build the same thing.

Inevitably the big gains in a rewrite come from a better understanding of business requirements so the new system actually does less stuff. Just because it meets all the same business requirements and maybe even looks the same to users doesn’t mean its doing all the same things or providing the same level of configurability or flexibility. That reduction in scope is what makes it a better system.

Flexibility and configurability is only an asset if you’re actually using it. In all other cases its just waste and should be removed.

Any opinions, news, research, analyses, prices or other information ("information") contained on this Blog, constitutes marketing communication and it has not been prepared in accordance with legal requirements designed to promote the independence of investment research. Further, the information contained within this Blog does not contain (and should not be construed as containing) investment advice or an investment recommendation, or an offer of, or solicitation for, a transaction in any financial instrument. LMAX Group has not verified the accuracy or basis-in-fact of any claim or statement made by any third parties as comments for every Blog entry.

LMAX Group will not accept liability for any loss or damage, including without limitation to, any loss of profit, which may arise directly or indirectly from use of or reliance on such information. No representation or warranty is given as to the accuracy or completeness of the above information. While the produced information was obtained from sources deemed to be reliable, LMAX Group does not provide any guarantees about the reliability of such sources. Consequently any person acting on it does so entirely at his or her own risk. It is not a place to slander, use unacceptable language or to promote LMAX Group or any other FX and CFD provider and any such postings, excessive or unjust comments and attacks will not be allowed and will be removed from the site immediately.