Show HN: "Programming is for Anyone"
ruby.bastardsbook.com
ruby.bastardsbook.com
It's really the right time for a book like this (for all the reasons the author enumerates).
Everyday I see how bad decisions are made because the people in charge haven't touched a line of code in over a decade (if they ever programmed at all, which is the more common case). This is a big driver of missed deadlines, cost overruns and generally craptacular products. Learning just a bit of programming can really shed some light on what coding is all about and what one needs to consider. It also highlights the potential for making your business decisions a lot more data driven instead of relying on people's personalities and internal politics.
I was thinking of ways to get more non-programmers in my company to understand the importance of coding and also something to get them started off on the right track. This book might be just what I was looking for.
Thanks for the efforts and thanks for making the draft available online, otherwise I would never have bothered reading it.
I think that there's a good solid group of people with the smarts and dedication to do something with programming, if they can see that it's something that has virtually limitless application. I personally went into programming because I thought I wanted to make video games, and after I decided I didn't, I basically stopped doing programming until I realized how it could help me in just about every day-to-day thing I do with my computer.
On a similar note, it would be great to be able to leave comments like this close to the source. Maybe you could include a system for on-line comments on the site, kind of like what Real World Haskell did (http://book.realworldhaskell.org/read/getting-started.html).
Great work. I especially like how well you made the case for non-programmers to pick up programming. The introduction is pure gold.
1. The main link leads to http://ruby.bastardsbook.com/about/ which talks about the book, but it took me forever to figure out that I go to the top where the little "Contents" link is to actually read the book.
2. I think you're whole first chapter with cut-paste could work, but I would provide the files. On a technical level there's all sorts of problems with cut-paste out of a browser and into code. It's rare but it's problematic, either by browser encoding problems or sloppy mouse usage. I'd set up a little .zip file with the code in it so they can just run it that way. Personally though, I find cut-paste has almost no value in actually teaching people to code, but I get you're trying to get them interested.
3. Your first real chapter, "Conventions" is just too much for most actual beginners. It is throwing in complicated inject calls, blocks, a really gnarly block of code that no programmer with any style would ever write, and other oddities. I'd recommend reworking this chapter so either it's at the end and is a capstone on "idiomatic" ruby style, or ditch the convoluted examples and keep it simple. Also, don't be fooled if someone who can already code tells you this is awesome. For an already capable programmer this is good, but for "anybody" this is just way too much and you'll lose them here.
4. You seem to spend a lot of time trying to convince the reader why they should learn to code. So far most of the material I've read has been the kind of stuff to pump them up and get them excited. Maybe you think that's necessary, but if that is your goal, then go back and rewrite some of your examples so that they're more accessible and people will think "oh man, I can totally get this!" Right now I think they would think "yeah! totally! oh wait, wtf is that shit?"
5. In the chapter on methods, why on earth are you showing them the C code to Ruby's implementation of puts? I really think that has no place in this book and wonder why it's even there. The link to the code isn't even valid anymore, which should tell you one reason why this is bad: Ruby's C code changes to quickly. The other reason is Ruby's C code is just bad. Not only are you overloading the student with C code in a Ruby book, but you're showing them very weird C code.
Overall I think you've got a book for programmers who want to learn Ruby, and not really a book for beginners or "anybody". Programmers would love this book because there's not many free good ruby books that are this extensive except for _why's (and that's crazy so many programmers can't handle it). You should basically consider making up your mind. Is it for beginners? Ok, then ditch everything complicated and redesign the order you teach things. If it's for programmers who can already code, then keep doing what you've got here. I'd place it at maybe intermediate programmers or beginners.
As I mentioned in various scattered parts on the site, your LPTHY was definitely an inspiration. In fact I think I started writing this shortly after LPTHY came out.
Anyway, keep writing it and I'm following you on twitter so bug me when you got something you want me to read.
Though I've been programming in PHP for a while sheepish smile. So, that might've helped. Total beginners, I'm not sure.
The probable reason for this is because, you get to the "good parts" quickly (twitter code). It's good for me because I don't want to be drilled down with the basics all over again.
An idea for a code example. As you mostly concentrate on web scraping, you can teach people how they can make a PDF version of your book so that they can read it on their ebook readers. I normally learn new languages when I have a real good need for it. This example can motivate them to actually "start" coding.
And thanks a lot for your effort! Appreciate it.
Google cache link if all else fails: http://bit.ly/uuJn78