Best way to try to learn Go programming

polaris · · 535 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>I&#39;m very new to programming. I&#39;ve been in the IT field for the past 6 years. I&#39;ve been working mostly with servers I haven&#39;t done any programming. Now I want to switch my career as a Go developer. How should I start this journey? I don&#39;t have any experience with coding. Need help please</p> <hr/>**评论:**<br/><br/>Southclaws: <pre><p>I&#39;d say, first of all figure out what you want to do. Go is a great language and I love it but - like all languages - it&#39;s not universal and won&#39;t fit everywhere.</p> <p>Go is great for the web. Connecting things, running servers, talking to servers. It&#39;s also pretty good for command line apps, daemons, tools and stuff that has to be reliable. It&#39;s not a scripting language and isn&#39;t really suited to knocking up a quick script like you would with maybe Python/Ruby/Perl.</p> <p>It&#39;s growing in the data science community and things are appearing for UI but it&#39;s primarily a server-sided language.</p> <p>If you&#39;re still interested then great! Go check out the gobyexample site, the Tour of Go and some videos by Rob Pike and Francesco Campoy - I&#39;d recommend &#34;Concurrency is not parallelism&#34; to get your head around the concepts of Goroutines/concurrency and the &#34;Just for Func&#34; series which is a great way to learn programming patterns and good practices.</p> <p>Hope you enjoy the language! I&#39;d recommend VS Code with the official Go tools extension (by luke-something, forgot the name but it&#39;s definitely a luke) the static analysis and formatting tools for Go are really what make developing with it so easy.</p></pre>SamJTWIV: <pre><p>Ill second the VS Code suggestion. I think VS Code is the best thing microsoft has done in years.</p></pre>carsncode: <pre><p>I resisted it for a while, but, damn if they didn&#39;t fork an open-source project and actually make it drastically better and not all... you know... Microsoft-y.</p></pre>joesacher: <pre><p>Jet Brains also has their <a href="https://www.jetbrains.com/go/" rel="nofollow">Gogland in preview now</a>. I love PyCharm and just recently started trying out Go with it. </p></pre>jart1987: <pre><p><a href="https://tour.golang.org/welcome/1" rel="nofollow">https://tour.golang.org/welcome/1</a></p></pre>akavel: <pre><p>Extending the above comment, I&#39;d suggest:</p> <ol> <li><strong><a href="https://tour.golang.org" rel="nofollow">https://tour.golang.org</a></strong> — indeed</li> <li><a href="https://golang.org/doc/effective_go.html" rel="nofollow">https://golang.org/doc/effective_go.html</a></li> <li><a href="https://golang.org/ref/spec" rel="nofollow">https://golang.org/ref/spec</a> (don&#39;t be afraid, it&#39;s surprisingly short!)</li> <li>Ideally, read all <a href="https://golang.org/pkg" rel="nofollow">https://golang.org/pkg</a>, or at least the ones most interesting to you and/or important. The rest can be left for periodical reading, or even just on &#34;as needed&#34; basis. The docs are <em>very</em> good in the packages, many of them strive to have some kind of a guide and lots of example snippets.</li> <li>Then, for &#34;intermediate&#34; level, to learn more about good practices, style, common patterns, etc., I&#39;d possibly suggest, in somewhat random order: <ul> <li><a href="https://blog.golang.org" rel="nofollow">https://blog.golang.org</a> has some worthy articles about some patterns and style, mostly in older articles (though OTOH they can sometimes be slightly outdated, esp. pre-1.0 ones)</li> <li><a href="https://github.com/golang/go/wiki/Style" rel="nofollow">https://github.com/golang/go/wiki/Style</a></li> <li><a href="https://golang.org/cmd" rel="nofollow">https://golang.org/cmd</a> — !!! many highly useful tools! for many of them, docs are unfortunately split between golang.org and <code>--help</code></li> </ul></li> </ol></pre>tmornini: <pre><p>There&#39;s only one way I know to learn a language: write a program with it.</p> <p>If you have code you want to write, jump in!</p></pre>deusmetallum: <pre><p>I&#39;m not sure how well suited Go is to new programmers, but the official go tour is very good.</p></pre>carsncode: <pre><p>Honestly, I think Go is <em>great</em> for new programmers. It&#39;s simple, it&#39;s straightforward, it has no surprises, most simple errors are caught immediately at compile time, there is exactly one way to do most things, the standard library is very well-equipped and well-documented, and there&#39;s plenty of sample code out there. I&#39;d highly recommend it as a first language. It might even be easier for new developers than someone coming from an object-oriented language because there&#39;s less to unlearn.</p></pre>_foobaz: <pre><p>You need a pet project to code up, that&#39;s my preferred way of learning a new programming language. </p> <p>Over the last couple of years I dicked around with go enough to know the syntax and how to read other people&#39;s code, but it wasn&#39;t until I had a few small, spare-time projects under my belt that I felt I really <em>knew</em> the language.</p> <p>Go is a popular language for microservices architecture and for writing simple web services in general. If you end up working with go you&#39;ll probably be doing those things, so read up and practice!</p> <p>Above all else, Always Be Coding.</p></pre>dcowboy: <pre><p>I purchased this:</p> <p><a href="https://smile.amazon.com/Programming-Language-Addison-Wesley-Professional-Computing/dp/0134190440/ref=sr_1_1?ie=UTF8&amp;qid=1499285738&amp;sr=8-1&amp;keywords=golang" rel="nofollow">https://smile.amazon.com/Programming-Language-Addison-Wesley-Professional-Computing/dp/0134190440/ref=sr_1_1?ie=UTF8&amp;qid=1499285738&amp;sr=8-1&amp;keywords=golang</a></p> <p>and started doing programming exercises here: </p> <p><a href="http://exercism.io/languages/go/about" rel="nofollow">http://exercism.io/languages/go/about</a></p> <p>back in February and never looked back. However. I&#39;ve also been programming for ages so YMMV with this approach.</p></pre>SamJTWIV: <pre><p>check out this <a href="https://www.reddit.com/r/golang/comments/6l86jb/need_help_please/?utm_content=title&amp;utm_medium=hot&amp;utm_source=reddit&amp;utm_name=golang" rel="nofollow">thread</a></p></pre>InStars: <pre><p>Go to your local Google Developer Group meetup <a href="https://developers.google.com/groups/directory/" rel="nofollow">https://developers.google.com/groups/directory/</a></p></pre>therocketofpoop: <pre><p>Pro tip: golang might be too much to a newbie. I would recommend a language geared for learning such as BASIC (FreeBASIC will work for you as well.)</p> <p>In my not-so-humble-opinion, most programming languages are quite similar in the end (despite basic libraries and syntactic sugar) and you&#39;d be well-served to learn basic programming with a language geared to newbies, that can then allow you to tackle other languages after understanding the basic underpinnings.</p> <p>Starting out from scratch in golang or C or python will leave you with basic knowledge gaps, doing-things-by-recipe-you-found-on-google, and some bad practices cos nobody told you any better.</p> <p>In the end, I do not think this will be a fast endeavour if you would like to become a competent developer.</p> <p>FYI, I started messing with BASIC thanks to my dad getting me a computer and making sure I had some shtuff available always before I was 10 years old.</p></pre>TheMiamiWhale: <pre><p>I could not disagree more. Python is a very easy language for beginners to pick up and I don&#39;t see how it would lead to any more gaps in knowledge than learning BASIC would. To be honest, this recommendation almost seems like you are trying to be different for the sake of being different. I don&#39;t see how learning BASIC will give a newcomer any special knowledge and will only delay them learning a marketable skill. On top of that, there is a wealth of information and tutorials on learning Python, which I think is the most important part. While you can find stuff on BASIC, it is substantially less than Python.</p> <p>At the end of the day, I don&#39;t think the first language really matters that much. Python is probably the easiest to learn, but also starting with C or Go is no big deal either. Millions of developers used C as their first language and they turned out fine. Maybe Go has some tricky parts that don&#39;t make sense to a beginner but that&#39;s fine! They don&#39;t need to learn and use the entire language right away. A beginner to programming could spend an entire school semester just playing around with basic Go syntax and learning how to build functions (similar to how schools teach Python in an intro to programming class), there&#39;s no need to dive into interfaces or mater goroutines.</p></pre>_foobaz: <pre><p><em>or he&#39;s a kid...</em></p></pre>SamJTWIV: <pre><p>I have to disagree with you to an extent. I don&#39;t think Go is a good starting point for a beginner for the same reason you say Python is. There just aren&#39;t enough true beginner resources for go yet. I agree about Python, and C being good and I agree about BASIC being kind of questionable. But I think it&#39;s less important to worry about the first language and more important to find a course or sierries of courses on Edx, Coursera, Udacity, or Udemy. Check That the course is well reviewed from multiple sources and learn what they teach after that you can worry about languages and where you want to expand.</p></pre>TheMiamiWhale: <pre><p>I think we are on the same page</p></pre>therocketofpoop: <pre><p>Python is a terrible language that teaches some horrible practices.</p></pre>

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

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