Getting Started with Slicehost

There comes a time in everyones life when they have to setup a linux computer from scratch. OK, so maybe not, but if you’re a web programmer you might well be faced with the problem of putting out a colocated server, just a VPS where you have full control over the box. With full control comes full responsibility though, so I hope you’re willing to learn a little on your feet.

For the new rails site I’m putting together, I decided on Slicehost. Why Slicehost? For cheap, respectable rails hosting with a load of support it just kept coming up. You have all the default features — the ability to upgrade your account at any time, a variety of operating systems. For someone just getting started, you might also want the ability to rebuild your system at anytime, which is possible from the Slicehost web panel. If you decide you want to switch from Ubuntu 7 to 8, or from CentOS to Fedora, it’s just a matter of selecting the option (well, and then rebuilding your slice from scratch). You can also restart of course.

What really sold me was the wealth of information available by other Slicehost members. There’s a wiki with some details but the technical article repository is a fantastic source of knowledge for getting a fresh install up and running for just about anything you’d want.

I’m still in the process of getting this setup, but I’ll post about my experience at Slicehost more as I use them. If you’re looking for a quick start with Rails from scratch, whether you’re experienced in setting a box from scratch or not, Slicehost offers some very useful tools.

9 Rules Accepting Submissions Today Only

If you’ve ever noticed that little leaf on my sidebar, you’re probably familiar with 9 Rules. 9 Rules is a community of bloggers focused on, you guessed it, 9 Rules. These are available in their about page, but the focus is to Love what you do and Never stop learning. If you’re even reading this blog you’ll probably qualify for both of these. If you have a blog, why not submit it to 9 Rules this round? I’m amazed at some of the new blogs that have been accepted this round already including Zen Habits, Unclutterer and Smashing Magazine — 3 blogs I already follow. Don’t think you need 100,000 RSS subscribers or even 100 to join though — they accept based on content and dedication. I’m looking forward to seeing if I stay in in what looks like a very fast growing and dedicated blogosphere.

A Good Way to Catalog Movies?

Why is so difficult to find a good, feature rich way to catalog movies? It seems like there are two camps applications focus on — either ownership or viewership, but few applications do both well. On one side there are applications like Delicious Library that allow you to scan in barcodes with a webcam (very nifty feature) but lack some of the usefulness for movie application. On the other side things like FrontRow are glorified directory browsers. What else is out there?

There are some applications that come strikingly close to this actually. If you’re on Windows, and you have an Xbox360, you might be amazed by how feature rich My Movies is. It’s an app that ties in with Windows Vista Media center and adds a new menu to media center extenders (like the Xbox 360). From this menu you can browse movies you’ve added by title, director, actor, category, rating — basically anyway you’d want. Through the setup you can also link a movie to a folder. If the movie is played it’ll play all video files in that folder. Simple enough setup, but enables you to have an in depth movie management system.

This sounded great to me for a while, and it was! I had a few hundred movies of mine cataloged, I was able to browse them to see what to watch, but at that point I’d have to slip in the DVD. Not the clearest line of thought. So I tried the next logical step, ripping some DVDs and associating them for playback on the Xbox 360. The problem is, my 360 and my computer doing the streaming are both hooked up wirelessly. If you’ve ever tried streaming HD content in this way you’re familiar with my problem. Unfortunately it’s not just HD content. Even compressed divx movies aren’t able to handle this setup although my network bandwith is only slightly below the “acceptable for HD content” bar in the diagnostics.

Honestly though, the 360 has a few issues with streaming content - as does any console or the Apple TV. You’re limited by what you can stream to it, and when it comes to files with subtitles (like mkv files) you’re probably out of luck regardless. Unless you setup an entire media PC.

So, a media PC. I’m not talking about a PC that acts like a DVR so that all TV you watch go through your computer, but a computer whose sole responsibility is storing and playing media in a way that makes it easy to find what you need. It also would have to be down by the TV in my case, unless I opt to run some wires through my walls (which sill wouldn’t fix the issue with a 360 and invalid media formats). But what to use?

Since I’ve been gravitating towards macs recently I’d probably opt for that as my media center machine. Mac Mini’s are capable of outputting in 1080p (unless I’m mistaken) and with very respectable sound output as well. For a living room PC it’s hard to get much better than that. It would cost quite a bit more than an AppleTV unfortunately, but the flexibility might just be worth it.

As for software there’s either FrontRow, CenterStage (once it’s complete), or XBox Media Center for Mac OS X (XBMC OSX). FrontRow is pretty slick and responsive. It also works well with the mac remote which is a plus. Xbox Media Center is currently blowing everything else out of the water though. If you’ve never checked it out it’s worth a look. Although I don’t find the interface to have that mac touch, you can update the look and with with different skins. I’m no expert in XBMC just yet, but I’m impressed by just how many features are available, as well as the essentials I’ve been looking for. Subtitles aren’t on the sidelines with XBMC, they have plenty of settings and options for this. You can even configure the color, font and position of them to your preference. With FrontRow you’re unable to change the subtitle during runtime, but with XBMC this isn’t a problem. XBMC also has a few tricks up it’s sleeve before version 1, such as MAME integration.

Where are all these files going to live? Ideally I’d have a local network attached storage device somewhere in my house (probably next to my router) that all machines in the house could access. But since it’s the HD over wireless that got me into this mess, it make sense for whatever HDs I have to sit by my media pc in my entertainment center. For this I’ve been looking into external hard drive cases that hold multiple drives. For this the idea so far has been Drobo, a surprisingly feature rich not-quite-raid device that holds 4 sata hard drives. I say not-quite-raid, because it has it’s own raid like system. It’s better to watch the videos on the Drobo site than listen to an in depth explanation, but this satisfies my cautious side by not having a single point of failure for the entire library. At $499 for a Drobo and another $199 for a network device though, Drobo isn’t cheap. The downside is that it’s limited to USB at the moment, so speeds are somewhat slow compared to esata. If you’re wanting to read some reviews (both good and bad) about Drobo, check out Neweggs Drobo Product Page. The nice part of having Drobo with a network adapter though is that it could always be on, and on the network, but my media PC could be shut down when not in use. The Drobo drive could always be shared through the media PC, but having that computer always on doesn’t seem like an ideal solution.

At the moment I don’t have a mac mini, a media center pc and or a Drobo. This is just the ideal media center setup that my research has led me to. I’m curious if anyone has any suggestions for improvement on this, or sees any gaping holes in my setup? I might just start piecing this together bit by bit over the next year. As hard drive capacity increases it’s becoming increasingly possible to throw an entire collection of DVDs/Blu-Rays on a single server. It’s fun to dream.

Adogo Meeting Tomorrow!

Interesting in going to an Adogo meeting? Tomorrow night we have two great talks — Maxim Porges with his cf.objective() talk, “Flex - No Frameworks Required”, along with Steve Gongage presenting a Flex ap he’s worked on with some tips and suggestions from his experience. It should be a fun, Flex filled night. If you’re going please do us a favor and register. Gives us a good idea of if there’s enough interest for the talks or if we should just skip them and meet up at BJs for some beers.

Design Books for Developers

Designing the ObviousDesigning the Obvious is a book I ran into at Books a Million a few months ago. Usually when I head out to bookstores I grab a handful of books and end up scanning over them for tips, maybe reading a few relevant chapters, then putting it back. Very rarely do I end up reading through the entire book at one sitting at the bookstore. That’s just what happened with Designing the Obvious. After reading through the entire book I put it back on the shelf as usual. On a second trip to the same bookstore later I ended up reviewing most the book, gleaming new shreds of information from each chapter. Rarely have I spent so much time on a book, better yet seen relevant bits a second time through. Eventually I ordered it from Amazon and have re-read most of it since then. If you want to check out a sample chapter from the book, it’s available for free on the authors website.

Designing the Moment The author, Robert Hoekman, Jr., also has a second book coming out just this week called Designing the Moment which seems to pickup with more concrete examples and run with them. Obvious was more general in what you want the user to think and what you want to convey in your app, while Moment seems to be more about analyzing actual examples. Anyone interested in creating kick-ass interfaces that people love to use should consider reading both of these. Moment comes out this week, so it’s a good time to grab one or both if it’s a topic you enjoy. Like Obvious, there’s a sample chapter on the authors website.

Harnessing GameFaqs with Ruby on Rails and Hpricot

One of the things that’s most annoying when making sites that rely on external data is keeping them in sync. Although this usually means importing some sample data during development, eventually you’ll have to do it the right way. This evening I hit that point on a project where I needed to get a list of all arcade games from GameFAQs. Keeping these updated manually is completely out of the question, especially considering there’s over 3500 of them.

I decided to turn to Hpricot, which I’d heard about on Peepcode as well a number of other blogs. Hpricot is a very simple HTML parser for ruby.

To get started, just install the hpricot gem…

$ gem install hpricot

After that you can require it in your controller and go wild. I needed to get a list of all arcade games available on GameFaqs for this, so that means hitting 27 different pages and parsing the results (26 letters + all numbers). My Games table is extremely simple at this point with just an ID, name and gamefaqs_id. Since all I really need is to update my local games table with the data from GameFaqs, I also want to make sure I don’t insert duplicate records. One thing to note though: GameFaqs has multiple names for the same game. You might pull back 3 different games with a specific id. In my case I’m just using the first one I find, but you could switch this up easily enough.

So where’s the code?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
require 'hpricot'
require 'open-uri'
 
class GatewayController < ApplicationController
  before_filter :check_administrator_role
 
  def update_games
    letters = ('a'..'z').to_a << '0'    
    letters.each do |letter|
      page = Hpricot(open('http://www.gamefaqs.com/coinop/arcade/list_'+letter+'.html'))   
      page.search( "//div#container/div#content/div#sky_col_wrap/div#main_col_wrap/div#main_col/div[@class='pod']/div[@class='body']/table/tr" ).each do |g|
        a = g.search( "//td:first/a").first
        name = a.inner_html
        link = a['href']
        gamefaqs_id = link.match(/[0-9]+/)[0]
 
        # Create this game if it doesn't exist
        if !Game.find_by_gamefaqs_id(gamefaqs_id, :select => 'true')
          Game.create(:name => name, :gamefaqs_id => gamefaqs_id)
        end
      end
    end
    render :template => "games/update" 
  end
end

Not too bad for 29 lines in Rails. The letters variable contains all possible endings for the URL, with a pair of loops to do the work. The main work goes on in the page.search() part, which generates an array of td elements containing the information we need. From this you can grab the a element and then the gamefas_id and game name.

CSS Naked Day #3

Once again it’s CSS Naked Day, a time to strip your site bare and see how good it looks without all that CSS. If you’re using Wordpress, you can grab the CSS Naked Day Plugin and not have to worry about disturbing your layouts once the day is through. So far I’ve been extremely happy with this theme, which although I’ve only done minor tweaks with, it’s been easy to expand upon while keeping the same tone and color. I didn’t notice until now though that the comments are above the posts themselves which does look a bit odd.

BarCampOrlando After Party

Izea put on a great (open bar) after party dubbed Geek Out ‘08 that bogged down their office with wet geeks. I was completely soaked from the knees down, but enjoyed geeking out in both games and tech talk. They had 2 entire rooms devoted to Rock Band, and others for Wii Sports, Smash Brothers Brawl and Halo 3. No doubt about it though — Rock Band with drunk people is a great ice breaker. Cameras were going non-stop throughout the party, so the Flickr tag should be filling up soon. They also had live video feeds going out to Stickam of a few rooms. Anyone interested could see me awkwardly singing Maps (and laughing at people who did Roxanne). Great party guys!

@BarCampOrlando Rundown!

No one is going to debate the fact that BarCampOrlando lived up to it’s namesake this time around (ok, so there wasn’t much Foo there, but details deails). Both venues for the event, Slingapours and One Eyed Jacks, had plenty of room for the events with room to spare. Power via extension cords and squid adapters wasn’t ever out of reach. The only time things got a little hectic was for the very first presentation which was packed since there was only one presentation at that time.

So here’s a brief wrap up of what I ended up attending:

Central Florida Tech Association by Dan Kinchen This was a great one to open on. Dan presented the crowd with a general question: Does Orlando need an association of technical workers/companies. The idea behind this would be that technical people from the area would volunteer to maintain some sort of an administrative board/website what would be a central portal for technical events. At the moment this is pretty much just the Central Florida Tech Events Google Calendar. Having a group like this would have a lot more power as well, such as throwing other events or even luring larger companies to the area. It sounds like a great way of marketing the Orlando technical community.

Social Spark by Peter Wright Peter gave an overview of Izeas new app, Social Spark, followed by a technical discussion of some of the issues facing the team in scaling the site. The site itself is impressive. I’ll skip the marketing spiel, but it had a great public face. Larry Diehl gave an rundown of some of the biggest issues in scaling rails with some innovative solutions. To make searches speedier, they used a bitstream (all 0/1’s) to represent true/false for a set of conditions. So if condition 1 is false, condition 2 is true and condition 3 is false, the end result would be 010. They converted this number into a unique integer (through something like (2^0*0) + (2^1)*1 + (2^2)*0, giving a 2 in this case. Obviously this makes searching lightning quick. Also some discussion on fragment caching and it’s importance. Useful stuff!

Web 2.0 Killed The Internet by Sunir Shah This was more of a rant actually. Sunir is strong about his opinions that’s for sure. He went into his opinion on all the major buzzwords — semantic web, microformats, w3c, xhtml, validation — issues facing web developers. This opened up into a discussion with some for the above and a few argueing that the big guys out there don’t stand to gain anything by adopting some of these, so they don’t expect them to open up and play nice with others.

Creating Object Oriented Designs from Natural Language by Mike Blake I only caught the last few minutes of this one, but it dealt with the idea that if you say what you want an app to do in clear english, you’ll be able to parse out the programmatic objects based on the parts of speech. Nouns, adjectives, adverbs and verbs have clear similarities to programming. This kind of thinking got me interested in learning a bit more about rspec user stories which sounds very similar.

Past, Present and Future of Tech in Central Florida by Ryan Price This started out as a bit of history about Orlando before going into a group discussion about what we can all do to make Orlando a better place for future developers. He mentioned a few of the resources we have here in Orlando to help new businesses get off their feet, such as a the business incubator (I believe that’s what it was called), where they assist in writing a business plan and help answer your questions about starting a business. Quite a few people expressed interest in some form of coworking, although since I’m not freelancing this hasn’t been an area I’ve followed too closely.

Demystifying Agile Development w/Scrum by Robert Dempsey Aside from the elevator pitch about pigs and chickens, and 20 minutes of thumbing through the book at B&N, I haven’t heard much about Scrum. Being on the development side of a large team we haven’t had much impact in affecting the project management techniques to this extent, so it hadn’t been a priority. Scrum sounds extremely effective though. Here’s a brief rundown of what I got from it. You plan out what units of work you will get done in a “sprint” a set unit of time that once started should not be changed. So if your sprint is 2 weeks long, in that time frame you’ll expect to get a set number of tasks on a list completed. At the beginning of each day all the developers meet with the scrum master and answer 3 main questions: what did you do yesterday, what will you do tomorrow, is anything holding you back. The scrum master is responsible for following up on these road blocks and getting back to the developer. The thing I like more about this is the small units of work involved. Constant evaluation and goal setting is extremely effective. Think about New Years Resolutions. Most the time people give up by February.

Bayes’ Theorem by Tim Rosenblatt Went over the idea behind Baye’s theorem by presenting some math problems to the audience. Based on how the numbers were presented more or less people would be able to answer it. Nice break from the programming with a touch of problem solving in there.

Unit Testing is for Weenies by David Rogers This was a pretty basic talk about testing. David went over the ideas behind it, some testing frameworks for each major language and why should test. Pretty much the token “you should be doing this if you want better software” talk of the day.

Luvd by Less: Open Source Social Network by Less Everything The Less Everything guys are a lot of fun to listen to. They started off talking about their new open source social networking site, Lovd by Less. It’s written in Rails, using Shoulda for testing, so I’d already dug into the innards a little. Definitely some good advice in there and on the Less Everything Blog for Rails structure and security, and they practice what they preach in Lovd. Worth downloading if you want to see a full social networking site and the code behind it.

Microformats by Kevin Murphy There was a 5 minute pitch about Microformats at the last barcamp, but this one had a 20 minute hype for them. He mentioned some of the sites using them, as well as some tools for testing. One I hadn’t heard about was the Firefox Operator Plugin. Other than that Kevin went over a few sites using them, the new microformats search on Yahoo (which I didn’t find when I was looking earlier actually) and generally hyped them. Good way of hyping them too — showing that if YOU implement this on YOUR site you’ll get MORE visits because Yahoo, Google or whoever will be able to display your information more clearly in search results or however they’re being presented.

Partners in Business not Life by Less Everything was easily the most funny talk of the conference. Less everything is a pair of developers with different strengths and weeknesses. They went over how they got together, just how huge a decision it is (they’re basically married) and what you should look for and avoid when getting into a businees partnership. And there were lots of hugs.

Simple Lisp Interpreter in 29 lines of Ruby by Larry Diehl Since I haven’t seen much Lisp, this one sounded like an interesting one. Larry went over his implementation, test cases and just how little Ruby code it took to accomplish. This sort of power in Ruby is one thing I still haven’t tapped, but always impressed by what can be done.

Ranting about the Community by Gregg Pollack Great way to end the day by bringing people together (and then making them stay there because it was raining). Gregg went the basics of community building and the importance of just talking and expanding your horizons. Sounds simple enough, but was a fun talk.

@BarCampOrlando

I’m downtown in Orlando at BarCamp and so far overwhelmed at both the quality of the venues and the community! As someone who doesn’t trek downtown all that often, the area on Wall Street between Slingapours and One Eyed Jacks is an excellent social atmosphere. Kudos to the organizers for keeping things going.

If you’re wondering what’s going on throughout the day, there’s a schedule up at http://s.barcamporlando.org/ updated frequently by Gregg. I have a pretty clear idea about what talks I’m headed to, although *uck OpenID and Microformats are both at the same time. Past, Present and Future of Tech in Central Florida with Ryan Price, Demystifying Agile Development w/Scrum with Robert Dempsey as well as a few Rails and UI talks I’ll probably catch bits and pieces of. Since each talk is 30 minutes rather than 20 minutes like last time around, things don’t feel hectic at all.

On a side note, I already see a few wordpress screens up all around me. Better throw in a BarCampOrlando keyword for good luck. If you’re wanting to check out some current photos, there’s a running BarCampOrlando2008 tag on Flickr.