Super Simple SMS in Go

I recently had a requirement at work to be able to send SMS texts to customers confirming that their order was on the way. We settled on nexmo.com as our SMS provider and I quickly set about making a simple Go wrapper around their API. Whilst, it is indeed very simple, I thought I might as well publish it as a package for reuse in any other apps where I might need texting capabilities. If you’re interested you’ll find it over on github.com

Advertisements
Super Simple SMS in Go

Go is boring

Go doesn’t do a lot that makes it stand out from other languages, at least not in ways you might expect. It doesn’t have generics for user-defined types. It doesn’t have classes or exceptions either, and it’s quite verbose. To some it feels kind of plain, safe, sometimes backwards, maybe even boring. It certainly has its critics and it’s by no means perfect butit’s precisely because it doesn’t try to do too much that it appeals to so many people. The way I see it, Go is a good example of the KISS principle.

It does stand out because its “surface area” api is relatively small, because it compiles to a single binary, because it makes concurrency easy. It stands out because it’s opinionated about what a programming language should be, but most of all it stands out because it actually embraces simplicity of which the same cannot be said for .Net and Java to name but two alternatives. It lets me “get shit done” quickly and without fuss. Compile times are negligible, the tooling is fantastic, and it’s cross-platform too. No one IDE to rule them all because the choice is yours. I choose SublimeText and GoSublime.

I’m developing our company’s first Go application and the experience has been nothing but positive. It’s the first time in a long time that I can say I’ve really enjoyed a project! I put that down to Go’s philosophy of simplicity rubbing off and therefore encouraging me to keep things simple too. Development feels quick and easy, and despite not being a shiny functional language in the style of say, F# or Scala, the resulting code is remarkably stable and solid. At various points whilst working on this project I’ve jumped between Windows, OS X and Linux too, and there hasn’t been a single obstacle or stumbling block to doing so, everything has just worked.

After primarily considering myself a C#/.Net developer for all these years, I think Go has the potential to become my “weapon” of choice for many tasks. Maybe I’m just jaded from all the over-engineering or frameworks-first approach that is so eminent in .Net and Java land. Maybe I’ve realised that I can achieve the same, more even, without all the heavyweight baggage these platforms bring. And as for cross-platform, do I really want to be considering Mono? I mean, it’s a great effort but there are issues and differences that for me just make it a non-starter.

When I look at it from that point of view, Go really does stand out. As far as I’m concerned it can continue being as boring and as simple as it likes. Maybe I’m boring and simple too or maybe I just want to get things done as easily as possible, and not worry or argue about Monads and Monoids. Those are distractions that just get in the way. I mean, who really, truthfully cares? And perhaps, more pertinently, why should you have to?

In a software world bogged down by ever increasing complexity I find Go very refreshing, and fun too. It lets me do a lot with little effort. It’s a great alternative to current mainstream languages and deserves to do well. Whether it’s exciting or boring, object oriented, functional or neither, is irrelevant. Simplicity, readability, maintainability, scalability. These are all traits that are important to me and probably to you too. On that score Go delivers in spades, and that’s why I like it, boring or not.

Go is boring