<p>What are your problems learning Go as a beginner?</p>
<p>I would like to know what are the most needed tutorials and books for Go beginners in 2017. </p>
<p>I also would like to know what holds you back from learning Go right now and for what you would like to use Go in the future if you could...</p>
<p>Which topic which isn't handled by the usually Go resources is needed for beginners any suggestion would help me..</p>
<hr/>**评论:**<br/><br/>deusmetallum: <pre><p>The only things I used were the golang tour, gobyexample, the go wiki tutorial and the Json and Go blogpost.</p>
<p>Everything else is just fluff that I neither go back to nor rely on. Once you've looked through the above, the /pkg reference is pretty much all you need.</p></pre>AngryGoNerd: <pre><p>Okay great thanks for the post!</p>
<p>If you don't mind.. I would like to know which programming languages did you learn before and how long ave you been programmer?</p></pre>deusmetallum: <pre><p>I wouldn't call myself a programmer, I'm a DevOps so really I'm a sysad who has then decided to learn how to code to make life easier.</p>
<p>I started with bits of Bash, then moved on to Python, and now I do almost everything in Go. I've been using go for about 8 months and I would say I'm relatively proficient in it now.</p></pre>AngryGoNerd: <pre><p>Ahh okay.. Do you really thing other tutorials and books for Go beginners are fluff if they're not sysadmins or DevOps but are programming beginners who want to learn howto wrte their first programms?</p></pre>deusmetallum: <pre><p>Thing is, I don't think Go is a language for beginners. Python certainly is, especially because you have the python console where you can get immediate results. I would tell people to start there, and then work thier way to Go when they're familiar with programming fundamentals, such as flow control, functions, method, etc.</p></pre>twetewat: <pre><p>I completely disagree. Go's fast compiler/strict typing/fmt tools etc makes programming way easier to start with than any other dynamic programming language. It's like having a piano teacher hitting you on your fingers when you screw up even on the basics.</p></pre>AngryGoNerd: <pre><p>Nice point.. I also think that Go fast way to to compile and directly see where I made mistakes is a great way following good practices and rules even on the basics... I wonder why so many people favor Python all the time... Sure it is longer out but..some aspects I don't think are easier then Go for example:</p>
<p><a href="https://en.wikipedia.org/wiki/Python_syntax_and_semantics#Indentation" rel="nofollow">Python Syntax: Indention</a></p></pre>breamoreboy: <pre><blockquote>
<p>I wonder why so many people favor Python all the time</p>
</blockquote>
<p>Programmer productivity as in time equals money.</p></pre>AngryGoNerd: <pre><p>Okay nice point more tools more packages more programmers coding it but as a beginner to programming do you really think the the productivity level is really higher in Python vs Go?</p>
<p>I terms on howto deal with packages and vendoring in Go a clear point to Python but writing code in Python or in Go I don't think Python has many advantages in terms of Rapid Application Development I think they're equal</p></pre>breamoreboy: <pre><p>Give me Python's dynamic typing than having to fight the strait jacket of dumb static typing that doesn't stop run time panics.</p></pre>AngryGoNerd: <pre><p>Hmm so you think one of Go's problems is that it lack a lets say standard REPL like in Python , Ruby or other Scripting languages? Or are there more points like lack of packages against Python?</p></pre>TrueFurby: <pre><p>"Lack of REPL" as you called it is most definitely not a problem, rather huge advantage. Scripting languages cannot be compared to compiled languages like Go because binary witch machine code is faster than executing scripts. </p>
<p>In Go there are various projects that use REPL, like <a href="https://github.com/mattn/anko" rel="nofollow">anko</a>, which basically introduces lightweight go-like syntax to be used in runtime or as script.</p></pre>AngryGoNerd: <pre><p>I also don't think Go needs a REPL...
Of course the execution of an binary built by the Go compiler is faster executed than running an Python program for example..</p>
<p>I know that you can use a REPL in go like for example <a href="https://github.com/motemen/gore" rel="nofollow">gore</a> I just wanted to know why sometimes other people familar with other programming don't recommend Go as a beginner language </p></pre>TrueFurby: <pre><p>I haven't seen many people discouraging others from learning Go as their first language. I think it might actually be good to start with Go, since it is more simplistic. Don't let other decide for you. Try it. Dive in. If you won't like it you can switch. There is no such thing as bad experience.</p></pre>AngryGoNerd: <pre><p>I didn't want to make the statement Go isn't a great beginner language indeed I think it is.. but sometimes I hear the argument that Python and Ruby are easier to learn sometimes there seems to be much debate about it: <a href="https://www.quora.com/Should-I-learn-Golang-or-Python-in-2017" rel="nofollow">Quora</a></p></pre>breamoreboy: <pre><p>IMHO the Go playground is a more than adequate equvalent to a REPL.</p></pre>AngryGoNerd: <pre><p>Its even a more social one because you can share the playground on the web directly</p></pre>r2p42: <pre><p>I struggle with finding the proper way to design multi-threaded applications/packages using channels. It is easy with mutexes since I can apply my knowledge from other languages. But with channels... There are the questions when it is actually useful to let something run in a go routine, which messages should be passed and how and when to use deadlock wakegroups and how properly....</p>
<p>Many tutorials count to 100. But I have a hard time turning this stuff into real world code with a broader interface than ".AddOne()".</p>
<p>Hope that makes sense.</p></pre>AngryGoNerd: <pre><p>Did you read this? <a href="https://github.com/golang/go/wiki/MutexOrChannel" rel="nofollow">MutexOrChannel</a></p></pre>r2p42: <pre><p>Read it now and I agree with the classification for channels and mutexes. But since you asked for missing resources for beginners, I would summarize my first reply like this:</p>
<p>Helpful for me would be a tutorial based on a real world scenario where proper project/interface/struct design is shown and described.</p>
<p>I am working on a raft implementation. When I am ready, I'll try to get reviews from somewhere.</p></pre>AngryGoNerd: <pre><p>Feel free to share the raft implementation with me when you're ready!
Do you have link ano GitHub to this? I know finding real world examples of Go code is sometimes tough.. summerizing some of the problems for beginners is the reason i started this...</p></pre>govision: <pre><p>I use these <a href="https://docs.google.com/document/d/1Zb9GCWPKeEJ4Dyn2TkT-O3wJ8AFc-IMxZzTugNCjr-8/edit?usp=drivesdk" rel="nofollow">https://docs.google.com/document/d/1Zb9GCWPKeEJ4Dyn2TkT-O3wJ8AFc-IMxZzTugNCjr-8/edit?usp=drivesdk</a></p>
<p>But I more then super suggest this.</p>
<p><a href="http://www.informit.com/store/ultimate-go-programming-livelessons-9780134757483" rel="nofollow">http://www.informit.com/store/ultimate-go-programming-livelessons-9780134757483</a></p></pre>AngryGoNerd: <pre><p>Thanks for sharing this!</p>
<p>Your Advocates Doc is ver useful for beginners! Do you also have a Markdown version of this on Github?</p>
<p>And yes William Kennedy is a genius I read <a href="https://www.amazon.com/Go-Action-William-Kennedy/dp/1617291781" rel="nofollow">Go in Action</a> and in my opinion its one of the best books about Go around..</p></pre>jsteenb2: <pre><p>The best place to get started is the the Go Learn wiki itself. Check it out <a href="https://github.com/golang/go/wiki/Learn" rel="nofollow">here</a>.</p>
<p>I've also put together a bunch of resources I've used throughout my time with Go, you can check those out here <a href="https://www.berged.com/blog/go-time/" rel="nofollow">https://www.berged.com/blog/go-time/</a></p>
<p>Good luck out there</p></pre>ShelterScelter: <pre><p>The Go Programming Language book and The ultimate Go course as n Oreilly</p></pre>xubu42: <pre><p>I've been programming in python and R for about 4 years. I've done mostly data stuff, e.g. database queries, file manipulation, ETL, analysis, plotting, but also some web scraping and API design. In those languages, I rarely if ever created my own data structures or defined the schema for JSON responses. The both have very comprehensive standard libraries, but they also very much encourage leaning on external libraries. Coming to Go, I'm really impressed with all the developer tools that make programming much easier. The hardest part for me has been understanding when to use built in types vs creating custom types, wrapping my head around pointers and interfaces, and adjusting to debugging without a REPL (in that order of most difficult to least). </p></pre>bestfoodnearme: <pre><p>In the sense of a beginner trying to merge a C project and a Go project, having some solid tutorials with cgo would be nice.</p></pre>AngryGoNerd: <pre><p>I agree there is a need for more using C with Go tutorials one of the best beginner friendly things I found on the web is this presentation:</p>
<p><a href="http://akrennmair.github.io/golang-cgo-slides/#1" rel="nofollow">Go & cgo</a> </p>
<p>I still take tis reddit as an input source for an new Go beginner guide or book and input like this really helps TY! </p></pre>AngryGoNerd: <pre><p>Again feel free to comment on this post! ;)</p></pre>apv0: <pre><p>Is your question directed at beginners coming from another language, or complete beginners to programming?</p></pre>AngryGoNerd: <pre><p>I would like to know what both sides have to tell.. So if you are a complete beginner to programming feel free to comment ;)</p></pre>apv0: <pre><p>I have just started learning go as a beginner to programming, the only background knowledge I have is some C and HTML/JavaScript from school. So far I have read An Introduction to Programming in Go by Caleb Doxsey and completed A tour of Go. While I understand the basics, syntax and am able to complete the exercises, I feel there is a large gap in the next step. There is no middle ground in the exercises, either they are trivial or broad.
I still have to read "The Go Programming Language by by Alan A. A. Donovan and Brian Kernighan" and "Go in Action
Book by Brian Ketelsen, Erik St. Martin, and William Kennedy". So I am not sure if my forthcoming suggestions are implemented already in those books. But what I would really like is a book with more "exhaustive" examples and exercises. Example: We just learned about Arrays, Slices, and Maps. When am I supposed to use a Map vs an Array? Later or I might have the question, if I pass and slice to a function, will it have access to the rest of the Array? It may be trivial but if there are at least varying exercises and solutions at the end of the chapter which cover a decent amount of variations in implementation, I think that would really help a beginner. This goes on to interfaces/structs/methods, I find there are not sufficient examples of intermediate difficulty. I understand Programming has a culture of learn it your self, research and read code from Github/Stack to find a solution. Break/Fix/Learn is great, but it can lead to a lot of unnecessary work later on, when a fundamental or trivial iota of knowledge is left for a new programmer to learn. </p>
<p>Thank You for your time, and good luck in you endeavors. </p></pre>
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
0 回复
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传