The Bastards Book of Ruby
ruby.bastardsbook.com
ruby.bastardsbook.com
The main complaint I've heard from people who go through Codecademy/Khan any of the other "easy-to-interactively-learn" options out there is that they don't know what to do with their knowledge of loops/conditionals/variables beyond passing the tests. I wanted something focused on applied tasks, whether it be web scraping/API-fetching or even something as simple as batch concatenating/editing text files.
That's how I myself learned, anyway, so just wanted to point out to other authors the value of simple real-world-data projects as a way to keep readers interested.
It's a very refreshing approach to loops and if statements as you say.
If you've built a program/app in another language, try and rebuild it in the language you're learning or one you've never used before.
For example...this isn't a "first project" for me but it showed me how something simple, to a coder, could be very popular to others; this list of free museums/attractions and their free hours:
The data-gathering part, I did it in the painful old-fashioned visit-every-webpage fashion...but only because I needed to figure out the domain of the issue.
If I were to do this again, I would start with the list of Facebook pages, throw that into Google Spreadsheets.
Then, I'd write the script that would read the spreadsheet for the Facebook IDs, use the Facebook Graph API to scrape the address/hours/summary info, and from there, move to batch geocoding (the Google Geocoder API exercise) and maybe some simple text-processing to auto-figure out if a museum has listed free hours (i.e. search for the div that contains a day/hours listing and the word "free")
And you could also use the Facebook API to get a list of events from each place, though that varies widely by organization and if they have a social media maintainer.
As you get better at coding, you'll find that the hardest step is the first step, collecting the Facebook ID (or whatever piece of data that you start out with)
Well done.
I've learned Python since the 1.5.x days, mostly on the job and following pydev discussions, so never had the need to look up for such tutorials.
But as I said, I find this one quite good.
I've been able to apply this knowledge through a fully functionnal Rails App that scraped 5 job websites.
Thanks!
Also, I wanted to let you know about my detailed and thorough tutorial for installing Xcode, Homebrew, Git, RVM and Ruby on a Mac. I think your readers will find it helpful. It covers a lot of steps that are missing from your instructions. http://moncefbelyamani.com/how-to-install-xcode-homebrew-git...
I'm not sure how many other programming books have come up out of the news apps/NICAR world (the National Institute for Computer Assisted Reporting), but one of the reasons i like the Bastard's Book so much is that it's a really practical bent on learning to program.
Programming languages are more human-friendly.
Early computer languages were optimized for early computers. With today's processors, languages can have far more built-in features that drastically reduce the physical tedium and memorized minutiae needed to write powerful programs. Because programming languages don't need to be as efficient for machines to process, they've become much more efficient for humans to work with.
Maybe I'll ask Dan to write that one next =)
https://github.com/schacon/git-scribe
Edit: Actually the project looks dead, so I'm not sure you'd want to use it.
The stack is markdown and mustache. This would be a great way for me to see how I need to evolve the ruhoh platform.
Can't honestly say this is the best platform for your book but I am willing to dedicate time to your project to get this done for everyone's benefit. Please contact me and/or point me to the public repo if available. thanks!
The focus thus shifts on to correcting the many mistakes these other learning resources make. That might be poor security (SQL injection, XSS, etc.), use of deprecated functions (mysql_* functions), and maintaining your website as an unholy tangle of intermingled HTML, CSS, JS and PHP. This is what I'm more interested in doing.
I don't personally see much value in writing about much else (like, idiomatic PHP), because the language itself lacks an opinion on what good code and bad code is, or whether it should be procedural or OOP (see DateTime and mysqli for examples where there is an interface for both styles). Trying to establish a 'norm' for these things would be nothing less than Sisyphean in nature.
Compare this to Python and Ruby, where these books flourish because the language itself makes it easier to write about.
Starting from practical, useful exercises would be an amazing way to (finally) truly learn PHP.
This sentence is not correct: "Je n'ai pas aller au bibliotheque pour manger le fromage."
You should write: "Je ne suis pas allé à la bibliothèque pour manger le fromage."
Which, in case you wonder, means: "I didn't go to the library to eat cheese."
I await the Bastards Book of Haskell with great interest. ;)
I love the practical focus; it's exactly why I want to learn programming. I have a very narrow field, and no one has applied programming + domain knowledge to it.
edit: forgot to add, the design is beautiful. A pleasure to read.