Join Todd McLeod for an in-depth discussion in this video Helpful resources for Go programming, part of Code Clinic: Go.
- So the first thing I want to do is I want to give you some resources to help you learn the Go programming language. Traditionally, resources are something that are provided at the end of the course but I want to provide it at the beginning so that as you're learning Go you have these resources upon which you can draw to further enhance your learning and to gain more knowledge. So the first resource I want to point out is GitHub. And if you go to my GitHub account, I have a bunch of different Repositories here. One of the Repositories, lynda, in here you could find a readme file that will have links to all the resources I'm going to show you, so you could check out that one.
But the Repository I want to show you right now is Golang Training because there's a lot of really great code in here which you can take a look at to learn the language. So there's a lot of really good steps in here for just how does a scope work, how do blank-identifiers work, all the way up to concurrency which is right here, go-routines, and parallelism, and what's the difference. So this is a super valuable resource and it's additionally valuable, and not everybody knows this, because you could come in here and you could search this Repository. So if I'm in this Repository and I search right there, I could see all of the instances in that repo and my code where I've mentioned os.Args.
And so I've mentioned os.Args there, and here, and here. So as you are learning the language or using the language, if you need to see how to do something you could come to me repo right here and search this Repository and see, "Hey, have I used os.Args and how did I use it." And so you could find that. The next helpful resource for you to know about is that there are some Forums for asking questions. So of course, one of the main Forums for asking questions today, in programming, is stackoverflow. I'm going to show you something about stackoverflow which not a lot of people know about.
Here I am at stackoverflow and when I search for Go, and I'm going to type in golang. And I'm going to take a little bit of a tangent here, for a moment, to talk about the difference between Go and golang and then we're going to come back and look at stackoverflow. But sometimes Go is referred to as Go, the programming language, and so you could see here Try Go and the Go programming language. And sometimes it's referred to as golang. So golang.org is the official website of the Go programming language. And often, Go is referred to as golang because if I was to search for go os or go args that's going to bring up a lot of results not related to the Go programming language.
However, if I search for golang that makes it more specific. And so Go and golang are terms which are sometimes used interchangeably. All right, so that's the end of our tangent, now let's come back to stackoverflow. I've searched for golang and I've gotten some Go results. You could see these tags here, as I hover my mouse over one of the tags, one of the options in this little flyout menu is that I could subscribe to this topic. By subscribing to this topic I'm going to receive an e-mail and I could adjust my preferences, how often do I want to receive it.
But I'll receive an e-mail of all the questions that are occurring around the Go programming language. This is a great way to help learn about the language because you'll see what are other people asking and then how are other people answering those questions. And so you'll be able to take a look and also ask questions here if you need help. Another great forum for asking questions is the golangbridge. There's not much more to say about that other than you should take a look at it, and check it out, and it's a good place to ask and answer questions about Go. So know let me give you a few books which I found really valuable.
I've looked at pretty much all of the books that are out there on the Go programming language and out of all of the books these are the ones which I think are the most valuable. So Caleb Doxsey has two books which are really valuable. One of them is this one right here, "Introducing Go." "Introducing Go" is very approachable and great for beginners. Caleb also has a book which is offered for free online at golang-book.com, so it's another really great resource to take a look at. Another good book for people who are just getting started with programming is, "The Way to Go" by Ivo Balbaert.
While this book is a few years old, it's still a really valuable book. All these books I keep on my desk and this is one of them. So I recommend with this book jumping over the first few chapters as they just cover some basic set up information but some of that information is a little bit dated but just start with Chapter four. And the way Ivo describes many of the different concepts related to Go programming is done very thoroughly and very well, so again, if you're just starting out with programming in Go, I recommend this one. Another great book is "Go in Action" by Bill Kennedy.
I would categorize this book as an intermediate book so if you have some programming experience this is a great book with which to begin. Chapter two is a bit advanced as is Chapter seven so consider reading those two chapters last. Finally, the last book I recommend is, "The Go Programming Language" by Donovan and Kernighan. So this is a fantastic book, it's very thorough but it is more advanced. So even if you're a seasoned developer I recommend purchasing this book with one of the other books mentioned as it will serve as a supplement to some of the more advanced concepts.
There are a few free resources which I also will afford to you as great for learning about Go. One of them is a YouTube playlist with all of my lectures so you could check that one out right here on YouTube. Another great playlist of lectures is one that Caleb Doxsey did and his playlist of lectures also has an index of videos which describes what's happening in each video. So this is a very thorough playlist and it introduces the Go programming language and then teaches you how to do web programming with Go, so another great resource for learning Go.
And he has a codebase which goes along with that also which you can take a look at at this github repo, right here. One more great resource is there's an in-person training which is offered by Bill Kennedy which he calls Hardcore Go so take a look at that website and see if there's a training near you because if there is that's a super valuable way to spend a weekend and to learn more about Go. And then, of course, another great resource is Go's official website, golang.org. Sometimes there is some confusion between golang.org and godoc.org for my students.
So what is the difference? Golang.org is the official website of the Go programming language and then we have godoc.org which has documentation for the Go programming language. This is not the official website of the Go programming language. This is the official website, right here, of the Go programming language. Inside here we have Packages and we have the Standard library. So if I wanted, I could come down here and I could look at the fmt Package from the Standard library. And this is the exact same documentation which I'd find right here at GoDoc so here's the fmt documentation from the Standard library.
So what's the difference between these two websites? Here, this is only going to have documentation from the Standard library at golang.org and here at godoc.org we also have documentation from third-party packages. So you could search for third-party packages like uuid, Universal Unique ID. And so here are some code which somebody else has written which you might include in a project and save yourself the time of having to write the code and you can find it by going there. So once again, the difference between golang.org for looking at documentation and godoc.org for looking at documentation is GoDoc has the Standard library and third-party packages and golang only has the Standard library.
Of course something else which is really helpful at the official website of the Go programming language is under Documents, you have the Language Specification which is right here. And then you also have a Document called Effective Go and both of those Documents talk about how to learn the Go programming language and they could be a little bit technical and they could be a little bit enigmatic but they're definitely the official source for figuring out how does something work so that's a great place to look.
One more thing to mention when you're looking for Third-Party Packages is that in addition to godoc.org there's also a repo called awesome-go so you could take a look at that and it's just a list of really awesome Third-Party Packages that people use. Finally, the last thing you could do, a useful resource for learning the Go programming language is staying connected with me. And so these are the different ways you could find me online to either just follow what I'm posting about Go or to even ask me a question, if you have any questions about Go. So lastly, I just want to say thank you to a few individuals who have helped me really learn the Go programming language.
And there's a concept to the Lakota Sioux Indians called Mitakuye Oyasin. And the idea behind that concept is that all of your relatives are the ones who are standing behind you, all of your relations, they're the ones who helped you get to where you are. And so it is only with the help of these people, Bill Kennedy, Caleb Doxsey, Daniel Hoffman, Corey Diehl, Ray Villalobos, and Zeno Rocha, it's only with the help of those individuals, plus many others that I've gotten to where I am with programming today. So I just wanted to take a moment and say thank you to all of them for all the help they've given me in becoming a better programmer so that I can now share that with you.
All right, so hopefully these resources will be helpful to you on your journey, learning about Go.
Todd introduces challenges and then provides overviews of his solutions in Go. Challenges include topics such as statistical analysis, searching directories for images, and accessing peripheral devices.