Interview: Gopher Kelsey Hightower

Kelsey Hightower

Qs. Welcome and thanks for taking out time to share your thoughts. For the benefit of the readers, could you tell us something about your-self?

Kelsey: I’m currently located in Portland, Oregon USA where I work remotely for a startup called CoreOS. My official title is Director Business Development, but I tend to wear many hats including Sales, Support, Community, and I still write code.

I maintain a few open source projects and give back to the community through free hands-on workshops and tutorials. I enjoy public speaking and collaborating with others around programming concepts and system automation.

Qs. Why and when did you decide to start working with Go?

Kelsey: I starting playing with Go about a year ago, and to be honest I did not like it very much because things seemed backwards. For example I found it odd when I saw code like this:

var gophers []Gopher

I’ve been so used to seeing the type on the other side of the variable name.

I, after making the rookie mistake of judging a language after 10 mins, picked up Go for a few small automation projects in late 2013. Since then I’ve been contributing to Go projects such as Packer, Golang, and Kubernetes. I also have a few open source projects of my own.

Qs. How should one go about learning the Go language? What material (books, eBooks, online tutorials etc.) would you recommend?

Kelsey: My first attempt to learn Go was reading everything on golang.org, but I was not very successful. I really wanted something a little more gentle and focused on the basics. Coming from a Python and Ruby background I had limited experience programing in a statically typed language. So I picked up “An Introduction to Programming in Go” by Caleb Doxsey, and in a few short days I was ready to absorb the content found on golang.org.

While I consider the official Go documentation an excellent resource for learning the language things did not really click for me until I started writing Go to solve real problems.

I would recommend that people learning Go start with a simple introduction to the language. The Go tour will work fine for those with a pretty good development background, but something like Caleb Doxsey’s book maybe a better starting point. Next, I would recommend working through the content under the doc section of the golang.org website; the Youtube videos are well done and offer tons of value fo visual learners. Finally write some code! Start with a small project and “force” yourself to write it in Go, while that sounds simple many find themselves trying to port their code from their preferred language, line-by-line, to Go. In short don’t write Go code like you would Java, you’ll be frustrated and miss the opportunity to learn what makes Go unique.

Qs. What best practices are most important for a new Go programmer to learn and understand?

Kelsey: The number one thing to understand is that Go is a new programming language. Try and avoid writing code like you would in your current language of choice. Spend some time to learn the “Go Way” of doing things. Also avoid using concurrency for the sake of using concurrency. Start with simple functions and types then level up to more advanced concepts like interfaces and concurrency.

Qs. What are the pros and cons of Go that are being discussed in the development community and what is your opinion on that?

Kelsey: One of the hot topics in the Go community is dependency management. Go ships with tools that handle dependency management based on the idea that master branches of your dependencies will always be in a deployable state, so you won’t find the ability to lock versions for your dependencies. Since many of the libraries we depend on are relatively new, people in the Go community don’t often run into version conflicts. Once those libraries start to mature then things will have to change.

To solve the problem of dependency managed, the idea of vendoring is becoming the preferred solution. Vendoring is where you include the source code of all your dependencies in the same source tree of your project. Doing this manually is a painful process, but luckily there are many tools to automate the vendoring process. The most popular tool for vendroing in Go is godep.

Go is the first platform where I’ve vendored my dependencies. Before Go I used tools like Ruby gems and Python pip. Those tools allowed me to use specification files where I could express my dependencies and lock versions. Naturally I wanted Go to work the same way, but to be honest the experience with those tools wasn’t always great, especially when you run into dependencies that just won’t resolve.

After using godep and vendoring my dependencies for about a year I find it a better experience overall, mainly for two reasons. First, vendoring means I have all the source code required to build my project checked into the same source tree. I don’t have to worry about GitHub or rubygems.org being down, or the library maintainer deleting the upstream repo. Second, I feel like I have more control over each dependency. I don’t have to rely on the upstream maintainers to “pin” specific versions. Once my project compiles and test pass I can chose to vendor things at that point.

Qs. Most beginners in Go would like to contribute their time, skills and expertise to a project but invariably are unaware of where and how to do so. Could you suggest some?

Kelsey: I have a sysadmin background so I tend to contribute to projects that I use in my day-to-day work. Lucky for me Go is becoming the dominate language for automation tools such as Packer, Kubernetes, confd, and Docker. I have no trouble finding great Go projects to contribute too. I would also recommend checking out projects such as etcd, consul, and the Go programming language. A lot of people forget the Go project. That itself is a pretty large Go project with tons of outside contributors.

If you are just getting started with Go one of the best ways to contribute is to start with improving a project’s documentation and test coverage. Both activities will help you learn Go by reading other people’s code and offers tons of value since most projects can use some help with test coverage and documentation.

Qs. What has been your biggest challenge while working with Go?

Kelsey: My biggest challenge working with Go is that I want to use it for everything. I was never a big fan of Java style OOP so I’m not missing much when it comes to writing code in Go. While I could nitpick about what could use improvement I’ve decided to work with the language as it is and take advantage of it’s strengths. So far I’m able to solve my problems with Go, when that is no longer the case I’ll have more challenges to speak about.

Qs. What types of applications are currently being developed in Go and what changes do you foresee over the next year or two?

Kelsey: I see Go everywhere. People are building text editors, IDEs, unix shells, and even desktop applications. As the Go team continues focus on speeding up the compiler, improving GC performance and reducing latency I’m sure Go will find its way into more embedded systems.

Qs. How do you see the market for Go Programmers in the work place? What is the future for Go?

Kelsey: I don’t think we will see a Go job market like we saw with Java and C#, because Go has a much smaller focus. While the Go programming language is capable of many things it’s not marketed in the same way Java and C# are. I see Go as claiming it’s niche for backend systems and micro services while existing alongside other languages better suited for other tasks. You know I’m wrong when we start seeing job posting for Go Enterprise Architects.

Qs. Do you have any other suggestions for our readers?

Kelsey: Go is a great tool to add to your toolbelt. Spend time learning what Go adds to the programming landscape and see if it can benefit you and/or one of your projects. Avoid the Go vs X conversations and focus on the ability to solve problems using Go and whether Go is a good fit for a specific project.

Oh, and if you do end up writing some Go code please make sure it’s go gettable.

Thanks Kelsey for sharing your views with us. I am confident that your insights would help all the would-be Go programmers. In case you have any queries and/or questions, kindly post your questions here (as comments to this blog post) and Kelsey would be glad to answer.


← Back to blog home
comments powered by Disqus