Archive for April, 2011

Adventures in Ruby: Week 3

Last week in class we went over a lot of good stuff in a short amount of time, writing a tiny little breakfast chooser app and deploying it on Heroku.

The problem with learning Ruby isn’t lack of resources–in fact it might be too many choices. I decided just pick one thing and stick with it for a while for continuity’s sake. I turned to my old friend Nettuts which has a whole series called Ruby for Newbies. The series is nine episodes, each in nice, digestible ~30 minute chunks covering a basic concept. I found it was a nice speed to follow along and the pause button (I still wish instructors had them), is nice for when I screw something up and have to debug.

My plan is to review 1-2 per week until I get through the whole thing.

The other plan for this week was to come up with a project for this class. I haven’t really felt inspired in this area, but thanks to some suggestions from Steve, I came up with a plan for a review site for AI instructors. Nothing revolutionary, but I think it will be a good project to learn some things about building a site based on user input. It also goes well with my last project, and most importantly it’s something I’m interested in.

I have always kept my ears sharp when it comes to talk about what classes/teachers to seek out and avoid. at almost $500/credit, I really can’t afford to have someone wasting my time and money. I’m always amazed that more of my classmates don’t do this, so maybe this will prove to be useful for a very specific audience.

Adventures in Ruby, Week 2

This week was a bit all over the map. Part of me really wants to dive into the Vim tutorials series on Nettuts…but I feel like I’ve spent most of my education trying to master tools at the expense of actually learning whatever language or framework I’m supposed to be immersed in. I’ve put in my time with Textmate and I still have only scratched the surface of what it can do–with a dull nail at that–so I’m gonna resist editor-jumping for another little while yet.

Instead I spent some time reviewing the notes from our Ruby class page and trying to wrap my head around the different methods of calling Ruby methods, working with classes etc. It still freaks me out that there are NO SEMICOLONS ANYWHERE. But I also kind of like it.

I’m still not convinced the merits of Haml, despite the glowing reviews of the Haml fans. At this point I think it’s good to know it exists, but again, I already know HTML quite well and piling on an abstraction layer while I’m trying to learn the basics of a new language seems like asking for some ::headdesk:: in the not-to-distant future.

I’m still trying to figure out the best way for me to learn things in a way that I will actually retain them. I spent some time with the Ruby Essentials training on Lynda.com this week. They’re very well done, but it can feel slow at times and I ended up skipping some things because I got bored.

The most interesting find of the week was the Ruby Koans which follows a teaching Ruby through Ruby testing method unlike any tutorials I’ve ever seen.  I’ve been around long enough to understand the concept of building an app through testing. You write tests for what you need to build, they fail and then you write code until you pass the tests. But for a n00b programmer, the thought of writing tests when you can barely write a function, much less a Class, is pretty overwhelming. I thought this was a pretty unique approach to getting at the concept in a really manageable way.

I’ve also been looking into Capistrano, although that’s not strictly related to the Ruby/Sinatra focus of class. Even though I use it daily at work, I haven’t yet had time to implement it for any of my personal projects. And now that I know it’s there, I get really bitter about my slow and painful deployment methods!

I’m supposed to come up with a project to work on for the rest of the term. I’ve been thinking about it, but nothing earth shattering has come to mind. Last term I was fortunate to have a project I was really passionate about–mostly because I really needed it and the existing tool was beyond crap. I even dabbled in Rails with that project, but if it is going to be truly usable for my school, I’m going to have to make it into a PHP-based app. And I would really like to leave it as a gift to future confused students trying to make it to the finish line.

I already dabbled in hand coding my own blog too. My current state of overwhelmedness is probably contributing to my lack of inspiration. There’s a sample project on the Lynda.com tut that is a restaurant finder. That might be a good project to try. The tutorial walks through creating a command line based app. Maybe I could go through that and then apply to Sinatra.

The only other thought I’ve had so far is some kind of online recipe book. That’s not really something I need since I already have an app that works well for that–but it’s a least something I might find interesting, since my partner and I are really into cooking right now, mostly from this site.

So that’s all from the idea factory so far. Survived 2 weeks of online classes so far with 3.5 weeks to go. What doesn’t kill me… blah blah blah.

 

Drop Everything And Read

What? Everyone doesn't read while they hike?

Kids, don't read and hike

I was almost a teenager before I knew there was such a thing as people who don’t like to read. My grandmother’s house is filled with books. My mom’s house was filled with books. On road trips, when we stopped for dinner at some restaurant in some little town on the I5, we—mom, my sister Traci and I—would order our food and then all pull out whatever we were reading at the time, occasionally sharing interesting tidbits. We considered this a perfectly social way to spend dinner.

I got in trouble for reading. In kindergarten, mom got a polite request from the teacher to please ask me not to read the private papers sitting on her desk. And many a time I was caught huddled under my bed covers with a flashlight because I just had to know what was going to happen next in the Black Stallion series.

We lost mom to (completely preventable) colon cancer 4 years ago today. I have no interest in sitting around moping, but I did want to do something fitting to remember her and remind people what an amazing person she was, and how many lives she touched.

In her 10+ years as the librarian at Self Enhancement Inc encouraged a love of reading in all the kids who crossed her path (and many adults).

One fun thing she started was D.E.A.R. Drop Everything And Read. At the appointed time, the entire building would take a break, pull out a book and get lost in another world for 15 minutes.

Everything starts with language. Without language, we can’t communicate. Without comunication, we can’t connect. Without written words, it’s harder to preserve knowledge. Thanks mom for giving me a deep love of words that has opened up the whole world.

I’ll be spending 15 minutes buried in a book today in mom’s memory. I invite you to do the same, and if you’re so inclined, let me know what you’re reading in the comments.

Adventures in Ruby: Week 1

Poor little neglected blog. I can tell you exactly when it went into a prolonged coma: Oct 6th, 2008. AIP Fall Term Begins. Goodbye to reading books that aren’t assigned textbooks and goodbye to writing anything that won’t be turned in to an instructor

Fortunately I can finally see the light at the end of the tunnel. Also fortunately, this term seems to be all about writing so the least I can do is post some of it in this poor little ghost town.

Last term I dove into Ruby with an independent study of Ruby on Rails. There are not any full time instructors at school who know anything about Ruby, but fortunately, my coworker at the time, @vosechu, is a Ruby nut and was happy to stay late one evening and give me enough guidance to get my environment up and running. From there, I dove into 12 hours of tutorials from Lynda.com that actually were quite good. I went through almost the entire series in less than 48 hours and was able to get my first project up and running and learn a few things about setting up a database and running migrations.

But learning RoR before I actually studied the Ruby language is by any measure, a little backwards. So I was happy to see a Ruby course offered this term that starts from the beginning and builds up the basics.

When I started my first term at the Art Institute 3 years ago, I remember clearly Chappy telling us in the first class that if we got out school without knowing how to learn a programming language on our own, then they hadn’t done their jobs. Now I understand what he was talking about. Having dipped my toe into the waters of Python, Javascript, PHP, SQL and Actionscript, there are many aspects of programming that are found across all these similar languages. Once you understand the structures and the concepts of programming, picking up a new language can be largely a matter of syntax. A loop is a loop is a loop after all.

There are a lot of basic principles I’m still learning so I’m definitely not past the struggling phase. But I do finally have the confidence to keep digging into things until I figure them out. The other thing I figured out pretty quickly is that if I have a problem, I am likely not the first one to have it. Google knows all, sees all, and until it turns on us in Skynet fashion, I continue to rely on it to learn from other people’s mistakes (which I much prefer to making my own).

One thing I’ve noticed when I have the chance to observe people who have been programming for a while is that they tend to be heavy users of the Terminal or Unix shell. When I started as an intern at Metal Toad, Chuck blew my mind with all the things that were possible with the terminal and I’ve been a devoted user ever since. I’m not doing anything earth shattering, but it has been useful to at least get more comfortable with the basic commands, and it’s been great for getting cozy with Git, which I now use every day. The Unix tutorials that Steve gave us in the first week, are some of the clearest and simplest explainations I’ve seen. If you’re interested in dipping your toe in, I definitely recommend it.

I also found just under 7 hours of Ruby Essential Training on Lynda.com. I know a lot of students might not have the budget to spend $25/month on a tutorial site when there’s so much out there for free. For me, I don’t really learn practical things that well from programming books. I’ve been a devoted fan of Nettuts since my second term of school. Being able to follow along with what is happening, and having a pause button, are a lot more valuable for me when I’m trying to learn something new.

So far I haven’t gotten too far with the actual Ruby tuts that Steve assigned for week one but this one looks pretty good (and it’s free). I have a habit of trying to extend my school break by an extra week and scheduled a ton of social activities, including an out of town guest who left today. It’s been an extra busy week, keeping up with my two compressed (5.5 week) online classes (procrastination is so not an option with remote classes). Yeah, I should have done one at a time, but I’d rather get the pain over with early and not have a four class pile up at the end of the term like last time. Now that I work three days a week on top of all of this, I’ve become one of those insane people that I looked at when I started here and wondered A) how they did it and B) if they slept at all.

I guess I’ve figured out the answer at least for me is, A) Because I really want to graduate in September instead of December so I can get my freaking life back and B) Not much.