bg

sbt the easy way

At Codacy, we use Scala for all our core, complemented by Play Framework and built with sbt.

sbt is a great build tool, specially if you want to focus more on coding than compiling :D.

Earlier this month we decided to do a complete separation of our application.
Although we already had several different sbt sub-projects we had to define some structure and rules to keep them in sync.

With all the simplification and ease of creating a project comes great responsibility, we want our build to be kept simple and easy to maintain.

(more…)

Read More

1500x500

How to update large tables in PostgreSQL

Updating a large table in Postgres is not as straightforward as it seems. If you have a table with hundreds of millions of rows you will find that simple operations, such as adding a column or changing a column type, are hard to do in a timely manner.

Doing these kind of operations without downtime is an even harder challenge. In this blog post I will try to outline a few strategies to minimize the impact in table availability while managing large data sets.

(more…)

Read More

bg

The start of a startup

The startup

Working on a startup is hard. You get a limited amount of resources and a limited amount of time to create a “temporary organisation designed to search for a repeatable and scalable business model” [source]. And the search is fast. Really fast. So fast that most will not find* that business model.

*This is also referred as a failed startup; I think that this ‘failed’ terminology is something we should not use, as it is quite far from reality, but this would be another blog post by itself.

Before having seed investment, it seemed easy; although having no money, we would be hacking something in our free time, trying to get our vision into a product, something that we could show to others and get feedback from. Having no costumers, meant we could rapidly prototype and start over.

It was fast. Really fast.

Then, one day, you have a product. You have a costumer. And you have investment.

(more…)

Read More

photo--7--1

20% of code review comments are about style and best practices

We are spending at least 20% of our software development time reviewing code [1]. If you are not, you should be. This is because code reviews have become an integral part of our modern development workflow [2],[3].

But code reviews can be ineffective.
Your effectiveness to spot defects (bugs) is reduced after reviewing 200 lines of code in 1 hour[4].
This previous paper also makes this obvious: if you’re reviewing 50 lines of code you will find many issues; if you’re reviewing 1M lines of code this is you:

Another way they can be ineffective is by being over concerned about style and best practices. (more…)

Read More

bg

Moving to Micro-services – Service Discovery

For the past few weeks, part of the development team at Codacy has been working on breaking our application into small microservices, following the ideas learned from this book.

We seem to have a perfect fit; a big monolithic application, with several sub-components that have a clear bounded context; having been built on top of Akka, we can clearly identify several parts of the system that are natural candidates for this.

Historically, on Codacy, we deploy several analysis servers that are composed of several subsystems, containing all the required funcionality to properly analyse a project. When we need more computing power, we just deploy more instances of the application.

Although this enables us to quickly grow and scale our application, it is not very performant; sometimes, we just need to scale one individual component in our application. For example, when analysing big PHP projects, we only require more computing power on the PHP engine, and not on any other system.

Using microservices, we aim to be able to quickly grow the individual components that are under heavy load, not only scaling the application by launching new servers but, on each server, only launching the components required to perform quicker analysis. (more…)

Read More

upload

Visualizing Scala Code Style

This is based on a presentation done on ScalaBay

Introduction

One of the reasons I am fascinated with Scala is the combination of bleeding edge experimentation, performance computation and reactiveness and big adoption by a growing list of companies1.

It’s rare to see programming languages cross the chasm of adoption while still be adventurous enough to push for modern programming language features.
It’s not by chance that people have started identifying similiarities between recent big programming language launches such as Swift 2345.

Spark is currently seeing a hockey stick-like growth which is also pushing Scala adoption.

To me personally, the most interesting aspects to Scala are the code styles.

Scala is a powerful language due (not only) to its extensive feature list and flexibility.
Because of this, it’s very important to define a coherent code style for each project/company so that people work together.

I wanted to study how each code style that I found deviated or added to the official and core code style. (more…)

Read More

bg

Introducing Hipchat, Slack and Webhooks

One thing we’ve learned building Codacy is that developers like their tools playing nice with each other.

Today we’re moving closer in that direction by introducing more notifications in Codacy.
Starting now, you can start receiving notifications from Codacy on your Hipchat, on your Slack or even configure your own via Webhook.

These services will be called when new or fixed issues are detected, so you’re only bothered when there are changes in your code quality.
We will introduce finer grained controls in the future (such as notifying per commit analysis being done or per pull request).

How to enable notifications

In each project you will now have a Notifications tab that you can use to connect your services.

channels (more…)

Read More

1500x500

Apply the Effective Scala Guide on your Open Source projects

After allowing our users to simply enforce the Official Scala Style Guide on their projects, we are now very pleased to announce that we released the Effective Scala Standard on Codacy.

Effective Scala was created by Marius Eriksen and comes from Twitter’s experience with developing their whole infrastructure in Scala.

To enforce the Effective Scala rules on your project go to “Code Patterns” and select “Code Standards”.
altLook at the results on this public Finagle project (more…)

Read More