Programming Activity

We know that any programming language can be used in business, but we also know that organizations like to pick one or two languages to solve problems across the board and use other ones just in marginal scenarios. Java, Ruby, C#, and JavaScript are the most popular business programming languages in use, but organizations end up using Python and R for data analysis, Groovy for CI/CD, Go for networking, and C/C++ for hardware and tooling.

Dave Thomas, the co-author of The Pragmatic Programmer, once said in a conference:

“Mike Clark and I had this thing called Rails Studio and each month we would give one or two classes of four days, onsite, with 30 to 40 people in the room, teaching them Ruby on Rails. We did that probably a total of 50 times. At the end we were really really good! I mean, we could nail that code, we would get it done exactly the way we wanted and everybody loved it! I found that in a way corrupted me because for a while it was so much part of my brain that that became the way I thought about software. That was wrong.”

What happened to Dave with Ruby on Rails certainly happens to engineers in companies that limit their codebase to 1 or 2 programming languages.

It is extremely important to learn several programming languages, but different ones, not so similar like Java and C# and JavaScript. The knowledge we gain in one language helps to improve the practice in others. In my experience, learning Go tough me to write succinct Java code, keep the code impeccably organized, and look for ways to improve performance. Learning Clojure helped me to understand the value of Java Streams and lambda expressions. Learning Python, which is dynamically typed, helped me to understand how important is generics for reusability in a statically typed language. I learned how to develop applications using libraries instead of frameworks and realized that many ideas in Java are actually derived from other pioneers. If we only focus on Java or C# we probably take things for granted and don´t realize how important the correct use of their features is for the health of the applications.

So far I have used Java, Python, Clojure, and Go as business languages. Java has been my main programming language for business since 1998 when I developed Java applets to show the levels of water reservoirs in an arid region of Brazil. 15 years later I learned Python to start a brand new project in Django. Python opened my eyes for a world of possibilities. It could make everything Java could but with a lot less code. But the most mind-blowing language was Clojure, which is extremely simple and yet more powerful than all other languages combined. I had to use it to develop an app to manage my home because it was hard to find a job with it. Unfortunately, Clojure is so different from popular languages that people feel afraid to even try it. Finally, I was exposed to a language that was simple, efficient, and popular: Go. I developed an IoT service that collected data from sensors and I immediately felt in love with it! No, it wasn’t sexy or expressive but it compiled almost instantly, always produced fast applications, consumed minimal resources comparable to C and Rust, and produced minimal native artifacts. While a Spring Boot app usually consumes a minimal of 500MB of RAM, a similar Go app consumes around 15MB without any runtime dependency.

Now, check the enormous amount of resources your Java applications are consuming right now on your cloud service provider. How much your company is paying to keep all those redundant services up and running? Now imagine using a fraction of resources, running faster with native executables, and improving productivity with instant compilations. With less code, less time in the build process, Go will ultimately and substantially reduce your deployment and runtime costs. In such competitive markets we are in, I can’t imagine a better development platform for business.

But can we find enough developers out there to form a new team? Yes we can, but first, I would suggest a simple experiment. Before hiring more people, consider a prof of concept with current engineers to see how fast they can get Go. The authors designed Go for readability, creating a compact language with fewer elements, yet using a syntax familiar to Java, C#, and C developers. It is highly probable they will rich some level of comfort within a day. In a week, searching for examples on the Internet, they will have a running prototype. In two weeks, talking to the community, they will improve the design. In a month, they will get it covered with tests. Ask them how they feel compared to the established languages. My guess is that they will feel so productive and empowered that it will reduce their demand for more engineers. Maybe just one Sr. Go engineer to boost speed and design. As indirect benefit, the engineers will embrace the spirit of simplicity and try to apply it to Java projects as well, vastly simplifying them.

Still, how reliable is Go for our critical business needs? The good news is that you are probably already using Go applications in your critical systems. Technologies like Docker, Kubernetes, and Terraform are developed in Go. They are the state of the art in automation, scalability, portability, and robustness. Large companies such as Google, Uber, Dailymotion, SendGrid, BBC, Dropbox, SoundCloud, Salesforce, and others rely on Go to deliver critical services. Countless startups are using Go to inovate and pivot their products fast while keeping costs low.

In a more operational level, VSCode has an excellent support for Go and JetBrains even provides a specialized IDE called Goland. The support for unit testing is native in the Go tool-chain and the community embraces it as the de-facto way of writing tests, which is very different from the ocean of possibilities in the Java platform. It also comes with coverage and benchmarking integrated. No extra installation needed. Go also comes with its own build and packaging. Actually, when we compile the project we always get an executable file ready for deployment. No need for extra tools like Maven, Gradle, and Leiningen. In the area of code quality, Go is supported by Sonaqube without extra plugins. It offers automatic code formatting so programmers do not debate about code style. It is really hard to have this kind of agreement and Go made it happen. In terms of observability, New Relic and App Dynamics also support Go.

I can keep going on and on, but I think at this point you had enough evidences of the piece of mind Go can bring to your business. As a case study, consider watching Dylan Meeus’ talk at Devoxx 2019: https://www.youtube.com/watch?v=4dSw3tkclQ4