Entries Tagged 'Uncategorized' ↓
May 15th, 2008 — Uncategorized
Heri rants justifiably about Tourisme Montreal spending $1.5 million on a yet another crappy flashy brochure website.
Before an agency embarks on such a high budget exercise ($1.5 for a website is a gigantic budget), I’d want to ask the following:
- How will they measure ROI?
- Who is the audience?
- What are the key metrics?
- What budget is there for iterating and adjusting the site?
While ‘user-generated content’ is no panacea, I’d suggest there are good uses for it, especially if we target those people I call Ambassadors.
Montreal has a lot to offer. When a friend told me he was considering a visit, I sent him Jazz Festival information, because he’s a jazz fanatic. Montreal has a festival, event or point of interest for just about every taste. I was effectively acting as an ambassador. An ambassador can be a local, or a person that visited your city and loved it so much they tell others.
One key metric I’d suggest for a Tourism promotion site is how many ambassadors used it to invite friends and family with targeted content.
For people that come visit me, I have created a google map (with the ‘My Maps’ feature) with recommended spots in my neighbourhood, places to see and public transit information. Combine the implicit data from many of those mash-ups, and you can have a list of ‘most recommended’ places and events.
Considering you can’t properly bookmark a page and that there’s no ‘tell a friend’ feature, I’d venture that idea was never even considered. Tourisme Montreal’s project hasn’t even caught up with staples of the 1990’s web marketing.
One nit to pick with Heri: I would squarely blame the agency for this failure. They should know the web if that’s their medium, and be ready to educate clients or refuse work that reflects so poorly on them.
April 23rd, 2008 — Uncategorized

I love the luxury of it all. Every Wednesday, fresh veggies and fruits, in my fridge. Jardin des Anges has a key to my place and debits my account automatically twice a month.
The lettuce tastes like what my dad gets from his garden: not your anemic grocery store variety. At $34, it’s pricey (click the image for details of the contents, or check their site), but if it motivates me to cook more and eat out less, I will save money.
The ethical thing to do (organic, and either local or fair-trade) should always be this easy.
January 20th, 2008 — Uncategorized
rake db:migrate:renumber now lives at google code. I recommend you use piston to import it in your projects:
piston import http://db-migration-renumber.googlecode.com/svn/trunk/ vendor/plugins/db-migration-renumber
See the project page for more details.
December 6th, 2007 — Uncategorized
Regardless of what you think of Microsoft’s IE team and the new IE7, is anyone else puzzled by their public relations strategy? Announcing IE8 after Bill Gates says it’s coming but not adding any details, Dean Hachamovitch, the IE team’s General Manager gets a whole other flame fest going on on his blog.
You will hear a lot more from us soon on this blog and in other places. In the meantime, please don’t mistake silence for inaction.
Let me point out the obvious: content-free or joke posts are not silence. After the self-congratulatory post on
The First Year of IE7, one ‘dk’ pointedly comments:
I am a front-end programmer and a co-founder of a start-up. I can tell you categorically that my team:
- Won’t download and play with Silverlight
- Won’t build a Live widget
- Won’t consider any MSFT search or ad products in the future
And the reason is because of IE - because MSFT disregards its most important relationship with us. Until this relationship is repaired, nothing else stands a chance.
That sentiment runs deep among developers. No MSFT technology will be considered by devs bitter about the MS tax. IE is a public relations disaster, and their non-silence silence is costing Microsoft dearly. If top management can’t see that and fix it, something very rotten is going on inside MSFT.
December 1st, 2007 — Uncategorized
The OLPC’s “Give One, Get One” has been extended until the end of the year. At this rate, almost half a million should be sold, which could be considered a success.
I know they are meant for children, but I want one. Those things are mega-cute! So here I am trying to rationalize the purchase. Go ahead, mock me. Or give me more reasons to buy one 
November 26th, 2007 — Uncategorized
Actual Campfire transcript (our developer chat room at work):
Daniel H. any objections to removing the README in our app? “Welcome to Rails” ain’t exactly useful
Francis W. We’ll replace README with a long-ass mission statement :P.
Marc-André C. yeah!
+1
+2 for lolcatized mission statement
Daniel H. the readme now says “I can haz cheezburger”
you guys can go nuts
Marc-André C. that’s a step forward for READMEs
James asked for a screenshot. There you go. Yes, we really are this crazy:

November 12th, 2007 — Uncategorized
Netflix has a 1 million dollar prize for anyone that can improve their recommendation by 10%.
Quebec residents are not eligible. We’re in good company. “Residents of Cuba, Iran, Syria, North Korea, Myanmar (formerly Burma) and Sudan are also ineligible to participate.”
Yesterday Google announced a $10 million “Android Developer Challenge”.
While we seek to make the Challenge open worldwide, we cannot open the Challenge to residents of Cuba, Iran, Syria, North Korea, Sudan, and Myanmar (Burma) because of U.S. laws. In addition, the Challenge is not open to residents of Italy or Quebec because of local restrictions.
We just have to be different, don’t we?
October 26th, 2007 — Uncategorized
rake aborted!
Multiple migrations have the version number 119
If you work on any sizeable rails team, you’ve had someone check in a migration before you do. There’s a great timestamp-based solution by the folks at revolution on rails. That does seem to be pretty heavy-duty for a 2 person team though, so I have just been manually reverting migrations from console and the database shell.
So I decided to script it. Here is an automated rake task that handles my most common issue. I decided not to polish its rough edges, to let any ’standout candidates’ (TM) have a go at it (Standoutjobs is hiring). This task is barely tested; you probably shouldn’t use it unless you understand what it does. I’ll polish and test it later.
October 2nd, 2007 — Uncategorized
Several commenters on Reddit’s story proposed absurdly inefficient solutions to the ITA ‘word numbers’ puzzle (If the integers from 1 to 999,999,999 are written as words, sorted alphabetically, and concatenated, what is the 51 billionth letter?). Some solutions took hours, others over a day. One person said their C solution took 5 hours.
Here’s my solution, as promised in my previous posts. This algo will generate and alphabetically sort one billion numbers in:
danielharan$ time ruby finder.rb
number:sixhundredseventysixmillionsevenhundredfortysixthousandfivehundredseventyfive
sum: 413540008163475743
real 0m1.453s
user 0m1.391s
sys 0m0.019s
There you have it: proof that Ruby is 12,000 times faster than C!
My code is available on refactormycode: Integer puzzle (scroll down a bit). Ok, if you dig, you’ll see that I don’t actually alphabetically sort all those numbers. I don’t even properly sum them. Here’s the function that adds all the numbers in a ‘thousand range’:
def child_values @thousands * 1_000_000 + 499500
end
A couple people that saw this code found it pretty confusing. Let’s consider the sum of numbers from 0 to 999 and the ranges 1,000 to 1,999 and 2,000 to 2,999, arranging them side by side and added:
| 0 |
1,000 |
2,000 |
| 1 |
1,001 |
2,001 |
| 2 |
1,002 |
2,002 |
| 3 |
1,003 |
2,003 |
| … |
… |
… |
| 999 |
1,999 |
2,999 |
| 499500 |
1,499,500 |
2,499,500 |
The reference to Gauss in my first post wasn’t haphazard. The difference between the first and second column is 1,000, repeated 1,000 times - naturally, the sum is 1,000,000 higher. This is what is expressed in the function above.
The same holds true for millions, although the numbers are quite a bit bigger. Since the puzzle also requires that we sum the size of the strings version of those numbers, I also worked out similar functions to calculate the sum of all strings in a range.
The range classes also help in one other regard: generating the sequence in alphabetic order. Trying to alphabetically sort one billion strings would take an absurd amount of memory and computing power, so any reasonable solution has to have a way to generate them already sorted. The code in finder.rb initiates the stream. Range classes are enumerable, and respond to each, taking advantage of the fact that all numbers that start with ‘onemillion’ or ‘eightthousand’ will be grouped together in a sorted stream. Sorting over 2,997 instead of 999,999,999 strings is a definite speed boost.
This puzzle has been a great learning exercise. Ruby is a wonderful language for quickly testing out algorithms, and plenty fast enough if you pick the right one for the task. My code still has room for improvement, however I consider it fairly readable if you understand the problem, and the shortcuts I explain above.
September 13th, 2007 — Uncategorized
Montreal Tech Watch has a surprising article about a new luxury handbag rental service.
This is great news.
One of the fundamental things we need to do if we are to have sustainable lifestyles is to own less stuff - and the easiest way to make that popular is by giving people access to more. Worldchanging had a great entry last year on Service Envy: Branding Experience Instead of Stuff which explored these themes:
We need to make the bright green city, in which we use instead of own, a place which makes us feel better, sexier, safer, more loved. If it doesn’t, it’ll never work, no matter how good the product design or how strong the wireless signal.