days
0
-38
-8
hours
-1
-3
minutes
-1
-7
seconds
-1
-4
search
Battling technical debt

Uber’s open source tool Piranha is here to eat your stale code

Maika Möbus
technical debt
© Shutterstock / Kastoluza

Code is not usually on a piranha’s menu, but this predatory fish is different: Uber has open sourced Piranha for automatically deleting feature flags that are no longer needed. The corresponding code is deleted as well. Let’s see how that works and when to use Piranha.

The ride-sharing company Uber has released several open source tools such as Manifold or Ludwig, and now we can welcome their latest tool: Piranha.

SEE ALSO: Resolving technical debts in software architecture

The open sourcing of Piranha was announced on the Uber blog. Let’s see what it can do.

Piranha keeps technical debt low

As the blog post explains, Uber uses feature flags in mobile app development for Android and iOS. These feature flags may turn into either a successfully implemented feature or be deemed unsuccessful. In both cases, the feature flag is not relevant anymore and turns into a stale feature flag.

These stale feature flags not only clutter up the code, increasing its complexity, but could also interfere with other flags or cause bugs.

That’s where the tool Piranha comes in: It scans source code and automatically detects and deletes stale feature flags along with their corresponding code. Piranha is currently implemented for Objective-C, Swift, and Java, but open source contributors could also make it available for other programming languages.

SEE ALSO: Does technical debt still matter in DevSecOps?

Uber recommends using Piranha in applications that use feature flags extensively and implement specific APIs to control their behaviour.

Find out more about Piranha on the Uber blog and get it on GitHub.

Author
Maika Möbus
Maika Möbus has been an editor for Software & Support Media since January 2019. She studied Sociology at Goethe University Frankfurt and Johannes Gutenberg University Mainz.

guest
0 Comments
Inline Feedbacks
View all comments