The Whyte Life

Blogs and news from Whyte family members throughout the world.

Archive for the ‘Extended Family’


My Ruby & Rails Reading List

FYI: I tried to list these in order of preference / desire.

Books I already own

Ruby:

Rails:

My “Wishlist”

Ruby:

Rails:

Share It:
[del.icio.us] [Digg] [Facebook] [Google] [MySpace] [Newsvine] [Slashdot] [StumbleUpon] [Email]

Subscribe to this Feed

So… I think

So… I think that Katie loves me. This past summer she made me an embroidered note expressing her love for me. Throughout the past three years she has always done randomly cute things and been insanely supportive of me. She’s been willing to move out east and leave her family in Arizona to help us work towards saving up to buy a house, and many other countless things I won’t list to save on time.

So... I think I love you

The one thing I will bother to list is that she gets to show me just how much she loves me for the next little while before life gets back to normal. For you see Katie is:

pregnant!

This means that for the next 9+ months she’ll need to remember just how much she loves me to off-set her remembering that I caused the morning sickness, food cravings, insanely heightened sense of smell (like seriously - super hero levels!), and random crying (Katie just doesn’t cry except when she’s pregnant).

We didn’t exactly expect it to happen in our first month of trying, so it kind of appears that Paisley is going to have a little brother or sister with a birthday almost the same time as hers (my iPhone apps predict a due date of 24 Sep. 2010 and Paisley’s birthdate was 25 Sep. 2007). Yay for close siblings!

Share It:
[del.icio.us] [Digg] [Facebook] [Google] [MySpace] [Newsvine] [Slashdot] [StumbleUpon] [Email]

Subscribe to this Feed

Falling Behind Already - New Year’s Goals & Resolutions

My 12 goals / resolutions for 2010. As you can see I’m already a few days behind (go figure):

  1. Add a new member to our family
  2. Make Katie fall in love with me again ;) (e.g.: even more)
  3. Do my chores at least 3 times a week
  4. Finish Scrapkits project (HUGE GOAL)
  5. Lose 30 pounds
  6. Do pilates with Katie
  7. Sell some blog designs/templates
  8. Blog at least once a week
  9. Become a better photographer
  10. Read 3 programming books
  11. Read the rest of Harry Potter
  12. Make more friends (and be a better friend to those I’m already have)
Share It:
[del.icio.us] [Digg] [Facebook] [Google] [MySpace] [Newsvine] [Slashdot] [StumbleUpon] [Email]

Subscribe to this Feed

In Katie’s Absence

Katie left for Springfield, MO yesterday to go visit her friends at Red Velvet Art. I hope she comes back with lots of pictures!!! She ended up traveling on my favorite kind of planes (the small ones!):

4 Dec 2009

Here’s a snapshot from FlightTrack when she was flying to her connection in Ohio:

4 Dec 2009

Paisley didn’t cry the whole way home from the airport like she did when I left, but I think it helped that we walked Katie to security and had a chance to go back and forth a lot of times on the walking escalators (for lack of knowing what to actually call them). Distractions are a life saver with kids I swear. It has helped a lot this trip that Paisley already knows that “on a plane” means we’ll be back eventually. I’m sure Katie went through much more difficulty with Paisley than I did - so far she’s been pretty much normal for me (phew).

After dropping Katie off at the airport I started working on my weekend project: cleaning the house as much as possible. Unfortunately I was only able to get a few projects in before my body just shut down. Pretty sure I’ve got a little flu/cold going on this weekend :(

I was able to take Paisley out for dinner last night. We went to Hana Japanese Cuisine (one of my favorite local sushi shops). Paisley ate almost all of her miso soup (I was SO proud of her!):

Eating miso soup with @paisleyjane. She took my Japanese marble drink ransom so she's very happy.

And I devoured my sushi (as well as my seafood fried rice):

I love Hana Japanese! Their food is always amazing!

I woke up insanely exhausted and pretty much done nothing all day today. It took all my energy just to get outside so Paisley could play in the snow for her first time (and I’ll have you know that I _love_ snow - my Burton tattoo on my foot serves as proof). I don’t even think I’d go snowboarding today if I had the opportunity to go for free - I just feel crappy :(

On that note, to keep this short so I can put P down for a nap and probably take one myself, here’s the pictures from Paisley’s first time in the snow :)

Paisley must be a snow angel

Paisley playing with snow for the first time

Paisley reaching for the snow

Paisley in the snow

And just some photos from throughout the day:

The morning of Dec 5, 2009

An hour into snow on Dec 5, 2009

From Outside Paisley's Window

And a few special ones Paisley and I did just for Katie cause we miss her:

We miss you Katie!

We miss you Katie!

Share It:
[del.icio.us] [Digg] [Facebook] [Google] [MySpace] [Newsvine] [Slashdot] [StumbleUpon] [Email]

See Original Post

In the Blink of an Eye

Three years. It’s quite amazing really. It seems like Katie and I met online and started talking via e-mail and private messages no more than half a year ago, maybe a year at most. And yet somehow we’ve managed to get married three years ago today, move four times (from AZ & MD -> VA -> AZ -> OR -> MD), have Paisley (who’s already 2!), and go through more financial struggles than I thought I would ever be susceptible to.

It’s been a very hard three years if you I look back at all the challenges we’ve had. Voluntarily taking a 40+% paycut to move to Arizona so Paisley could be with family. Having to sacrifice the second car and learning how to work with one car even with long commutes. Getting laid off or having my contracts end without warning (literally told at the end of the day that my services were no longer needed the next day). Struggling to find money to pay for groceries for months at a time. Wondering what we would do for birthdays, Christmas, and why we ever bothered to take vacations (even one day getaways). Every time I lost my job it happened within days of our only vacation plans we had up until our trip to DisneyWorld this past September.

In spite of all the difficulties we’ve gone through, we’ve had even more blissful moments than I ever thought were possible. We’ve managed to go to Disney in some form or another every year (DisneyLand for a day for our honeymoon, DisneyLand for a day trip with Paisley shortly after she turned one, and this past September to DisneyWorld for a week!!!!) We’ve been able to go through several parts of the country (a trip to Virginia when we lived in Arizona and an interview trip to Portland, OR where we would one day like to live). We had Paisley and were able to spend a little over a year living close to both our families. We’ve been blessed enough to be able to get a contracting job with some former coworkers of mine out here in Maryland and are grateful for how much our circumstances have changed with the current economy. We’ve learned the joy of making thoughtful gifts for each other. A mailed surprise letter, a simple flower arrangement, a candy bar when we shouldn’t have, or post-it notes scattered throughout the house with random thanks (washing machine, computer screen, dishwasher, fridge, etc). We’ve had a few arguments (who doesn’t in some way or another), but ours are generally mild and insignificant (and infrequent). We almost always resolve them in a matter of minutes - the big ones might take an hour or two. We’ve learned the value of honest communication, and the value of constantly working on improving our personal weaknesses in the relationship (and letting the other one support us). We’ve opened our own businesses (my consulting for web development and Katie’s Etsy shop) and supported each other 100% with those efforts when it was needed. Ultimately, we’ve always strove to show unconditional love and support for one another no matter how uncertain our circumstances have been and I couldn’t ask for a more perfect partner as a result.

With the basic background of our circumstances covered I’d like to borrow from Katie and list some of my favorite things about her. Katie, I want to thank you for being perfect in every way, here are a few of the things I love most:

  • That you watch over and teach Paisley so much every day
  • That you get distracted 20 times within a 2 minute conversation
  • That you always ask me what I’m actually thinking or feeling, even if it isn’t what you want to hear
  • The way you look at the computer screen when you’re engrossed in something
  • That you love to read
  • That you hooked me on LOST
  • You in your wedding dress
  • How you always are yourself, no matter where we are or who is with us
  • How understanding and forgiving you are when I make mistakes
  • That you introduced me to Anthropologie, Urban Outfitters, and Trashy
  • That you not only let me do things I want, but encourage and help in any way you can
  • The way you look when Paisley falls asleep in your arms
  • Your goals
  • How intelligent you are (and that you are willing to correct me all the time)
  • How you still have common-sense even with your intelligence (because we both know I’m lacking)
  • How gorgeous you are
  • That you encourage and support me to feel confident in who I am
  • That you got me to stop saying “I’m Sorry” so much
  • That you sleep in late (letting me watch you when you sleep on most weekend mornings)
  • That you would do your hair straight almost every day before we had Paisley
  • Your legs in tights
  • Your love of designer clothes
  • Watching you read or color with Paisley
  • Laughing at (and even liking) my insanely corny jokes
  • Not teasing me for being a girl and crying during movies
  • That you bake, make candy, craft, sew, embroider, and scrapbook
  • And so many more that I don’t have time to list them all…

And as you’ve taught me that blog posts are always better with photos, here are a few of my favorite photos of you from the past 3 years :)

Thanks for making my life so perfect Katie!

I LOVE YOU!!!

Steven.Joseph.Haddox

Share It:
[del.icio.us] [Digg] [Facebook] [Google] [MySpace] [Newsvine] [Slashdot] [StumbleUpon] [Email]

See Original Post

My Ultimate Wish List

I’m going to post this list with the following preface: I would never expect to receive anything on this wish list (hence the “ultimate”).  I am merely thinking of things I’d love to someday have but probably won’t anytime soon as I don’t have thousands of extra dollars just laying around :)

Before I get into my list itself, I thought that everyone might want to know about a really cool tool I’ve been using for nearly the past year or so called the “Universal Wish List Button” by Amazon.  It allows you to easily add items from any website onto your wish lists on Amazon.com. It has made my life a lot easier for managing my wish lists and has been quite useful to me on a weekly basis at least so I highly recommend it :)

I have a lot of Ruby and Ruby on Rails books, but what I don’t have is a ton of swag to go with it. I’d love a few Ruby on Rails related t-shirts and other miscellaneous stuff :)

  • This shirt in Medium and Charcoal would be awesome.

  • This sticker for my netbook would be very cool :)

  • Or even this button to go on my backpack for the few times I do travel.

So nothing in that list is too bad (ranging from $4-$30ish). How about the next genre… Technology :) This will make your mouth water and probably destroy your bank account as well:

  • A new 27″ iMac to replace my Mac Pro and it’s crappy 23″Acer monitor. Specs:
    • 2.8GHz Quad-Core Intel Core i7
    • 8GB 1066MHz DDR3 SDRAM
    • 2TB Serial ATA Drive
    • Apple Remote, Magic Mouse, Wireless Keyboard
    • AppleCare Protection Plan for iMac - Auto-enroll (NEVER buy a Mac without it!)
    • Total price with gov’t discount: $2,622.00

  • But what if I wanted to just bide myself over until I can save up for the nice new shiny iMac? Well I could always upgrade my current setup. I do have a Mac Pro first generation after all that’s only 3 years old, surely it’s good for something still right?
    • There’s always the 24″ LED Apple Display ($799)

    • But then I’d need the ATI Radeon 4870 graphics card to make it work with my Mac Pro ($314)

    • I’d also need more RAM (another 12GB should do it) to keep my slow moving Mac Pro going ($402)
    • Total price to upgrade current setup: $1515 (You can see why I’d rather just get the 27″ iMac no?)
  • Next up on my list is a Drobo S (NEW at only $799!) & of course I’d need 5 2TB hard drives to go in it ($699.95).

  • Last, but not least is a TiVo. You see, I absolutely HATE my Verizon FiOS DVR. I hate that in order to use it I have to have their crappy ActionTek Router and then piggy-back my Apple Airport Extreme network setup off of it. So if I could just get rid of that stupid DVR I could ran a CAT5 down to my Airport Extreme and skip the bandwidth throttle on my 50MBPS connection. That would be great… how can I do that though? By getting a TiVo (yay!) (TiVo HD = $250 normally $300). Add in a 1TB drive to store a whole lot more since I can upgrade it myself for only an additional $80.

And that about sums up my main dream items right now. Is there anything technology related that is in your ultimate setup wish list? Anything I should know about but have somehow missed? Let me know in the comments :)

Share It:
[del.icio.us] [Digg] [Facebook] [Google] [MySpace] [Newsvine] [Slashdot] [StumbleUpon] [Email]

See Original Post

Doctype

I just found out about Doctype.tv and I am _insanely_ excited:

Share It:
[del.icio.us] [Digg] [Facebook] [Google] [MySpace] [Newsvine] [Slashdot] [StumbleUpon] [Email]

See Original Post

Katie’s Amazing Writing, Publication, and Some Family Love

Katie has had a busy week.  She’s had to deal with a financial roller coaster from a publisher, creating several felt fruit projects, mentally prepare for turning 21, take care of a very emotionally uncertain 17-month old, and discovered that her font was actually published along with her layout.  We also got to take some time and do things together as a family including a fun walk around the neighborhood.

We got a letter earlier this week stating that the company who published her most recent page was trying to avoid bankruptcy.  In order to do this they were offering most of their payees a 40% settlement.  We failed to get the paperwork to them in time (not that Katie was ever really able to decide if she wanted to or not in the limited time we had).  The response was due yesterday by 5pm.  We checked the mail this afternoon and her check for her layout was there waiting in the full amount (woot!)  We still have to get a check for her font that you’ll see in a second, but at least she’s got part of her hard-earned money so far.

Without further ado, I’d like to turn the focus over to the good news.  Katie was published in the most recent publication from Simple Scrapbooks.  This special publication is called, “Scrapbook Play With Photos.”  Her layout is featured as the second out of 145 layouts!  Her handwriting is also featured as a font throughout the entire magazine.  Her font will eventually be available to dowload online over at http://www.simplescrapbooksmag.com.  You can download her font from Katie’s blog.  Here are some photos of her layout and font:

Katie's Font From Simple Scrapbooks,
Katie's Handwriting as a Font
Katie's Most Recent Publication
Katie's Most Recent Publication

Katie was also kind enough to take some photos of Paisley this week while I was at work.  They are absolutely adorable so I wanted to share them with you as well. There’s even one of Katie that she took of herself not knowing I’d post it ;)

The Things I Miss While Working
The Cure to a Bad Night's Sleep
Diving In
Eating More Than She Can Chew
Eating More Than She Can Chew

We also had the chance to go on a nice family walk together this week.  Here’s some of the cute pictures we got of Paisley walking with us for the first time in our new neighborhood.

Paisley Walking with Dada
Paisley Walking with Dada
Paisley Walking with Dada
Paisley's Cute Legs & Feet
Tiny Feet Making Quick Progress
Paisley Walking with Mama

Finally, I just realized tonight that although most people I see everyday know that I am growing a beard, the ones I don’t see everyday (including family) don’t necessarily know that.  Here’s a picture Katie took of me a little less than two weeks ago when my beard was about six weeks along.

I'm Growing Into a 'Manly Man'
Share It:
[del.icio.us] [Digg] [Facebook] [Google] [MySpace] [Newsvine] [Slashdot] [StumbleUpon] [Email]

See Original Post

Rails and large data strings in MySQL (longtext)

During my day-job this week I came across a situation where we had nice functioning code very near to our launch of a Rails application. We had just completed migrating over some historical data from another database (have I mentioned how much I love rake in the past, if not I may have to do a blog post about that too). Anyway, the data all migrated over in a matter of minutes and after invoking a few more custom rake tasks that were simple to write we had every record in the exact same position as it was originally.

The cozy aura of accomplishment had settled upon our little team when we soon discovered that all was not well in Rails-land. You see, we are processing data at defined intervals (on a per-record basis by an attribute on the object). We have a cron job setup to invoke a rake task that checks and sees if each record needs to be updated or not (I love .minutes.ago and built-in timestamp fields btw). Then the rake task fires off the method call to update with the new data as often as needed. After the update is complete we parse the new data and create a JSON string that is stored in the database (for performance over parsing every time we want to display it). We also do a combination of all the past data sets we’ve received (one for 24 and 72 hours each) and store those in JSON format to the database as well. This worked out great on all our sample instances where our objects didn’t have hundreds of data sets being merged and combined into one long JSON string.

However, once we get some live data our application started blowing up rather quickly. We came across an ‘rbuff’ error (or something weird and very vague in its meaning) and spent a little bit of time realizing that the string we were trying to write to the database was more than 64KB. We had set our fields to ‘text’ and it was truncating our data (and hence blowing up all our JSON.parse methods to get our strings back into Ruby hashes). The fix seemed fairly easy, we just had to change our column types from ‘text’ to ‘longtext’.

If you do a Google search you’ll find several ways to have MySQL create a column in the table with a longtext type in Rails. However, none of them worked for me (we tried :text, :limit => huge_number as well as :text, :limit => 64K+1, and several other methods we found online). I couldn’t find any documentation to indicate that Rails had added in support for :longtext as an actual column type as it seems to be MySQL specific. My pair suggested (for the 10th time) that we just put :longtext in our migration file instead of :text and see if it worked. I’m not as much of an off-the-cuff kind of guy as he is and I was skeptical it would work as so many blogs said to do it the ways we had been trying. Well I finally gave in and said, “Okay, well try it your way, but I bet you’re wrong.” We edited the migration to:

change_column :table, :column_name, :longtext

rake db:migrate and all of the sudden our MySQL table was showing a column type of ‘longtext’ as we had wanted all along. Needless to say I was rather embarrassed that this wasn’t better documented and I lost the bet to my pair. My question now is, does anyone know if :longtext as a column type is supported on other database types or is tied directly to MySQL with Rails? I can’t seem to find any documentation for this as a column type anywhere so I’m not sure if it is new to Rails 2.3.2 or if it just has been overlooked in the docs. As the searches I performed hadn’t brought anything back of any use for migrating my column to longtext I figured I should try and make sure I at least get a blog up about it to help anyone else who may be in a similar situation.

Share It:
[del.icio.us] [Digg] [Facebook] [Google] [MySpace] [Newsvine] [Slashdot] [StumbleUpon] [Email]

See Original Post

Integrating Controllers, jQuery, JSONP, and Remote Domain Requests with Rails

I’m developing an application that needs to have a normal web presence (typical HTTP/HTTPS) as well as a very easily consumable 3rd party API. With these requirements in mind I easily decided to run with Ruby on Rails (.to_json anyone?) I’ve been working on it for over a month now and have encountered a situation where my controllers are getting a little large due to having to handle logic on whether the request via the API url was a Javascript AJAX requests or a regular HTTP request. Generally this is easily solved in the respond to block with something like:

respond_to do |format|
  format.html # reports/show.rhtml
  format.js { render :partial => 'reports/show' } # reports/_show.rhtml
end

This example is just rendering a partial that is also used in my show.rhtml to save updating more than one file at a time. However, my current project started turning into things like this (due to the API methodology we had decided upon with the client in advance that got extended into doing things we hadn’t anticipated):

# show method
respond_to do |format|
  format.html # reports/show.rhtml
  format.json { render :json => @report } # json format of the report data
  format.js { render :partial => 'reports/show' } # reports/_show.rhtml
  format.js_vdata {
    render :template => 'reports/show.visual_json', :layout => false, :content_type => 'application/json'
  }
  format.table {
    render :template => 'reports/show.html_table', :layout => false, :content_type => 'application/json'
  }
  ... [more formats for special MIME types here with customized views all from the same report data] …
end

As you can see this code was being extended to generate multiple kinds of reports for loading via an API with AJAX requests. The extra formats are all being returned as JSON in order to allow for JSONP and remote-access from other domains and then the user can display the requested data / customize it as they desire. But how did I go about providing those same views to users on the web application itself? Create another format just to render the same view for regular HTTP requests? Definitely not very DRY. So it occurred to me that the following might be a possible solution:

#Controller show method
respond_to do |format|
  ...
  format.js_vdata {
    if request.xhr?
      render :template => 'reports/show.visual_json', :layout => false, :content_type => 'application/json' and return
    else
      render :template => 'reports/show.visual_json', :layout => true, :content_type => 'text/html' and return
    end
  }
  format.table {
    if request.xhr?
      render :template => 'reports/show.html_table', :layout => false, :content_type => 'application/json' and return
    else
      render :template => 'reports/show.html_table', :layout => true, :content_type => 'text/html' and return
    end
  }
end

#View template for reports/show.visual_json
< %- if request.xhr? -%>
  < %= @report.visual_data.to_json %>
< %- else -%>
  
  < %=debug @report.visual_data %>
< %- end -%>

Although this was a basic proof of concept there was already a problem with it. Any request coming from a remote domain would send requests for ‘jsonp’ and would not be recognized by request.xhr? (at least with jQuery 1.2.6 on the server we were consuming this API). I’m not sure why this was, but it seemed to be the situation I had to work with. This meant those requests were getting the HTML version of the page (not fun for parsing via Javascript). The solution I found was this (please note this is a very initial stab and is more than open to refactoring suggestions):

#Controller
before_filter :set_request_type

#show method
respond_to do |format|
  ...
  format.js_vdata {
    begin
      render_dynamic_template('reports/show.visual_json')
    else
      render_dynamic_template('reports/show.nil')
    end
  }
  format.table {
    begin
      render_dynamic_template('reports/show.html_table')
    else
      render_dynamic_template('reports/show.nil')
    end
  }
end

private
  def set_request_type
    @ajax_request = true if request.xhr? or (params[:callback] && params[:callback].include?(’jsonp’))
  end

  def render_dynamic_template(template)
    template = ‘reports/show.nil’ if template.nil?
    if @ajax_request
      layout = false
      content_type = ‘application/json’
    else
      layout = true
      content_type = ‘text/html’
    end
    render :template => template, :layout => layout, :content_type => content_type
  end
#View template for reports/show.visual_json
< %- if @ajax_request -%>
  < %= @report.visual_data.to_json %>
< %- else -%>
  
  < %=debug @report.visual_data %>
< %- end -%>
#View template for reports/show.nil
< %- if @ajax_request -%>
  < %= [nil].to_json %>
< %- else -%>
  
  < %= 'There is no data at this time.' %>
< %- end -%>

Also, the best tutorial I could find for implementing jsonp support with a quick (like 2 minute) Google search was over at Sitepoint

And that should allow you to render both html and json/jsonp results based upon the kind of request coming in. Obviously it makes an assumption that remote jsonp requests will provide a parameter of ‘callback’ that includes ‘jsonp’ in the string, but given that it is your API that’s not a huge requirement to impose and you can customize it to how you see fit.

If you know of a better way to go about approaching this kind of task I’m more than open to being educated, but given the short time-frame I had and the few tutorials specific to jsonp I found this to be a pretty good first stab. Hopefully this post will help someone else if they find themselves looking for some way to accomplish similar tasks.

Share It:
[del.icio.us] [Digg] [Facebook] [Google] [MySpace] [Newsvine] [Slashdot] [StumbleUpon] [Email]

See Original Post