Getting started with GO

In more recent times I have being using GO for more of my development tasks, this is an interesting modern development language and is worth giving some time to checking it out. If you are coming from a strong object development background where you normally use classes to describe objects it may take you a little time to adjust to an world where their are still objects but these objects are not described by classes. This is just one of the many differences that exist in GO, at first it is a little strange but I have found the way GO handles object to be just as easy to use as using classes in other languages. Normally when I start learning a new language I use my previous development experience as a guide and make a lot of assumptions about the new language, this speeds up my learning as in most cases I can learn the syntax and fill in the more deeper language idioms over time. With GO I recommend studying the language first as you will need to wraps you head around some new aspects you will not have used before.

Their are a number of reasons why I have chosen to learn and use GO,

1) Clean syntax.
2) Typed.
3) Productivity.
4) Maintainability.
5) Easy deployment.
6) Easy field management.
7) Concurrency.
8) Compiled for speed.

At this point the language is a little immature and as a result their is lack of available library’s when comparing GO with a mature language like python, this has not being a problem for me but it may be worth looking what libraries you require when you start a new project.

Their are many resources available on the internet, here is some to get you started,

Home page.
http://www.golang.org

Free GO book.
http://www.golang-book.com

To get started and wet your apatite lets do a quick install and hello world, this should take no more than five minutes

1) Lets install GO on our Ubuntu dev PC,
#sudo add-apt-repository ppa:gophers/go
#sudo apt-get update
#sudo apt-get install golang-stable

If you do not have add-apt-repository install python-software-properties” installed you will add this package.

2) Lets create the hello world app, create a empty file called hello.go using you fav text editor.

3) Put the following empty code in the text file and save,
package main

import “fmt”

func main() {
fmt.Println(“Hello, playground”)
}

4) Lets save, compile and run, execute the following command,
go run hello.go

That’s it, hope this gets you started…………………