Where I go find Go is like Go

I’ve been playing with Go recently; writing a little REST server that will do some stuff on hitting various end points. So far so copy-and-paste-from-Stack-Overflow. The issue is that, while my application works, I know at a visceral level that it sucks. I’m using go run to test it, and everything is lumped into one file. As an experienced developer I know this is bad – and it’s going to get worse.

And herein lies the problem. Architecturally I know what I should be doing, but as a Go newbie I don’t know if I should be splitting my file into many files in the main package, or splitting it into lots of little single file libraries, or something else entirely. I’ve picked up the syntax of the language, but the paradigms and idiosyncrasies are still, for the most part, unknown to me.

Remove the architectural knowledge that a few decades bashing away at various languages has given me and what you’re left with is a program that compiles, runs and does some nifty stuff – so it must be good, right? Look at me, I’m a Go developer!

I’m all for teaching people about how computers work, and the fundamentals of programming them, but lets not kid ourselves that we’re raising a generation of software engineers. There’s a world of difference between barfing a small, toy project into existence and writing performant, fault tolerant, scalable software that can drive business. Seriously, if I’d presented what I wrote yesterday as some production code I’d fire me. And yet too many people out there don’t know that they don’t know how to be a software developer.

Sadly, I have no idea what the solution is. Computers are fairly ubiquitous, learning to code is easy, and putting together need little programs that, on the surface of it, look impressive, is reasonably trivial. A good parallel would be the game ‘go‘. It’s trivial to pick up and learn, but takes a lifetime to master.

Now, do I know any friendly Go developers who would be willing to give a gentle code review of some truly awful code? Now that I’ve learned Go I need to learn Go.