Go is recommended as the first programming language?


(Vinicius Barreto) #1

Hello everyone!
Please, I would like to ask for sincere advice and all help will be greatly appreciated.

I’ve heard about Go and its performance very well, so I was interested in developing my web systems with it.

Note: I just did a basic PHP course, basic Java and basic C #, because I have not yet decided which language I will choose for my career.

1- Would it be a good idea for me to study Go right after programming / algorithm logic, that is, Go can be my first programming language for production?

2- Or should I first study a gateway language like PHP, C # and etc, study more deep object orientation and MVC, so only come and study Go?

3- With Go I would have the same ease to start as I would have with PHP, C3 or Node.js for example?

Thank you very much!


(Giulio Iotti) #2

You do realize that in this forum we are very biased, right? :wink:

Go is a distilled of some ideas and very opinionated. So yes, learning Go and the ideas around it (those of simplicity, of software engineering at scale, etc) are absolutely worth learning.

That said: don’t stop there. Go is great but it’s not everything. Some languages have a very different paradigm than Go, for example functional languages.

Having a broad worldview on programming languages makes you understand that every programming language is imperfect and result of trade-offs. This will make you a much better developer.


(Jay Ts) #3

Here’s some quick opinon…

  1. I had exposure to other languages before I learned C, but had trouble learning C because it was a relatively new language at the time, and based on more advanced concepts than what I had exposure to. But after learning it, I never wanted to program in any other language. Go is the first language I’ve seen since the early 1980s that I prefer to C. So if you learn Go, you might have trouble stepping down to any other language. :wink:

  2. (Again, my opinion!) PHP and C# are not gateway languages. Gateway languages for Go are C (the original, that PHP, C#, C++, Java, Javascript, etc. are descended from) and other Algol-family languages like Pascal and Modula 2. Also, Go allows object-oriented and functional programming, but it is really a data-oriented imperative language. The most important thing in Go is to understand how the computer’s hardware works. The computer is a real electronic data processing machine with a von Neumann architecture, not some kind of abstract mathematical idea. So if you want to study the object-oriented programming paradigm, forget about Go and try C++ or Java. It may even cause you problems if you study either of those or some other OOP language before learning Go.

  3. If you want to learn Go well, it will be more difficult in some ways than interpreted languages like PHP, Python, or Javascript. But compared to C, C++, or Java, Go is a lot easier and simpler. (At least it was for me.) The benefit of learning Go isn’t just efficiency, but productivity. Go is type safe and memory safe, so you spend a lot less time debugging, and more time writing new code.

I hope you get many more replies because I’m very opinionated about this, and my point of view is uncommon. Please just consider what I wrote, and don’t take any of it too seriously.


(George Calianu) #4

The language you want to learn depends to what domain you want to touch. If we talk about web applications, networks servers or so on probably Go is a very good choice but if you want to write gui applications probably not. Supose that we are in the first case:

  1. Definitely yes
  2. Why shoud you spend time with other languages if you want to end with Go? On the other hand Go is not an object oriented language in the way that other languages are, so studing object oriented is generaly useful but not very useful in direct relation with Go.
  3. With Go you can have the easiest start because of simplicity of the language. I recommend you to start with this book.

(Vinicius Barreto) #5

Hello Giulio! thanks for your answer!

You’re right, after I stopped to think about this point of view :sorrir:

Once again I’m very thankful for sharing your opinion! :smiley:


(Michael De Barros) #6

1 -There is a talk by Audrey Lim about learning Go as her first programming language. There are a lot of resources out there and the community is very helpful.

2 -In the other hand, I think yes it could be beneficial to learn a more OOP oriented language first, specially one that can also let you write in functional paradigm also. The JS world is going in that direction, it seems. That way you can have a more critical eye once you try Go, and a better appreciation for it, if you like.

3 As I said, there is are a lot of resources for learning Go. It is becoming easier to start, specially with module support from Go 1.11. Managing dependencies will be much easier now.


(Vinicius Barreto) #7

Hello @jayts thank you so much for sharing your experience and your knowledge!

In my short trajectory I studied algorithm and programming logic through the C language, and, I confess, it was very difficult for me.
I then studied basic PHP and found it very easy because PHP courses and teachers generally assume that PHP is the first programming language of the student and so they bother to explain the smallest detail and are very concerned with the didactics.

Then I started the object orientation study in Java (because the online course only gave Java option …) and I was scared by the great verbosity of Java, however I liked the idea of ​​Object Orientation …
I also did the basics of C # and I really enjoyed the Visual Studio IDE, but I do not like the idea of ​​being stuck in the Microsoft ecosystem because I came from the infra structure and when I compared some Microsoft products with other open source products I liked it much more than I saw in Linux, plus the stability, simplicity, transparency, performance and economy of hardware resources …
And that’s what got me interested in Go.
I did 3 Go online courses, two basic ones and one for web applications in Go, and I was very delighted with what I saw, especially with the web server integrated with Go, but I’m not able to absorb learning and solve problems that arise when I try to do something myself. I thought about it and maybe it’s because in the Go courses, the teachers assumed that the student is already a developer and came from other programming languages, and so they skip some basic teachings mainly regarding syntax that Go inherited from C.
I will continue to study Go, but calmly and without haste, however, for projects that I need to do urgently, I will have to do in PHP or Node.js and in the future I will migrate to Go when I am feeling comfortable with Go development and when the performance of applications is imperative.


(Vinicius Barreto) #8

Hello @geosoft1 thank you very much for your reply!

Yes, my main intention is in web applications.
I am a true beginner with all those doubts about which programming language to choose and with the most basic difficulties possible.
I realized that most Go courses assume that the student is already a developer and therefore skip some basic explanations and mainly about the syntax Golang inherited from C.

So I wondered if it would be appropriate for me to try to take on a bigger challenge than I could do now. What led me to wonder if it would not be appropriate for me to learn another easier programming language (PHP 7, JS or C #) to make my current web project go and study Golang very slowly and without haste, in the future to migrate my web application to Golang when I already have experience, feel safe in developing with Golang and performance is essential for my application.

I am very grateful to share this book.
It will be of great help!


(Vinicius Barreto) #9

Hello @michaeldebarros thank you very much for your response!

Thanks for sharing this video!

Yes, I’m too biased to start my web projects in JS and at the same time go studying Golang calmly and then migrate the back end of the application to Golang.

Yes it’s true! In one of the Go courses I did, I met Godep for dependency management and found it very interesting and facilitative for dependency management!


(Michael De Barros) #10

Go 1.11 (now 1.11.1) has support for modules, which will be the standad for managing dependencies.


(George Calianu) #11

A previous background if helpful but not necessary. I consider the fact that Go has a very close syntax to C is not a scary thing but an advantage. C language has a very clean syntax and statisticaly speaking in Go you will write much small and clean code than many other ‘easy’ languages. More than that, you will write readable and maintainable code. If we speak about interfaces or concurency, well… things are complicated but in the web apps you don’t interact to much with those things.
On the other hand the easiest of writing self hosted web apps can be a big advantage vs configuring web servers (at least from my point of view).


(Jay Ts) #12

Hi Vinicius,

Thanks for telling us more about your background. I’ve also heard from other people who are learning Go as their first or second language, and are having trouble getting from watching or reading to the point of writing their own programs.

I’ve been watching video courses, and it seems common that the instructors move through the topics very quickly. Sometimes I see code displayed on the screen for such a short time that I can’t read it. I have to back up and pause the video to understand what the instructor is saying. If I were learning Go as my first language that way, I would be lost too. So don’t worry.

I suggest you find one or two good books that are introductory. Introducing Go (O’Reilly) is a good introductory book. You can read through that and for each topic that is covered, stop reading and write some little programs that use that part of Go, until you feel you understand it well. I’ve been looking at William Kennedy’s book Go in Action (Manning), and it is a longer and more thorough coverage of Go.

Aside from those, I find it hard to make suggestions. There are many books on Go, but in my opinion, only a few are really good.

I thought I recognized your name was Brazilian, so I looked you up and it appears that you live in Rio de Janeiro (?). Assuming that is correct, I understand that it can be difficult and very expensive for you to get imported books there. (I have many Brazilian friends and know about that.)

Years ago, I wrote a book for O’Reilly, and one of the benefits I received was a lifetime subscription to their Safari service. There are thousands of books and video courses from many publishers available through it. They charge about $40 per month (so about R$160) to access it. If you can afford that, I suggest you look into it. https://www.safaribooksonline.com/home/ I’ve found it to be a really great learning resource. You can search on topics and then read or watch samples to learn which work best for you. At least, maybe it’s better than buying expensive books and waiting a month for them to be delivered, only to find it’s not a good book for you.

To get to the point where you are really good at a language, it’s a kind of bootstrapping process. I think people expect too much of themselves too soon. You need to start with simple things, and keep stepping up to writing more complex programs that do more.

So to develop more as a programmer, I have these suggestions:

  1. Take your time to study the language in detail. This can be from reading books carefully, or watching videos again until you really understand. Write very simple programs to practice using elements of the language as you learn about them.

  2. Use websites that are for coding practice. Here are some examples:

https://gophercises.com/ (Go-specific)
https://www.hackerearth.com/
https://www.coderbyte.com/
https://leetcode.com/
https://exercism.io/
https://www.hackerrank.com
https://projecteuler.net/archives

(Of the above, I have used only HackerRank. I know very little about the rest.)

Except for Project Euler, the sites have coding exercises. You write code, and then the correctness is checked automatically. Of the above list, I have used only HackerRank, and I thought it was fun to use.

  1. Think of a simple kind of program. Maybe it will be something fun or solves a problem just for you. Then write it in Go.

After you have success with little things, think of more complicated programs you can write. I’ve found that with the various languages I’ve learned well, I reach a point of comfort with the language, or you might call it mastery, after I’ve written a few thousand lines of code for a project that requires the use of most of the parts of the language. If you write a program in Go that’s about 5000 to 10,000 lines of code and makes you use many types, define your own types, and also involves the use of interfaces, go routines, and channels, I think you will see what I mean. After that, you will feel comfortable with the language, and you will be confident with it.


(Anielkis Herrera) #13

The most simple course that I found is this one: https://www.udemy.com/go-programming-by-example/

every topic includes very simple explanations of how it works… It helped me to deepen my knowledge


(Vinicius Barreto) #14

Hello @jayts! Wow, thank you very much for your comprehensive answer!
As my English is not one of the best (yet), I will respond in parts to facilitate understanding.

Yes, that’s exactly it! But, I have already accepted the fact that I will have to study Go slowly, one step at a time. As the sages said, “more important than speed is the right direction.”
It will not give to have good domain in Go in 5 days as I did with PHP, however I will not give up Go, which will undoubtedly be the future, due to its intelligence in being light for the hardware, to be self hosted with embedded web server, to be easily multi-platform and handle competing processes with mastery.
I understand and value the economy of hardware resources and the ability to work with several processes simultaneously because I’m trying to be a software developer after working for years in infrastructure in datacenters (here in Brazil they call it who manages and supports servers) . This was one of the reasons that drove me away from C #, although I have seen that the Microsoft IDE (Visual Studio) is very good for developing and debugging.

Thanks for pointing out the right path in books, I will keep my notes with great zeal and buy them as soon as possible.

Yes that’s right!
I’m from Rio de Janeiro - Brazil. It’s not the best place in the world, but we’re surviving what we have available today :slight_smile:
Yes it’s true. Some books are difficult and the tax we have to pay in Brazil for international purchases over 50 dollars doubles the purchase price. High tax burden is a problem that needs to be solved in Brazil.

Wow, congratulations on your book!
For me it is very interesting to know safaribookonline.com, because I only knew packtpub.com as a source of books outside Brazil.

This phrase (“people expect too much of themselves too soon”) translates my huge demand on myself and the fact that I was disappointed that I had not been able to learn Golang in 4 days after taking 3 different courses (online).
I think I made a mistake on this point.
I will follow your advice.

Yes I’ll do it!

I did not know it existed. Thank you also for this valuable information!

You’re absolutely right. I’ll follow your advice to the letter.

Thank you one more time @jayts!


(Vinicius Barreto) #15

Hello @Anielkis_Herrera, thank you very much!


(Vinicius Barreto) #16

Hello @geosoft1, Thank you very much for your reply!

Yes, I fully agree. By learning easier but more verbose languages, as I always have a critical and thoughtful look at things, and although I have not gone into the study of these languages, I think about myself because I had to write so much and for the program to do (while I’ve been studying Java and C #).
The Golang also gained my admiration in this.
Although I did not have the privilege of studying at Harvard, I always had an idea in my mind: “Everything can be improved.” (I do not know if it’s true, but I’ve heard that this is one of Harvard’s principles)
And I think the creators of Golang had the same thing in mind when they decided to create the Golang.
So I became an admirer of this programming language and felt like studying it.

Yes, the concurency is something I see as advanced for me at this time.
I confess that it was very difficult to actually learn Object Orientation only with youtube and online courses. And I know that with some parts of Golang it will be like that too. But I will not easily give up.

I totally agree. It’s just cool to include the self hosted web.


(Alexis Paques) #17

Short: I would not start with Go.

Long: You probably should start with one of the simplest yet very capable language: Python. Learn the design patterns, be familiar with coding and more importantly: Achieve some applications you’re proud of.
By succeding doing applications, you’ll first feel the true happiness of success in life (this is biased).

Once you went through Python and felt happiness, you should not sleep over and say: “Yes I can”, because no you can’t, yet.
You should instead grab another language with another complexity. Go would be the perfect pick for the second language. It requires a bit more investment at first to achieve an app, but is very capable in the fast prototyping world.

NOTE: To be able to truly enjoy Python, please enable a linter to force you to write properly. => Visual Code or Pycharm provides you with a out of the box linted Python experience.


(George Calianu) #18

I completely disagree.


(Ignacio Gómez) #19

I’d say forget about the particular language and study computer science/engineering topics: algorithms, data structures, logic and formal languages, computational complexity, digital systems, computer architecture, software engineering (i.e., design patterns), concurrent programming, compilers, operative systems, distributed systems, etc. (sorry if those names seem odd, I’m just translating on the fly). Languages then become just tools, and the best choice is the one that fits better the job or the one you are most comfortable with when any of them fits. C#, Java, Go, etc., all we’ll be fine to start learning these topics, at least the first ones. But then again, what’s your intended career? Why are you learning to program?

But apart from that more general approach, if you want to talk languages, I’d say go with C: you’ll learn memory management, types, a syntax that inspires many later languages one, etc. That’s not to say you can’t start with something like Java (I did), C# or Go, just be sure to learn what the language is hiding from you (e.g., memory management) so you don’t get bitten in the ■■■ later. That’s why I wouldn’t recommend starting with dynamic languages such as Ruby, Python, etc. I’d also stay away from Javascript and PHP, they are just crappy. You’ll probably have to deal with them at some point, so learn them too, but I wouldn’t get my fundamentals from them. Also, MVC, OOP, etc., are principles, they are not tied to languages. That certain language or framework is more inclined to one doesn’t mean you can’t learn the concept by itself.

I know that my first paragraph may seem too much and maybe you just want to learn some programming. But you did mention the word career, and I really believe that languages aren’t really important and knowing how to program is. It’ll make you a much better programmer to know strong programming principles and be able to use them in any language, than to only know a lot about a particular language.

But if you’re asking about Go, it’s fine: it’s simple and you can learn the important basics such as algorithms, data structure, design patterns and concurrency with it.


(Vinicius Barreto) #20

Hello @AlexisTM, Thank you very much for your reply!
As you can see from my previous comments, I came to a conclusion similar to yours.
However, I believe that in future, when Go becomes as famous as PHP, Java or Python, more courses will emerge from that type that is directed to the beginner who has just left the basic course of programming logic, thus making it easier for the beginner to progress and absorb Go’s learning well.
But I would like to emphasize that I will not give up on the Go and I will study it gradually. One step at a time.

Python is one of the only languages I have not tried. Is it easier than JavaScript?