You've successfully subscribed to Hackemate
Great! Next, complete checkout for full access to Hackemate
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.
Success! Your billing info is updated.
Billing info update failed.

00 Golang first steps

Discover the first steps to starting to learn the Go programming language, easy explanation for react-native developers


Hello and welcome to the new blog post series, we wanna learn all what we need to learn Go the cool programming language, for all us that we are REACT NATIVE developers. We know that is very difficult to get a new programming language knowledge, more when we are been working with one language for many year, but in this blog series I wanna teach you how to learn Go with the easy way, but whit out discarding the main and important concepts.

Why we should choose Go programming language to our stack technology?

There are many reasons to lear a new programming language, but I have 10 important thing that I have in account when i try to lear a new programming language:

  1. Performance.
  2. Security.
  3. Job demand.
  4. Powerful tools.
  5. Open source.
  6. Great community and support.
  7. Easy to lear and easy to write without sacrificing the big characteristics like what I been mention before.
  8. Big and good companies are using it trusting it and supporting it.
  9. The programming language solves some problem that other language not, or at least makes more easy solve that problem? If the answer is yes, so is a correct choice getting it and learning it.
  10. The language is flexible i mean if the language can be used to many things not only one thing like php. "I don't have any problem with PHP, was my first programming language but would  be saying that PHP is only for web, not for any more".

Ok the list that I wrote before has all thing that Go covers, and not only that, Go has a lot of characteristics that are impressive and makes it a super programming language.

So we could to say what Go is one of the best things that was happened to the modern software development.

Then what is Go?

Go is an open source programming language that makes it easy to build simple, reliable, and efficient software. Go is an open source programming language supported by Google

  • Easy to learn and get started with
  • Built-in concurrency and a robust standard library
  • Growing ecosystem of partners, communities, and tools
  • Flexible and useful to make CLIs, Backend, DevOPS, Hacking, Data Science, Web development indeed you can use it on mobile development and IoT development.
Go started in September 2007 when Robert Griesemer, Ken Thompson, and I began discussing a new language to address the engineering challenges we and our colleagues at Google were facing in our daily work. When we first released Go to the public in November 2009, we didn’t know if the language would be widely adopted or if it might influence future languages. Looking back from 2020, Go has succeeded in both ways: it is widely used both inside and outside Google, and its approaches to network concurrency and software engineering have had a noticeable effect on other languages and their tools. Go has turned out to have a much broader reach than we had ever expected. Its growth in the industry has been phenomenal, and it has powered many projects at Google.  - Rob Pike.

Ok we are getting enough arguments to using Go some people may get some questions about it for example:

Why should use Go instead a node.js?

Go can handle a lot of things including asynchronism with channels, is concurrent by default, is compiled, is easy to learn, the core is updated and you don't need tools to use static typed like Typescript, linters and so, because go is strong and statically typed, and has a good CLI tool that helps to test your code and make a lot of things, that we will learn in the next lessons.

Go vs Javascript main differences?

  1. Go is strongly and statically typed, Javascript not.
  2. Go has methods, struct, interfaces, pointers and Javascript classes.
  3. Go is explicit error handling, you could indicate when and where use it, panic, defer, etc. In Javascript the error handling is already build in.
  4. Go is multitasking and Multi-Threaded by default, can handle Sync and async, and Javascript is async and single thread.
  5. Go has strong options, conventions, linter and with javascript are fluid option, you can use the tools that you want without any convention.

Go changes a lot of times? or if I learn once I don't have to learn any more in the future?

Go is not only easy to learn the core and the language doesn't have strong changes when a new version is released with the time you only need to read the documentation frequently to stay updated.

Go is more secure than JAVA? more faster than c++? Has support on any server? is easy to deploy?

Yeap Go is null safety, has a garbage collector, can be builded and optimized to be more faster that almost all language, and is so easy to install only one command and you are builded your program, and it not all, you can compile for any platform!

Go is more easy to lear that Python?

Yeap to me is more easy and you don't need this ";" at the end of the line too, and not only that. Go is really fast and python is relative slow, the google team that created Go language solves the slowly problem of python, the difficult of Java and insecure of c++.

Go is POO language or what paradigm can support it?

Go can be use POO, is a little bit different agains what how work with some other languages that are POO by default like C# or JAVA, but we will see that in the next lessons, by default Go is a functional programming language, you know functions are so much more clearly and useful that classes, if you asking me I prefer functional programming.

How can install Go?

easy in I don't wanna be repetitive, so you can see how make that in the official site, Just select your platform and follow the instructions.

"is one of the most easy to install programming language that i ever seen."
Download and install - The Go Programming Language
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.

Go has package manager?

Nope, Go has a particular way to manage dependencies and environments, called modules, is so much more cleaner way to get dependencies without get a 2gb of node modules haha.

Go has ternary operator?

Nope for moment, you need to handle the traditional if else,  but in some future Go will go for it, the community are proposed this.

Where can I practice my Go knowledge?

There are many sites to practice I recommend the following sites:

The Go Playground
Code Practice and Mentorship for Everyone. Level up your programming skills with 1,879 exercises across 38 languages, and insightful discussion with our dedicated team of welcoming mentors. Exercism is 100% free forever.
HackerRank is the market-leading technical assessment and remote interview solution for hiring developers. Learn how to hire technical talent from anywhere!
AlgoExpert | Ace the Coding Interviews
The leading platform to prepare for coding interviews. Master essential algorithms and data structures, and land your dream job with AlgoExpert.

Go has web frameworks?

Yeap Go is so easy to use, in this lessons we don't use any framework because you don't need it, but Go has a lot of interesting frameworks that can be useful to speed development like this:

An Express-inspired web framework written in Go.

Differences between and is the site for the foundation and core package, and is the site to find more information, use cases, branding, resources, books and community packages.

What editor or IDE can I use to work with Go?

You can use VSCode or Goland IDE or whatever you want.

ok i think all this is enough for the moment, if you would like to learn how to write Go code with the best practice you should visit this site.

Effective Go - The Go Programming Language
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.

In the next lessons we are gonna start to write some code, if you have any question don't hesitate about question me in the comments below.

Golang for react native developers


Sensei of Karate-Do React Native

Follow me