home development system design Linux databases Docker kubernetes about me contact
Go

Go language is relatively new, with its first public release in 2012. It was designed at Google by three of the world's top computer scientists specifically for large, distributed scaled projects. The design is simple, elegant and extremely well thought out.

Go compiles directly to machine code, so there is no run-time environment like with Java. Also, no shared libraries. This is important for production environments because nothing can be missing when a Go executable is run. Also, this independence is perfect for containers.

Build times are also very fast, partly because the language was designed to be "compiler friendly" from the start. Go was designed as a C++ replacement according to one author, Rob Pike. Anyone who has worked on a large C++ project knows that builds can take hours at times. This is partly because C++ class based inheritance breaks encapsulation, so tools like Make can't tell what needs to be updated. The result is a total rebuild of all the code, while the crew goes to lunch or overnight. You can imagine the problems this causes. Best practices like incremental changes and testing lose out because they would take too long. Go fixes those problems.

We think of Go as a C++ replacement, and also a Java replacement. Java code will be around forever due to legacy projects, but for "greenfield" projects Go makes much better sense. Go is relatively easy to learn, especially for programmers with C experience. It's good for small utilities that might otherwise be written in Python or elaborate shell scripts, and best for large scale projects where collaboration is needed between remote teams and individuals.

Go is a strongly typed language, which is a good thing for eliminating errors, but has the advantages of loosely typed scripting languages via duck typing.

Here's the source code for the little program I use to generate content for this site.

If you think I can help you with your projects using Go, let me know.