Sunday, December 27, 2015

Go Go Go: Golang is the way for me to go

It all started with this picture.

What do you see?

I see a happy environment with 2 essential elements.  All the characters are happy and there is food.  After all this is what I am trying to pursuit all these years.  A happy working environment and be able to provide food for the family.  

With these 2 things (happy working environment and food for the family) I have decided to learn this "new" language. An of course, I started with writing a Hello World program.  Even this is a simple program it provides some some insight as to how this language looks like.  In this blog post I am not going to dig into the language itself.  If you are interested, I will be presenting "Introduction to Go" on Dec 30 8:00 pm EST for Commitmas vBrownBag.  Once I got a link to the presentation, I will update the post to reference it.  Registration for the event is here.

So what are we to talk about here?

The purpose of this post is to have a glimpse of Go from a high level.

Go is developed in response to specific problem that Google encountered in software development and deployment.  According to Rob Pike one of the 3 original designers of Go along with Robert Griesemer and Ken Thompson defined Go as a:

  • Complied
  • Concurrent
  • Garbage-collected
  • Statically typed language developed at Google around 2007 for efficiency, scalability and productivity

These 16 words summarized what Go is cleverly and precisely. 

Efficient, Scalable and Productive

The Go language is created with the goal of being efficient, scalable and productive.  Google’s infrastructure is huge and some of the software that runs this infrastructure is also huge.  Even building the software image may take up to 45 minutes.  Imagine there is a one line change to fix a critical bug that needs to be deployed immediately. For the developer to make the change and build the software already takes 45 minutes and then go through testing and then another production build and then deploy.  The turnaround time is measured in unit of hours.


I don’t know about Google’s infrastructure but one of the advantage of Go is that it works on Windows, Mac and Linux.  Once a program is written it can be compiled and run on one of the 3 platforms mentioned about.  This bring another point on Go.  It is a compiled language.  Python which make up of 99% of OpenStack is not compiled.  It needs a interrupter to run the code.  Compiled means the software will generate an executable and then being ran.  Compiled program run faster than language with an interrupter.


One of the build in feature of Go is "Garbage-collection".  This term is about memory management for the language.  The designer of Go see that lots of coding is done in the case of C to manage the allocation and freeing of memory.  If the language can ease up the mundane but necessary task of memory management, developer and spend more time effectively on the feature itself.  Another build-in feature of Go in memory management is how the stack is handled.  Stack size in Go is dynamic.  If more memory is needed for the stack a new block of memory is allocated and be used for the stack.  Developer does not need to worry about stack overflow crashing the program.

Static Type

A type describes how memory is used.  A type can be a integer, a string etc.  Type is Go is say to be type safe meaning the compiler at compilation time check the usage of memory variable and will not allow the developer to assign a string to a previously integer variable.  This can be done in Python and the designer of Go decided that this is "dangerous" and make sure the types are diligently checked at compilation time.


This is a famous feature of Go taking advantage of the multi-processor of the modern hardware for instruction execution.  I read somewhere on the web using a simple for loop takes 42 ms to complete a task and written in Go with concurrency take only 14 ms.  This is a deep topic and I will dig into this more in the future and for now we just from a high level, know that Go has the ability to execute the instructions faster thus fulfilling the design goal of efficiency.

A very developer friendly language

Besides what Rob Pike's explanation of Go, I have found that Go is really a very developer friendly language.  Go function is able to return multiple parameter and this makes debug much easier.

Go has lots of build-in packages for modern day applications such as JSON processing, networking or web processing.  This makes developer's job much easier and no need to re-invent the wheel.

Go has a rich ecosystem on tools as well as build-in testing and bench-marking support.  This helps to validate local function modification.  This testing and bench-marking support is also in line with DevOps or Agile programming practice.

Golang is the way for me to go

This is only a glimpse of the language Go.  There are much more to it but after looking at this language for almost a month, I have decided that if I were to learn any new language, Go or Golang is the one that I am going to pick up because it aligns with my programming philosophy and practice.


  1. Numpang Ijin Share gan...!! Jika ada yang berminat bisa langsung ke website kami

    Kami Waletbet hadir untuk para bettor mania sebagai Agen Judi Online , Agen Bola , Agen SBOBET dengan menyediakan produk online betting seperti SBOBET , IBCBET , 338A , 1SCASINO , ASIA8BET, BOLA TANGKASNET99 DAN BOLA TANGKAS88.

    Kami Agen Betting Online terpercaya yang beroperasi dalam dunia maya. Kami membantu para member dalam melakukan pendaftaran produk judi online , dan proses deposit withdraw dengan AKSES BANK BCA / MANDIRI / BNI DAN BRI.

    Untuk bergabung bersama kami hanya dengan melakukan pendaftaran melalui website agen di waletbet dan cantumkan data yang di perlukan di kolom register
    Dan dapatkan PROMO BONUS WALETBET Untuk member baru bergabung bersama kami dan juga untuk member akif kami yang bermain bersama kami di WALETBET Agen Judi Online

    Untuk bertransaksi deposit dan withdraw anda bisa konfirmasi pada CS ONLINE kami melalui akses YM , LIVECHAT , WhatsApp atau melalui kontak BBM kami yang tersedia di website kami.
    Dengan proses cepat dan CS yang ramah siap melayani para bettor mania dalam kenyamanan bermain ataupun dalam konfirmasi perihal betting pemain.

    Agen Judi || Agen Judi Online || Agen SBOBET || Agen Bola || Agen SBOBET || Agen Betting Online || Agen Casino Online || Agen Bola Online

    1. Great Article Cloud Computing Projects

      Networking Projects

      Final Year Projects for CSE

      JavaScript Training in Chennai

      JavaScript Training in Chennai

      The Angular Training covers a wide range of topics including Components, Angular Directives, Angular Services, Pipes, security fundamentals, Routing, and Angular programmability. The new Angular TRaining will lay the foundation you need to specialise in Single Page Application developer. Angular Training

  2. An effective server can take your business upto next level. Get Cloud Servers according to your need.

  3. eToro is the ultimate forex broker for new and full-time traders.

  4. Wow, absolutely fantastic blog. I am very glad to have such useful information.


  5. Hi There,

    Gasping at your brilliance! Thanks a tonne for sharing all that content. Can’t stop reading. Honestly!

    I've got the following code at the moment:

    Python Code: (Double-click to select all)

    2 aLen = len(sa_data[1])
    for a in range(1,aLen):
    Is there a way to simply say: for a in len(sa_data[1]):?

    THANK YOU!! This saved my butt today, I’m immensely grateful.

    Irene Hynes

  6. • Nice and good article. It is very useful for me to learn and understand easily. Thanks for sharing your valuable information and time. Please keep updating IOT Online Training


  7. Your good knowledge and kindness in playing with all the pieces were very useful. I don’t know what I would have done if I had not encountered such a step like this.

    python Training in Bangalore | python Training in Bangalore

  8. It's very useful article with informative and insightful content and i had good experience with this information.Enroll today to get free access to our live demo session which is a great opportunity to interact with the trainer directly which is a placement based Salesforce training India with job placement and certification . I strongly recommend my friends to join this Salesforce training institutes in hyderabad practical course, great curriculum Salesforce training institutes in Bangalore with real time experienced faculty Salesforce training institutes in Chennai. Never delay to enroll for a free demo at Salesforce training institutes in Mumbai who are popular for Salesforce training institutes in Pune.

  9. Serbu4D merupakan salah satu perusahaan slot deposit pulsa tanpa potongan yang menyediakan deposit via pulsa terbaik dan terpercaya di Asia.
    Kami perusahaan yang menyediakan permainan Togel Sydney, Togel Singapore, Togel Hongkong , Slot Online, Live casino dan Tembak ikan tersebut memberikan keamanan dan keyamanan untuk semua calon pemain kami.
    Rasakan sensasi main Slot online deposit via pulsa TANPA POTONGAN sekarang juga. Mainkan semua permainan yang kami sediakan via gadget atau komputer anda sekarang juga hanya di situs slot online deposit pulsa nomor 1 di Asia.
    Slot Online
    Login Serbu4d
    Daftar win88