Originated from the Go Gala hackthon.
Before Gala, I was having a talk with my friend, he thought coding is cool, and asked me to teach him to code. At that time the idea came to my mind - How about write a open repository for gophers to learn how to code Go code by practice?
I got the name "Learn Go the Hard Way" with the inspiration of "Learn Python the Hard Way", and decided to use the form of "Go tour" - fill the unfinished functions in the source code.
The target users are the gophers who had went through the online documents and tutorials like Effective Go, A Tour of Go, and build-Go-web-applications, assuming the users have basic understanding about Go and want to get something to do with the features of Go.
The key features are the form of learning Go. All the tasks are challenging, and most come from the real open libraries as well as relevant papers or talks, however not difficult to complete. It will help you understand main parts of these works instead of browsing the huge code.
In my opinion the best way to learn coding is just coding.
There are currently 10 exercises, those works were done during the weekend of hackthon, so they are not seemingly that perfect, but I am sure, you will gain a lot if you finish the tasks.
This repo has no dependencies, so you can install by typing:
git clone https://github.com/gophergala/learn-Go-the-hard-way
or
go get -u github.com/gophergala/learn-Go-the-hard-way
You should complete the current exercise before you enter the next.
Each exercise is a git tag (from l1 to l10), you can check out the tag, and finish the task with tips.
Run go test
, if you complete the task, and it will tell you whether you pass the task.
To get the tips, please run go run main.go
, and follow the tips to modify main.go
.
Now run git checkout l1
, let's go!
- warm up, reverse slice.
- parallel vector sum.
- cheat rock-paper-scissors.
- make map function.
- parallel dynamic programming.
- tiny webframework 1, managing context.
- tiny webframework 2, middleware.
- lexer.
- cheat sheet.
- a surprise!
I am currently workinng at kesci, if you are interested in Kubernetes and machine learning infra, please contact me!