1

Watch our latest Product Showcase

Group 370
2

Meet us at WeAreDevelopers World Congress in Berlin

Group 370
3

Spotlight Whitepaper by IDC on Importance of Automated Code Review Technologies

Group 370

How Mobile Premier League (MPL) uses Codacy to improve development efficiency

In this article:
Subscribe to our blog:

We spoke with Kumar Pratyush, Staff Developer Experience Engineer at Mobile Premier League (MPL), about how Codacy helps them improve development efficiency. We also covered how MPL uses Codacy Quality to achieve engineering excellence and directions for using Codacy Pulse.

About Mobile Premier League (MPL)

MPL is the world’s leading mobile eSports and digital gaming platform that allows users to participate in free and paid competitions across 60+ games in multiple categories, including fantasy sports, sports games, puzzles, casual and board games. Founded in 2018, MPL hosts hundreds of millions of tournaments a month and is trusted by over 90 million registered users across Asia,  Europe, and North America. 

The main programming languages used by the MPL development team include Go, Python, Java, JavaScript, Swift, and Unity. In addition, they use Bitbucket as their version control system.

Main goal: improve the efficiency of the development team

The gaming industry is highly dynamic and competitive. To succeed, companies must constantly—and quickly—innovate. MPL understood this well. Still a relatively young company in this space, MPL has made progress in a short period, establishing itself as a leader in the industry with a global reach by focusing on delivering innovative solutions. And by ensuring the efficiency and quality of its tech team. 

Now, with a keen understanding of the importance of code quality and reliability, MPL is taking steps to proactively reduce any tech debt it may have accumulated during the early days. Pratyush explains, “There is not enough time when a company starts out. So as with all the startups across the world, engineering practices often take a toll. And once your product is successful, you start looking back, and then you realize that you have a plethora of tech debt that you have left behind in the making of the business.”

To address this, MPL embarked on a search for a static code analysis solution that would help them tackle tech debt and improve the overall efficiency of its development team. The company also sought to gain a deeper understanding of the coverage and quality of their code.

The solution needed to be compatible with the various programming languages they use at MPL, including Go, Python, Java, and Swift. So Codacy Quality, which supports more than 40 programming languages, was the way to go. Pratyush said, “Codacy really fits in nicely as a middleware in between to cater to all the different kinds of languages and have all the different tools with respect to static code analysis.”

To improve the development team’s efficiency, the solution MPL was looking for also needed to provide metrics on code coverage, show the real situation in terms of the code quality of their repositories, and give them feedback on how to improve. Codacy Quality did exactly that.

Quoting Pratyush, “When we talk about efficiency, we wanted something which we could integrate with a one-click solution, and it would start scanning, analyzing all our repositories, irrespective of the languages, and then start giving us these metrics (…), and it can provide quality gates with respect to our coverage metrics, as well. That’s the biggest USP [unique selling proposition] we have with Codacy.”

The road to development efficiency 

Engineering excellence

Tools like Codacy Quality help engineering managers and their development teams improve efficiency. The goal is to make their job easier and help them achieve engineering excellence. The feedback these tools provide needs to be right on the spot, when the developer changes or adds a new piece of code, not later on. Plus, the feedback needs to be actionable so developers can promptly improve their code.

As Pratyush clarified, “When improving or trying to move toward engineering excellence, you want to push metrics toward developers (…) and get timely feedback on the code snippets that they’re pushing to the repositories”. Codacy Quality plays a major role in giving this feedback in a timely manner.

Pratyush added, “There are a few other products in the market (…), and they would spend forever to give you the metrics, and by then the PR is already merged (…) it just becomes a report, it becomes useless, nobody is going to look back once the train goes out of the station.”

When trying to improve development efficiency and push for engineering excellence, the effort needs to be cross-cut; it’s a company endeavor. From developers to managers, everyone is involved. Plus, it’s all about enablement, not imposition. As Pratyush explained, “I can set a number of rules and start enforcing them. But you would not like to be in a culture where I start enforcing things on you. Rather, if I have an open conversation with you, and I enable you with all sorts of automation, so you develop yourself and learn in the process, then it won’t feel like enforcement anymore. It will just feel like a learning practice for you.”

This approach of showing enablement was fundamental to implementing Codacy Quality successfully. In Pratyush’s words, “[Codacy] is meant to actually make you a better engineer. But not everybody sees it that way. ‘Oh, you’re preventing me from doing something? Why are you doing that?’ (…) It takes some time to convince people”.

However, developers will embrace the tool when they start seeing the benefits. In fact, other teams might even want to start using it. As Pratyush told us, “Five to six months from then, we have had team leads coming to us and saying, ‘hey, can you start scanning my repo as well?’ So that is the end goal you want to see from integrating any tool, right? People come to us, and they say, ‘Can you start blocking my PR if I’m making a number of violations?’ And then that’s a huge benefit.”

Coding standards

Code standardization across projects and teams was one of the building blocks for the development efficiency that MPL aimed to achieve. Codacy Quality helped them with this process. As Pratyush stated, “We are dealing with at least  500-550 repos on average, which are regularly being updated (…) So, there needs to be an MPL-wide standard, and Codacy is central to organizing that standardization process. I can set up the rules in one place, which affects all the repositories.”

Having the standards in a centralized tool is particularly beneficial when several developers contribute to the same repository, as is the MPL case. Plus, having coding standards in place will improve the overall quality of the code. As Pratyush pointed out, “That has been really, really fruitful for us in our React repos. It’s driven from Codacy and primarily uses ESLint, and on PRs, any ESLint violation or failure, the PR is blocked; it is not merged. So for React repos, we have reached the position where we are not introducing any more code smells; we are at effectively zero code smell.”

Code coverage

Code coverage is one of the building blocks of software with good quality if the tests are meaningful and worthwhile. How much test coverage does the code need to have? For MPL, they aim for 70% coverage.

Having information about code coverage in a centralized tool has been fundamental for MPL. It allows them to go from a situation where tests were not widely visible to a place where anyone has access to the information. As Pratyush told us, “We didn’t have a lot of automated tests in place previously. They were scattered (…), and those numbers were not getting published anywhere to a larger audience. So with Codacy, we’ve started getting these numbers centrally now. Anybody can log in and go to a repository and see that. That has been a good benefit.”

Having this broader visibility on code coverage also helps MPL prioritize their code changes to make it cleaner and pay some of the accumulated technical debt. Quoting Pratyush, “We are thinking about cleaning up some of the old code (…). We would want to make our codebase testable. And that would mean refactoring our codebase and reducing the number of code smells. So the cleanup, refactor, write tests, reduce the code smells, that is the one-liner summary for the excellence track right now.”

Future directions for MPL and Codacy

The next step for MPL is to expand their usage of Codacy Quality and aim at bolder goals. Starting using Codacy Pulse is also on the horizon for MPL. Pulse allows teams to measure the DORA metrics, allowing them to identify their level of performance in speed and quality of development. 

Pulse takes care of all the details to ensure DORA metrics – deployment frequency, lead time for changes, time to recover, and change failure rate – are accurate and reliable, allowing teams to achieve full engineering performance. As Pratyush told us, “We want to know how productive my engineers are. And we want to know where the gaps are. So combining these two tools and then driving your engineering track really makes sense.” 

Codacy Quality and Codacy Pulse are the perfect combination for teams wanting to improve their practices and achieve engineering excellence. Together, they can give you all the insights you need and bring you even better results. In Pratyush’s words, “Once we combine our analysis from Codacy Quality with the productivity data from Pulse, that is when developer experience and engineering productivity as a whole becomes more powerful.”

We look forward to seeing what MPL accomplishes in its mission of creating new and exciting games!

RELATED
BLOG POSTS

How Agile & Container technology led to the rise of enterprise DevSecOps
New development processes and open-source technologies have shifted the technology security landscape for enterprises. Previously a separate security...
Codacy at DevOps Jenkins World
Gain key insight on the state of DevOps and come together with the global Jenkins community…
8 Common Software Development Mistakes and How to Avoid Them
The world of software development is fast-paced and ever-changing. The queue of feature requests never seems to shrink.

Automate code
reviews on your commits and pull request

Group 13