I'm learning Go and it's boosting my creativity

In which I reflect on learning how to code in Go, how it is boosting my creativity, and why oh why would I go through the pain of learning something from scratch again?

I recently decided to start learning Go.

(Before you keep reading this, you should know: I am not a programming expert!)

A few people at work kept telling me about it, and after my initial grumpy phase (“new things are bad”, “it’s just a trend”, “no I won’t go see the Oppenheimer movie because everyone says it’s amazing”), I started getting curious.

Learning a new programming language isn’t usually something I’d do for fun. In fact, it can quickly become frustrating.
Imagine you’ve learned how to ride a bike. It was hard work, and you got hurt multiple times in the process! Now, you want to enjoy riding your bike, and what it unlocks for you. For example, going places, spending a Sunday afternoon cruising through a park, exploring the woods nearby and crossing a stream – splashing water all over yourself in the process.

Now, you could do most of these things with a longboard too. You wouldn’t be as fast but you would look pretty cool. Sensations would be different. It would be a lot of work though, and probably even more painful than learning how to ride a bike. You could also feel a bit humiliated, if you were to learn in a public place and fall over a lot.

I don’t want to get the scratches and the bruises all over again. I want to enjoy myself!

But why, then??

Yet I have decided to do it with Go, and here’s why:

  • It’s learning something new while being able to apply it straight away
  • I’m seeing it like some people see crosswords: it flexes my brain
  • It forces me to look at things from a different perspective. I can’t solve a problem the same way I would do it in Python, I have to come up with a different approach. It forces me to be creative
  • I practice thinking “How can I do this?” instead of “It can’t be done
  • I like how you can deploy code without worrying about dependencies too much
  • It might be useful at work, one day

I secretly hope that it will help create new neural pathways in my brain. Maybe it will make it easier for me to see new challenges as a puzzle to solve, instead of an obstaclenot only with code but in life too.

I am seeing this the way a photographer who only shoots with DSLRs would pick up a film camera. It makes me slower. I have to stop and look at familiar situations in a novel way. The craft feels different.

Learning about myself

So far, I am having fun. It’s a practical language. Easy to read and, for the most part, easy to write.
I caught the bug, and I practice trying to solve old problems, while having to take new avenues. First I make something that works, then I try to make it faster, and easier to read. I am taking notes: what I like, what frustrates me, and questions I have. The latter two are opportunities to learn how to do things a different way.
It’s funny because it also uncovers what’s important to me, day to day. In short, it’s not how fast I can write complicated code. It’s things like:

  • how fast I can get an idea tested
  • how easily I can deploy it
  • how quickly I can assess its version and dependencies
  • how I can find out about what data it’s using
  • how it’s configured
  • why it’s crashing

I’ve been stuck in one way of seeing things, and this is shaking me up. As Abraham Maslow wrote, “If the only tool you have is a hammer, it is tempting to treat everything as if it were a nail”. Maybe I avoid challenging myself by always using the same tools. I stopped learning. Sometimes, it’s time to mix it up a bit!

This is good reminder that I am, in fact, a curious person 🙂

Go By Example: easy to follow website that goes through the basics of the language (especially useful if you know a few languages already)
Go packages documentation: super useful to explore all the things a package can do (example here with the standard library)
3 dots in 4 places: where the three dots ... can be used in Go

Built with Hugo
Theme Stack designed by Jimmy