Tools that help you program faster
Here is an overview of tools that can support your daily work and make life as a programmer a bit easier
A programmer’s daily work can be thrilling and demanding. Some tasks, though, are dull and repetitive. Here is an overview of tools that can support your daily work and make life as a programmer a bit easier!
Sonar - static code analysis
Reviewing code is something every programmer does each day. When you read through hundreds of lines a day, some errors can easily slip by. In other situations, for example when you work with junior devs who are just starting out, you may end up writing lots of comments.
This is where static code analysis tools come in. They have been on the market for quite a while. Using a predefined rule set, they can check pull requests automatically and highlight spots that need fixing, also explaining the reason. You can run such tools locally, as a pre-commit step, or on the CI while the review is in progress.
Which options are there? Sonar is among the best known.
At the moment it comes in 3 variants:
- SonarLint - a plugin for your IDE
- SonarQube - to deploy on your own infrastructure
- SonarCloud - the SaaS edition
Dependabot, Renovate, Scala Steward - keep your dependencies up to date
Outdated project dependencies are one form of technical debt. In the beginning you might only lack some bug fixes & security fixes, but over time it suddenly turns out you have skipped 2 major releases and your version is no longer supported. Sadly, problems like these pile up. Libraries rely on one another, and you may get to a point where every major framework&library in your service has to be migrated at the same time. That makes the whole operation take longer and carry more risk. Moving forward gradually, one step at a time, is a far better approach. Yet who has the time to keep checking whether new versions have been released? Hardly anyone.
Luckily, some tools can do this for you. The simplest are plugins for your build system or IDE that list the libraries with available updates, distinguishing minor from major releases. More sophisticated ones open pull requests (PRs) with the updates on your behalf. Such a PR may even include a changelog pulled automatically from the project’s release notes. CI picks up the PR and tells you automatically whether it still works with the unit, integration and end-to-end tests in your project.
Some examples of these tools:
Before you pick one, verify which programming languages & build systems it supports.
There is one more thing that can make your life easier. Once you adopt these tools, a flood of Pull Requests may come your way. There are a few ways to handle it:
The simplest – set up weekly duty shifts in which different team members take care of them. One person alone gets tired and bored very fast.
Set sensible check intervals, for instance restrict PR creation to once a week.
Adopt tools that merge some PRs automatically when certain conditions are met. For instance, hotfix and minor version updates that pass every test can be merged without manual action and deployed to the development environment. Mergify and GitHub auto-merge can help with this. Renovate comes with this capability built in.
Trivy & Snyk & OWASP Dependency-Check - security issues scanners
Security matters a great deal. Errors in this area can bring an entire company down. Security practices apply to many areas – from the workplace, through infrastructure and procedures, all the way to the code.
Trivy is a really interesting tool that scans not just Docker images but also project repositories, VM images and more. It finds problems in OS packages (for example in container images) as well as in libraries used with certain build systems. It can also point out misconfigurations & a number of bad practices.
snyk is another tool. It finds vulnerabilities in code and dependencies (Scala Sbt included) and can scan containers & Infrastructure as a Code. You can integrate it with your IDE as well as with your CI pipeline.
The OWASP (Open Web Application Security Project) foundation offers one more tool, Dependency-Check. It lets you find publicly disclosed vulnerabilities in the dependencies of your project. Plugins are available for e.g. Maven, Gradle, SBT, and even for Jenkins and SonarQube!
When it comes to security, it pays to run checks on CI for every new PR, but periodic checks are worth doing too, in case new vulnerabilities come to light.
GitHub Copilot - your AI partner
Is AI going to take our jobs one day? Perhaps, but at the moment it can simply help us do them.
GitHub Copilot uses OpenAI to propose whole functions in real time while you write code. It is available as a plugin for the major IDEs and is most useful for repetitive work.
For popular open source projects Copilot is free. Individuals otherwise pay 100 USD per year. Regrettably, it has stirred up some controversy. Open source developers point out that Copilot was trained on open source code, yet the service as a whole is paid and says nothing about the licences&authors of the code it learned from.
ChatGPT - the new chapter
I doubt there is anyone in IT who has not come across content about ChatGPT in recent weeks. Its capabilities are remarkable. Want a song written about our company? Easy.
Need CRUD generated in Scala with Doobie from a particular domain model? Done as well. A bit frightening. How can programmers make use of it? As an assistant – it can serve as an alternative to Google & Stack Overflow.
It can help put together very rough Proofs of Concept or serve as a starting point for code written by hand. Still, I would not be surprised to see, in the coming years, simple money-making apps built entirely on content generated by ChatGPT.
No-code&low-code - do things without writing code
No-code&low-code has been a trend for the past few years. Some things can be achieved with no code at all or with very little of it. They are typically used for rapid development, for building internal tools, or for getting ideas to market fast to validate them. What comes out may not scale well or be ready for millions of users, though that depends. Over the long run they will likely not be the cheapest option, but sometimes they are worth trying.
Some examples? For simple automation you can use Zapier. Want to publish your programming blog post on Facebook and have it automatically shared to Twitter afterwards? Zapier handles that. It integrates with many services for e-mail, social media and assorted cloud tools. You can set up flows in which e-mails go out automatically after a customer does something. In the same way, customer emails you receive can be automatically turned into entries in your sales system. Your imagination is the only limit. Perhaps you need a simple website and a mobile app? Not a problem – you can use e.g. Wix.
Conclusions
We still need programmers! Knowing a range of tools and products, however, can make them even more productive. Some simple things can already be built without code, but that usually involves tradeoffs. You have to weigh how much effort building something by hand would take against long-term service costs, privacy, security terms and other factors. As is typical in software engineering, deciding what to use is not straightforward. And the answer is, as always: it depends!