Recommendations for learning Go through projects.

polaris · 2017-03-22 17:00:09 · 704 次点击    
这是一个分享于 2017-03-22 17:00:09 的资源,其中的信息可能已经有所发展或是发生改变。

I have 2-3 years experience in Python and would like to pick up the Go lang. I do not have much knowledge about pointers and concurrency. I have completed the Tour of Go and didn't face many difficulties until Maps. How do I learn more about the internals of Go while building some projects? What would be some good resources for a project-driven Go learning method? Suggestions for books, videos, blogs etc are welcomed.


评论:

NeverUse-YouPromised:

Find a Python program or script you love and translate it, line-by-line, into Go. In my case, it was this program. That program includes regular expressions, set operations, object-oriented programming, intricacies on the details of pass-by-value, list comprehensions...it forced me right into the Go way of thinking.

dchapes:

line-by-line

IMO it's not a good idea to translate programs this way. You end up with a Python program shoe-horned into Go instead of a Go program. Different languages have different idioms and ways of doing things and ideally you should translate between those idioms which is a much higher level than "line-by-line".

Neurotic_Goose:

I started learning by using the Cobra library to build a little CLI tool. They make it super easy to get up and running.

https://github.com/spf13/cobra

thewhitetulip:

It really depends as to what you are planning to learn, writing cli apps/webapp/ML/AI etc

I would recommend taking a look around what tools you require and aren't existing yet. For instance, I use an android phone with termux terminal, and I wanted a good todo list manager which'll sync up with my machine, so I wrote one in Go, I use the cli in termux which then syncs with syncthing. Thus, I have a small app which I use in day to day life.

I also wrote a todo list manager (https://github.com/thewhitetulip/Tasks) when I was learning webdev, then I wrote this (https://github.com/thewhitetulip/Tasks-vue) when I was learning the VueJS.

The key is to build something you use, and if it is really a timesaver, then you can show it to others and they'd use it too.

I wrote a small guide , https://github.com/thewhitetulip/web-dev-golang-anti-textbook/, it aims to teach how to write webapps to total newcomers to web development.

There is a quote attributed to Einstein, "you haven't really understood a topic until you can explain it to your grandmother", what I learned in my journey is that you'll learn faster if you teach others.

All the best!

yaourtSS:

Hi! Do you know something about Go usage in cryptography? I found one but now it's too hard for me because I'm a beginner in this language. I'm not really into webdev, but I love cli tools and crypto. Can you also recommend some books/guides/repos related to the topic described above, please? Thank in advance!

thewhitetulip:

I am not totally sure as to what you mean by Go usage in cryptography, what is it that you exactly want to do. Please forgive my naivety, I have not worked in cryptography.

What is it that you want to build? Do you want to break crypto algo or do you want to build them?

Make sure you read https://awesome-go.com it has the largest collection of libraries. Do let me know if you need any other help :)

whizack:

Just for Func is a pretty solid intro.


入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

704 次点击  
加入收藏 微博
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传