Learning Rails (O’Reilly), a Review

November 29th, 2008 Comments

O’Reilly’s Learning Rails (2008) by Laurent and Dumbill is a great way for a non-programmer, but techie person to dive into rails. I took AP Computer Science AB in High School, which was in C/C++ but I haven’t done much programming since, except a bit of cut and paste PHP and some javascript hackery. Early in College I thought to teach myself web programming in Perl/CGI but the languages were just so complex that I couldn’t get my head around building anything really useful and they have become a bit depricated except for sysadmin purposes. I’ve worked around programmers for the past few years now and I’ve yearned to get back into programming. Yet, I keep trying to pick up what should be really awesome books and not being able to dig in. They make too many assumptions about your pre-existing knowledge or just don’t fit with my learning style. I’ve found that they make sense in a classroom situation or with a mentor to help guide me, but they just don’t fit me. I understand technology. I understand HTML, yet some concepts go a bit over my head.

For those completely non-programmers out there reading this Ruby on Rails is a framework (basically a lot of stuff done for you already) that makes developing web applications happen really quickly. Its sometimes taunted by developers in other camps as being unscalable due to the growing pains of its most prominent application, Twitter, but that really isn’t an issue. Rails is best suited towards rapid application development for testing and prototyping.

I took some photos for O’Reilly’s Ignite Boston 3 a few months ago and in return they’ve sent me a nice selection of O’Reilly books, including this one. I guess they sent it to me a bit ahead of publishing date, which was nice of them. I’ve found this book to be the perfect fit as an introduction to Rails. It isn’t condescending as a ‘For Dummies’ books might feel, but it doesn’t fly over your head or go into insane detail in trying to explain every intricacy of the framework. In fact, several times it tells you to not worry about something and that you can look into it later but not to sweat the small stuff.

This book doesn’t take the approach of many Rails tutorials that rush you through building a complex application in 5 minutes. Those make too many assumptions of knowledge and are made for showing off more than learning. This goes through in a simple logic manner to explain the layout of a Rails application and how to extend it. You won’t be a Rails master after reading this, but you’ll be ready for your next Rails book and you won’t be lost or confused.

The first chapters go through the basics of installing Rails (giving you multiple options) and explaining some problems you might hit and how to get around them. I already had Rails installed, but I’ve had problems before in reading other tutorials and wasn’t able to understand the layout of the application, how to start the programs, or what the hell these Gems were. This got me around that and I feel much more comfortable with such things.

It steps through basic MVC structure and handling of input, getting it into a database and dealing with RESTful interfaces. The mid section of the book elaborates on this more and gives you room to start actually building some interesting things. The book ends up talking about deploying basic Rails apps, Apache integration, SVN/git, Ajax and other useful topics.

The appendices are really useful and don’t just feel like tables from an encyclopedia. Appendix A takes you through a quick Ruby crashcourse which was really useful. It might still be a bit too high level for your mother to grasp quickly, but if you’ve ever done any sort of programming then you’ll get it almost instantly. The other appendices are equally useful and definitely aren’t just page filler.

So if you’re just trying to wrap your head around Rails I wholehearted recommend this book. I haven’t found a better introduction to Rails, but you likely won’t find a bunch of super-geeks recommending it as it was probably too low of a level for them to want to read. You’ll be able to dig through most of it in a long afternoon, and internalize most of it in a week or so. The examples are clear, short and easily understandable. There are no multipage sections of code to copy, which are often tough to understand and prone to typing errors. The next up rails book that I’d recommend for an aspiring programmer who doesn’t have a large history in programming would be Agile Programming in Rails.

  • Share/Bookmark

I love/hate open source software

August 24th, 2007 Comments


I have a true love/hate relationship with open-sourced software.

First of all, it is written by programmers. All software is, but generally the entire team of open source software is written by programmers. The programmer think this is the best thing in the world because then there are no business people (suits), marketing people, accountants, lawyers, or people out to make money on it. For the programmers it’s a dream. They get to make what they want, and it’s fun for them. They get to do the code they care about.

Well that’s great and all until someone who isn’t a hardcore programmer in 10 different languages tries to use it. I have ‘some’ programming ability. I can write simple cron jobs. I can make myself little things in C++. I can alter code. I can read code generally in a few languages. In Computer Science I got up to pointers and memory management stuff. I’m not a ‘grandmother’ or something when it comes to this. I consider myself to be pretty savvy when it comes to computers and technology in general.

For programmers, the easiest/best thing is to always only have things in the form of code. Who wants a binary they figure?

It reminds me of my very first ventures in Linux circa 1997 or so. Just getting Linux installed (often by compiling everything yourself, setting half of the options, going though god knows how many howtos and man files) was a feat. Getting it so all of your hardware supported was a completely different issue. If you could get linux installed, get a windowing system running, AND get your hardware supported- then you were the man. None of this ‘insert Ubuntu’ DVD and hit enter. In short, it kinda sucked. It felt ‘cool’ to use, but for getting stuff done, it was horrid.

So what’s the best way to have the code out there (since the programmers insist against compiling binaries for common platforms)? A simple zip/rar/tar/dmg file? No. It must be kept in a CVS/Subversion repository. For those who have never tried to get through one of these, it’s a pain in the ass. So many branches of code often sitting around. You never know what will actually work and what won’t. ‘Beta’ quality ranges between, “Someone got it working once” and “It’s more stable than Gmail”.

So you get the code. Then you have to compile it. Sometimes this isn’t so bad. There’s a few package managing systems that can do this for you. I have both Fink and Macports installed on my Macbook Pro. Fine enough.

So I want to run xcircuit. Simple enough. Should just be able to type ‘fink install xcircuit’ or ‘port install xcircuit’ and then type ‘xcircuit’ and boom, it should run right?

Nope. Apparently it wants to use tcl/tk. Great stuff. ‘Wish’ is crashing. Wrong version/compiliation/something. Of course that wasn’t in the readme. It happens to be an issue on EVERY install of OS X that I can find out about. Now you have to troll through a ton of documentation, get another version of tcl installed (again from source), etc… Then boot it with various options.

Tried to find help here. Maybe my Google skills just suck. Typing ‘xcircuit os x problems’ didn’t help much. I did find this, which seems marginally more helpful. I still feel it’s too much to ask of a user. Pen and paper is easier at this point for my schematics.

Then it sits there. Does nothing. Nothing appearing in the console. You can’t tell. You have to run it using X11 instead of terminal, since terminal doesn’t open the windowing system. Grr.

I’ve tried to get 3 different schematic capture pieces of software running so far. All of them have had their own weird requirements. Undocumented of course.

Had a similar problem when trying to do a buildout of Plone. Wrong version of Python apparently ships with OS X. Python is finicky is seems and doesn’t just tell you ‘wrong version, click here to update’. Even with a large number of people in the room, it took me over 2 hours to get a reliable way of installing the software, which included installing the Apple Developer kit, etc… Yea, it was Beta, but so is Gmail.

But, Open Sourced software is great. It’s generally at no cost. It does things other things dont often. I don’t think it’s generally the best interface-wise. I don’t think it’s ‘smooth like Apple/Google’ generally. I love using it. I have as many Open-Sourced things on my computer as I can use.

I guess my problem is that some software apparently has an intelligence filter on it for how hard it should be for someone to be ‘cool’ enough to use it. The Programming Gods feel me unworthy to run xcircuit. I’m not ‘leet enough apparently.

Some Open Source software is done right, and simple to install/use.

The user should not have to know about:
a) Compiling software
b) keeping track of version of compiliers/interpeters
c) CVS/Subversion repositories
d) archaic ways of unzipping/decompressing files.
e) the merits of various package management systems
f) The different between a standard terminal, and an ‘x11 terminal’
g) what language the software is written in
h) How to open and modify text preferences, launch daemons, launch processes in the background, etc.
i) They should not have to open the terminal windows. This isn’t a commodore 64. It’s a Macbook Pro!

Some software does this well. The preferred workflow for this should be:

1) Download DMG from website (use of Subversion/ftp/bittorrent client should NOT be needed!)
2) mount dmg image.
3) Drag to Applications
4) Double click on application.

Simple as that. IF compiling software is SO easy for the user, then it should be simple enough for the programmer to compile the software for them, and throw it in a disk image. They will complain, “I don’t have a Mac!”. Umm, 2007 = virtualization. Did you see VMWare’s IPO? Get with the program. I’ve seen plenty of people with standard intel machines run OS X on them. That was old news.

So I’m going back now to trying to ‘force’ my system to run some circuit software. If this keeps up, I’ll have to break down and just buy something that actually works. That’s the reason I use a Mac and left Linux. My Mac generally works and I don’t have to monkey around to get a program working. No, it’s not cool to have to mess with a program (or set of) for 6 hours before you can get work done (and make money).

  • Share/Bookmark

Where Am I?

You are currently browsing entries tagged with programming at David Fisher : What is Noise Blog.