Leopard and MySQL Gem

Those of you doing rails development work on Leopard with MySQL have probably seen this error message when starting your app:

WARNING: You’re using the Ruby-based MySQL library that ships with Rails. This library is not suited for production. Please install the C-based MySQL library instead (gem install mysql).

Normally I don’t care, but I figured since I was doing some cleanup today and getting things ready to move on to a longer term it might be good to have a properly working MySQL gem.  I like to run with a system that is close to what we run production.  The closer you get, the less surprises you have when you push it live.

Read More…

Posted in Code, Software Development, Uncategorized, ruby at November 6th, 2008. No Comments.

The Tie Breaker [Updated]

I have this disturbing lack of confidence in both presidential candidates.  I don’t really want either of them.  Today I was trying to decide who to vote for because, well, it is election day.  I was walking into the office from lunch when it dawned on me: the best way to pick a president is based on their website.

Presidential Candidate Websites.

Shock and horror came over me as I scanned their websites.  There was stuff all over the place, explosive gradients and backgrounds that simply don’t jive.  Youtube videos are injected in every nook and cranny.  Since both websites are full of crap I don’t fell like reading or watching, I thought that I’d go a step further and do a good ol’ W3C Markup Validation on them.  The results were astounding to say the least.

John McCain: 171 Errors, 46 Warnings (217 problems)
Source: W3C

Barack Obama: 220 Errors, 37 Warnings (257 problems)
Source: W3C

You would think that with the Democratic party doing anything and everything to get Barack all over the media, news, magazines, to the point where I check under my bed at night to make sure he’s not there, they would have made sure his website was W3C compliant.  If he wins, what does that say about their concern for web standards.  It makes his “net neutrality” talks sound like complete crap.  McCain’s site is not much better than Obama’s but the fact is that McCain’s site is better.  Winning is winning.

You’d think that my selection process would be over, but you would be wrong.

VP Candidates.

I went to JoeBiden.com and SarahPalin.com and both were serious let downs.  Biden freeloads off of Obama’s website.  Palin’s website says “This space intentionally left blank.”  Serious disappointment.  Not even a picture of Palin for me to hang up on the wall of my gun locker.  Biden too… dude what’s up with that?  You gotta have Obama carry you through the whole damn election?  Complete rubbish from both the elephant and the ass.

For giggles, I ran ‘em through anyway…

Sarah Palin: 5 Errors, 0 Warnings

Joe Biden: 72 Errors, 29 Warnings

…and let me tell you, I did giggle quite a bit.

Because of how atrocious both VP candidates’ sites are, I won’t be including them in my decision.  Their awfulness cancels each other out.  If you wanted to play a numbers game though, Biden’s piggybacking on Obama’s site does more hurt than good.

The Tie Breaker.

Don’t listen to my drivel.  This blog post is balderdash.  You shouldn’t judge your presidential candidate based on how compliant their website is with W3C standards, even if I am.  When you don’t like either candidate, you need to pick one small issue that you can judge the candidates on go from there.  That’s the tie breaker.  Could be something as lofty as religious beliefs or something as trivial as who has a better choice of neck ties.

Fact of the matter is, you need to go out and vote, no matter how irrational and illogical your selection process might be.

Update

Just tested Change.gov and I’m slightly more impressed.  Seems like since Obama is now president-elect he is able to rocket past anything McCain could ever compose with a WYSIWYG with a cup of coffee.  He has created quite a website that is pretty damn compliant.

Change.gov: 20 Errors, 3 Warning

This makes me feel much better, because the one thing that keeps me up at night is web standards.  Seems like we’re getting much closer to changing.

Posted in Opinion at November 4th, 2008. No Comments.

String#Nameize

This morning we had an email from someone who wanted us to capitalize their name because they had not done it at signup.  That’s fine and all, but this is one of those things we’re going to see again.  Normally you’d just slap a .capitalize on the string and call it a day.  Unfortunately with Irish names, you run into a problem because capitalize doesn’t capitalize those types of names properly.  I wrote a quick function to extend the String class in Ruby that will help get around this problem.

class String
  # Extension of the string class to properly handle camel names
  # Should be used on pieces of names, not full names.
  def nameize
    # If they took the time to capitalize their name then let's just jump out
    if self.match(/\A[A-Z]/)
      return self
    else
      name = self.downcase
    end
    # Let's now assume that they were lazy...
    return case
    when name.match(/^mac/)
      name.capitalize.gsub(/Mac/, "").capitalize.insert(0, "Mac")
    when name.match(/^mc/)
      name.capitalize.gsub(/Mc/, "").capitalize.insert(0, "Mc")
    when name.match(/^o\'/)
      name.split("'").each{ |piece| piece.capitalize! }.join("'")
    else
      name.capitalize
    end
  end
end

I know it’s not perfect, but it should handle most oddly capitalized names.  Let me know what you think in the comments or on Twitter or whatever and definitely give me any changes you think should be in there.

Posted in Code, Software Development, ruby at October 24th, 2008. No Comments.

The Identity Landscape

The other day, I noticed something that sort of pertained to what I wrote a few months ago about killing off JiveMasterT.  I see a lot of people doing this, albeit, subconsciously.  I’m not sure when this change in mentality began and I believe I was actually late to the party.  What follows here is what I think happened.

Over the past ten years, the way that people identify themselves on the internet has changed drastically.  It’s not quite obvious because the change was very gradual and it has not totally affected every area of the internet.  Despite this, it definitely happened.  It’s almost like when your girlfriend asks you if you think she’s lost weight.  It happened so gradually you didn’t notice but when asked - you notice.  There was a time when someone could jump onto IRC and chat with their friends using a username that had varying value.  The username could be thrown away if its reputation faltered and it could be retained if it had meaning and significance to those that interacted with it.

Read More…

Posted in Opinion, Social Media at September 13th, 2008. No Comments.

How Rails Saved Me Last Week

The night time, it was great.  Air was cool, had just gone on a nice jog with my girlfriend, and I was quite content with everything.  Being that my girlfriend has my health in my best interest, she decided to give me some cereal to take home with me.  I walk out to my car in my running shorts that have no pockets and I’m half juggling my clothes, laptop case, shoes, cereal, and… my Blackberry.


def for_the_record
running_shorts != skin_tight
end

I do what I can, placing my blackberry on the roof of my car, get everything inside the car and start driving home.  I get about half way there and…

Read More…

Posted in Uncategorized at August 27th, 2008. No Comments.

PatrickTulskie - Now More Mobile!

If you read my site from your Blackberry or iPhone then try pointing your browser at http://m.patricktulskie.com

This is powered by Mobi which basically takes the RSS feed from my site and parses it into a normally readable page.  This works pretty good on iPhones and Blackberries but I would imagine that it will be just fine on even your normal cellphone.  It took me like 1 minute to setup my site so if you’ve always wanted the m.yourdomain.com then here is an easy way for you to do it.

I think I might need to write some logic in the back end to redirect viewers to the mobile site if I detect they are browsing from a mobile browser.  Hmm.  That’s a post for another time I suppose.

Please note: I am not affiliated with this service at all.

Posted in Blog News, New Stuff at August 24th, 2008. No Comments.

What the heck is REST?

Quite frankly, I’m tired of about hearing about REST.

So what if I started off my post with a pun?  Look you’re just going to have to deal with it.  Let’s move on.  No stop it with the face, it’s my blog and I can do what I want.

Anyhow - REST is one of those things I hear a lot of people talk about as if it is this big mystery.  Then, when you finally find someone to explain it, it turns out they have never actually used it and only understand the theory.  It’s so frustrating to the beginning Ruby on Rails developer because not everyone has a mini David Hansson in their pocket and it really is one of those things you need to see to understand.

Read More…

Posted in Code, Software Development at August 20th, 2008. No Comments.

Tales of a Developer: I Code in my Sleep

You know what I am talking about.  It happens to us all at some point.

Oh no it doesn’t, you’re just being silly/bragging/etc.

No.  It will happen if it hasn’t already so just shut up and listen.

The Night Before

You’re working on a project, it’s late at night, you can barely function, so you close the lid on your Macbook and go to sleep.  A meer fifteen minutes later and you’re coding again.  How is this possible?  You’re not at your computer anymore.  You’re off in la la land and yet the project you’re working on continues to consume your subconscious.

Suddenly, at 3am, you spring out of bed, open up Textmate, and write in some code, relaunch your application and sometimes it works perfectly, other times the foos and bars don’t line up properly so you start trying to fix it.  Next thing you know it’s 5am and you need to wake up for work in an hour.  Then you get back into bed, angry at yourself for ruining your sleep, and get out of bed an hour later, shower, head into work a complete zombie.

Read More…

Posted in Opinion, Tales of a Developer at August 2nd, 2008. No Comments.

The Great Comment Dilemma

My father IM’d me this afternoon because he wanted to comment on my article about Digg vs Mixx. Apparently no one could register and no one could comment on my blog as a result. I had initially turned it all off so that I didn’t have to deal with spammers and the like but I had forgotten to turn it all back on once I had some countermeasures in place. Oops.

Read More…

Posted in Blog News, Opinion, Social Media at July 21st, 2008. 2 Comments.

Mixx vs Digg - David and Goliath

I spend a pretty equal amount of time on both sites.  On Digg I mostly go to read whereas on Mixx I go to participate in a community.  Both get me my news and both deliver different content, but it got me to thinking… what makes these two sites so different?

If you Digg this then you Dugg this.

The typical workflow at Digg is that you go, submit an article, people digg or bury it and if it’s popular and makes it through their algorithm it makes it to the front page.  If you aren’t up for submitting something you can just read the articles, make comments, and digg or bury them.  The comment stream at Digg is really great.  Sure there is a lot of stupid stuff, but the user participation is fantastic.  It’s not uncommon to see a few hundred comments on an article.  Furthermore - you can actually digg or bury the comments.  If people are saying stupid stuff then they can be burried so no one has to look at them.  If you leave a good comment then it can be dugg up so you and everyone else can see what the community is thinking about things today.

More after the jump…

Read More…

Posted in Opinion, Social Media at July 20th, 2008. 1 Comment.