Here’s the code and slides of my presentation : http://github.com/macournoyer/mor7/
Hope you liked it!
My software passion spreading place
Here’s the code and slides of my presentation : http://github.com/macournoyer/mor7/
Hope you liked it!
If you’re in Montreal next Tuesday, be sure to come to the next Montreal on Rails. I’ll be presenting Thin with a fanfare, dancers and pizza.
RSVP if not already done and do it fast, places are limited.
I’ll present some new features in the upcoming Spherical Cow release and recode Thin like I did at DempCampCUSEC, but this time, with one hand tied being my back and someone yelling at me in Russian. All this in 2 minutes (I don’t know yet what I’ll do with the remaining time).
Yesterday I presented Thin at DemoCampCUSEC. Things went pretty well and the other presentations were very good too.
My demo was basically re-coding a simplified version of Thin live, here’s the final result:
%w(rubygems eventmachine thin thin_parser rack).each { |f| require f }
class Connection < EventMachine::Connection
attr_accessor :app
def initialize
@parser = Thin::HttpParser.new
@data = ‘‘
@nparsed = 0
@env = {}
end
def receive_data(data)
@data << data
@nparsed = @parser.execute(@env, @data, @nparsed)
process if @parser.finished?
end
def process
status, headers, body = @app.call(@env)
body_output = ‘‘
body.each { |l| body_output << l }
send_data "HTTP/1.1 #{status} OK\r\n" +
headers.inject(‘‘) { |h, (k,v)| h += "#k: #v\r\n" } +
"\r\n" +
body_output
close_connection_after_writing
end
end
welcome_app = proc do |env|
[
200, # Status
{'Content-Type' => 'text/html'}, # Headers
[
'<html><body>',
'<h1>Welcome</h1>',
'<p>Welcome to my server!</p>', # Body
'<p><a href="/rails">My Rails app!</a></p>',
'</body></html>'
]
]
end
rails_app = Rack::Adapter::Rails.new(:root => ‘/Users/marc/projects/refactormycode‘, :prefix => ‘/rails‘)
app = Rack::URLMap.new(‘/‘ => welcome_app, ‘/rails‘ => rails_app)
EventMachine.run do
EventMachine.start_server ‘0.0.0.0‘, 3000, Connection do |con|
con.app = app
end
end
Hope you enjoyed it!
Montreal is white and snowy
Ruby is red and pretty
Rails is red (also) so lets party
Remember my Defensio plugin ? It is used on RefactorMyCode to keep the site clean of any spam and the users happy.
Defensio(hit refresh if you don’t see the new site) is now public, so you can get an API key in seconds and get to speed with my plugin in milliseconds (or less).
Congrats to the Karabunga guys!
Here’s a screenshot of my stats window:

Pretty cool!
And you can also subscribe to a feed, so you get notifications of spam in your feed reader.
I just came back from BarCampMontreal3. It was an amazing event! You really missed something if you didn’t came!
Here’s a remix of the notes I’ve taken from the (un)conference.
Hugh McGuire delivered a great talk about two of his projects: LibriVox and DataLibre. Excellent talk, that started up the event nicely. I didn’t took notes at that time so I can’t quote quotes, you had to be there.
(Oh I think I missed a couple one here…)
Marc-Andre Cournoyer presentation was boring… sorry about that. My computer crashed just when I plugged it on the projector. I had 5 minutes, so I improvised while waiting for the computer to reboot. But anyway, when I asked who knew about the project, a lot of people raised their hands, I was surprised!
Looks like a new language with a syntax similar to Java and built-in workflow stuff. I didn’t really understood it. Seems like a framework for building web apps with customizable business logic.
John Hansen, from Jetfire, posted a comment pointing to this article for a short description of Jetfire.
Avery Pennarun showed with his banking app, how deploying can be easy with desktop app. He showed, installing and updating, all with a simple click. The cool thing is, he did all this without using InstallShield or anything. He built it himself and said it took only 300 LOC or so. Impressive! He said it’s as easy as deploying a web app. Well I not sure from the point view of the user, he still has to click somewhere and be aware of the updating process.
Frank Lamontagne and Dan Simard presented their project. TimmyonTime allows anyone to fill in timesheets and manage tasks by IM. Sadly they couldn’t get the thing to work even tough they had 3 backups solutions! Somebody shouted you should have called it Murphy, Frank replied they also tough about calling it GeorgeOnTime but it doesn’t sound so nice… They did a great improvisation anyway and also organized another presentation afterwards to show the thing.
Francois Lane was next, announcing CakeMail public beta launch! The service, is for resellers only, it’s not branded. He had cool animated slides showing why they chose a cake as the logo and the name, because it’s all layers, API, something-I-forgot, plugins. It’s multilingual, has a couple of plugins for analytic, CRM and Google Maps. He also did a demo of it by sending and email to people registering to a mailing list live during the presentation, nice idea! Plus they offered cupcakes for lunch, they won me on that!
Evan Prodromou presented Keiki, a wiki for parents. After his success with WikiTravel and Vinisimo he was used to having free books and info. So when he and his wife got a baby he couldn’t travel that much anymore, that’s how he started Keiki.
Lunch was free! Sandwich, vegetables and salads. Dessert was offered by CakeMail, as mentioned before.
I had great talks with Denis Canuel, Mehdi Akiki about Blitzweekend and with Duncan More about CakeMail and multilingual issues in software.
Sylvain Carl
gave plenty of tips on how to start a startup in Montreal. 40 meetings rule, 40 meetings before anything happens, shit that’s a lot! One of his lesson was : Knowing what will be your features is not that important… Knowing what’s gonna happen next is more. Location doesn’t matter, it is possible Montreal, he met more then 10 VCs here he claimed.
Marc Laport is a project manager of TikiWiki a wiki engine that is very active, top 20 most active project on SourceForge! Lots of documentation, he showed a 950 pages manual. Some features that make it different from MediaWiki and all are: builtin multilingual, better permissions, custom theme.
Denis Canuel started with a quote claiming everyone is a journalist. He talked about his upcoming social news site. He gave a couple of hints on what will be the features by saying how timelines could be useful to display what happened around an event. But sadly he presented no demo, saying it was too alpha yet but still asked people to register for alpha on the site.
Erik Wright and David Lemieux presented StickyCal.
Learn about events before they happen, like music shows for example. It’s simple to setup, put an script tag on your page and you’re done. No authentication required and let your friends know you’re attending an event. It keeps the user on the band’s page. But again, no demo…
Pierre Phaneuf was next presenting his guide on making your website faster with caching using Modified-Date or ETags, compression and a couple of others. One memorable quote:
The faster way to handle a request : don’t handle it!
I wish this came before I had to optimize RefactorMyCode. But he forgot to mention YSlow!
Scott Annan showed MercuryGrove. Basecamp-like web app. Really looks like Basecamp + Highrise + Backpack.
Not enough time and the app was too slow.
Quick talk. Big company. They install a box on your web server and you get detailed real-time stats of the visits on your site.
Austin Hill was next with a talk on how to raise angel financing. Raising is like dating. You need to build a relationship first, not like getting a girl in bar. Look for second time entrepreneur, look for sold cie in your field., target groups of angels. Convertible dept is the preferred way. There was lots of interesting questions after the presentation: What is an angel investor? anyone who invest in private cie, lawyers, 2nd time entrepreneur. 3-6 month to put and angel round. Don’t commit to long term things
I left, before the end, sorry for all the other presenters.
Next BarCampMontreal is this weekend, November 3rd, I’ll be giving a short presentation on RefactorMyCode.com. I’ll also be giving away a free special and unique gift to celebrate RmC success and announcing a new secret feature, be there!
Montreal on Rails is next week, November 6th, I won’t be giving a presentation on anything, but lots of interesting people will.
There’s also a conference on castle system in Christianity, November 5th, in Madurai, India.
See you there!
Update: I can’t make it to India for the 5th, sorry!
This post is cross-posted on Blitzweekend’s blog
When Heri asked me to write a post on Blitzweekend’s blog to share some of my tips on building an app in one weekend I thought only of this one:
Don’t do it!
Truth is, if your manager and boss finds out you can do in 2 days what takes us 4 months at work, we’d all be screwed! So keep it quiet and pretend it was an old project you’ve been working on for a long time (months, even years if your boss is not that bright).
See the true story bellow:

If you’re still reading, maybe you don’t care about being labelled as a fast worker. Perhaps you just like creating new things so much, you can help yourself but build stuff again and again! But for most people the problem is: how to turn this into something other people can use. Not only you. Here are 3 tips I’d like to share with you on how to get that damn weekend project out the door, fast, without any pain (until you get labelled a fast worker) while having fun (for now! wait ’till you get labelled!).
Keep everything simple, as simple as it can get. Don’t try to solve all the problems in the world all at once. Find one problem, for example: greasy door handles, and solve that single problem: a web site for locating clean door handles in a specific building.
But hey, it would be cool to also share pictures of the greasy door handle with your friends! That’s when you start loosing focus. Choose only one idea and keep it simple and atomic. It should be impossible to split your project into smaller ones.
Here’s a quote I quote way to often:
Perfection is reached not when there’s nothing left to add, but when there’s nothing left to remove
- Antoine de St. Exupery
Don’t think of new features you could add to make it more cool. Think of which one are just too much or don’t add that much to your project. If you need to add features to make your project interesting it’s because your original idea sucks.
It’s like a 3 legs chicken, if you pull on the features leg, you’re gonna need more resources and time. But if your time and resources are restricted, your only option is to cut off the features leg (who wants a 3 legs chicken anyway?).
If you think you’re going the wrong direction, start over. That’s why it’s important to put your code under source control from the beginning, revert is your friend when everything goes wrong!
Don’t go big bang approach! Build sometime small, simple (even stupid) and release, rinse and repeat.
Most people don’t take the time to automate parts of their development because they think: it’s just a small project. Bullshit! Because it’s a small project, you’ll be making lots of small changes fast. So you wanna make sure you can deploy in one step, test in one step and restart, stop, cleanup, backup, eat, sleep in one step.
In the case of a web application, deployment can be time consuming if your not used to it. The Internet is full of guides on how to do it. Make sure you deploy a small version before your project gets too much dependencies. If something fails, it will be harder to find out which of the 10 libs you depend on is bogus rather the just making a bare-bone app work. I would also recommend automating your deployment with tools such as Capistrano, Vlad or Paste deployment.
Now that we’re all labelled as fast workers I think blitzweekend should be shrunk to 2 hours.
Have you built an app in 2 days yourself? Share some tips with us! (but don’t tell our bosses)
Have you ever dreamed about being amongst the best developers in town ? Well, here’s your chance : Montreal on Rails is tomorrow! With 3 of the best Rails hacker in the world (of Montreal at least) presenting!
It’s in our StandoutOffice (suite 615). Register in the following 15 minutes and get the chance to sit on my chair, for FREE*!
Montreal on Rails was yesterday. It was the place to be for Rails and even web people in general. 3 great presentations with really useful stuff, you can actually use. How’s that ?
Chris Scott showed the Ext Javascript framework. Lots of cool stuff, really crowd pleaser and exciting. Fancy javascript dialog closing the gap between desktop and web apps. But man does the code reminds me of Swing. Bad, bad, bad memories! Chris strangely claimed that Ext was better then Prototype and that Prototype was the past… I think this is like comparing tomatoes and cream cheese and salmon bagel. Prototype is what Javascript should have been from the start, it’s a framework to write beautiful Javascript code that looks almost like Ruby. Form the demo and by looking at the doc, Ext is a UI toolkit framework. It sure has all the cool stuff Prototype and Scriptaculous has, but I didn’t like the API. With hash arguments like script, callback I sure miss the expressive evalScript and onXXX. Ext looked really verbose on many levels, from event management to layout setuping. Small details you tell me, but “This is all your app is: a collection of tiny details.”. Even though my reluctance here, that was an amazing presentation, though provoking! Nice work Chris!
Chris Lamothe then coded live in front of us a Rails app from scratch using Acts as authenticated plugin. Chris said he’s not a Rails expert, even a beginner, so I think this is an exploit to be able to code a live app in front of a crowd like this. He covered pretty much all you need to know about this and after his talk we all had a brief discussion on other alternative plugins: Restful Auth and Salted password generator. A nice presentation for people starting with Rails, plugins and authentication.
Terje Tjervaag was last with a series of tips on how to debug your Javascript. He started off with a really brilliant quote: “Debugging your javascript should be the last thing you do”. Wow! He advocated unit testing and validating your code before even thinking about debugging. How brilliant and such a nice introduction. I never though about js debugging this way. How come you don’t have a blog Terje ? Living in 1994 ? Come on!
He presented tools like Firebug, HTML Validator, YSlow and Web Developer toolbar. He showed how to used them next, hacking some css and js live in Firebug console.
After his talk he proposed that we (Montreal on Railers) do a RRobots tournament, everyone jumped of joy!
After all this, some people, including Carl, Mat, Camillo, Mathieu, JF, Francois and me got together and grabbed a bite somewhere (I don’t remember where, I was drunk) we had mind blasting discussions and time passed faster then your last vacation.
If you didn’t come because there was no place left, you’ll be happy to know that the next Montreal on Rails is gonna be at our StandoutOffice (if everything goes well on that side). If you come, not only will you be among the most talent web developers in Montreal, you’ll also see where I work ! Oh, how exciting ! Maybe I’ll even let you sit on my chair, but don’t you touch my beautiful thin Apple keyboard or I’ll hit you on the head with my Mighty Mouse!
Thanks to all the people who make this happen!
Update: Heri wrote a better report then mine, (he was not drunk).
Recent Comments