Golang from Python

Writing Go Web Services

Google Go (“golang” to your search engine) is a promising language for web services, and I expect to use it professionally within the next five years. But, unlike other languages and frameworks with a longer history, there aren’t many people or resources to help me get productive. So, I’m going to learn the old fashioned way: by taking an app I wrote and rewriting it in Go, and documenting the ups and downs.

If you’re looking for the “right” way to do things, don’t take what I say too seriously; I’ll try to be thoughtful, but I expect to change my mind several times over the next few months. My goal here is to make a lot of beginner mistakes now, so I can be somewhat competent in the future. Perhaps the distant future.

Besides my main goal (make mistakes; learn; repeat), I have a few things in mind for this project. First, I’m using some code I already worked on — a Django-based web game with the working title of Asphodel. Second, I’m going to try and use the standard library as much as I can — I’m partly inspired by this post, by the author of the Martini middleware framework, on why standard interfaces are important. As a counterpoint, I’m also going to try some libraries — though compatibility with the standard library will influence my choices. I’m trying to learn to be productive, and using open source libraries is a big part of that. And finally, I’m going to balance pragmatism with my quest for knowledge: ultimately, I don’t mind writing some code that seems rushed if it gets the job done while I focus on something else. At worst, I rewrite it later; at best, I actually like the “quick” code I wrote.

I’m going to start this off with a post about HTML templates; coming from Jinja or Django templates, it took some getting used to.