Go by Example
gobyexample.com
gobyexample.com
There is a previous discussion of Go by Example if you want to mine the comments: https://news.ycombinator.com/item?id=7075515
There is also Effective Go for learning about, well, idiomatic Go: https://golang.org/doc/effective_go.html
And there is a previous discussion of Effective Go if you want to mine the comments: https://news.ycombinator.com/item?id=4285461
It's a fine introduction to the language! It's great that Go has a credible book. But if you're already familiar with Go, I think you can skip this.
Happy to hear if other readers had different experiences.
Perhaps a future edition...
- Book Site: http://www.gopl.io/
- Book Example Source Code: https://github.com/adonovan/gopl.io/
Am I missing something here? This site is well known and I have been using it as reference for a long time.
For me, I haven't worked with Go before so it's nice to see a resource like this as it's appealing as an outsider. Maybe it's the thing that pushes people from just hearing about something to actually try it out themselves.
It's common for old stories get reposted, and it's fine since it's impossible for everyone to be aware of everything all the time.
It's quite possible that the specific search terms you use (eg I never include "example" when Googling about Go[1]) and Google's personalisation (eg favouring resources you've used previously) would result in different search results to what other people might receive.
[1] Since any resource offering help in programming will include example source code, I always considered the search term "example" to be redundant.
Plus on queries that generic, a lot of people might just go straight to golang.org and re-read their docs.
Obviously this isn't the case for everyone, but it would explain why I've personally never heard of gobyexample.com before.
Better grepablity.
https://github.com/melling/ComputerLanguages/blob/master/go....
My OCaml notes are a better example of what I'm trying to do:
https://github.com/melling/ComputerLanguages/blob/master/oca...
By the way, what would you use for complex, fast, and reliable software?
I wrote a (bad) compiler in it, and Go wasn't really any of the trouble I had with it.
I don't especially love writing database-backed web applications in Go.
I think the author meant that Go is a simple means to design fast & reliable software.
That would certainly be my point of view, in any case.
Edit: no, seriously, as the other commenter mentions: "This site is well known and I have been using it as reference for a long time." If looking for something like this, it would've been hard to avoid this. This post seems sponsored, or friends doing favours. Weird.
Edit: I have already seen the website as well, but I was glad to see it again because I could come to the comments section for some good discussion.
Though this is most likely personal/anecdotal and the website is an invaluable resource for a beginner. Well done.
Have you read The Go Programming Language by Donovan and Kernighan?
- Book Site: http://www.gopl.io/
- Book Example Source Code: https://github.com/adonovan/gopl.io/
I think this is because programming languages are built with performance, readability, and writability in mind. I've yet to come across a programming language that was specifically built to make it easy to use to build a software product (plenty of frameworks though, ex Rails).
This page gives a much faster understanding of what the language is like.
https://github.com/thewhitetulip/web-dev-golang-anti-textboo...
Their terminology is concurrent programming. So you never actually spawn threads. But just declare your code to be able to run concurrently. So it will parallel process on multi cpu machine. Or just get scheduled in/out of cpu, when waiting for I/O. So very much like threads, but the mental/programming model is different.
Channels are particularly very useful, where you would use a thing like Barrier in Java, for threads to converge. In channels you get concurrency by message passing on channels.
So example application can be, crawl multiple sites concurrently and converge using channels.
In my experience its very robust, and once coded and tested, rarely(if at all) you face any weird bugs, e.g. Deadlocks/etc which you would, in explicit threaded programming. Not to imply that its not shoot-in-the-foot proof. But for a programmer having experience of multi-threaded programming, when one moves to this model, it seems more intuitive and robust.
Edit: I see other programmers have endorsed http://tour.golang.org/welcome/1 . I second/third them. IMHO that's the best resource to learn Go (and from your browser). After I did the 70 or thereabouts exercises, over there, I attained Nirvana :-) , and didn't need anything else. Of course apart from golang pkg docs. And one piece which confused me in the beginning was slice/array. Its very easy, once you get a hang of it. Another thumb rule I follow is always have pointers to struct in slices or maps. To avoid, the costly copy. May be its obvious in hindsight, but wasn't to me, in the beginning, as sometimes passed pointer to slice, having struct as values, to a function argument. On realizing what a foolish thing it was, as slice/maps are passed by reference, I started doing the reverse (i.e. slice as is, but having pointers to structs) :-).
* Rust - http://rustbyexample.com/
I think I need to learn the rudiments of go-the-programming-language, just so I stop forgetting there's still something to disambiguate when I see the word 'Go' as a noun.