7 ms·
Dump it and rewrite it in ten thousand lines of beautifully crafted code.
by Kilimanjaro 14y ago
Dump it and rewrite it in ten thousand lines of beautifully crafted code.
- eps 14y agoAlso known as "Russian refactoring". Every self-respecting Russian programmer will always try and convice you to rewrite everything from scratch. Regardless of the context. I'm pretty sure it's in their DNA.
- YuriNiyazov 14y agoWhere is it known as such? Googling "Russian refactoring" brings up nothing related. This is not strongly exhibited amongst me and my friends. Maybe we are not self-respecting.
- huhtenberg 14y agoYou are young yet :) Virtually every Russian dev over 30-40 I know is like that. I am myself that way too. It always seems easier to redo from scratch than to waddle through someone else's code.
- zeroonetwothree 14y agoThis is true of non-Russians as well.
- eps 14y agoChill, comrade Yuri :) It's a joke. Though... not really.
- deleted 14y ago[deleted]
- vineet 14y agoSorry, but this is really bad advice. It is very tempting to redo something from scratch, but in doing so you will end up spending a very large amount of time fixing issues and adding details that were already done in the original code.
- antidoh 14y agoI think the advice was sarcastic.
- vineet 14y agoOh, In that case... (I can't tell you how many times I have heard the same advice being given seriously)
- antidoh 14y agoSame.
- TillE 14y agoIt can sometimes be the right approach. It's not a decision to be taken lightly, but it should be on the table. Especially if your goal is not to duplicate the functionality of the old software precisely, but to provide a significant upgrade. It really depends on the requirements.
- cjdentra 14y agoOh yes, I have seen where re-writes are actually done. Developers start to talk about the lack of "scalability" and "maintainability" of the application with the best solution being to rewrite the app. I've also seen Java-to-Microsoft stack ports being bandied about. Generally it is a really bad idea but some of the decision depends on the language(s) preferred by the firm inheriting the app and the size of the app.
- greenyoda 14y agoHe can't do that, since he doesn't have the hundreds of man-years of domain knowledge that the authors of the code have accumulated. As a software developer, he probably doesn't know the first thing about how a chemical plant works. ("The program itself is a physical model of a complex chemical processing plant; the team that wrote it has incredibly deep domain knowledge but little or no formal training in programming fundamentals.") Understanding 200K lines of complex code well enough to be able to rewrite it is hard enough, even if it's just pure database or graphics software. If it's about something you know nothing about you're going to have to learn something about the domain first, just to understand if the output you're seeing is anywhere close to correct. You're going to need to know whether some odd behavior of the code is essential to its correctness and must be preserved, or an accident of its particular implementation which can be changed or removed. Also, you can't just dump some system that people depend on to get their work done. You have to maintain it and fix bugs while writing its replacement. Given that he's just a lone developer and doesn't have the budget or authority to hire a large team of professional hackers to help him, his only chance for success is to start learning about the system, adding tests and making small refactorings.