In short
Bárbara Almeida, Software Engineer II at Cadence Design Systems, argues that a long, unglamorous code migration can be finished and pays off well before it ends. Drawing on her team's multi-year effort to move hundreds of thousands of lines of Java into C++, she shows that tracking, a mix of senior and junior developers, and a willingness to retire obsolete features are what keep such a project alive.
Key takeaways
- Tracking and inter-team communication are essential tools in a long-term project.
- The process is important: it is an opportunity to improve the ramp-up of juniors and new hires.
- The process is important: it exposes code improvements and obsolete features.
- Developer experience (DX) matters on the path to delivering a high-quality product.
Why two languages became a burden
Almeida's team works on Jasper RTL Apps, Cadence's formal verification tool. Its code base was mostly C++, with some Java connected through the Java Native Interface. The goal, which the team reached, was to remove the Java and the bridge between the languages so that only C++ remained.
She describes concrete pain points. The tool was harder to set up, because Java needs a heap memory size and choosing it was not always straightforward. Maintaining infrastructure for two languages, plus the connection between them, blocked some architecture and performance improvements. Developers had to program in both languages, and tools such as indexers, linters and sanitizers either had to be maintained twice or left part of the code uncovered.
Even so, the team could not pause product work to do it. "We cannot stop adding features and fixing bugs to do this code refactors." (2:37) The migration took a few years and involved many developers, moving slowly but continuously toward the goal.
Tracking keeps the work honest
The first lesson Almeida draws is about measurement. "Anything that you're not monitoring can easily get out of control." (3:02)
She shares a cautionary example. Years earlier, another initiative had made significant progress but left one specific component in Java. Over time, new features landed there and the line count grew again. When the team built a tracker at the start of this project and used it to look at the history, the result was a shock: "We were surprised to see that we were almost at the same amount of Java lines before doing any migration." (3:47)
During the project, the tracker also showed how fast the team was progressing, so they could adjust the resources assigned and their intermediate goals. In her session notes she pairs tracking with inter-team communication as the two tools that hold a long project together.
A migration that grows people
The second lesson is about who does the work. "Another thing I want to mention is that this type of project is a good opportunity to leverage the abilities from people from different level." (4:30)
Because the migration had to happen progressively, the component needed to run for a long time with part of its code in C++ and part in Java. Senior developers built that infrastructure first. Once it was in place, the migration itself became the easier part, and people at every level of experience took part.
Almeida found this especially valuable for beginners. Working on migration tasks, they could talk with senior colleagues about how to migrate, take part in code reviews and learn the structure of the code base along the way. In her view, this could really improve the ramp-up of new hires.
Cleaning up along the way
The third lesson is that the value does not wait for the finish line. Reaching the final goal was an important milestone, but "But we did have benefits during the whole process, and it was especially a good opportunity to clean up our code." (5:56)
Moving code piece by piece surfaced places to improve in the future, odd things in the code and possible bugs. It also pushed the team to review each feature and ask whether it was still used or still needed. "Or, and for some features, we decided that we could deprecate them instead of migrating." (6:19) Deprecating, rather than faithfully porting everything, made the project a further way to simplify the product.
Why refactoring is worth it
Almeida closes with a case for refactoring initiatives in general. In this project, customers saw direct benefits, though she notes that refactoring often does not deliver those. The indirect benefit is always there: "But there is always the indirect benefit for customers when we make the code easier to maintain so we can have less bugs and have faster response times." (6:51)
She is candid that projects like this look enormous, the end is hard to see and that can be demotivating. Her team's experience is her answer to that doubt: "But I hope our experience can show that it's possible to finish it's possible to reach the end." (7:27) Even in the middle, she adds, there are benefits, learnings and opportunities to collect. She ends by inviting engineers to pursue whatever code improvement makes sense for their own teams.
Watch the talk
"Learnings from the migration of 100k+ lines of Java code" by Bárbara Almeida, 9 minutes: https://www.womentech.net/video/learnings-migration-100k-lines-java-code
About the speaker
Bárbara Almeida is a Software Engineer II at Cadence Design Systems who has worked for four and a half years on the development of Cadence's formal verification tool, Jasper RTL Apps. Besides developing in C++, she has joined initiatives aiming to bring quality to developers' hands and improve developer experience, and she is passionate about creating art through programming.
Questions this talk answers
- Why would a team remove Java from a mostly C++ code base?
- Why is tracking so important in a long migration?
- How can developers of different seniority contribute to a migration?
- Does a migration deliver value before it is finished?
- Can a large migration run alongside normal feature work?
Drafted with AI from the talk transcript. Editor review pending.