"Come and hear how we’ve built an international team of developers to tackle the problems of resurrecting a poorly-understood, gigantic code-base extensively commented in German, with no unit tests, a tangled build infrastructure, and twenty-five years of un-paid technical debt."
Looks like a project I worked on. It's eerie how similar it is (and no, it was not an office app, it was something different).
At least the comments weren't in German, but there were a couple of ones in Dutch. (Not that the comments were of any help)
No unit tests: CHECK. Twenty-five year of technical debt, CHECK. And now we're supposed to make it work in a different platform
So thank you, but I don't plan on touching a monolithical piece of old C++ ever again. Not even with gloves.
Start by adding integration tests, then (try to) identify the core of the project and isolate that in its own sub-project in the repo. Add unit tests for the functions in the core and then split the remainder into parts that are peripheral and that could be removed/disabled. (say a spellchecker). Next up re-factor the core until you're happy with the state of affairs, but keep the interface the same. If there was no interface to the rest of the code then you'll need to define one and implement that as well as changing the peripheral code to use that interface. Then look at each peripheral piece and decide if it is worth saving, needs rebuilding or refactor it as well.
The basic trick is to reduce scope until a subsection of the work becomes tractable.
With a really large project this is a multi-year effort with a team of seasoned programmers, it's hard and it means that while you do it there will be no honoring feature requests. You need management buy-in, patience and perseverance but that goes for any large effort.
Building fresh and green stuff is obviously much more fun to do but taking an old codebase and making it nice is (to me, at least) just as rewarding.
I find this argument smells of rationalisation to me: You admit yourself that building new stuff is much more fun. Say making an old codebase is "just as rewarding" but in order to actually understand all the legacy you need to put in 2x (or whatever the amount) of work that you'd need to build a new thing. Wouldn't you want to build 2 new things instead?
I could never imagine someone on their own accord, going by themselves into a 30-year-old codebase and refactoring it, just to make it "look nice". On the other hand people constantly build new stuff (too much of it really). I think it would be fine to admit that working on new code is more desirable than working on old code. Sometimes the latter needs to be done, but I think most programmers are happy to avoid maintenance work when they can.
The problem is that in cases like these, invariably the old, crappy code contains documentation and functionality that will never be reproduced by a ground-up re-write. Understanding the old code and rewriting is, in general, just as expensive as refactoring. This is the common dilemma with old codebases like this -- in spite of its horrible, unreadable state, it contains business knowledge too valuable to lose.
As far as making the code "look nice" -- you've missed the point. The goal is to make it functional, readable and extensible again, and doing that to a 1M+ line codebase (which I've had to do) can be enormously rewarding, the business value gained more than tangible.
Building something new is more fun in the beginning. Refactoring an old codebase and making it fly is rewarding when you're done. This is not about cosmetics.
Both are fun, assuming you stay in long enough the first will at some point turn into the second, no matter how well your intentions were at the beginning ('this one will be different, this time I'll get it right').
Yeah but programmers are generally not bound to a codebase for life. A friend of mine who works at Google says that he generally works on projects in the "do it new and figure out what it needs to do" phase, while there's other engineers at Google who are very good at the maintenance phase and "keeping stuff running and adding slowly to it". I think that's a very nice way of wording it, but I'd definitely want to see myself in the former group, not the latter.
> Yeah but programmers are generally not bound to a codebase for life.
If you're young I can see how you might have that impression. But I know quite a few programmers personally that have been working on the same codebase for more than a decade, and even a couple that have been working on the same codebase for 3 decades.
The web is still young enough that most people that came into programming through building websites have no idea how long most code bases are alive.
There is a neat little proverb here: programs are like children, you can start one in an evening but you'll end up supporting it for the rest of your life.
Not arguing against the fact that old codebases exist and that people have to take care of them.
However I don't agree with glorifying old codebases or putting them as "equal" to working on new stuff. If you're happy doing that, then fine, no one's going to stop you from doing it, but I do think that in general, given the choice, almost anyone would pick building something anew over working on a legacy codebase.
Heh -- stick around, kid. :) Those shiny new greenfield codebases, so full of promise, perfect architectures and unfettered extensibility, can turn into slow-moving, spaghetti-code Leviathans in a matter of weeks. It's not just the decades-old, massive LOC codbases that provoke this dichotomy: chances are very good that the code you're working on right now, that gorgeous, sleek, sexy code -- will be staring at you with its cold, incomprehensible dead eyes within the year, asking you how, how did it come to this, how did you neglect me so, and why do you hate me now?
OK, or maybe not. But it can happen, and it does, all the time, in really good shops with very experienced coders using all the right techniques and best intentions. I know. Dear God, I know.
Of course anyone would rather bootstrap new code and feel the thrill of new object models, shiny, hip new libraries breezing through their editors. But until you've experienced both sides of the equation, the long-term consequences of technical debt growing through a codebase like some kind of...virus...you'll not know how important the second-order effects of refactoring, TDD, and truly clean code really are.
> Not arguing against the fact that old codebases exist and that people have to take care of them.
ok
> However I don't agree with glorifying old codebases or putting them as "equal" to working on new stuff.
Ok, so we will disagree on that then. I think that both jobs, new stuff and maintaining old stuff are equally rewarding and are essential skills. If all you can do is make new shiny MVPs you'll never run a business.
> If you're happy doing that, then fine, no one's going to stop you from doing it, but I do think that in general, given the choice, almost anyone would pick building something anew over working on a legacy codebase.
You won't be given the choice, unless you keep running away from your creations.
The neat thing about old codebases, is that even if the code is messy, the problem it solves can be very interesting.
"Legacy codebase" is another word for "important codebase".
When you're coding, you solve the most important problems first. Thus, in some sense, the older the code base, the more important the problem it solves.
> I could never imagine someone on their own accord, going by themselves into a 30-year-old codebase and refactoring it, just to make it "look nice".
One of my "hobbies" that I unfortunately have too little time to delve into, is to find old code that I want to see live on, especially old Amiga code, and make it live on. Some I "only" make compile for AROS (an AmigaOS re-implementation). Some I try to port to e.g. Linux.
Part of it is nostalgia. Part of it the learning experience - code written for a system with 512KB or RAM and a floppy is often structured very differently, and sometimes the approaches are still interesting. Part of it that it is just relaxing to clean up something where all the hard implementation decisions have been done.
You could do the refactoring to enable yourself to add shiny new functionality to the big old product. In the end you will have a revived mature product with shiny new brass bells and whistles. While that other guy will have nothing more than just another half-usable prototype.
- The project ran on embedded hw (hence it does not have a user interface, only interface is with hw devices)
- There was a lack of problem domain understanding, so it's not - like in LibreOffice case, for example, 'this is a list of paragraphs', but 'we don't know what's this piece of data' because if refers to a specific domain of knowledge
Not to mention unit tests (both writing and running) are more painful in C++ than in Python for example
I think acquiring domain knowledge is one of the most overlooked elements in software design. Lots of people write programs for things they essentially do not understand.
This causes all kinds of misery.
I'd see this being C++ over Python and embedded as advantages rather than disadvantages! Each to his own I guess :)
Another side of the same approach is just starting to hack bits out in to their own services. Really the key point that you identified is trying to find the internal interfaces of the code, and fracturing the monolithic codebase along those lines.
I agree, it's doable. You do need to put a lot more effort into coordination between team members than usual, because it's very easy for the developers (should I say the refactorers?) to step on each others' toes.
I think that this scenario routinely happens at many companies. Only you don't hear public stories about it, because in the end what happens is the same for all software: continuous transition/refactoring. I know I've been working on many projects like in these conditions, though not of that size.
With more and more experience of that kind and by working on stinking code-bases, I've come to the conclusion that while in the past I could have thought that trashing the code and starting from scratch would help, now I would probably approach most problems by pushing new code in the form that I want and transition the rest as changes are required.
I had projects that I did myself with great design care, but after 5-6 years due to shifting requirements also started to look like you could have done a better job by starting from scratch again. Reality is, in retrospect all code is suboptimal.
Not only LibreOffice, this is somewhat a general sentiment I have about most Open Source Software. If I were a designer I'd love to be part of such an important project like this.
I don't get why designers are always doing stuff like redesigning website X for free, without being asked to, but miss great opportunities to be in the spotlight by participating in projects like GNome, KDE or the likes. There are many examples of good OSS projects that could use some UX/UI love, one that comes to mind right now is Moodle, for example.
Is it designers that don't like to participate in OSS? Are programmers making it harder for them to join these type of projects or is simply the fact that they don't bring to much excitement or challenge to the design community?
>Not only LibreOffice, this is somewhat a general sentiment I have about most Open Source Software. If I were a designer I'd love to be part of such an important project like this.
I don't get why designers are always doing stuff like redesigning website X for free, without being asked to, but miss great opportunities to be in the spotlight by participating in projects like GNome, KDE or the likes.
Because redesigning famous X website does bring them attention in their circles AND its something that they can do by themselves in little time.
Whereas participating in projects like Gnome/KDE is a messy, long term, no pay, proposition where they'll also have to put up with the opinions of non-designer contributors and be at their coding mercy.
Plus, they like to work on the platforms they use, and almost every professional designer uses either OS X or Windows.
Then redesign LibreOfice for Windows (in Photoshop) and hand over the artwork to the programmers, which, I think, would gladly implement something good-looking.
For one, a Windows designer has access to Office if he wants an office suite. Why would he use LibreOffice? The price wouldn't entice him much, Office costs less than what he makes in a day's project.
Like level one of a libreoffice effort would be to organize all the buttons on all the dialogs and make sure they are consistent, or something like that. There are probably a couple hundred standard ones, it's not sexy. It is some work though.
A level 10 would be doing something like reinventing the ribbon from office, which might be more of a gtk+ task than a libreoffice task, and the libreoffice guys might not even think that's in their domain or their problem. I think that could be a justifiable position too.
You have to actually collaborate a lot with the team just to find all of the work for both of these. Ux guys don't seem to be dedicated enough to those projects. And fwiw, the projects themselves might not be open to spending energy "reskinning" especially when libreoffice has so much other technical debt.
"A level 10 would be doing something like reinventing the ribbon from office, which might be more of a gtk+ task than a libreoffice task, and the libreoffice guys might not even think that's in their domain or their problem."
I think 'reinventing the ribbon from office' is exactly what I don't want as a daily user of Libreoffice/OpenOffice. Surely we can have a competition to find a new paradigm for an office UI? Ubuntu searchable menus (HUD) coupled with execution of the command from the search results would be something I'd be interested in.
>Ubuntu searchable menus (HUD) coupled with execution of the command from the search results would be something I'd be interested in.
You mean like the OSX help system? Yes, feature discoverability is the main issue I have with Office ribbons. For this reason alone it's IMO not well thought through. iWorks still has the best / most consistant UI, if only its features weren't so lacking. I'd much rather have LibreOffice copy these concepts, such as the info window, table insert hotkeys and spreadsheets with multiple tables per sheet.
Some developers don't appreciate the value of separating data from UI. A UI designer says, "Give me the data and I'll present it." But if they get a mixture of data and UI code, there's a serious problem, requiring a rewrite. If you're lucky, the project is already using UI templates, but that's no guarantee that they're flexible. It can be hard to keep a designer's interest if they're waiting on a complete refactor just to make a new UI even possible.
The worst I've seen is where users have been encouraged to embed UI elements (such as HTML or nonprinting ASCII) in raw data or settings to trigger certain functionality. That'll drive a UI designer to drink.
Maybe designers do that because it is a much more direct way to get hired or land a contract. Doing design for something like LibreOffice or Gnome has a really long turn-around time and your efforts are somewhat dependent on your teammates. Then, if your design is released, your potential employers/clients need to translate what you just did to how it is relevant to them. OTOH if you just redesign their website, that is a direct solicitation to them.
I guess it's not quite as easy as whacking up something in HTML and CSS, which might justify the recent trend towards supporting that in as many things possible.
I also think that the attractiveness of one of these projects can vary quite heavily depending on whether you're a UI/UX designer or a programmer, and there's always the opportunity cost of giving up working on something new and fancy.
I'm fairly sure the public's complaint with gnome 3 is that it has a ux team - which has resulted in ux changes the public hasn't necessarily appreciated. From what I've seen gnome has far more ux changes designed and documented than implemented - much of the uneven treatment is due to coding bandwith.
"If I were a designer I'd love to be part of such an important project like this."
Great: pop your screen mockups somewhere first though. LibreOffice/OpenOffice has a LOT of users, and many of us have the interface and shortcuts wired into our neuron structure. Basically, gradualism might pay benefits...
I'm almost 100% sure all of the projects you've mentioned have at least one UI/UX designer. The problem as I see it is that you can't just throw more designers at a problem and have it work any better or faster.
>I don't get why designers are always doing stuff like redesigning website X for free.
Simple.
Because if they did assist with FOSS projects much of the time they would be dealing with developers who (a) think they know what users want better (b) have no respect for designers and (c) believe obscure feature X is more important than UI.
Remember this is the same group of people e.g. on Slashdot/Reddit who think the iPad is an overpriced toy and think people are sheep for buying it.
After the GNOME 3 disaster, it's understandable why many developers within the open source community have become skeptical of designers and their contributions.
Within a single release cycle, these designers managed to destroy what was once among the most vibrant of all open source projects. The existing GNOME users have been alienated by the absolutely horrible UI. Among their ranks were many good developers and other contributors, too, whose absence now prevents the project from recovering. A large portion of these users moved on to KDE or Xfce, rather than MATE, causing further harm to the GNOME project and community.
There are other cases, too. Windows 8 and the UI changes starting with Firefox 4 are other recent, and major, examples of the work of designers going terribly wrong. The end result is software that is nearly unusable, or much less usable than previous versions.
The skepticism you describe is very well earned and deserved.
This neatly illustrates another problem with redesigning popular software: no matter how much time you spend, no matter how beautiful you make the design, the people who're already using it are used to its current layout, and don't care about learning a new interface.
If you could give people a completely fresh, unprejudiced choice between Gnome 2 & 3, Windows 7 & 8, or Firefox 3.5 & 18, I bet many of them would choose the newer version. I don't think (most of) these UI decisions are objectively bad, and over the long run they might even pay off. But when the user upgrades and suddenly can't see how to make it Frobnicate, they get angry.
After you've learned hundreds of interfaces over 3 decades, you learn that newer can be, but isn't always better. So when I see YAIR, (Yet Another Interface Redesign), I get a case of deja poo, (I have seen this shit before).
Given that FOSS developers are, in some sense, their own users, (a) and (c) are not always unjustified.
For my personal use case for LibreOffice specifically, I don't give a damn how ugly it is, and I'm willing to have some patience if it's a bit slow, but crashing or hanging on a 160-page document is unacceptable. So adding a designer to the project wouldn't add any value to me.
I agree with the point that there is a lack of respect for designers in the area, and IMO more significantly, they would not be allowed full control of design; hard work could easily be ruined by differing opinions.
But FFS why did you have to bring apple in to this. Absolutely nothing to do with this, quit it.
> I agree with the point that there is a lack of respect for designers in the area...
That's because it looks like everything designers are touching (Gnome3, Unity and partly Firefox) starts to turn to crap.
Yes, I completely respect Designers and I understand that they can do wonders for every FLOSS project and I know that this sentence is completely biased...but there are many examples out there were a designer (or multiple) are trying to stuff their vision down our throats without any afterthoughts.
>But FFS why did you have to bring apple in to this. Absolutely nothing to do with this, quit it.
No, actually he made a very good point by bringing Apple into it. Apple, see, is the very place were design and UX reigns supreme over other considerations (of course they also have faults, every team has).
So, OSS developers bashing Apple and its UIs, are not the very best community to nurture biding UI designers.
With the previous code, the dialogs couldn't flex or expand, so they had to be sized for the longest translated text. Which, as you can imagine, was not only ugly but poor for usability.
It is now much easier for them to redesign dialogs for UX/UI reasons.
I was talking to a friend about "legacy code" the other day and I realised: the company that's going to put you out of business won't have any legacy code.
I think you need to have a really good excuse not to completely rebuild your product from scratch every now and again. Because if you don't, someone else will.
OTOH, the greatest asset you have competing against the company that's going to put you out of business is your legacy code.
Every line in your legacy code is there for a reason. Sometimes the reasons are bad, but often they're there because of some very valuable lesson you learned from a customer, a mistake you made that your competitor is also likely to eventually make. Throwing away your legacy code means that it's likely you'll make the same mistake again.
Legacy code will also tend to have had many of its bugs ironed out, since it's been in operation for so long. New code will have a whole new set of coding errors hidden in it, and you'll have to go through that ironing-out all over again.
I think this is a crucial point we all overlook in our rush to throw out the legacy code and 'do it right this time.' We're thinking, 'but we'll have unit tests so we'll catch the bugs.' But in reality, some get through and they tend to be a real pain in the ass.
I know this probably means that I don't unit test right. It also obviously means I don't code right, because I have bugs. The point is, these are facts of (real) life, and to be successful you have to manage the reality. Often this means that the best course of action is to stick with the legacy code.
You'll have bugs either way. That's a fact of life, and the vast majority of a developers time will always be spent debugging.
What legacy code does is inhibit your ability to make the fundamental changes you need to implement in order to stay competitive. And I'm not saying throw you code out every other week. And I'm not saying every attempt to rewrite your product should replace what you already have. But the for all the costs associated with re-writing your product, they pale into insignificance when compared to being put out of business.
In terms of debugging, there are certainly the goofs (off-by-one, = instead of ==, and so on) which are just lapses by the programmer. The danger I think is in losing the wisdom gained in having already solved the hard problem (of course it is helpful in this regard if the original programmers are still around somewhere). It's something akin to cultural knowledge. Don't underestimate what it's going to take to rebuild it.
But perhaps we can agree, then: rewriting code is a business decision, driven by the business needs of the company. Premature rewriting is just another form of premature optimization, and can get you in trouble by putting your resources in the wrong places. But when you have a tangible threat- when you are unable to adapt to accommodate needs that you are convinced are on your horizon, then you should do it.
It should go without saying that fewer bugs is better than more bugs, though.
I'm not saying you should never rewrite a system from scratch. But I do think it's extremely costly to do so, and that it's extremely difficult to predict when you'll be driven out of business if you don't. So I don't think it's usually justifiable.
I'd be very interested if someone could supply an example of a company that was put out of business because they failed to re-write their product.
Also, code that might look crap and seem to do weird stuff often handles intricate edge cases. But due to the lack of comments, it's not obvious what's going on.
I've been involved in several component refactorings when as a team we've gone "look how complicated the old code is, we can make it much simpler".
When we've re-written it and then tested it with actual production use cases, it then becomes obvious why the code was so convoluted previously. So time was wasted, but at least there are comments now (and in those cases, the code's slightly better).
It seems there's an assumption here that building your product again means throwing out all of your experience. What I thought would have been self evident is that by starting again, you bring to the table all your experience and you harness that to build a better product.
Because that's exactly what someone else is going to do. The company that makes the product that competes with yours is unlikely to have picked your product at random and simply decided to compete against it on a whim. There's a good chance they've been using your product and have become so frustrated with it's shortcomings that they've had a crack a building there own version. They've been on your support forums that detail every bug and bad descision, they've read the blog post detailing exactly what is wrong with your features and how they could be done better. They've stared at their screen in a full on rage wondering why the hell your product doesn't do things in a way that makes sense. They have their own experience and they are not afraid to use it.
There could be one, tens or hundreds of people who decide to do this. Many will fail, but if one succeeds then you have a serious problem. The continued success of your product can no longer rely on it's features unless you're prepared to make some fundamental changes. Only now you have a deadline, whereas before you could have worked at your own pace.
You're right when you say your legacy code is your greatest asset. It's proof of what is a good idea and what is a bad idea. But that doesn't mean you should keep it around any longer than you have to.
"It seems there's an assumption here that building your product again means throwing out all of your experience. What I thought would have been self evident is that by starting again, you bring to the table all your experience and you harness that to build a better product"
Ideally, yes! Realistically, there's always some hairy, gnarly wisdom "baked into" the code.
The definitive article is Joel Sposky's article on the perils of writing from scratch. If you only want to read a few paragraphs:
"Back to that two page function. Yes, I know, it's just a simple function to display a window, but it has grown little hairs and stuff on it and nobody knows why. Well, I'll tell you why: those are bug fixes. One of them fixes that bug that Nancy had when she tried to install the thing on a computer that didn't have Internet Explorer. Another one fixes that bug that occurs in low memory conditions. Another one fixes that bug that occurred when the file is on a floppy disk and the user yanks out the disk in the middle. That LoadLibrary call is ugly but it makes the code work on old versions of Windows 95.
Each of these bugs took weeks of real-world usage before they were found. The programmer might have spent a couple of days reproducing the bug in the lab and fixing it. If it's like a lot of bugs, the fix might be one line of code, or it might even be a couple of characters, but a lot of work and time went into those two characters.
When you throw away code and start from scratch, you are throwing away all that knowledge. All those collected bug fixes. Years of programming work."
Ideally, yeah, you take that wisdom with you to the new project but realistically (even if you've followed great documentation practices, etc, for all of those hairy kludges) the rewrite-from-scratch is never as easy as one thinks.
> the company that's going to put you out of business won't have any legacy code
Code becomes legacy pretty quickly, in my experience... Architectural decisions that were obvious before you had real customers rarely stand up to real usage.
The company that's "going to put you out of business" also doesn't currently have any working or revenue-generating code, and are unlikely to immediately understand the architectural challenges...
> I think you need to have a really good excuse not to completely rebuild your product from scratch every now and again
It pretty much just doesn't work in the real world; how's that for an excuse? As other people have said, you need to scaffold interfaces, and rebuild small parts. Any company that isn't continually reinvesting in making their codebase better will accumulate technical debt pretty fast; but the throw it away and start from scratch approach rarely works on big systems.
Maybe, maybe not. I've never been presented with any evidence that supports that view. I'm not saying you're wrong, I'm just saying I've got no reason to believe you're right. And vice versa.
"Netscape wasn't the first company to make this mistake. Borland made the same mistake when they bought Arago and tried to make it into dBase for Windows, a doomed project that took so long that Microsoft Access ate their lunch, then they made it again in rewriting Quattro Pro from scratch and astonishing people with how few features it had. Microsoft almost made the same mistake, trying to rewrite Word for Windows from scratch in a doomed project called Pyramid which was shut down, thrown away, and swept under the rug"
If the factories are operating with giant iron cog wheels older than your grandmother, then maybe yes, we should.
The world of software is moving a lot faster than the physical world, so things can become outdated pretty quickly. Compare a 15 year old browser to a 15 year old factory.
I think that wasting money on solved problems is, essentially, bonkers.
Sure, it's nice to have the latest and greatest. But I don't think it gives you magical powers. You still need to do all the other stuff.
That, and the well-known problems with rewriting (the track record is notso hotso) mean that really, the onus for making a case to rewrite is on the rewriters.
The difference between a browser and a factory that makes say, steel wheels for cars, is that while the web has changed dramatically in 15 years, the basic requirements for a steel wheel have not. As long as your machinery can hold the required tolerances and make product profitably and while complying with the laws that apply (like environmental), it would be foolish to scrap the old factory.
If the market starts shifting to alloy wheels, and the reduced volume of sales for your steel wheels starts to affect the profitability of your factory, then maybe it makes sense to start looking at investing in updating your process to make steel wheels more cheaply at lower volume or to dump steel wheels entirely and start manufacturing alloys.
The Air Force Heavy Press Program made the rounds on the internet last year when Alcoa refurbished its 50,000 ton forging press in Cleveland [1]. It's been around since 1955, and it's almost unique in its capabilities within the USA. The idea that it should be replaced simply because it's old is, frankly, insane.
That's obviously a pretty extreme example, but the fundamental requirements for a metal lathe or end mill haven't changed in years. Yes, there are multi-axis CNC machines that can do vastly more operations before somebody has to change the setup on them than on a basic lathe or mill. If you aren't making something that requires a lot of steps, the basic lathe or mill might still viable.
Just because the rate of change in requirements over time is huge in software doesn't mean that it's true everywhere. If an old factory can continue to meet the requirements, it's probably hard to justify changing it just to be up to date.
This attitude strikes me as wasteful. By all means, if a system has shortcomings, and you can afford to build a new system with fewer shortcomings, and migrate to it, then do that; but by itself, "it's old" is not a reason to rewrite something.
The company that's going to put you out of business is using an early version of their own legacy code.
It's not always obvious when you should attempt a rewrite from scratch. Having done a few refactorings, I've noticed one desirable trait in good code bases: If you can implement new logic easily in a few lines of code, it's probably a good design. But if you need to get out the surgeon's knife and write tons of new code every time you want to implement new logic, it might be fundamentally flawed enough to warrant a complete rewrite. A good design is adaptable and will allow you to be resilient against newcomers.
If it ain't broke don't fix it. If you've got a team of about 10 - 15 engineers that'd be over a million dollars you'd be burning in 1 year for a code rewrite. And most code rewrites that I've seen or been a part of take more than 1 year.
I'd agree with the "more than 1 year" estimate for any large code base. It could even be several years if your run into unforeseen problems. You probably don't want to even start a rewrite like that without first spending a few months thinking really hard about the architecture of the new system and making sure you'll end up with a feature set that does everything that your customers depended on in the old code.
And furthermore, while the developers are rewriting the code, who is going to maintain the old code? The demands for new features and bug fixes aren't going to stop just because you've decided to rewrite the code.
>> the company that's going to put you out of business won't have any legacy code.
Even assuming their newly-minted code is better (which others have disputed), what they don't have is loyal customers and brand recognition. If you're worth competing with, you do.
>> I think you need to have a really good excuse not to completely rebuild your product from scratch every now and again.
There could be many reasons. 1) That's expensive. 2) May introduce new bugs. 3) Interface changes may alienate existing customers. 4) Switching technologies may require new developers.
I wouldn't say "plan to rebuild from scratch periodically." I'd say "design your software to be flexible, watch your competitors, and iterate to ensure they don't leave you in the dust." If it becomes clear that you can't compete on features without a rewrite, then consider it.
I consider "legacy" code any code that has been committed and is dependent upon. I look at code that is 3 weeks old (has had a few additional commits), and start cringing. All code gets ugly fast. At the end of the day you have to pick your battles wisely.
Given their licenses, LibreOffice can incorporate any code written for OpenOffice into their project, but OpenOffice can't use any of LibreOffice's code.
I think all good developers have their connotations and anecdotes for words like 'poorly-understood', 'gigantic', 'no unit tests', 'tangled build infrastructure', let alone '25 years of technical debt'.
What I was surprised to see is the word 'resurrect'. As if they wanted to imply LibreOffice was dead.
Well, I think many developers know the feeling when working with a codebase which just feels like riding a dead horse...uphill, both ways, in the cold...and when you manage to refactor some part it starts to feel like it gets up on one leg and so on.
It's not the only thing. The UX and UI itself is very 'old-school' and IMO very outdated.
It's like using Windows 3.11 instead of Windows XP, let alone Windows 7/8.
Looks like a project I worked on. It's eerie how similar it is (and no, it was not an office app, it was something different).
At least the comments weren't in German, but there were a couple of ones in Dutch. (Not that the comments were of any help)
No unit tests: CHECK. Twenty-five year of technical debt, CHECK. And now we're supposed to make it work in a different platform
So thank you, but I don't plan on touching a monolithical piece of old C++ ever again. Not even with gloves.