How do I start learning Go?

xuanbao · · 621 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>I am an experienced developer, a web developer precisely. I am now willing to learn Golang. What I check so far that Go can be used both for system programming and Web Application. I want to know which route should I adapt and which Open source project will you recommend me to check for code and participation?</p> <p><strong>Update</strong></p> <p>In short, should I opt for Web Programming route directly or learn it for both sys programming and web?</p> <p>Thanks</p> <hr/>**评论:**<br/><br/>amazingsammy: <pre><p>There are two courses on Udemy by Todd Mcleod. Between the two of them, it&#39;s like 20 hours of course material. </p> <p>He covers absolutely everything you&#39;ll want to do with the language, especially in the web module, which is the second piece. I&#39;ve taken both of these, and they&#39;re the best I&#39;ve seen. </p> <p>If you want to do it the hard way, you can do what I did. Start with the manual, and bang your head against the stuff in github. But these days, there&#39;s a lot of good material out there, in a lot of places. It all comes down to how you prefer to learn.</p></pre>joncalhoun: <pre><p>I&#39;ve heard great things about both of these, so I def recommend checking them out. Todd does a great job of introducing basic programming techniques with Go in his first course.</p> <p>Todd&#39;s second course - the one covering web development - focuses a lot on the core parts of the net/http library and how to use them. That is, each program you write will be self-contained in one single go file and will focus on teaching one specific thing.</p> <p>While this has a ton of value, I personally prefer to learn how to put all of those pieces together while I am learning about them. The best example of where the former can fall short is when building an authentication system. There are tons of small pieces you need to get right to build a truly secure authentication system, so it is much better to not only learn how each piece works, but to also learn how to put them all together to build the finished product.</p> <p>That&#39;s where my course is meant to fit in - Web Development with Go (<a href="https://www.usegolang.com/" rel="nofollow">https://www.usegolang.com/</a>). In it I teach you how to go from a super simple (15 lines of code) web application all the way to a production ready web application deployed on Digital ocean with SSL and everything.</p> <p>It is very long and covers a ton of material, but it is layed out in a way that you shouldn&#39;t ever just feel like we are doing things for no reason. We write basic code early and then constantly refactor and update our code as we introduce new concepts and see better ways to structure out code so following along feels similar to gradually learning by reading docs and examples but without all the confusion or stumbling around. I often even go to the docs and show you how I figured out what functions to use before actually using them (this happens more in the screencasts because it is easier to do in video format). In short it is meant to feel like a natural learning curve while avoiding the feeling of being stuck or lost. </p> <p>If you want to see some samples the first 2 - 2.5hrs of screencasts are available online completely free on youtube - <a href="https://www.youtube.com/playlist?list=PLVEltXlEeWglOJ42pCxf22YVyxkzan3Xg" rel="nofollow">https://www.youtube.com/playlist?list=PLVEltXlEeWglOJ42pCxf22YVyxkzan3Xg</a> It starts on chapter 2 becuase that is where the first piece of code is written in the book.</p> <p>You can also get a free sample of the first few chapters of the book if you prefer text - <a href="https://www.usegolang.com/#sample" rel="nofollow">https://www.usegolang.com/#sample</a> - or message me if you prefer to download epub, PDF, or Kindle format.</p></pre>metaperl: <pre><blockquote> <p>That&#39;s where my course is meant to fit in - Web Development with Go (<a href="https://www.usegolang.com/" rel="nofollow">https://www.usegolang.com/</a>). In it I teach you how to go from a super simple (15 lines of code) web application all the way to a production ready web application deployed on Digital ocean with SSL and everything.</p> </blockquote> <p>I looked over the TOC. It appears that this is server-side web development instead of single page apps based around client-side rendering.</p> <p>It is possible to compile to JS / WebAssembly from Go to create modern single page apps?</p></pre>joncalhoun: <pre><p>You can create a single page app with any backend language. You just may end up using webpack or similar to compile your front-end assets and then your js talks to the server via APIs.</p> <p>Do you have a specific question about how to do that? Or is there something you are worried you won&#39;t be able to do?</p> <p>I specifically don&#39;t teach this because it requires me to teach two fairly complex technologies at once, and for like 80%+ of web apps it is overkill. Once you understand how everything works in the book it is fairly easily to go from rendering html pages to instead returning JSON and using it as an API for your frontend. You can then start to learn front-end js frameworks and connect them to your API, but all of that is JavaScript and is hardly​ related to Go. </p> <p>If you are a beginner, trying to learn both is probably going to make things harder. If you really want to learn a front-end js framework I would recommend focusing on front-end or backend first with just enough of the other to get by, then once you are somewhat comfortable there go start working on the other.</p></pre>Cykon: <pre><p>This was the most helpful resource in getting me started with the golang fundamentals <a href="https://gobyexample.com/" rel="nofollow">https://gobyexample.com/</a></p></pre>ayan_baqur: <pre><p>I liked <a href="http://openmymind.net/The-Little-Go-Book/" rel="nofollow">The Little Go Book</a> It&#39;s a great intro to the weirdness of the language.</p></pre>thewhitetulip: <pre><p>book: <a href="https://github.com/thewhitetulip/web-dev-golang-anti-textbook/" rel="nofollow">https://github.com/thewhitetulip/web-dev-golang-anti-textbook/</a></p> <p>youtube series: <a href="https://www.youtube.com/playlist?list=PL41psiCma00wgiTKkAZwJiwtLTdcyEyc4" rel="nofollow">https://www.youtube.com/playlist?list=PL41psiCma00wgiTKkAZwJiwtLTdcyEyc4</a></p> <p>code: <a href="http://github.com/thewhitetulip/Tasks" rel="nofollow">http://github.com/thewhitetulip/Tasks</a></p> <p>Enjoy learning!</p></pre>deusmetallum: <pre><p>I found that the best resource was the official Go tour and the Go PKG documentation. Once you understand the basics (slices are awesome, pointers doubly so), then the PKG documentation of the standard library becomes a joy to read, and makes coding in Go extremely easy.</p></pre>Yojihito: <pre><blockquote> <p>What I check so far that Go can be used both for system programming and Web Application</p> </blockquote> <p>No. Google meant something different with &#34;system programming&#34;, more in the way of the &#34;server system&#34;.</p> <p>Stuff you can do with C/C++/D/Rust you can&#39;t do in Go. Use it for the backend, server, web stuff and you will be fine.</p></pre>pknerd: <pre><p>Like device drivers or low level hardware access?</p></pre>Yojihito: <pre><p>Yes, impossible with Go, you don&#39;t build browsers, editors, OS, drivers, databases etc. Also you wouldn&#39;t do any graphical stuff (no UI framework).</p></pre>pknerd: <pre><p>Ethereum blockchain has been built in Go.</p></pre>Yojihito: <pre><p>Isn&#39;t that just a server application too? A more complex one, yes but still a CLI server application.</p></pre>pknerd: <pre><p>it&#39;s not <em>just</em> a sever application :)</p> <p>Anyway check this out as well: <a href="https://gobot.io/" rel="nofollow">https://gobot.io/</a></p></pre>Yojihito: <pre><blockquote> <p>framework for robots, drones, and the Internet of Things (IoT)</p> </blockquote> <p>Those are all things that</p> <ul> <li><p>have low specs (memory, cpu), especially IoT devices ... running Go binaries there seems weird if not impossible</p></li> <li><p>probably need deterministic calculations so no Go GC (drones, robots)</p></li> </ul> <p>The Arduino site says &#34;SRAM 2k bytes&#34; (ATmega328) and &#34;SRAM 8k bytes&#34; (ATmega2560). The Go GC alone is several megabytes.</p> <p>I&#39;m not conviced :p.</p></pre>

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

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