add: programmer's roadmap

This commit is contained in:
Inanc Gumus
2019-05-15 23:39:54 +03:00
parent 5c2dffe6c0
commit 74df798fa4
13 changed files with 182 additions and 233 deletions

View File

@ -0,0 +1,169 @@
# PROGRAMMER'S ROADMAP
Hi!
If you're an experienced developer, you may want to watch only the following lectures. If you follow this roadmap, you will need to watch about 50 lectures instead of 180 lectures.
This course starts from the most basics than advances toward the end, step by step. So, the complexity of the topics increases on each level. I've intentionally designed it so to make it easy for everyone.
If you think some of the topics are easy for you, then watch the recap lectures, take the quizzes and exercises, and even skip the lectures in that section altogether, you can always come back to them later.
Enjoy!
## LECTURES
* **Write Your First Go Program**
* Please watch all the lectures.
* **Learn Go Fundamentals - Packages, Scopes, and Importing**
* Please watch all the lectures.
* **Learn Go Fundamentals: Statements and Expressions**
* What is Go Doc?
* **Write a Library Package**
* Please watch all the lectures.
* **Variables, Basic Data Types, and Type Inference**
* Every Go type has a zero value
* What is a blank identifier?
* Let's declare a couple of variables!
* What is type inference?
* How to short declare multiple variables?
* Why can't you short declare a variable in the package-level?
* What is redeclaration?
* When to use a short declaration?
* Get input from command-line and learn about slices
* Learn the basics of os.Args
* Greet people using os.Args
* **Print Formatted Output Using Printf**
* Please watch all the lectures.
* **Learn Numbers and Strings**
* Convert Celsius to Fahrenheit
* Convert Feet to Meters
* What is a Raw String Literal?
* How to get the length of a string?
* **Learn Go's Type System Mechanics**
* Please watch all the lectures (except the ones marked with: [For Beginners])
* **Understand Untyped Constants**
* Learn the rules of constants
* Recap: Constants
* How untyped constants work under the hood?
* What is a Default Type?
* Example: time.Duration
* What is iota?
* Naming Things: Recommendations
* **Pass Me: Create a Password-Protected Program**
* Please watch all the lectures.
* **Understand Go's Error Handling**
* Please watch all the lectures.
* **Learn Go's Switch Statement**
* Use multiple values in case conditions
* How does the fallthrough statement work?
* Solution: Parts of a Day
* Recap: Switch Statement
* **Learn Go's Loops**
* How to continue a loop? (+BONUS: Debugging)
* Create a multiplication table
* How to loop over a slice?
* For Range: Learn the easy way!
* **Randomization in Go**
* Please watch all the lectures.
* **Mini Project: Word Finder**
* Please watch all the lectures.
* **Remaining Sections**
* You may watch all the remaining lectures from this point. They are intermediate to advanced level lectures.
## That's all! Enjoy! 🤩
---
# BONUS: Why should you learn Go?
**In summary:** Go is easy as Python and Javascript , and it's as fast as C/C++. It's more enjoyable to work with Go than C/C++. You can go low-level, or you can stay high-level.
## What Go is used for?
Go is used mostly by web companies: Google, Facebook, Twitter, Uber, Apple, Dropbox, Soundcloud, Medium, Mozilla Firefox, Github, Docker, Kubernetes, and Heroku.
**Go is best for:** Cross-Platform Command-line Tools, Distributed Network Applications, Cloud technologies like Microservices and Serverless, Web APIs, Database Engines, Big-Data Processing Pipelines, Embedded Development, and so on.
**Go is not best for (but doable):** Desktop Apps, Writing Operating Systems, Kernel Drivers, Game Development, etc.
## Who Designed Go?
Go designed by one of the most influential people in the industry:
* Unix: Ken Thompson
* UTF-8, Plan 9: Rob Pike
* Hotspot JVM (Java Virtual Machine): Robert Griesemer
## HOW MUCH CAN YOU EARN?
* [Go Salaries](https://www.payscale.com/research/US/Skill=Go_(Golang)_Programming_Language/Salary)
## [From Eight years of Go post](https://blog.golang.org/8years):
> Today, **every single cloud company has critical components of their cloud infrastructure implemented in Go** including Google Cloud, AWS, Microsoft Azure, Heroku, and many others. Go is a key part of cloud companies like Alibaba, Cloudflare, and Dropbox. Go is a critical part of open infrastructure including Kubernetes, Cloud Foundry, Openshift, NATS, Docker, Istio, Etcd, Consul, Juju, and many more. Companies are increasingly choosing Go, to build cloud infrastructure solutions.
## What Can You Accomplish with Go?
* [A network Driver written in Go](https://www.net.in.tum.de/fileadmin/bibtex/publications/theses/2018-ixy-go.pdf) (_only 10% penalty compared to C driver_)
* [Google gVisor](https://cloud.google.com/blog/products/gcp/open-sourcing-gvisor-a-sandboxed-container-runtime) (_Userspace kernel written in Go_)
* [Multi-platform Nintendo emulator](https://humpheh.github.io/goboy/)
* [Docker: Container system](https://github.com/moby/moby)
* [Kubernetes: Container scheduling and management](https://github.com/kubernetes/kubernetes)
* VM image deduplication utility
* Chat server
* RUM beacon collector
* Time-series database engine, a client for it, command-line tools, etc.
* Map-reduce library
* Clustered front-end-optimizing reverse proxy with on the fly content rewriting, image resizing, caching, Lua event handler execution (all multi-tenant)
* Geographically distributed reverse proxy CDN nodes
* Health management daemon with event handlers and peer to peer reporting
* Pure Go DNS server
* API backend that interfaces with MySQL
* Linux process capture/restore utility
* Reverse Proxy to mask our asset server from clients.
* HTML -> PDF converter for invoice generation.
* URL shortener like tinyurl.com and goo.gl
* SMS messaging service.
* Credit Card payment gateway
* JSON Web Token package
* On the fly image processing services
* 3d render farm/content production pipeline (pretty large project)
* Production lxc container deployment
* Automated testing management
Reference: [This Reddit post](https://www.reddit.com/r/golang/comments/5nac2b/what_have_you_used_go_for_in_your_professional/).
## CHECK OUT FOR MORE INFORMATION:
* [About Go: An Overview](https://blog.learngoprogramming.com/about-go-language-an-overview-f0bee143597c)
* [Why should you learn Go?](https://medium.com/@kevalpatel2106/why-should-you-learn-go-f607681fad65)
* [Emerging language of cloud Infrastructure](https://redmonk.com/dberkholz/2014/03/18/go-the-emerging-language-of-cloud-infrastructure/)
* [Companies using Go](https://github.com/golang/go/wiki/GoUsers)
* [Eight years of Go](https://blog.golang.org/8years)
* [Twitter: Handling Five Billion Session in a Day with Go](https://blog.twitter.com/engineering/en_us/a/2015/handling-five-billion-sessions-a-day-in-real-time.html)
* [A C++ developer looks at Go](https://www.murrayc.com/permalink/2017/06/26/a-c-developer-looks-at-go-the-programming-language-part-1-simple-features/)
<div style="page-break-after: always;"></div>
> For more tutorials: [https://blog.learngoprogramming.com](https://blog.learngoprogramming.com)
>
> Copyright © 2019 Inanc Gumus
>
> Learn Go Programming Course
>
> [Click here to read the license.](https://creativecommons.org/licenses/by-nc-sa/4.0/)

Binary file not shown.

View File

@ -1,6 +1,8 @@
# Cheatsheet: Write your First Go Program # Cheatsheet: Write your First Go Program
Hi! For reference, you can store this cheatsheet after you take the lectures in this section. Hi!
For reference, you can store this cheatsheet after you take the lectures in this section.
You can also print this cheatsheet and then follow the video lectures in this section along with it. You can also print this cheatsheet and then follow the video lectures in this section along with it.
@ -20,9 +22,7 @@ Enjoy!
* List files in a directory: `ls` * List files in a directory: `ls`
--- ## BUILDING & RUNNING GO PROGRAMS:
## BUILDING & RUNNING PROGRAMS:
* **Build a Go program:** * **Build a Go program:**
@ -34,11 +34,6 @@ Enjoy!
* While inside a program directory, type: * While inside a program directory, type:
* `go run main.go` * `go run main.go`
<br /><br /><br /><br />
_See the next page..._
<div style="page-break-after: always;"></div>
## WHAT IS $GOPATH? ## WHAT IS $GOPATH?
* _$GOPATH_ is an environment variable which points to a directory where the downloaded and your own Go files are stored. * _$GOPATH_ is an environment variable which points to a directory where the downloaded and your own Go files are stored.
@ -59,8 +54,6 @@ _See the next page..._
* _You might want to add this to your `PATH` environment variable if it's not there already._ * _You might want to add this to your `PATH` environment variable if it's not there already._
---
## WHERE YOU SHOULD PUT YOUR SOURCE FILES? ## WHERE YOU SHOULD PUT YOUR SOURCE FILES?
* `$GOPATH/src/github.com/yourUsername/programDirectory` * `$GOPATH/src/github.com/yourUsername/programDirectory`
@ -73,11 +66,6 @@ _See the next page..._
* And, let's say that I've a program named hello, then I put it under this directory: `~/go/src/github.com/inancgumus/hello` * And, let's say that I've a program named hello, then I put it under this directory: `~/go/src/github.com/inancgumus/hello`
<br /><br /><br /><br />
_See the next page..._
<div style="page-break-after: always;"></div>
## FIRST PROGRAM ## FIRST PROGRAM
* **Create directories:** * **Create directories:**
@ -110,11 +98,9 @@ func main() {
That's all! Enjoy! That's all! Enjoy!
---
## NOTE: ## NOTE:
* BTW, There's a new *Go Modules* support which allows you to run your programs in any directory that you want. After the section ends, you'll also find an information about it. * There is a new *Go Modules* support that allows you to run your programs in any directory that you want. It's still an experimental feature, when it stabilizes, I'll update the course and include Go Modules as well.
> For more tutorials: [https://blog.learngoprogramming.com](https://blog.learngoprogramming.com) > For more tutorials: [https://blog.learngoprogramming.com](https://blog.learngoprogramming.com)
> >

Binary file not shown.

View File

@ -29,7 +29,7 @@ func main() {
// Println function of "fmt" package becomes available // Println function of "fmt" package becomes available
// Look at what it looks like by typing in the console: // Look at what it looks like by typing in the console:
// godoc -src fmt Println // go doc -src fmt Println
// Println is just an exported function from // Println is just an exported function from
// "fmt" package // "fmt" package

View File

@ -33,7 +33,7 @@ func main() {
// Println function of "fmt" package becomes available // Println function of "fmt" package becomes available
// Look at what it looks like by typing in the console: // Look at what it looks like by typing in the console:
// godoc -src fmt Println // go doc -src fmt Println
// Println is just an exported function from // Println is just an exported function from
// "fmt" package // "fmt" package

View File

@ -43,15 +43,15 @@ func main() {
"pngs/empty.png", "pngs/empty.png",
} }
pngs := detectPNG(files) pngs := detect(files)
fmt.Printf("Correct PNG Files:\n") fmt.Printf("Correct Files:\n")
for _, png := range pngs { for _, png := range pngs {
fmt.Printf(" + %s\n", png) fmt.Printf(" + %s\n", png)
} }
} }
func detectPNG(filenames []string) (pngs []string) { func detect(filenames []string) (pngs []string) {
const pngHeader = "\x89PNG\r\n\x1a\n" const pngHeader = "\x89PNG\r\n\x1a\n"
buf := make([]byte, len(pngHeader)) buf := make([]byte, len(pngHeader))

View File

@ -1 +0,0 @@
# TODO

View File

@ -48,6 +48,9 @@ func (s *summary) iterator() (next func() bool, cur func() result) {
var last int var last int
next = func() bool { next = func() bool {
// done := len(s.domains) > last
// last++
// return done
defer func() { last++ }() defer func() { last++ }()
return len(s.domains) > last return len(s.domains) > last
} }

View File

@ -1,208 +0,0 @@
# ROADMAP FOR EXPERIENCED DEVELOPERS
Hi!
If you're an experienced developer, you might want to follow this roadmap while taking this course.
This course starts from the most basics than advances toward the end, step by step. So, the complexity of the topics increases on each step. I've intentionally designed it so to make it easy for everyone.
If you think some of the topics are easy for you, then watch the recap lectures and skip the lectures in that section altogether, you can always come back to them later.
BTW, if you're also wondering about why should you learn Go, then scroll down to the bottom of this article.
---
## Basic Configuration
1. **Git clone the repo**
https://github.com/inancgumus/learngo
2. Read **"Side Note About Go Modules"** part right after the outline below.
1. If you also want to learn about GOPATH, watch: "Learn about GOPATH and Go directory structure" lecture
3. You might want to **increase the video speed**.
1. If you don't know how, [here](https://support.udemy.com/hc/en-us/articles/229231247-Change-the-Video-Speed)'s how you can do that.
---
## Roadmap for Experienced Developers
👉**Then, watch the following lectures in this order.**
### Getting Started!
* Install Go
* Configure: Visual Studio Code
### PART I — Write Your First Go Program
* Code your first program
* Compile and Run your first program using Go Build
* Run your first program using Go Run
### PART I — Packages, Scopes and Importing
* Packages - Learn how to run multiple files
* Packages - Executable vs. Library Packages
* Importing and File Scope
* Importing - Rename imported packages
### PART I — Statements, Expressions, and Comments
* Go Doc: Generate documentation automatically from your code
### PART I — Create Your First Library Package
* Watch all the lectures here.
### PART II — Variables and Type Conversion
* Zero-Values
* Variable Declaration Examples (Code Along)
* Example: Greeter: Get input from the command-line
* Short Declaration: Initialization & Type Inference
* Short Declaration: Package Scope
* Redeclaration
* When to use short declaration?
* Recap
* Naming Things: Recommendations
### PART II — Printing Formatted Output using Printf
* Printf: Recap: Let's summarize
### PART II — Numbers and Strings
* Numbers: IncDec: Easy Way to Increase and Decrease
* Strings: Raw String Literals
* Strings: Get the length of a string and Introduction to Runes
### PART II — Deeper Into The Go Type System
* Watch all the lectures here.
### Constants
* Recap: Constants
* Typeless Constants: Understanding Typelessness
* Typeless Constants: Default Types
* Example: Real-Life Usage
* IOTA: Constant Number Generator
### PART III — If Statement and Error Handling
* Recap: If Statement
* Then watch all the lectures starting with:
* Error Handling Basics: Introduction
### PART III — Switch Statement
* Fallthrough Statement
* Recap
### PART III — Loops
* Continue Statement and Debugging with Delve
* For Statement: Looping over Slices
* For Range Clause
* Recap: Loops
* Project: Lucky Number Part I: Randomization
* Project: Lucky Number Part II: Seeding with time
* Project: Lucky Number Part III
* Labeled Statements: Labeled Break and Continue
* Labeled Statements: Break from a Switch
* Labeled Statements: Goto (Optional)
The rest is coming soon.
---
## SIDE-NOTE ABOUT GO MODULES
Since Go 1.11, there's a new feature called Go Modules (_it was known as vgo before_).
With Go Modules, you are not required to put your source code files under $GOPATH anymore. You can put them in any directory that you want.
If you're a power user and want to try this **experimental feature**, just put your programs in a directory outside of `$GOPATH` (this is very important). And then run this to initialize your module:
`go mod init [module-name]`
Afterward, while in this directory, Go assumes that it's like you're under your GOPATH. However, you'll be under your module's directory. You can create as many modules as you want. However, keep it simple and use only one module for now.
### EXAMPLE:
1. Let's say that my module directory is under: `~/Desktop/go`
2. Also, my github.com username is: `inancgumus`
3. And, I have a program called: `hello`
4. So, I put my hello program under: `~/Desktop/go/hello`
5. Then, while under `~/Desktop/go` I would call mod init like this:
`go mod init github.com/inancgumus`
6. So, if I want to build my program, I'll go into `~/Desktop/go/hello`
7. Moreover, I can use usual go build and go run commands there.
8. By doing so, I've created a single module for all my projects. As I've said, you can also create separate modules for each of your projects, like this:
`go mod init github.com/inancgumus/hello`
For more information check out [this wiki article](https://github.com/golang/go/wiki/Modules).
---
## Why you should learn Go?
If you're curious about why you should learn Go, then check out this summary here.
**In summary:** Go is easy as Python and Javascript and it's as fast as C/C++. It's more enjoyable to work with Go than C/C++. You can go low-level, or you can stay high-level.
### WHAT GO IS USED FOR?
Go is used mostly by web companies: Google, Facebook, Twitter, Uber, Apple, Dropbox, Soundcloud, Medium, Mozilla Firefox, Github, Docker, Kubernetes, and Heroku.
**Go is best for:** Cross-Platform Command-line Tools, Distributed Network Applications, Cloud technologies like Microservices and Serverless, Web APIs, Database Engines, Big-Data Processing Pipelines, Embedded Development, and so on.
**Go is not best for (but doable):** Desktop Apps, Writing Operating Systems, Kernel Drivers, Game Development, etc.
### WHO DESIGNED GO?
Go designed by one of the most influential people in the industry:
* Unix: Ken Thompson
* UTF-8, Plan 9: Rob Pike
* Hotspot JVM (Java Virtual Machine): Robert Griesemer
### WHAT YOU CAN DO WITH GO?
* [Network Driver written in Go](https://www.net.in.tum.de/fileadmin/bibtex/publications/theses/2018-ixy-go.pdf) (_only 10% penalty compared to C driver_)
* [Google gVisor](https://cloud.google.com/blog/products/gcp/open-sourcing-gvisor-a-sandboxed-container-runtime) (_User space kernel written in Go_)
* [Multi-platform Nintendo emulator](https://humpheh.github.io/goboy/)
* [Docker: Container system](https://github.com/moby/moby)
* [Kubernetes: Container scheduling and management](https://github.com/kubernetes/kubernetes)
* VM image deduplication utility
* Chat server
* RUM beacon collector
* Time-series database engine, a client for it, commnad-line tools, etc.
* Map-reduce library
* Clustered front-end-optimizing reverse proxy with on the fly content rewriting, image resizing, caching, Lua event handler execution (all multi-tenant)
* Geographically distributed reverse proxy CDN nodes
* Health management daemon with event handlers and peer to peer reporting
* Pure Go DNS server
* API backend that interfaces with MySQL
* Linux process capture/restore utility
* Reverse Proxy to mask our asset server from clients.
* HTML -> PDF converter for invoice generation.
* URL shortener like tinyurl.com and goo.gl
* SMS messaging service.
* Credit Card payment gateway
* JSON Web Token package
* On the fly image processing services
* 3d render farm/content production pipeline (pretty large project)
* Production lxc container deployment
* Automated testing management
Reference: [This reddit post](https://www.reddit.com/r/golang/comments/5nac2b/what_have_you_used_go_for_in_your_professional/).
### [From Eight years of Go post](https://blog.golang.org/8years):
> Today, **every single cloud company has critical components of their cloud infrastructure implemented in Go** including Google Cloud, AWS, Microsoft Azure, Heroku, and many others. Go is a key part of cloud companies like Alibaba, Cloudflare, and Dropbox. Go is a critical part of open infrastructure including Kubernetes, Cloud Foundry, Openshift, NATS, Docker, Istio, Etcd, Consul, Juju and many more. Companies are increasingly choosing Go, to build cloud infrastructure solutions.
### HOW MUCH YOU CAN EARN?
+ [Go Salaries in US](https://www.payscale.com/research/US/Skill=Go_(Golang)_Programming_Language/Salary)
### Check out these posts for more information:
* [About Go: An Overview](https://blog.learngoprogramming.com/about-go-language-an-overview-f0bee143597c)
* [Why you should learn Go?](https://medium.com/@kevalpatel2106/why-should-you-learn-go-f607681fad65)
* [Emerging language of cloud Infrastructure](https://redmonk.com/dberkholz/2014/03/18/go-the-emerging-language-of-cloud-infrastructure/)
* [Companies using Go](https://github.com/golang/go/wiki/GoUsers)
* [Eight years of Go](https://blog.golang.org/8years)
* [Twitter: Handling Five Billion Session in a Day with Go](https://blog.twitter.com/engineering/en_us/a/2015/handling-five-billion-sessions-a-day-in-real-time.html)
* [A C++ developer looks at Go](https://www.murrayc.com/permalink/2017/06/26/a-c-developer-looks-at-go-the-programming-language-part-1-simple-features/)