Podcast?

March 13th, 2008
Posted by hcatlin

I’m thinking of getting back to doing a podcast. I used to have a popular one.

I want questions submitted.

Tech questions are OK, but not preferred. I prefer questions that require opinion.

So, ask away if you can think of anything. Or if not, let me know if you’d like to listen to a podcast of me just doing my thing. Perhaps if you have enjoyed my interviews before or something like that.

Thanks, Hcat.



Announcing RubyFringe

February 11th, 2008
Posted by hcatlin

We at Unspace had started to become a bit dissolusioned by the conferences we have been attending. Leaving us with the feeling that we really don’t like going to conferences. We sat down and asked ourselves why.

The result is that we are doing the insane task of throwing our own conference called RubyFringe. We are super excited that other people like the things we are doing and we’ve been able to get every single speaker that we wanted to have at the conference. We had a list of 10 “dream speakers” and we have all 10 now.

Check out the Rethink post here about it.



scoped_struct

January 29th, 2008
Posted by hcatlin

So, Mike Ferrier tossed me this idea a long time ago… and I was very excited about it. Its something I often wished I could do.

For the Rubyists out there, check out this awesome new software release!

http://mikeferrier.ca/2008/1/28/scoped-struct



Seriously?

January 18th, 2008
Posted by hcatlin

I don’t know how long this will remain up.. but check out this page on Zopa.com

https://us.zopa.com/co/AboutMe.aspx?Id=26



Everybody Votes?

January 8th, 2008
Posted by hcatlin

This is an essay written by one of my good friends from college about the Nintendo’s Everybody Votes channel on the Wii. Its a pretty interesting looking at a pretty strange little application that NIntendo has cooked up.

What possible purpose could there be in a Wii polling application? Once I played a little with it though, I began to see the genius behind it. By spacing out the polls to one every other day or so, Nintendo ensures that the user plays with the Wii every couple days to check out what the new poll question and to see what one’s results were for predicting the outcome. Each Mii is ranked by its predicting accuracy and told about its “distance from public opinion” and so forth via a snazzy interface. The point is that once Nintendo has users checking the Wii every couple days in order to try the new poll question, see tomorrow’s weather, and read a couple headlines from the AP, users are more likely to think, “Hmm, I guess I should go ahead and get a new game for this thing, since I’m always just fiddling with the channels anyway.”

He goes on to talk about the roles of gender in gaming and the representative numbers shown through statistics made available by Nintendo.

Check it out here, yo.



Haml 1.8.0

January 8th, 2008
Posted by hcatlin

A new, faster Haml has been released. Significant internal changes have been made for this release. In fact, 39 different people submitted patches to Haml since the last release (about 2 months ago). I just want to say thanks to Nathan and the whole community for helping us get this release out of the door.

Nathan has the deets.



Hell has Frozen

December 12th, 2007
Posted by hcatlin

So, as many of you know, I’m all about OS choice in the Rails community. I very much dislike the conformity to the all-encompassing Throne of Apple. Anyhow, yesterday my PC broke and in a momentary decision I decided to give another try at Macs. I’ve already had 3 Macs (2 with OS X) and was generally disappointed with them. After that, I then moved on to Linux once I got bitten by the Unix bug. I have used Linux for the past 2 years as my primary development and home usage environment.

However, yesterday in my fit of rage at my loss of a harddrive, I decided to run down to the Apple store and buy myself another Mac to see if everything really had changed. Jeff and Lukas are always on about how Macs are perfect now and that I should try a newer version of the OS and how it changed their lives.

I figure, at best… they are right and this time it will click better with Rails development. Or, at worst, I have much more authority to bash Mac-worship. Besides, I’ve had a lot of my portfolio in Apple and it has done well for me (I bought it at $14 a share!). So, why not bump up their sales numbers to make me a little money back.

So, things have NOT gone smoothly. I was really hopeful about the whole “Rails installed” thing. I figured I could just drop my $4k+ and then I would be able to immediately develop. Nope!!!!

First, the computer did not come with Leopard installed. I had to use the upgrade DVD. So, I had to wait 2 hours at my desk while it installed the upgrade. And guess what… it failed! My machine was thus instantly busted. It said something about the hard drive failing.

You heard it here, I had TWO hard drives fail in one day. So, I went back to the Mac store where they wanted me to schedule an appointment for the next day to meet with a Genius… yes, I had purchased the computer 2 hours before and they wanted me to schedule help for the next day when I knew full well that the HD was bust (I had the error screen open for them). I had to put a bit of pressure on them, and finally the manager came and was willing to switch it out.

6 hours have gone since purchase. I get it up and running and it takes 2 more hours to do the upgrade again with my new machine (they had none with Leopard pre-installed). At least it worked this time. 8 hours.

I open up the console… Subversion is installed! Nice! I didn’t know that. Things are looking up. I check out one of my rails apps… awesome! Oh, but wait… no mysql support. Let me go through all of the posts and pages that I have had to go through to get this task done…

http://documentation.rubyonrails.com/2007/10/26/today-is-leopard-day http://www.garyharan.com/index.php/2007/12/11/installing-rmagick-gem-on-os-x-105-leopard/ http://hivelogic.com/narrative/articles/installing-mysql-on-mac-os-x http://darwinports.com/download/

Wait.. where is gcc…. wtf? I didn’t see any developer disk. More googling. Oh, GCC is on my DVD… well, that’s at home. Ok, so I assume I can just download the 100MB install of GCC and build etc, right? WHAT? No? I have to download 1.1GB of random apple tools if I want to compile anything. So, that’s 2 hours to download that before I can do anything.

Screw off. You’re kidding, right?

I just want to build a gem. Or like, install a database. Why is this hard?

On the plus side…. I’m very happy with OS X’s support for multiple monitors. I’m happy with having easy Wifi support. Those two are MUCH better than on Linux. However, let me show you the entire process of installing a fully working rails stack with mysql support and rmagick on Ubuntu.

  1. Roughly its this sudo apt-get install ruby-1.8 rubygems build-essential ruby-rmagick ruby-mysql sugo gem install rails mongrel merb -y

Done! That’s it. Nothing funky. No need to go read tons of blogs. And there is no excuse for Apple. This should be easy. I’m currently at 12 hours of trying to get a basic Rails app running… and I’m not really that close. I’ve had a fully day wasted now and I’m not really close.

This is not ok. There is no excuse for not having easy package management installed by default. Its fucking 2007. I’m not very happy right now. This OS is great for designers and noobs, but apparently Apple could give a shit about advanced users. I’m not saying there aren’t good things. There are…. but this is far from even being a decent Unix-style development environment.

Steve, take 2 minutes from your day of adding Wizzes, WIshes, Zooms, Fades, Plinks, Boinks, Slides and etc…. and put the 1 week of developer-time it would take to make this a solid environment. As a shareholder… please!



Merb Article

December 3rd, 2007
Posted by hcatlin

I wrote a pretty in-depth overview of Merb over at Rethink for anyone whose interested.

Read it!



Attachment_fu Gotchas

November 26th, 2007
Posted by hcatlin

I’ve been struggling a bit with some problems uploading files with attachment_fu recently. I’m going to go through the common problems I’ve had. Attachment_fu is the best thing I’ve seen out there for upload handling. And, hopefully mentioning these gotchas will save some people some time.

1) Mongrel’s Dying with S3

This is really a problem with the AWS-S3 library. The problem is that the library uses persistent connections by default, and the last thing that Mongrel wants to deal with is keeping a persistent connection open to an outside service while its trying to serve unrelated web requests. My current theory is that the multi-threading + Mutex means that the persistent connection is ignored and times out, then when the app comes back to try and say hi to the connection, it just waits forever. This is totally unproven, but its the theory I’ve got in my brain.

Luckily, this is easy to fix! Just add this to your config/amazon_s3.yml

development:
  bucket_name: mybucket_develompent
  access_key_id: 1RX1190JQBAV
  secret_access_key: RN2nBEFhYu8k5S3kVXtM
  persistent: false

Obviously, do that with all three types of connections. Dead mongrels, no more! But, we aren’t done with S3….

2) EofError with S3

This generally happens when you have thumbnails. Why does it happen? Because it takes too long for Rails to have multiple POST conversations with S3 and something weird happens with the connections. Yes, even if you turn off persistent connections. This is usually ok for single-file uploads to S3… aka, no thumbnails. It is really unfortunate that we can’t use Thread.new in Rails with any consistency because doing the uploads to S3 after the request is finished would be really fantastic and would nip this problem in the butt.

The only known solution is to switch to file_system. That, or use Merb which is thread safe.

3) Good Attachments Validate as not having a Size

I’m still a bit unclear about what is going on with this one. It seems to be inconsistent and mostly has to do with if the upload object given by the OS is a StringIO or a TempFile. The way to tell this one apart from #4 is that when you use debugger… the #size attribute isn’t set at all. You’ll get a “Size is not included in the list” with a #save! .

Add this line to your attachment_fu.rb file in the plugin…

def uploaded_data=(file_data)
  return nil if file_data.nil? || file_data.size == 0
  self.size = file_data.size # <----- THIS LINE 
  self.content_type = file_data.content_type
  self.filename     = file_data.original_filename if respond_to?(:filename)
  if file_data.is_a?(StringIO)
    file_data.rewind
    self.temp_data = file_data.read
  else
    self.temp_path = file_data.path
  end
end

That should solve that!

4) Larger files FAIL!

Ok, this one is a gotcha and not at all a bug. In fact, I’m kind of embarrassed that I ever had this problem. Let’s say you have a general file upload area. Not just images… you want attachments put onto something on your site. And let’s also assume that this is a protected section. So, you build your attachment_fu things to look like this.

has_attachment :storage => :file_system

And that’s all you do because you don’t care about type, size, etc. GOTCHA! You may not have specified a max_size, but attachment_fu did! It sets the default max_size to 1.megabyte. DOH! So, the error you get is the same one as above… “Size is not included in the list” That error message could be a touch more useful, IMHO. However, this is also an easy fix…

has_attachment :storage => :file_system,
                   :max_size => 100.megabytes  # Since this is admin, and we don't care

So, there you go. Hopefully these helped some of you out there who have been using this non-released software. I guess that’s what we get for living on the dangerous side!



Bad Ruby

November 13th, 2007
Posted by hcatlin

This is never acceptable in Ruby. Ever.

$_variable2 = String.new("development")


make_resourceful 0.2 released

November 10th, 2007
Posted by hcatlin

So, we just released proper API documentation and a brand new version of make_resourceful.

I’ve done a terrible job of marketing make_resourceful mostly because I’ve been so busy recently (using m_r on stuff!).

Luckily, Nathan is saving my ass as usual: Official Release Notice.



ZipLocal Launched!

November 1st, 2007
Posted by hcatlin

I’ve covered this a few times on this blog, but I’m extremely proud to announce that all of these months of hard-work have finally paid off. Ziplocal.com has launched!

Today there are people out on the streets in Toronto handing out stuff about Ziplocal. If you see them, think of me!

We have a lot more stuff we are starting on immediately for the site and I can’t wait to get to blog about all the new features and some of the subtle design decisions that are unique to the site.

Also, this is AFAIK the largest deployment of Haml and Sass and make_resourceful ever!



Google Maps and Family History

October 28th, 2007
Posted by hcatlin

I like that as I am in my mid-20s, I can already tell what obsessions and hobbies I’ll have even later in life. I think this happens to everyone. For instance, fellow Unspacer and Rubyist Mike Ferrier, has recently been entertain by an ornithology book (bird watching). I told him that his fate is set in the stars, he’s going to be a bird watcher when he retires.

For me, I think its definitely family history that enthralls me. When I was younger, it meant very little to me, but as I’ve gotten to my adult life, I am absolutely interested in family photos and facts and information. I feel much more connected to the people before me. It was the realization that I was those people. It wasn’t me, but parts of the same energy-chain-reaction that created me has lived all over the world. It is like having past lives… but without all the mumbo jumbo!

Anyhow, the point of this post is that someone on one of the far wings of the family tree (connected by the Saylor family) used Google Maps satellite photos to send out an image of a family graveyard he found! The graveyard is circled in blue and the nearby family chapel they had is in blue.

Full link

How weird is it that in modern times my grandmother is utilizing Google Maps to do family history research and email forwarding lets people all over the world know a bit about their past. That’s really cool stuff.



Project Mention on Access Blog

October 25th, 2007
Posted by hcatlin

My old business partner Ryan McMinn is now at Microsoft and wrote an “Access Blog” post about a project we did together that integrated with Access. Never thought I’d see a project I built references on an MSDN blog!

Is this the first time Rails is mentioned on an MSDN blog?

Read it!



Stocks: VM + ZIP

October 24th, 2007
Posted by hcatlin

I don’t know if people know this about me, but one of my hobbies is trading stocks. I’m a computer nerd whose a closet business nerd. Anyhow, I’ve recently been pretty active in my portfolio. I bought Apple (AAPL) in 2004 and put most of my (tiny) assets into it. At the time, I was interested in buying a Mac and so I thought that the price was a little low. This is the chart from when I bought to when I sold. Its not that I think Apple’s in trouble, I just think the price has “adjusted”. I mean, how much more positive wall street buzz do they need? I’m looking for my next undervalued stock.

So, my tiny assets turned into bigger assets. And now I’ve put a lot into two companies. First, is one that I’ve been working for… Ziplocal. The stock has had a rough go, but I’m seeing the makings of a huge turn around for them and I’m just honored to be involved in it. So, I’ve decided to put my money where my mouth is and get into that one pretty strong. I mean, at this point, its hard to go lower. And, I really have a lot of faith in their management and the team they have together.

The second stock I’ve put in on strong is Virgin Mobile USA which IPO’d a few weeks ago. The main reason I bought into it is that several people I know use the service and would recommend it strongly. Their branding is young and they are being very aggressive in a market space that is already (admittedly) pretty crowded. There are a couple things I like. First off, Virgin Group companies tend to have very strong financial pasts. That is to say companies occasionally explode because of bad financial management (regardless of the functioning of sales). I put Virgin companies very low on this list. Branson has a lot of smart people around him that keep their eyes on every number for his vast empire of separate companies. And each of those companies have private and public investors. That means lots of eyes on the books. Secondly, they are willing to take risks with new idea, which I like.

Virgin Mobile just announced that they are going to let users upload wallpapers and ringtones to the online store and make money from them. That is, if your a 20 year old in art school with a Virgin phone, you can make $0.10US per download of anything you put online for sale with your handset. That’s an amazingly powerful idea! Also, they announced that they are going to allow people to list themselves in phone books and listing services. They are speaking to my generation with that. I don’t own a home phone. And, I have lots of minutes. So, I’d much rather have my number listed for someone to find. Cell phones are no longer secret exotic numbers. Its the number that every service, person, and group I know has on record for me. I’m not saying everyone is going to do it (or that they should), but I get excited that Virgin Mobile is thinking outside the tradition box for a cellphone company.

The last thing I really like about them is their overall pricing model. Their entire system is automated and easy to use. Their entire network is set-price for them because its really owned by another operator (or Bell in Canada) and they pay per minute and you pay per-minute. They also don’t keep stores. That means, their sunk-costs per customer are just the price of the phone-discount. Otherwise, every customer that goes past their profit-line (about 6 months of use) is nearly pure-profit on a per-unit basis. That’s a fantastic business proposition in my book.

In the computer world, we’d say that they are amazingly “scalable.”

Anyhow, I haven’t really posted about this before. And its a bit weird to post about my stock purchases. But, its a topic I get really excited about and I wanted to share with my readers.