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?
Elliott: When I go to technical events, I’m often the oldest geek in the room. In an industry always looking for the next new thing, that worships up-and-coming young talent, few envy me my grey hair. Yet with my age comes both a longer-term perspective and considerable business experience beyond the IT bubble. I hope that experience helps me bring a mature approach to the work that I undertake. As I write these words, that work is freelance Go development for documize.com.
Qs. Why and when did you decide to start working with Go?
Elliott: I’d been away from programming for 20 years and while looking for a language I wanted to write my comeback project in, I stumbled upon Go. Reading golang.org was a revelation to me, similar to reading Kernighan & Ritchie’s 1978 book “The C programming language” and falling in love with programming for the first time. Like C, Go is small and clean, with a powerful software engineering rationale; but unlike C, Go addresses today’s problems of working at scale on multi-core CPUs. When I started using Go full-time in early 2013, I fell in love with programming all over again.
Qs. How should one go about learning the Go language? What material (books, eBooks, online tutorials etc.) would you recommend?
Elliott: This is a live issue for me, as I’m currently teaching my daughter how to program. As Go is the programming language I use every working day, it was natural for me to want to teach her Go as her first language. Sadly I’ve not come across any material for teaching Go to complete programming novices, rather than converting their knowledge of an already known programming language into Go. So we’ve just had to muddle through.
I learnt Go myself through writing my own language-related project: “TARDIS Go”. I spoke about it at FOSDEM’14 and was delighted to see my talk featured in the official Go blog. Although I’ve not been able to devote as much time to the project as I would wish over the last few months, I still think it has considerable potential.
Qs. What best practices are most important for a new Go programmer to learn and understand?
Elliott: The consensus seems to be that “OO” modeling using interfaces and concurrency patterns are the two most important aspects of the language to master. However, saying that probably serves to put a lot of people off learning Go, which is a real shame. It is perfectly possible to write large volumes of really useful Go without using either of these two quite complex aspects of the language. So my advice is, start writing Go code using the easy parts of the language and the complicated parts will make sense to you over time.
And if you wonder what good Go programs look like, the library code written by the core team sets the gold standard; if your code is less readable (as mine often is) you need to improve.
Qs. What are the pros and cons of Go that are being discussed in the development community and what is your opinion on that?
Elliott: Although I love Go, I can appreciate why others say that it is an ugly set of compromises. My particular dislike is that the second parameter when taking a sub-slice (e.g. x[3:5]
) is always one more than I think it should be. And of course everyone knows that Go lacks generics…
Like any programming language, Go IS a set of compromises. The question is not whether those compromises make it ugly, as beauty is in the eye of the beholder; but rather whether they make it useful. I think that Go makes some really clever compromises, in order to maximize its usefulness. And useful languages get used.
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?
Elliott: The best project to contribute to is one where you can add the most value. That means choosing a project in an area in which you are already something of an expert. So search github.com and the like for “golang” projects in your comfort zone.
Use your search for the right project to contribute to as a learning experience, try a number out as you go, go get
them, play with some code to see how they work. In your travels you will see what works, and also what does not work so well, learning all the while.
Qs. What has been your biggest challenge while working with Go?
Elliott: Changes to the APIs of library packages which my code depend on has caused me a lot of grief in the past, especially as it often happens at the least convenient times! Vendoring the code does help, but I’m looking forward to Go community settling on a common solution to the problem of version control.
Debugging is also not as slick a process as I would wish; I regularly find myself writing out debug messages to the console, much as I did when I started programming in 1974…
Qs. What types of applications are currently being developed in Go and what changes do you foresee over the next year or two?
Elliott: Go was created as a systems programming language that could operate at Google scale. So it should be unsurprising that most of the large projects using Go are concerned with creating cloud infrastructure, Docker being the best-known example.
However, I think the future of Go will lie more in the general-purpose programming world, especially in the server-side interpreted language space, where Go gives a similar software development speed but with far faster execution speeds and radically lower cloud hosting costs.
Qs. How do you see the market for Go Programmers in the work place? What is the future for Go?
Elliott: At the moment, with Go mainly being used for systems programming, there are only a lucky few, like me, who are paid to write in Go full-time.
But as Go gradually gets adopted for general-purpose programming, especially replacing interpreted languages like Ruby, Python and PHP on the server-side, so opportunities for Go programmers will rise exponentially.
Qs. Do you have any other suggestions for our readers?
Elliott: As I tell my daughter; just keep playing about with the code and you never know where it may take you.
Thanks Elliott 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 Elliott would be glad to answer.
Tweet