This really isn’t very important, but blog.jimdrewes.com just got a facelift. I found this style on a WP style site, and I thought it looked a bit more professional. So, we’ll see how this one does.
I get hay fever (seasonal allergies). Actually, I get really bad hay fever. For as long as I can remember, every year I get perscriptions for half a dozen medications to treat my seasonal allergies, and it’s usually just enough to make life tolerable. My head becomes a block of cement. My nose becomes an open faucet. My eyes get so itchy that I have to lay down with a cool cloth over my face. My airways constrict to the point where I’m usually taking a couple of inhalers every day. There are times that I simply can’t function. But, since this happens every year, I can usually feel the onset of allergy season a few weeks ahead of time. This generally gives me enough time to go to the doctor, get some perscriptions filled, and start building up a barrier to the upcoming allergens. This year was different. We’re only a few days into March, and I’m miserable. Up until Saturday the 7th, I was just fine. I didn’t have so much as a sniffle. I woke up Saturday morning though, and it felt like someone sprayed a can of that expanding foam into my sinuses and my eyes burned like I just got maced. But why? Why did I get no warning this year? I have an answer.
Below is a grid, Monday through Friday of last week. We have day of week, how I felt, temperature, and a few pollen levels:
| Day | Feeling | Temp | Elm | Juniper | Maple |
| 2 | Good | 26F | 2 | 0 | 0 |
| 3 | Good | 27F | 0 | 0 | 0 |
| 4 | Good | 43F | 2 | 9 | 0 |
| 5 | Good | 57F | 31 | 31 | 9 |
| 6 | Terrible | 72F | 277 | 644 | 123 |
So, I think it’s painfully obvious what happened. We had a string of cold days, as would be expected this time of year in St. Louis. Then when we finally get a beautiful spring day… POW! All of the trees start getting frisky, and decide to spread their pollen. According to the St. Louis Department of Health, the pollen levels of Elm, Juniper, and Maple were considered “High” on Friday, but were either absent or low in the days prior. Guess I’ll be watching out for the Elm, Maple, and Juniper trees.
So for TodaysCigar.com I wanted to tweet the day’s cigar each night, just as Woot does. This way anyone following the @todayscigar twitter account could instantly see the daily posting, and look back at past days’ cigars. Fortunately, some members of the Ruby community have released Twitter gems – namely the Ruby Twitter Gem and the Twitter4R gem. Both are extremely easy to use, but I opted for the Twitter4R gem. The Ruby Twitter Gem is excellent, but it’ll track multiple twitter accounts and it wants you to run some migrations on your database. I didn’t want to update my DB schema, so I went with twitter4r. Once the twitter4r gem was installed, all I had to do was write up a quick rake task, then setup a cron job to fire it off every night after midnight.
So first was the installation of twitter4r…
sudo gem install twitter4r
Next, I created a new rake task in lib/tasks called twitter_poster.rake.
desc “Posts the current days’ cigar to the twitter account.”
task :twitter_poster => :environment do
end
Next, I added a couple of lines to my various environment files (development.rb, etc) to indicate my login/password for my dev and production twitter accounts. This way my passwords won’t be floating around in the code, and it’s easy to test on multiple environments.
ENV["TWITTER_ACCOUNT"] = “login_name”
ENV["TWITTER_PASSWORD"] = “password”
Going back to the twitter_poster.rake file, I included the twitter4r gem, and was able to set up a new Twitter client and post my first status.
desc “Posts the current days’ cigar to the twitter account.”
task :twitter_poster => :environment do
require ‘twitter’client = Twitter::Client.new(:login => ENV['TWITTER_ACCOUNT'], :password => ENV['TWITTER_PASSWORD'])
new_message = client.status(:post, “Welcome to the TodaysCigar.com Twitter feed.”)
end
Throwing in some code to actually pull the current cigar, and I’ve got a workable rake task.
desc “Posts the current days’ cigar to the twitter account.”
task :twitter_poster => :environment do
require ‘twitter’@product = Product.todays_item
if (@product.nil?)
@product = Product.default_item
endclient = Twitter::Client.new(:login => ENV['TWITTER_ACCOUNT'], :password => ENV['TWITTER_PASSWORD'])
new_message = client.status(:post, “Today’s cigar is the #{@product.title}, for only $#{@product.price}. http://www.todayscigar.com”)
puts “Twitter posting complete.”
end
Then all I had to do was add an entry to /etc/crontab to kick off the rake task each night.
Thank you, Twitter4R!
Tags: code
Today is the last full day for my trip to Sydney, and we dedicated the day to seeing some of the sights that the city has to offer. It has been an interesting day, with experiences ranging from gorgeous views of Sydney harbor to winning a meat raffle in the suburbs. I couldn’t have asked for a better final full day in Australia – it was a perfect blend of standard tourist attractions and more personal esoteric experiences.
Read the rest of this entry »
As I write this, I’m sitting in my hotel room in downtown Sydney, Australia. For my role with Contegix I’ve been provided the opportunity to travel in order to maintain relationships with some of our top clients. Right now I’m visiting Atlassian, and CustomWare. These are both great organizations that are I’ve thoroughly enjoyed spending time with.
Sydney is an absolutely beautiful city that seems to have more to see around every corner. I suggest making a trip down to Australia if you ever have the chance. Make sure you do the bridge climb though. It is a spectacular way to fully appreciate how amazing of a city this is.
In our family there is a tradition of opening one gift on Christmas Eve. I remember the tradition starting because I asked for Karate pajamas one year, so my parents let me open them the night before Christmas. Since then, every Christmas eve we all get some form of pajamas.
This year was J.R.’s first Christmas. Amazingly, my sister was able to find these jammies that my parents then gave to J.R. for Christmas Eve. He has Karate pajamas, and he’s only 8 months old.
What you see in this picture is J.R. doing his first ninja moves. If you check out our Christmas Eve pictures, you can see some more shots of J.R. all decked out like a ninja. He even has a little ninja hat thing, which you can see in this picture. He isn’t a big fan of the hat, but I think it looks pretty cool.
Well, we stalked the wild pine last weekend, and we bagged ourselves one funny looking tree. We have been cutting down our own Christmas trees for four or five years now, and my family has been taking part in this tradition for probably more than 15 years – and we still bring home trees that are too short, too tall, too fat, too full of spiders (that year was rough). You would think that after all of those years of cutting down trees we would have a pretty good idea of what looks good in our house, but we don’t. This year we had two criteria:
1. Don’t get a tree that is too tall. We may want to place it in our bay window.
2. Trim up enough branches so J.R. can’t reach anything to pull the tree down.
Here is what we ended up with:
So, after almost 7 years of running the jimdrewes.com website, I finally decided I might as well put up a blog too. Part of the motivation to do this was the fact that I got tired of people hitting jimdrewes.com classic, and telling me that they “read my blog.” Well, that was never a blog.
The original jimdrewes.com was an early foray into web development (specifically PHP development, and later Ruby on Rails) while I was still in college. It turned into a place where my friends and I exchanged stories, links, and personal news. I often had to moderate the content to make sure I was willing to have my name associated with the general direction things were heading – and I didn’t like having to do that. So, I have a blog now. These are my thoughts alone. I may not have written the software to power the site, but at least I have a more professional outlet to collect my thoughts, ideas, and interests.
The classic jimdrewes.com website will remain. It will likely move to classic.jimdrewes.com, and www.jimdrewes.com will become a landing page. Right now I’m in the process of moving everything over to my new server, so there will be more to say as I progress.
If people read this blog – cool. If not – cool. Hopefully in 7 years I’ll be able to go back to the blog.jimdrewes.com archives and get a chuckle out of what I find valuable today – just as right now I can look back and find amusement in the fact that we thought “Ultimate Foosball” was the greatest idea we had ever developed. (It still is pretty sweet. I just haven’t played in years).

