I just installed wordpress for my iPhone. I am writing this from said phone. Perhaps this will make on the go life blogging easier?

Oops, my blog was down. I kind of knew it was, I was just too lazy to move it, I wasn’t sure if I wanted it anymore. Life has been very crazy since I started this blog:

  • I got in trouble at work (Avon) for posting here.
  • I had a son
  • I got divorced
  • I fell in love again
  • I’ve dealt with an interesting new career path

I suppose this is some lame excuse as to why I haven’t posted here much. The real truth is that I always got in trouble for posting the truth here - or I was afraid of posting because of all the eyes that might see the negative things I might say. I am pessimistic by nature, what can I say?

So why post again? I am in love with an amazing woman? Yip. I am raising two amazing fun-loving kids? Yip. I have a great new job, and I am the co-boss? Yip.

I am finding the key to a good life is to stop and enjoy it as much as you can, don’t work yourself to the bone. Don’t worry about others and what they think, just do what you love! The minute you start to worry about what other’s think, stop and focus on the great things around you.

So I was laying in bed this morning, thinking about how late I get up now compared to when I worked at Avon. I tend to go to sleep around 1am or later most nights, and get up around 9:00 or 9:30 am. Late night seems to be optimal coding time for me, the tv is off, most of my twitter network is winding down, things just get quite on the net and in my house - code flows.

This is a stark contrast to how things were with Avon. I was usually in bed by 11 and up by 4:30 am to make it in for the 5:30 am start time. I never understood why a call center had to be open at 6 am for customers? I mean really, the Avon ladies couldn’t wait until 8am like most normal humans in this day and age?!?

When the constrains were lifted from your life because you work from home, how did your life change?

I am sure if you read my blog, you are aware that Steelpixel Hosting has been “acquired” by RailsPlayground for an undisclosed sum of nothing (read: $0). I made a major MAJOR mistake with the hosting server and the easiest route was to just move people to a new service. The control panel hard drive died, it was also our “backup” server and we didn’t have any external copies of the customer data. Luckily the websites were intact on another server, we just lost CC and control panel data.

The current blog you are reading is on my new private server (vps) running both nginx (rails) and litespeed (php). I have almost all my sites moved over to this box, I think I only have 4 or 5 more to move at this point. I am also thinking about setting up a new blog geared more towards my rails work, I find a lot of nifty tips that I feel should be shared because the search results on these issues are totally lacking. I will link to it once I get it up.

Tasty Planner our 1st place app, has been updated. We have really revamped the Menu Planning, Grocery List Creator, our Chef list, and the Recipe Sharing portions. We added popularity algorithms to recipes, changed our backend search engine (sphinx now), focused on SEO a bit, and tried to really clean up the UI. You can also find a brand spankin new Recent Recipe Atom feed if you are curious to follow new recipes up to the minute :).

A counter cache is a drop dead simple feature that makes counting child objects much faster. It allows you to keep a database field on the parent object, with the integer in it. Rails will update the counter for you when an association is made between the parent and child objects. This allows you to do a simple SQL query for the counter stored on the parent object, rather than counting *all* the associated objects each time. Very handy, but something changed in edge (2.0) recently that made all the instructions on tutorial sites stop working.

Counter cache has become a attr_readonly attribute, and as such you can’t directly mess with it and have the changes saved when you call object.save. Take this railscast example and give it a shot against the latest edge build… You will end up with all 0’s in the count column. So what is a guy/gal supposed to do to get some Counter Cache action into a db table for objects that are already in production? Let me show you my edge based migration…



  def self.up
    add_column :recipes, :saved_recipes_count, :integer, :default => 0
    Recipe.reset_column_information
    Recipe.find(:all).each do |r|
      Recipe.update_counters r.id, :saved_recipes_count => r.saved_recipes.count
    end
  end

So if you note, we are using update_counters instead of update_attributes. The update_counters call takes two arguments, the first arg is the id of the object and the second arg is a hash of counters with the amount to increment by (or decrement if the number is negative). The update_counters call is the same thing rails uses behind the scene to update your counters when you add/remove child objects.

Hopefully someone will find this stuff helpful, it drove me nuts for about a half hour the other night.

Well, I guess the jig is up. My g rankings are starting to slip. I suspect if I redesigned the site a little to point to all my active projects and all the writing I have done around the web, I would probably go up a few notches. I used to be 8 of the top 10 search results for my name, but that is no longer.

I used ClaimID in an effort to try and “glue” all my work together, but that doesn’t seem to be helping. They did turn out to be an easy way to start using openID, though.

So here are some projects I am working on:

I have also done some various writings around the internet:

Here’s to hoping I can find some time to make this site a bit more useful and redesign it a bit!

Next Page →