You should have a look at geopattern, if you haven’t yet.

What’s the buzz all about?

This blog post is about development of geopattern library in golang.


What do you think about this my favorite colored concentric circle pattern?

Concentric Circle Pattern

geopattern. What?

Umm, actually I don’t know exactly why the name is geopattern but I know what it is.

It is a golang library that generates pretty image patterns. It comes with awesome pattern types like nested squares, tessellation, concentric circles, and 13 more.

Now if you are thinking, why I don’t know the reason behind its naming. It’s because geopattern is actually the golang port of my friend and GitHubber Jason Long’s GeoPattern Ruby library.

Jason created the original Ruby library to power GitHub’s Guides and Explore sections.

Another geopattern. Why?

As you can see the original geopattern is being used at GitHub itself. What else do you want, huh?

There are many other implemetations in different programming languages, trying to help users of each language choice.

But this was not the real force for me to develop one more in golang.

Before geopattern, the last thing I worked on was Doga: HTTP log monitoring console for Humans. I really loved developing it and still love to just watch it working.

The reason behind this special attraction is that :

  • It helped me landing a summer internship at Datadog.
  • It is written in Python. <3.

Then I started writing blog for an old project teamwork, just for the sake of adding an entry to my archives but it’s still in drafts.

I tried many things to kill my time :

  • watched too much movies, more than too much Animation movies.
  • tried to read one seventh of the entire internet; I just missed it, though.
  • collected some best music and shaped it in a playlist named confusion on Muzi, so was I.
  • managed to complete reading one entire research paper, first time \o/.
  • attempted watching Coursera content for two courses.
  • tried to work on something new but got stuck somewhere and paused the work.
  • managed to contribute to term2048, only one right thing.

In short I was doing everything but there was no sign of satisfaction; getting philosophical, lol.

That’s why I decided to write something. And here comes the geopattern.

Golang. Why?

Please don’t kill me, if you use ‘go’ more than ‘golang’. I’m just being formal.

Since this summer I was collecting talks, blogs and other sources etc. about use of different programming languages in the wild. I hope someday I’ll be able to convert that all in something readable.

Golang was on my list ever since.

I have seen many awesome products shifting their infrastructure from Python, Node.js to golang. Even Dropbox migrated part of their code stack to golang from Python. Also I have read the TJ holowaychuk praising golang.

All this made me to take a walk in the golang land.

Learning Golang. Developing geopattern.

In starting I spend two evenings reading about formal language convention stuff on the Golang-Book.

After playing for a while in my ~/projects/learn.go/ directory, I started working on geopattern.

I love to read source code of every readable thing in any language except assembly, as far as I can understand it. So I started reading source code of original library and it was fun. The most helpful thing was Jason’s blog Generating visual designs with code.

In starting I was having problems that I even googled go sucks. Because I found that golang is a bit more verbose language. It doesn’t have some generic things so you have to write some work around like absense of optional arguments in functions and a better way to manage classes and stay object oriented.

But the more I worked with it I found that I’m more aware about what I’m writing, debugging is hell lot easy and what not.

Things that helped me from not giving up, are :

I mailed Jason asking permission to port it and some other stuff related to licensing. His reply was positive. That’s the ideal way you port something.

Then I called an astrologer for the right time to post about geopattern on Hacker News and Holy, mother of bull!, He was perfect. It went to 2nd rank on the front page. #ThanksHN \o/.

All this happened a bit fast. In a week or so.

Now What?

I hated and then loved working with golang; still loving.

As you can see, people are using golang to speed up their projects and scale them upto higher levels. So now I wish to understand more about it. I haven’t smoked golang’s concurrency primitives - Go routines and Channels yet.

It was awesome to see geopattern leading GitHub’s trending repositories.

I have noticed that I’m not good in managing my past works like some inspiring people do in the GitHub community. It’s mainly because I move myself to some other stuff totally and don’t pay much attention to older ones.

I’ll try to work on this and learn more things about golang.

If you want to answer the question I asked in the start, you can use the Internet of things to catch me. \o/.