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:
dchapes: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.
Neurotic_Goose: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".
thewhitetulip:I started learning by using the Cobra library to build a little CLI tool. They make it super easy to get up and running.
yaourtSS: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!
thewhitetulip: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!
whizack: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 :)
Just for Func is a pretty solid intro.
