when you don’t create things, you become defined by your tastes rather than ability. your tastes only narrow & exclude people. so create.
so go out and create something!
when you don’t create things, you become defined by your tastes rather than ability. your tastes only narrow & exclude people. so create.
so go out and create something!
In one of my apps, the need arose to use a new thumbnail size (using attachment_fu). My problem was I had a ton of existing images that I would have to create this thumbnail size for. But how? A google search didn’t turn up much. So i threw together a little instance method that would make quick and short work or creating (or re-creating) a thumbnail for images i already had in my database. I just stuck it in an initializer with my other attachment_fu hacks. It goes a little something like this
module Technoweenie
module AttachmentFu
module InstanceMethods
def create_thumbnail_size(target_size)
actual_size = self.attachment_options[:thumbnails][target_size]
raise "this class doesn't have a thubnail size for #{target_size}" if actual_size.nil?
tmp = self.create_temp_file
self.create_or_update_thumbnail(tmp, target_size.to_s, actual_size)
FileUtils.rm_rf(Dir.glob(File.join(RAILS_ROOT, 'tmp', 'attachment_fu', '*')))
end
end
end
end
nothing fancy and by no means the “best it could be” but meh, it gets the job done for me. Here an example of usage:
Say you have an Avatar class that you stuck your “has_attachment” on and you’ve decided you want to generate thumbnails of a new size. You designate this new size as “smaller” (in your has_attachment options, you’ve added it like so, :thumbnails => {:thumb => ‘75×75>’, :smaller => ‘25×25>‘}). To create “smaller” avatar thumbnails, you’d grab all the avatars that need one and call create_thumbnail_size on each one. Like so…avatar. create_thumbnail_size(:smaller)
Voila. Thumbnails are recreated and you can move on. cheers!
As I was waiting for these very pages to load will finishing this little redesign, I decided to watch a few TED talks videos to keep me awake. I’m glad I did. The talks I watched were the right mix of engaging, intriguing and inspiring. I’ll post a few of the ones I dug after the jump…
I’m mostly not well known for two things:
1. My stunning good looks 2. My horrid picture taking.
So it’s not surprising that a lot of the photos I took (or that had the sad misfortune of being taken were taken by my camera), ended up a tad on the blurry side. After combing through the batch and picking out the ones I thought were the most awesome (see if you can notice the trend), I decided to post a few of them here to give the world a sense of what my first SXSW experience was like. This first one’s free and the rest are after the jump…

My notes from the Social Media panel. The panel is going to discuss how to sell social media marketing to companies and why they should be doing it if they aren’t.
-A good way to sell social media marketing to the big wigs would be to speak to what they’re interested in. Gaining more exposure, getting in touch with users etc…
-Metrics are still a big deal for companies.
and that’s about it because i was bored out of of mind. Maybe I’ll just post about the panels that move me to do so.
Figured I’d do some SXSW blogging while I’m here so , here it goes.
I’m currently sitting in the Art of Speed panel discussion with the kick ass panel of Mike Cassidy (currently of BenchMark Capital), Evan Williams (currently of Twitter), Cali Lewis (of GeekBrief.TV) and Tim Ferriss (of The Four Hour Work Week). I’ll be listing my own notes here for my own selfish reasons (a personal archive of sorts) and for your perusal. Hope it’s worthwhile.
-Mike Cassidy has a really impressive resume.
-Evan Williams is speaking about reaching critical mass and how SWSX 2007 helped Twitter skyrocket.
- Twitter is apparently really big in Japan.
-The more Evan Williams is talks about how SXSW helped Twitter get huge, the more I realize “mass adoption” is more about having something usable and ready to go when the right time comes. “Luck favors the well prepared” comes to mind.
-Note to self: go where the market takes you.
-Cali is talking about how passion is key and can’t truly be faked. Doing what you’re naturally interested in allows you to put in what ever amount of work is required to make it work.
-I really need to start watching GeekBrief.tv, see what’s it’s like.
-Thought-Leaders and the Traffic-Leaders are not necessarily the same people. Good point. People seem to always go after the Traffic-Leaders (the Scbole’s and Arrington’s of the world).
-Wait a sec, Cassidy invented Xfire? He’s totally got to be into WoW.
-Cassidy touches on how you need to go above and beyond to get the right people. He invites recruits over to his house for dinner and sends congratulation flowers over to new hires, welcoming them to the team. Also mentioned how he’ll pay more for the right developers.
-Evan Williams says they don’t have a real big “feature implementation” process and how they try to understand how customers feel but being customer’s themselves.
-Evan makes an interesting point on how tricky it can be to balance the appeasement of the power users while planning for “regular” users down the road. An example: to use Blogger when it first launched, you had to put in your FTP info. While the hosting of content didn’t come until later, the ftp features are still there to this day (...i think)
-From Cali – Don’t promote your goodness too early. Give yourself some time (or a few shows if you’re a vlogger) to work out the kinks and to find your voice and flow.
-Ready.Fire.Aim. – the key to quick development
-Things you shouldn’t do too quickly: handling internal team morrale issues, talking and meeting with people (don’t skimp just to meet more people in a shorter amount of time).
- Cassidy “if moral is high, the team can go 6 months without salary” (paraphrased) – interesting…
now it’s on to Q&A, I don’t think I’ll post any of them unless there’s something really compelling.
Overall, good panel.
Couldn’t the Hard Rock Cafe Memorabilia site have been done in Flash?
Cheers to Google for making it easier to grab a user’s GMail contacts with their brand spanking new (to us) Google Contacts API. No, there’s no OAuth support but this is an awesome start.
Financial Times is going to be giving students (apparently you really do have to be a student, what about those of us who are students of the school of Hard Knox?) free subscriptions to all who want. The subscriptions will only last for a year at a time, but those interested will be able to renew the subscriptions for free for up to 4 years.
I can’t say I read the mag (because I don’t) but I wonder if this can be seen as getting a kind of free financial education of sorts.

That’s different from them, and a bit refreshing. I still hate how I can’t just hack together a Silverlight-app as easy as I could a Ruby app but meh, I don’t have the time these days anyway.
...because I’ll be there! I’ll be the shining ray of sunshine and awesome easily spotted in any crowd. If you see me, feel free to say “hi” or “ZOMG it’s really you!” or whatever. I get them all.
Oh, now it’s on!
I’m loving how they’re approaching the launch of their API by sticking by keeping everything sandboxed and letting everyone play on a level playing field (no one got early access to the api). It’ll be fun to see what people do with it (and you know I have stuff brewing!).
So I finally got accepted into Joyent’s “free Accelerator’s for Facebook appications” program. I plan on documenting working through a Facebook app with Rails from beginning to end in this big push to relaunch this site. I may even release the source code too but that more or less depends on how “generous” I’m feeling. Oh and by “generous” I mean if more than 2 people read that post and actually want the source or not. We’ll see.
Also, If there are any other aspiring Ruby/Rails/Human Facebook devs out there interested in Joyent’s free Accelerator program*, you should know that it took me a few weeks to of waiting to get my account. Your time could be longer or shorter depending on demand. I personally was expecting something a little quicker and despite my inner-pulling to let you feel the same patience-pain I felt, I decided it was my duty as a decent netizen to let you know. So, enjoy!
I had a few problems trying to get the Mephisto trunk to run with the current edge Rails, my “few problems” really just being unable to run rake db:bootstrap without getting a wrong number of arguments (1 for 0) error. After trying a few things, it looked like my problems were rooted in old rubygems and rake versions, upgrading both allowed me to bootstrap just fine. Figured I’d throw this out there incase anyone else was having problems.
Or, go with one of the given options:
ActionController::Base.cache_store = :memory_store ActionController::Base.cache_store = :file_store, "/path/to/cache/directory" ActionController::Base.cache_store = :drb_store, "druby://localhost:9192" ActionController::Base.cache_store = :mem_cache_store, "localhost"
It’s also easier now to roll your own caching system by subclassing the ActiveSupport::Cache::Store and writing your own implementation of the read, write, delete and delete_matched methods. Ryan “Edge Rails” umm Johnson? (no idea what his last name but I had to use something, I couldn’t just leave it as his first name then a nickname, that would be silly) has the scoop and by “scoop” I mean more than what my lazy bum is going to write.