Rails Pet Peeve
Posted on February 29, 2008 at 04:00 AM
There is something that has been bugging me since I first looked at the skateboard book. I love the framework, and I love ruby. I also love consistency.
Having a button that does something (submits the form maybe) and a link that does something else (cancels the form maybe) bugs me. I see this a lot, and it always bugs me. I understand that we shouldn't have links that do destructive things. But what's wrong with having a complementary button to the submit?
I think aesthetically functional symmetry is important when we are talking about a visual medium.
So you might catch me putting buttons in place where they ought not be according to some of the purists. Or maybe I will get used to it because I see it all the time now and get over myself. I am finding it less jarring now than I first did.
Sigh
Converting From CVS to Subversion
Posted on February 24, 2008 at 10:24 PM
From CVS to SVN
I manage the website for a non-profit bicycle advocacy group. It's a great sandbox to try stuff out, I got the idea this weekend to take the code repository for the site, which was CVS on my localhost, and put it up in a Subversion repository on my host (Dreamhost). I have really taken a liking to svn - especially hosted not on my computer.
From what I can tell it went well, and I got it on the first run. How often does that happen? There was only 1 very minor glitch that was easily fixed. Here are the steps for this magical conversion....
Non-Technical Diversion
Posted on February 23, 2008 at 01:57 PM
Are there any flavors that just go together for you - like chocolate and peanut butter? I have one that got started by chance after a meal - probably something from Sonic. They give you peppermints with your food, you see.
So my flavor combination is peppermint with Diet Coke. It's to the point now that if I have a peppermint I have to have a Diet Coke. The carbonation in the Coke makes the peppermint come alive!
Let's Split
Posted on February 16, 2008 at 01:30 PM
Compare and Contrast
I was planning on this next entry being a comparison of regular expressions between a few languages used in web development (Perl, PHP, Ruby, and Tcl). Tcl? Yes - it's baked into AOLServer, which we still use some at my Large Multinational Corporation. With this week being Valentine's Day, though, I was inspired to go in a different direction.
Let's split!
I decided to use an example I have used in the real world myself: split a series of key-value pairs (querystring data, for example) and put the data into a structure that makes it easy to get to the bits that you need.
But wait, you say. I can already get to the key-value pairs in my querystring. True. This is useful for parsing data out of a server log.
Syntax Highlighting Test Post
Posted on February 13, 2008 at 12:35 AM
This is a test post with some ruby code in it.
def show
@product = Product.find(params[:id])
end
def new
@product = Product.new
end
I used the Google SyntaxHighlighter
Here is an even better example of this in use: http://www.nullable.se/past/2007/12/12/syntax_highlighting_in_posts/
Big Nerd Ranch
Posted on February 11, 2008 at 08:15 PM
I Am A Big Nerd
I had seen a banner for the Big Nerd Ranch on a site somewhere back in December as I was plowing through the skateboard book, and I thought it was pretty clever. I actually thought it looked really great. I sort of filed it away and went on my merry way.
I've recently picked up ruby and rails, and I really dig it. We do a lot of scripting and site stuff, so this would be great. I also do some work on the side, and had already started planning how to redo the insanity of my PHP and Perl sites in Rails.
I got to the point where I had sort of hit a plateau, though. This was about the same time we were planning training for the year at work. There happened to be a Big Nerd Ranch RoR Bootcamp a couple of weeks away, and I jumped on it.
The price was a bit of an issue for us. At my Large Multinational Corporation we do our budgets with separate lines for travel, food, lodging, and training. This would hit the training budget pretty hard. If you break it down, though, it's really not a bad price. I figured the actual training probably cost $2000 - $2500 when you factor in the room and board. And how do you put a price on unlimited access to the instructor and other smart people in the class?
My boss (and my boss's boss) were generous enough to make it happen. Off I go.
Typo: No, SimpleLog: YES
Posted on February 10, 2008 at 11:43 PM
Hello, World. There - I said it. This is the first post on my shiny new blog. It's actually my second run at a blog, but you wouldn't know that because I couldn't get the first run to deploy. I will admit that I am not a Rails jedi (yet), but I did spend a LOT of time crawling through Google to get the thing running. I even found a nice blog that was written about a week and a half ago for the EXACT steps I needed to do to get it to work on the host that I am using (Dreamhost).
No dice. I suck at Rails.
Then I found some nice blogs that compared Typo to WordPress or Mephisto. I even saw where some people recently switched from Typo to Mephisto (which isn't being all that actively developed on). The results were a mixed bag. Typo seems to have a pretty heavy memory situation going for it, and on a shared host that poses a problem. It also had a pretty serious not running in the first place problem for me.
Enter SimpleLog. I started seeing some comments about why didn't you try SimpleLog. It is, after all, pretty simple.
I checked it out, and here we are after only about 2.5 hours of work. That includes the time I spent checking it out on my localhost. It also includes the time I spent helping my wife with a project that she is working on for my son's school. My svn version is only 7, with the first version being the initial checkin before anything else was done.
Maybe I don't suck so bad afterall. Tomorrow will be another day, though.