Skip to content

gophergala/learn-Go-the-hard-way

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Learn Go the Hard Way

Originated from the Go Gala hackthon.

img

Inspiration:

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.

Target User

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.

Features

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.

How to install

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

How to use

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!

Exercises (currently available):

  1. warm up, reverse slice.
  2. parallel vector sum.
  3. cheat rock-paper-scissors.
  4. make map function.
  5. parallel dynamic programming.
  6. tiny webframework 1, managing context.
  7. tiny webframework 2, middleware.
  8. lexer.
  9. cheat sheet.
  10. a surprise!

Members:

ggaaooppeenngg

Find Colleague

I am currently workinng at kesci, if you are interested in Kubernetes and machine learning infra, please contact me!