8 ms·
Free Book: An Introduction to Programming in Go
- Mithrandir 14y agoThe book is now on Amazon, available for Kindle and in paperback: Kindle: http://www.amazon.com/An-Introduction-Programming-Go-ebook/dp/B0095MCNAO/ http://www.amazon.com/An-Introduction-Programming-Go-ebook/d... Paperback: http://www.amazon.com/An-Introduction-Programming-Caleb-Doxsey/dp/1478355824 http://www.amazon.com/An-Introduction-Programming-Caleb-Doxs...
- esschul 14y agoIt's nice, but I wish there was a summary page of the syntax. As an experienced coder, I don't really need to understand the concept of a map, only how it's done in go, and maybe restrictions.
- thomas11 14y agoThis book isn't for you, then. I understood it as an introduction to programming, using Go. The official Go website http://golang.org http://golang.org has everything you need, including the spec [1] and the insightful Effective Go [2]. [1] http://golang.org/ref/spec http://golang.org/ref/spec [2] http://golang.org/doc/effective_go.html http://golang.org/doc/effective_go.html
- briandoll 14y agoThe website says that the book will be for sale on Amazon soon. Anyone know if it will be Kindle friendly? The text looks like it would convert easily from the web pages, if not.
- cdoxsey 14y agoIt's available now: http://www.amazon.com/An-Introduction-Programming-Go-ebook/dp/B0095MCNAO/ http://www.amazon.com/An-Introduction-Programming-Go-ebook/d...
- victork2 14y agoThanks, I really want to get serious with that language seeing all the praise from people around. I have began to do some small things with it and it feels like a great language ( I love the no makefile idea !) My only regret is that this format makes it really hard to print in one motion. Could you provide a link for a PDF version? The animal on the cover looks really hilarious too!
- trustfundbaby 14y agoyes, please provide a pdf version (free or paid, doesn't matter for me) ... oftentimes authors will make a kindle version of the book for sale on Amazon and forget to put out a pdf.
- aristus 14y agoI am an author (not of this book) and I very occasionally get an email asking for PDFs. Maybe one in a thousand sales are PDF. Since it doesn't come up that often I've never bothered with setting up a paid system; I just send them a link and ask nicely for a few bucks via PayPal. Where do most people go to buy PDFs? Is it really a large-enough market to worry about?
- elemeno 14y agoLulu? At least that's the only place I've specifically bought a PDF - then I found out that it's wrapped in some horrible Adobe DRM (if there are any ways to remove this, I'd love to know). I don't begrudge the money, I just wish I could read it in Preview.app rather than Adobe Digital Reader or what ever it's called - it doesn't scroll smoothly, only page wise which is a massive pain when there's lots of diagrams. Other than that, all the ebooks I've bought from individual storefronts, often from having seen them on HN, have come as a PDF/epub/mobi bundle to work on any device.
- donatzsky 14y agoInstall Calibre and then follow the instructions here: http://apprenticealf.wordpress.com/ http://apprenticealf.wordpress.com/ If it's not DRM protected, but rather a "secure" PDF, you'll need some other tools that can remove the owner password. About.com has a list here: http://pcsupport.about.com/od/toolsofthetrade/tp/pdf-password-remover.htm http://pcsupport.about.com/od/toolsofthetrade/tp/pdf-passwor...
- noirman 14y agoLove the format (especially reading from mobile). Thanks for the free book!
- nhebb 14y ago@cdoxsey - Nice work, but you might link to an installer that doesn't include a text editor. I'd be willing to bet that the majority of the target audience already has their preferred text editor installed. Edit: After reading the first few chapters, I made a false assumption. It looks like the book is aimed at people new to computing (or, at least, it doesn't make the assumption that the reader has programmed before).
- akldfgj 14y agohttp://golang.org/doc/install http://golang.org/doc/install I guess the target audience is programming novices who have never written anything like source code before. Go seems like a strange choice for a first language, being neither foundational (C, Assembler, Scheme/Lisp) nor front-end scripty (JS, Logo, Scratch).
- micpalmia 14y agoI don't know much about the US, but in Europe the majority of colleges is now teaching either java or C++ as the first language, and only a minority is teaching scripting languages as PHP. I guess it's easier for students to understand higher-level languages and to transport their knowledge to other languages (or, at least, it was easy for me).
- krzyk 14y agoI agree about C++ or Java in colleges. I would add that in high schools we are still taught Pascal here in Poland. I was 15 years ago, and I heard that Pascal is still the first language.
- Evbn 14y agoMore that it is easier for a classroom to teach an old stable language than invest in new things that might not last. It is rare to see an accomplished programmer who started writing any code in Java... most started with JS (younger folks) or educational environments like Logo/Scratch or super simple envs like Basic.
- Kilimanjaro 14y agoCan't help it, but it needs some more padding: #container { padding:60px } Btw, great resource, the more the merrier.
- cjdrake 14y agoThe TIOBE programming community index rates Go as not being in the top fifty languages used today. That seems strange since it was the "language of the year" in 2009. http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html http://www.tiobe.com/index.php/content/paperinfo/tpci/index.... I like Go, and it gets a lot of good press. Is TIOBE not accurately portraying Go's popularity?, or is there some other explanation as to why few people use it? Sorry, not related to the book (which looks cool, btw).
- akldfgj 14y agoTIOBE has always been a joke, and only even attempt to manage language chatter, not usage. It is based off job boards and internet search trends, and is highly susceptible to homonym confusion, which is especially harmul in the case of "go".
- davidw 14y agoA better index is http://LangPop.com http://LangPop.com, which I recently sold on to a new owner, who hopefully will be working hard to spruce it up some, and add some new languages like Go, although Go is always going to be problematic in search engines.
- siodine 14y agoWhy is it a better index?
- davidw 14y ago1. It has more data sources. 2. It lets you fiddle with the 'normalized comparison' to weight the sources differently. If you play right, you can make your favorite language win!
- PilateDeGuerre 14y agohttp://LangPop.com http://LangPop.com does not track Go
- netghost 14y agoAnother great resource is "A Tour of Go": http://tour.golang.org/ http://tour.golang.org/ You can also install a local version, I've been working through it, and it's great for fiddling with on the plane.
- spiffworks 14y agoGoing through the source code for that tour is also a very good way of getting familiar with the http package and a good introduction to channels.
- patrickg 14y agoSee also another nice book, which can be downloaded as PDF: http://www.miek.nl/projects/learninggo/index.html http://www.miek.nl/projects/learninggo/index.html
- lsiebert 14y agoI'm kinda bummed that it doesn't cover installing to linux. Not that installing Linux is difficult, just that A. I suspect we'll see a lot more people on Linux computers, especially in the developing world, and B. beginning programmers should be introduced to the concept of Linux as a programming environment
- georgemcbay 14y agoThere's really not much point in covering that in a book beyond pointing you to http://golang.org/doc/install http://golang.org/doc/install Go is dead simple to install to Linux via either binary or source. Even building it from scratch on non-standard Linux systems like embedded armv5 systems is easy. Basically if you have a non-broken gcc already, go will build just by invoking one single shell script they provide.
- spiffworks 14y agoI have been really impressed with Go's portability. I recently cross compiled a binary from a Linux machine for an ARM target and had it running from scratch in less than 15 minutes. Go could become a serious option for embedded Linux targets.
- georgemcbay 14y agoI agree. My current spare-time project involves programming in Go for ARMv5-based boards (old chumby devices). I write the code in Windows (Sublime Text 2), compile in Windows, but target GOOS=linux, GOARCH=ARM, GOARM=5 and end up with an executable that I can easily rsync and run over on the ARM device. The cross-compiling available in Go is much easier to setup initially than the usual situation of having to build an entire toolchain for your target.
- Evbn 14y agoDoes B make sense? First install a new OS before learning what a loop is?
- taude 14y agoIs there a web framework? Go on Rails?
- taude 14y agoI was half kidding, but found this: http://www.getwebgo.com/ http://www.getwebgo.com/ and http://code.google.com/p/goweb/ http://code.google.com/p/goweb/
- cdoxsey 14y agoGo has a great built-in web server in net/http. Not as feature-rich as Rails, it's more akin to a micro framework like bottle.py. I ate my own dog food and the book's site is written in Go.
- emehrkay 14y agoThanks for this. I scanned the document and the language seems pretty straight forward, should be easy to learn. I did a search for classes and object oriented in the document (pdf) and it returned no results. I did a web search and came up with this https://sites.google.com/site/gopatterns/object-oriented/classes https://sites.google.com/site/gopatterns/object-oriented/cla..., maybe the book should reference that somewhere early (maybe not because the intro seems to touch on computer programming in general so I would assume that it was for first-time programmers).
- cdoxsey 14y agoGo doesn't have classes. I agree that it'd make sense to talk about them in a book aimed at C# or Java programmers, but this book is written for people who are new to programming.
- alexk7 14y agoI'm worried about Gordon the Gopher. He can't reach the pedals. :)
- Gazler 14y agoI really like the structure of this, very readable and a great intro. I have some confusion on http://www.golang-book.com/6 http://www.golang-book.com/6 It says: Go also provides a shorter syntax for creating arrays: x := [5]float64{ 98, 93, 77, 82, 83 } We no longer need to specify the type because Go can figure it out. Sometimes arrays like this can get too long to fit on one line, so Go allows you to break it up like this: However the type is specified as `float64`
- zemo 14y agohe means the type of the individual elements. Each element is of type float64, not int.
- nyan_sandwich 14y agovs Java-like float64 myfloat64array[] = new(float64[5], ...)
- cdoxsey 14y agoI meant you didn't need this: var x [5]float64 = [5]float64{ 98, 93, 77, 82, 83 } But I explained ":=" earlier so I can see how that would be confusing.
- jamesbritt 14y agoWhat's the best way to install Go on Linux (Ubuntu in particular)? Build from source? Any caveats?
- cdoxsey 14y agohttp://code.google.com/p/go-wiki/wiki/Ubuntu http://code.google.com/p/go-wiki/wiki/Ubuntu
- jlgreco 14y agoBuilding Go from source is trivial if you want to do that (two commands, one of which just grabs the Hg repo iirc. building only takes a few minutes on my underpowered eeepc.), but you may as well just use the binary distributions of it.
- xtracto 14y agoAny chance of providing an ePub version?
- lanna 14y agoI would have named the book "Go Learn Yourself"
- lanna 14y agoOr "Go Code Yourself"