Sunday, December 2, 2007

If I could travel anywhere, I would travel to the 70s













I am a big fan of Communauto.

I am not going to rant too much about the wonders of car sharing. Like you, I am sadden of seeing so many m^2 of land space dedicated to parking. Gosh, all the things we could do if we reclaimed all that space! Our city could be punctuated of long and narrow forests. Every sprinter could have a 100 m long running track on his corner. If we made playspace, a child could push his trucks for a whole afternoon before having to turn around. It would be wonderful.

But also, Communauto is an example of neo-hippism.

The hippies were right. Green homes? Organic food? Nature is good and should be protected ? That is all mainstream now. It is unfortunate that hippies never get any credit for coming up with these ideas.

Hippies were also suspicious of money. It was dirty and corrupting, and anything you would do with money could be done better through barter. With barter, your efforts would stay within the community, and you would have to chance to grow a friendship with your economic partner. The waitress at the local coffee sometimes knows my name; hippies dreamed of closer relationships.

Yet, I have met a new brand of hippie who embraces money.

Ecological lobby groups used to refuse to advise companies on their ecological practices. You live to make profits, they would say, so you are fundamentally incompatible with the environment, and we want nothing to do with you. That attitude is changing, which has brought some wonderful collaboration, such as those described in Cradle to Cradle.

Neo-hippies, as I call them, come together and form companies in order to use capitalism to change the world and make it better. They give no further thoughts to profits than is necessary to keep the group together. It is the case of Café L'Utopik, which exists to expose people to vegan food and to be a platform for a more humane management style.

And, although it does not look so from the outside, it is also the case of Communauto, who operates at 1% profit, on purpose. Their price schedule closely follow the CAA's model of the expenses involved in private car ownership, and that is no accident.

However, I wish they did not follow it so closely. Their price chart is awfully complicated. I tried to mention it to one of their representative. Without admitting the complexity of the task, I could feel she was proud to be able to compute the price of a location in her head. I challenged her, and although she came back with an answer quickly, she got it wrong. She had forgotten about weekend peak charges, and about the day rate, which is a discounted rate for locations of between 12 and 24 hours in length, unless, of course, the "network rate" is more advantageous. It is twisted. That encounter must have delayed my membership by a good six months.

I always love an overdone joke. My programming friends: laugh at the following! Here is a short program that computes the price of a Communauto rental.



(require (lib "match.ss"))

(define (is-peak-day? day-of-the-week)
(member day-of-the-week '(thurday friday saturday sunday)))

(define (is-high-season? month-of-the-year)
(member month-of-the-year '(july august)))

(define (hours-of-overlap a-start a-end b-start b-end)
(define (pos t start end)
(cond [(t . < . start) 'before]
[(t . < . end) 'middle]
[else 'after]))

(define s-pos (pos a-start b-start b-end))
(define e-pos (pos a-end b-start b-end))

(match (list s-pos e-pos)
['(before before) 0]
['(before middle) (a-end . - . b-start)]
['(before after) (b-end . - . b-start)]
['(mid mid) (a-end . - . a-start)]
['(mid after) (b-end . - . a-start)]
['(after after) 0]))




(define (basic-rates package day-of-the-week km hrs)
(define base-price-per-hour
(if (is-peak-day? day-of-the-week) 2.05 1.55))

(define base-price-per-day
(if (is-peak-day? day-of-the-week) 24.60 18.60))

(define-values (price-per-km<100 price-per-km>100 price-per-hour price-per-day)
(case package
[(lievre)
(values 0.09 0.09 6.00 50.00)]
[(C)
(values 0.29 0.19 base-price-per-hour base-price-per-day)]
[(B)
(values 0.23 0.16 base-price-per-hour base-price-per-day)]
[(A)
(values 0.16 0.16 base-price-per-hour base-price-per-day)]))

(define number-of-days (floor (hrs . / . 24)))

(define number-of-hrs (hrs . - . (number-of-days . * . 24)))

(+
((min km 100) . * . price-per-km<100)
((max 0 (km . - . 100)) . * . price-per-km>100)
(min (number-of-hrs . * . price-per-hour)
price-per-day)
(number-of-days . * . price-per-day)))




(define (network-rate month-of-the-year km hrs)
(define hrs-per-week (24 . * . 7))
(define number-of-weeks (floor (hrs . / . hrs-per-week)))
(define number-of-days (ceiling ((hrs . - . (number-of-weeks . * . hrs-per-week)) . / . 24)))

(define-values (price-per-week price-per-day)
(if (is-high-season? month-of-the-year)
(values 242.00 39.95)
(values 222.00 35.50)))

(define km-limit ((number-of-weeks . * . 2100)
. + .
(number-of-days . * . 300)))

(+ ((min km km-limit) . * . 0.09)
((max 0 (km . - . km-limit)) . * . 0.12)
(number-of-days . * . price-per-day)
(number-of-weeks . * . price-per-week)))




(define (workweek-rate day-of-the-week km start-hour end-hour)
(define noon-extra-charge-applies?
((hours-of-overlap start-hour end-hour 12.5 12.51) . > . 0))

(define noon-extra-charge
(if (is-peak-day? day-of-the-week) 2.05 1.55))

(+ (if (km . < . 40) 12.80 (km . * . 0.32))
(if noon-extra-charge-applies? noon-extra-charge 0)))




(define (communauto-price package month-of-the-year day-of-the-week km hrs start-hour end-hour)

(define unbillable-hours (hours-of-overlap start-hour end-hour 0 6))

(define workweek-rate-allowed?
((package . eq? . 'A)
. and .
((hrs . - . unbillable-hours) . < . 10)))

(define at-base-rate (basic-rates package day-of-the-week km hrs))

(define at-network-rate (network-rate month-of-the-year km hrs))

(define at-workweek-rate (workweek-rate day-of-the-week km))

(define sales-tax 0.1395)

(define price
(if workweek-rate-allowed?
(min at-base-rate at-network-rate at-workweek-rate)
(min at-base-rate at-network-rate)))

(price . * . (1 . + . sales-tax)))






Unfortunately, this program will not tell you which price rate you should ask when you book your reservation. For that, you have to turn this program into its algebraic representation and solve for the inputs.

Sunday, September 9, 2007

Getting organized

There is a lot of of calender software out there, to do list software, task list software, alarm software.

And it is all disjointed. I will receive an e-mail in my Gmail, copy and paste its body into a Google Calendar entry, then start a Google Document, send the URL to my work mates through e-mail, then finally paste the URL to the calendar entry. Even working within a single constellation of software, my workflow remains jittery. As the information is copy-pasted around, I am responsible for keeping everything in sync.

I might as well use my inbox to keep track of my tasks. At least there, I can see everything at once. Which is what everybody ends up doing.

I am quite excited about the Chandler project. In their system, an e-mail is a calendar entry is a to do entry is a document. Which is a how it should be.

Chandler is sprinkled with the "getting things done" spice. Items can be either active now, deferred or done. Deferred items can have a tickler alarm, which naturally goes on the calendar.

It also serves as a sharing platform. You share a document by e-mailing the URL to it. There is no needful further login, knowing the URL is your password.

It seems like modern lessons in interface design were finally heard. I will try using it. Ask me how well it went in two weeks.

http://chandlerproject.org/vision
http://chandlerproject.org/Projects/PreviewDemos

Friday, July 27, 2007

Meat and bone

In my kitchen there is a knife which cuts through meat and bone easily.

It comes from a country far far away.

When you miss-handle it, you feel no pain, for the cut is clean.

Instead, your ego is halved : you are made a fool for thinking you could master what you could not.

But it is actually quite cheap in store. It is called the Tojiro DP F-808 21cm Gyoto Chef's Knife, I know of it via Cooking for Engineers' excellent chef knife review, and you can get it for around 50$ at korin.com.

Je conduis à 8.25$ de l'heure

Bonne nouvelle ! Je me suis résolu d'acheter des crédits carbone pour tous mes déplacements en auto et en avion.

Il s'agit de savoir maintenant, combien ça va me coûter.

Tel que je le mentionnais dans le poste précédent, l'analyse de Vatterfall conclut qu'il est possible de contrebalancer toutes les émissions de ce monde au coût de 3$can par tonne (aka, 2 euro par tonne). Ça semble cher. Et puis, on se doute que ce prix ne sera pas disponible pour un consommateur isolé, pour l'ultime early-adopter qui décide de sauver la planète avant les autres. C'est le cas de terrapass.com, qui vend des crédits carbone au coût de 10$can/T.

J'aime bien calculer la consommation de mon auto en $/heure. Ça aide à mettre les choses en perspective. Un voyage Allostop entre Montréal et Sherbrooke coûte 13.50$ (4.50$ de frais, $7 au chauffeur, et un billet de métro). Le même voyage en auto, c'est 1 h 30 à 8$/h (utilisant 6.5L/100 km, 120 km/h, et 1.03 $/l), donc à peu près le même prix.

Avec ma décision d'acheter des crédits carbone, l'auto sera dorénavant encore plus chère de l'heure. Voyons voir: Brûler 1L de gas libère 3 kg de CO2. Au prix de Terrapass, c'est 3c/L. Je passe donc de 8$/h à 8.25$/h. Une augmentation nette du coût de l'essence de 3 %.

3 % d'augmentation, c'est tout ce que ça prend pour sauver la planète.

Planète à vendre. Méchante aubaine.


Voici la feuille OpenOffice que j'ai utilisée pour faire les calculs.

Saturday, July 14, 2007

Avoiding a global warming explosion is technically feasible

I love sentences that use the literal meaning of a word where you would not expect it. Sometimes the figurative meaning of a word takes over, such as when it is made into an common expression. Take for example the expression "While it is technically true that ...". In the title, that is not what I mean by technically.

The goal is to arrive below a raise 2 degrees Celsius, before 2030. According to the UN, that is the cut-off date to avoid explosion of the world temperature due to positive feedback mechanisms within the world's weather system. The technologies required to achieve this have been identified. It is technically feasible.

The Swedish energy company Vatterfall published their engineering report on climate change. In it, they present this illustrated list of the numerous measures available that reduce CO2 emissions, ordered by cost. On the left there are the measured which save the most money, such as insulation, and to the left those that cost the most money, such as Biodiesel.




The horizontal axis is the cumulative tonnage of emitted CO2 that would be saved, if we applied all the technologies leftward of that point of the axis, given how much opportunities for deployment there are for each of them.

We can achieve our objective by selecting all the technologies, the money saving ones, the cheap ones, the not-so-cheap ones, all the way up to those costing 40 euros per ton. The average cost amounts to 2 euro per ton of CO2. Expensive, sure, but also feasible, economically.

Remains the question of whether it is feasible, politically.

On that question, François offered I read the book Collapse: How Societies Choose to Fail or Succeed, by Jarred Diamond. It is available at the Grande Bibliothèque Nationale, and it will be the next book I read (thanks François).

Update, March 03, 2010:

The study I mentionned above has gone offline. Here is another one with similar conclusions:

http://maps.grida.no/go/graphic/strategic-options-for-climate-change-mitigation-global-cost-curve-for-greenhouse-gas-abatement-measu


Update, Nov 25, 2014: This resource has also gone offline. Here yet another source.

Sunday, July 8, 2007