I moved my blog to: http://macournoyer.com/blog.
New feed is at http://macournoyer.com/blog.atom
I know, I’m asking a lot… But I guarantee you’ll have a lot more fun if you update your feed to point to my new blog.
Thin 1.0, codename That’s What She Said, is out!
gem install thin
Yes 1.0! That doesn’t mean it’s bug free or anything. But, it does mean that it’s been running on a number of servers and no show stopper bugs have been found since a while.
A lot of people have helped me achieve this milestone. I’m very proud to say that Thin is no longer my project, but the collaborative work of many bright people.
Here they are. If you like Thin or if it helped you in any way, please take a couple minutes and recommend them.
(If you contributed to Thin in any way and are not on the list, that’s an error so please let me know!)
Also thanks to everyone who’ve taken the risk to run Thin on their website.
From meshU site:
meshU is a one-day event of 12 focused workshops in three streams (design, development, management) given by those who have earned their stripes in the startup game; people who can talk knowledgeably about everything from interface design to using Amazon’s S3 distributed server network. We hope this addition to mesh will meet a growing need in Toronto: the need for practical, down-to-earth information about tools, knowledge and expertise for startups, web designers and developers of all kinds.
There will be some awesome and famous speakers: Daniel Burka and Leah Culver of Pounce, John Resign, creator of jQuery, Kevin Hale of Wufoo, Avi Bryant of Dabble DB, Jon Lax, Ryan Carson, Allistair Croll and Reg Braithwaite, it’s gonna be crazy-sexy-cool!
I hope to see you there!
So there I was last night, unable to sleep after Simone finally did went to sleep. I started to play with Why’s Freaky Freaky Sandbox. I knew some people thought about using this to run multiple Rails applications inside the same VM but nobody actually did.
Installing the Sandbox is kinda scary cause you have to patch Ruby and install it using
setup.rb which is not the typical
Patch Ruby 1.8.6:
cd /path/to/src/ruby-1.8.6 wget http://code.whytheluckystiff.net/svn/sandbox/trunk/patch/ruby-1.8.6-sandbox_needs.patch patch -p1 < ruby-1.8.6-sandbox_needs.patch make sudo make install
Install the Extension:
svn co http://code.whytheluckystiff.net/svn/sandbox/trunk sandbox cd sandbox sudo ruby setup.rb
See InstallingTheSandbox for the official guide.
It clones the Ruby environment and keeps all the objects seperated in their own freaky freaky sandbox! It’s a bit like running a VM inside another VM!
Rails + Multiple VMs, yeaaaah baby you guessed it!
So I’m hacking on this thing: http://github.com/macournoyer/rack_sandbox that runs a Rack application inside a Sandbox. I was able to run 2 very-very bare bone Rails applications (no db, no session, no plugins) inside the same VM, all served by one single Thin instance!
map 'http://myfirstapp.com' do run Rack::Adapter::SandboxedRails.new(:root => '/path/to/a/rails_app') end map 'http://mysecondapp.com' do run Rack::Adapter::SandboxedRails.new(:root => '/path/to/another/rails_app') end
I don't fully understand how the Sandbox works, I had to do some crazy hacking to make it work and haven't tested it with several Rails applications. A lot more work needs to be done before this is even usable.
But this allows to save all the memory overhead of running a separate ruby process which is about 60 MB on my machine. So instead of costing you 120 MB to run 2 simple Rails app it's only around 63 MB.
git clone git://github.com/macournoyer/rack_sandbox.git
Feel free to clone, pull and fork!
Since a few days now, I have the pleasure to be the father of the most beautiful baby girl in the world. You might say that all parents think their child is the most beautiful, but that’s because you haven’t seen mine. I’m totally objective, ok?
I’ve already started to teach her some basic Ruby.
It beez dat tiem of teh yeer agin, lol
Hai! Kittehs luv Crismus Trees very much! Dey liek to play wit dem, an eet dem, an mak tinsul hang out of der butt. But we mus remembah teh troo reesun we haf Crismus is cuz Ceiling Cat luv pien trees and he mak a holaday for dem. Srsly.
See dis piktur? Ceiling Cat in high plases cuz dat be wer he belong, srsly. Ceiling Cat don haf to stay in teh tree tho! He can has plases everywhar! Ceiling Cat can has part in ur Crismus? Uplaod yer pikturs or send dem to his proffet an show everywun wer Ceiling Cat hangz out in yer holiday decerashuns! Invisible sanity!
Yu can has a mery Crismus!
If you’re looking for something to do this holidays, I’d suggest renewing with The Bible.
Merry Christmas and happy new year to all my readers.
When James asked me if he could send RefactorMyCode to Digg, I said: sure. After all I spent lot of time on caching parts of the site so it would be fast. Ben and Fred also helped me spread the word with their networking ninja skills. By the time I went home that day it gained 30-40 diggs, but disappeared on the other link sites (reddit and ycomb hacker news). The server had no problem handle the load.
I kept checking my stats until I fell asleep.
7 AM: Checking my site… Huh! Not responding…
What can I do ?
I tried multiple things on my poor little 200 MB of RAM Dreamhost account. Whenever a new dispatcher process is started it’s killed right away due to the incredible number of simultaneous visits. I read some comments on Digg, damn those people are mean, . I make some coffee and realize the only solution it to put an index.html file at the root and turn Rails dispatching off. Doesn’t seem to work, I can’t even serve a static page! 15 minutes later it works! The home page shows the last snapshot of the live site I could take. And visits keep going through the roof, 30 000.
It was better then nothing and I think it was less frustrating for people to see at least the facing page.
On my way home I was pretty desperate that the only solution was to move everything to a new provider. That means it will be down until I can get an account and resetup the whole app (installation of Ruby gems for syntax highlithing require some black magic and lots of luck). That’s too long!
So there I was, yesterday night, trying to find a better solution with my site busting the 50 000 visits mark.
After all this, the site is now back online. Everything seems to be working well now. Even though the traffic is going down a little bit, I still got 5800 visits today (at 1PM).
I opened my inbox last night and had an email titled “Greetings from Google!”. Ah! nice try, spammers! Ok, I’ll just open it to laugh at what they came up with this time. But I’ve never seen any spam coming from @google.com before, strange.
Haha looks like a job offer.
That’s righty-dly-doo! I got a job offer (or more of a 17 interviews offer) from Google! Wahooo! What an honour! I couldn’t believe this email was dedicated to me,
all I do is copy code from other people (my lawyer told me to remove this).
Although this is really flattering, it doesn’t overcome my passion and excitement of working at a crazy startup here in Montreal, with the best people I ever worked with: Fred, Ben and Daniel. We might not have free food and Segways, but we have a fridge full of Gurus, an amazing view and a believe we can change the world (of recruiting, for a start).
I guess some people will think I’m crazy declining this offer. But for me, this is like waiting in line at the grocery, you always have 3 choices:
I quit my previous job because I truly believed in Standout Jobs. I chose to dedicate a part of my life to it and now is the time to stick.
Knowing when to quit or stick is hard. Like Seth Godin say it in his life changing book The Dip:
Winners quit fast, quit often, and quit without guilt-until they commit to beating the right Dip for the right reasons. In fact, winners seek out the Dip. They realize that the bigger the barrier, the bigger the reward for getting past it. If you can become number one in your niche, you’ll get more than your fair share of profits, glory, and long-term security.
Losers, on the other hand, fall into two basic traps. Either they fail to stick out the Dip they get to the moment of truth and then give up or they never even find the right Dip to conquer.
You always have 3 choices whatever you’re trying to achieve:
The only stupid choice in those 3 is the second one.
And whoever referred me at Google, thanks a lot! This is a great honour for me!
As a guy who have studied in software engineering, for most of my family members and friends I’m the guy to call when anything breaks on your computer, even though I’m clueless about computer hardware. So one day someone asked me to come by and see what didn’t worked right on his machine. A website didn’t worked. So I asked him to show me that website. He booted his computer, opened a remote desktop connection to his office network, wait and opened Internet Explorer. I said that he could just use Internet Explorer directly in his start menu. He tried clicking on the Start Menu and then on the Applications sub menu several times, with no success. The drop down Application menu kept disappearing because the mouse pointer did not follow the path of the menu box. He finally conclude that his way was faster.
Some people might argue that doing things the wrong way is faster.
Sure it’s faster, if you do it like that all the time!