Keep a task running

March 5th, 2010

so you’ve got task that you want to run but you need to leave right away and you have to logout.

If you do a “command &” it will certainly run and in the background but if you logout it’ll go away. So how can you keep it running ?
With the “nohup(1)” utility. Preceed your command with nohup and end it with “ampersand &” and it will detach it from the current tty and spits the output to ‘nohup.out” in the current directory.
You can also apply this if you want to run some program and don’t want to daemonize it just yet.

This thing helped me twice in the past few days so I bet it will help you too!

Touchscreen smartphones

January 22nd, 2010

It’s been a while I have not posted anything on this blog. I am going to talk about smartphones and the hype that surrounds them. It looks like their popularity is picking up and everybody seems to want some kind of smartphone and especially the Apple iPhone. Apple iPhone is such a trend that some people confuse every existing touchscreen smartphone for an iPhone. Now what is so special about them ? Why are they so popular ?

A lot of people think simplicity and ease of use is the source of the iPhone’s success. The iPhone does simple things but does them better than anything out there. This might be true and for using it for about a week I can attest of that fact. Bu there are so many things that makes me not want to use this device as an everyday phone:

  1. They lock down everything: Not allowed to install third-party apps not approved by Apple, not allowed to run apps in the background (except Apple’s own apps), not allowed to run different apps at the same time, forces you to use iTunes to manage your music, not even allowed to transfer your contacts from/to your SIM card…
  2. The touch screen: I don’t think it’s natural to not get any feedback when they perform a given action. That is especially true for keyboards. I feel faster with T9 than with Apple iPhone’s onscreen keyboard. I make so many mistakes, It is so frustrating! I hear people get better at it but I don’t want to adapt to it. I think it should adapt to me since it’s supposed to make my life easier!
  3. The hardware is not even that great: They advertise the camera of the iPhone 3GS as supporting video recording. That has been supported in regular phones for years and that is just an example.
  4. So what are they so popular ? Is it really simplicity ? Yes but the real answer is: Marketing/Advertising.
    Apple is very good at that. They are the second biggest technology advertiser just behind Microsoft and ahead of IBM and HP that have three time’s Apple’s annual sales (according to NYT). Their ads are usually targeted and sarcastic. we-do-it-better-than-the-others. They spend hundred millions every year.

    One other reason is design: They are also very good at that. It does not need to have a lot under the hood but it’s got to be shiny! People should look at it and think of how beautiful it looks. “IT” can be anything (Computer, Music Player, Phone…).

    So all in all what is it ? A “gadget”! A “toy” ! I don’t see professional people nor power users switching to this thing in the future. What are the alternatives ? There are a lot !

    Their current market share is high but it’s not growing as much as it used to. I think/hope in the end Apple victims will wake up and switch to something else.

Car-sharing services in Vancouver

April 19th, 2009

En francais plus bas


My story:

So I’ve been living in Vancouver for almost two years now. And from time to time I feel the need of a car. There are things and activities that one can’t do (or with difficulty) without a car: Big grocery shopping, trips to IKEA, trips to the local mountains, trips to Richmond :D
Owning a car when you don’t use it often (less than twice a week) can be very expensive. Not including the loan (if you don’t buy it cash) you have to pay for insurance (which is crazy in British Columbia), maintenance, parking, gas and of course you loose money with the depreciation of the vehicle. When you own a car you tend to consider yourself free but this freedom has a price. Usually car owners pay between $500 to $1000 a month (sometimes more, sometimes less depending on the car).

So for people who live in Vancouver, Canada there as far as I know two alternatives to owning a car:

They are both membership based and you have to pay a small setup-fee to join ($20 for co-op, $25 for Zipcar).

I listed the differences between the two options in the table below.

Zipcar Co-op
Cost to join
  • $25 application fee
  • $55 annual fee on the occasional driving plan. No annual fee on the extra value plans
  • $20 non-refundable registration fee
  • $500 refundable deposit. You get that back when you leave provided that you committed for at least 6 months. A 3% surcharge applies if you pay by credit card.
Joining process Both require a driving history and claims record from ICBC. Zipcar doesn’t require a BC Driver’s License. That means foreign licenses are accepted and depending on the country of origin a notarized English translation of your driving record from that country is required. The Co-op requires holders of foreign licenses to get their BC Driver’s License within a month after joining.
Pricing
  • Hourly rate from: $9.75
  • Daily rate from: $69

The rates depend on the time (weekday, weekend) and on the car you book.

If you are on the extra value plan you get 10% off on each booking.

Extra value plans involve a monthly commitment (50, 75, 125 or $250) and you get as much in driving credit + 10% off on each booking. On some plans you can rollover your credit to the following months.

150 km per day are included in each reservation. additional kilometer charges apply if you go over.

  • Hourly rate (flat rate): $2.50
  • Daily rate (flat rate): $30.00

Depending on your usage you get a monthly fee + kilometer charges

  • High usage (+251 km): $40 monthly fee, 18¢ per km driven
  • Moderate usage (81- 250 km): $15 monthly fee, 28¢ per km driven
  • Low usage (1- 81 km): $6.25 monthly fee, 38¢ per km driven
  • No usage (0 km): No charge

There is no surcharge for bigger vehicles, no surcharge on week-ends and the hourly rate doesn’t apply between 11 PM and 7 AM.

Gas Gas is included for both but Zipcar provides a gas card (only usable at Esso stations). The Co-op reimburses your gas expenses (they deduct gas expenses in your monthly bill)
Parking Parking is included for both and there are usually lots of cars in your neighborhood. For Co-op cars you are allowed to park in stalls that show “only with permit” in the city of Vancouver only
Access to cars An RFID card and gives you access to all the cars in the fleet during your booking. You scan it on the reader located on the windshield and you’re ready to roll. VERY convenient A fob has been recently introduced and unlocks the ignition. So same thing you scan your fob on the reader located on the windshield and it unlocks the driver’s door and the ignition. You still need to get the key from the lockbox at the back though. A lockbox key is provided along with a fob when you join. The cool thing is that if you forget something in the car you can always go back anytime and get it
Booking system
  • Online: Very well designed user interface
  • Mobile: A mobile version of the booking system. Very convenient if you need to extend your reservation
  • Phone: Automated: free. Assisted (with the help of a representative): A surcharge applies
  • Online: Poorly designed user interface
  • Phone
Insurance Insurance is included but you may have to pay a $500 deductible if you are in an at-fault (or no fault determined) accident. You can buy a damage waiver to decrease or eliminate the deductible (waivers are valid for a year). Insurance is included but you may have to pay a $500 deductible if you are in an at-fault accident. You can use your credit card Loss and Damage Waiver insurance to cover that.

The Co-op network now has a non-membership based offer comparable to Zipcar where they charge the car by the hour with a limit of 150 km per day + annual fee. More info here

A Zipcar member can use each and every car in the fleet everywhere Zipcar operates (many cities in the US and London, UK). Very convenient when traveling abroad. Co-op has an agreement with Victoria Car Share (Victoria, BC) and City Car Share (San Francisco, CA).

Zipcar and Co-op both allow you to cross the US-Canada border without any special clearance.

So who is the winner ? Well Zipcar is definitely more expensive than Co-op. I personally am a member of both but I use Co-op more often since it’s cheaper. I like the idea of being able to use cars in other cities and I also use Zipcar for longer periods of time (usually a day).


Pour ceux qui habitent au Québec ou à Paris il y a aussi plusieurs alternatives
- CommunAuto (Montréal/Québec/Gatineau/Sherbrooke)
- Caisse Commune, Carbox, mobizen, Okigo et Connect By Hertz (Paris)

My laser eye surgery experience

March 22nd, 2009

Laser image
48 hours ago I went through laser eye surgery on both of my eyes. Before that, I had never been able to do anything without my glasses. Not been able to see more than 3 feet away. I had tried several times to wear contact lenses on daily basis (I tried all of them including the extreme hydrophilic ones such as Extreme H2O, Acuvue moist, …) and even if I was able to sometimes tolerate them, it wasn’t always easy especially after wearing them for several hours. I work in front of a computer and in confined air-conditioned room all day. My eyes were irregularly too dry. It was nothing chronic but I remember getting allergies every once in a while due to contacts.

Glasses were fine and looked not bad on me but you can’t do much with your glasses on: your vision is very limited to the sides, you can’t watch TV while laying on the couch and first and foremost you can’t practice any sports.

So after a little bit of thinking, researching and talking to all those happy and satisfied people who had it done: I decided to go for it as it would probably relieve me from wearing contacts or glasses for a while. I am only 24 years old and my vision hasn’t significantly changed for the past 3 years. I’ve had the same correction on both eyes (-2.00). Now I am feeling that my left eye is a bit weaker but not by much. I know that my vision is most likely going to change (maybe a lot before I turn 30).
Of course my research got me onto these findings on the bad sides of the laser eye surgery: some terrible side effects such as increased dry eye problems leading to sensations of burning and pain, night vision problems (halos, hazes, stardusts…). Besides my mum, who is an experienced ophthalmologist back in France warned me about the procedure and was totally against it. She would always say: “why all surgeons who actually need vision correction never had the surgery done on themselves?” If you want to scare yourself before you have it done check out this website. It will make you think twice believe me!

A month ago I went to my free consultation at Clearly Lasik and after about an hour and a half I was told that I was a good candidate for all laser eye surgeries and there were three: Regular Lasik (with a blade)/PRK, Wavefront Custom View Lasik (with a blade)/PRK, Intralase Wavefront Custom View Lasik (bladeless) know in Europe as femtoseconds or Z-Lasik IIRC and has been around for the past 5 years or so.

I didn’t want to go cheap because I only have two eyes and they’re precious to me so I decided to take the more expensive one: Intralase Wavefront Custom View Lasik. That included lifetime enhancements (if I ever need to do it again) at the same clinic.

The procedure itself took less than 10 minutes for both eyes and was fairly painless. I remember feeling a slight pain when the surgeon lifted my left eye corneal flap but nothing huge. I remember not being able to see for a few seconds when that laser was reshaping my cornea and I remember smelling a bad odor of burnt hair when the laser was performing. Other than that nothing. When the operation was over, the Surgeon quickly checked my eyes and then sent me home. I remember him and his two technicians talking to me during the procedure but I also remember not saying much other than “OKs” here and there.
That same day, I didn’t do much but keep my eyes closed with protective sunglasses on.

It’s been 48 hours so far and what I am feeling right now is really close to what I used to feel when I had worn contact lenses for a while. Meaning sometimes it would feel nothing and sometimes it would feel pain. I try to keep my sunglasses on even indoors in dark areas because the air contact makes my eyes dryer and brings more pain I feel. I look like Agent Smith (i.e like an idiot) but who cares. My vision is definitely a lot better and I can see almost everything but I don’t know the numbers, I will have to check that next week.

To be honest I don’t know if I have made the right decision, it’s too early to tell anything. The only thing I know is that I caused permanent damage to my eyes as the flap that was created to perform the surgery will never ever heal completely and could be lifted by anybody even years from now. But that’s a sacrifice I am willing to make if it comes with clear vision without glasses/contacts.

Another procedure I could have done is the PRK procedure but I didn’t know much about it except that the healing time was longer and Lasik seemed to be the preferred procedure.
The PRK/Lasek procedures are older procedures that are now being replaced by Lasik. When you talk to most Surgeons they will tell you that the main difference between PRK/Lasek and Lasik is the healing time (a few hours for Lasik as opposed to a few days/weeks for PRK/Lasek). Actually the main difference is that in PRK/Lasek there is no flap creation as they operate directly on your cornea and that’s why it takes longer to recover. So your cornea will stay almost intact (close to what it was before surgery). This is very important because any trauma caused to your eyes will be the same had you done the PRK/Lasek surgery or not. So for athletic people who do a lot of contact sports such as martial arts, kick boxing, football, …PRK/Lasek are better alternatives but think about the healing time and the side effects as well (as they are the same and maybe worse than lasik side effects…).

I actually do a pretty violent martial art called Krav Maga but I didn’t know that PRK was preferred over Lasik for contact sports.
My optometrist said to me yesterday for my 24 hours post-op exam that if she had known that I was doing a martial art she would have told me to go for PRK but I forgot to mention it and she didn’t ask me either. Now I guess I have to give that up for a little while and maybe forever as it represents a lot of risks and I am not willing to lose my eyes yet.

Ice skating tips and tricks

March 15th, 2009

Skates picture

So I’ve been ice skating since I moved to Canada but not very regularly to be completely honest. The main reason is that I wasn’t feeling any improvements throughout my sessions. Every time I was just getting bored turning around the arena (or they call it Ice rink here).

So I looked on the Internet and I found a series of videos that really helped me a lot.

The guy is visibly from somewhere in Eastern Europe but he’s got perfect English imho.

Before your perform any of this you need to know how to skate at least barely without holding to the side wall.

As I said above it really helped me a lot, especially the one where he teaches how to stop.

The videos are here

A few bruises later you should be able to master the thing!

PS: There are some videos on YouTube as well but I find them to be “not” complete.

Snowboarding

March 15th, 2009

Snowboarding Picture

Before last year I had almost never seen snow nor had the chance to try any snow sports such as skiing or snowboarding. But last year I decided to give it a try. I took some ski lessons and snowboarding lessons just to see how both feel. I liked skiing but even though it was super hard for me to get the fundamentals, once I got them it seemed too “easy” and not very “challenging”. So I opted for snowboarding and I bought a VERY cheap gear for $150 including everything. I knew that I liked it but I didn’t know how much I really liked it so I figured I’d better buy a cheap gear in case I didn’t like it.

I first thought I was goofy until this year when I realized that I was in fact regular (which kind of makes sense because I am right handed). That prevented me from doing the basic stuff such as J-C turns for a very long time. I remember this one day on chairlift when a very nice guy told me that my feet were positioned weirdly and I should probably think of switching positions (from goofy to regular) but I never listened.

This year is actually when I realized that I couldn’t make any turns so I might as well switch and see how it feels. BINGO, I could make my first basic turns after a lot of bruises and back pains! I am still in the very beginning of the learning curve but I got to a point where I actually enjoy it and that’s all what matters. Right? :)

So same thing as with Ice skating I did some research on line and I stumbled upon this website where they teach you everything for every level. As you might guess I am still at the beginner level. They even tell you the things you should know before you buy a snowboard and equipment a lot more!

I really find that watching the videos over and over again helps a lot!

Enjoy!

Virtualisation

March 4th, 2009

Pourquoi ?

Parce que dès qu’on veut tester/faire quelque chose de conséquent comme:

  • un nouveau système d’exploitation
  • une grosse application avec beaucoup de dépendances
  • Du développement spécifique (tester une application sur une archi différente de celle sur laquelle on est).
  • Tester le déploiement d’une application web.
  • Tester la répartition de charges entre différents serveurs

on ne veut pas forcément avoir à pourrir sa machine. Tout le monde n’a pas les moyens de s’acheter des racks HP/Dell ni l’espace pour les héberger. La virtualisation dans ce cas là est très pratique et fait du bien à la planète et à votre espace vital.
Après avoir exploré différents projets libres, j’ai choisi KVM. Mes raisons sont que:

  • KVM est module faisant partie du noyau Linux, donc bien maintenu et présent par défaut.
  • Avec libvirt, l’utilisation devient très souple et ne change pas grand chose par rapport a Xen. On peut: démarrer/suspendre/éteindre/détruire une machine virtuel comme dans Xen et l’accès graphique est dispo via VNC

Le seul inconvénient c’est qu’il faut posséder un processeur dernière génération pour pouvoir en profiter mais la plupart des ordinateurs fabriqués depuis 2006 devraient en être équipés.

KVM est présent et bien supporté dans la plupart des distributions. Pour Ubuntu, la documentation est très bien faite.

Les alternatives sont: VMWare server/client (gratuit mais pas libre), Virtualbox, Xen, (K)QEMU, …

Ce que je n’aime pas avec les alternatives c’est qu’elles sont soit: trop intrusives, trop compliquées, trop lentes. Il parrait que les choses se sont beaucoup améliorées pour Virtualbox donc il faudrait que je réessaye.

Conclusion de ce billet: Testez KVM! Au moins si vous hésitez à choisir!

Migration dotclear -> wordpress

March 17th, 2008

So I just finalized the migration from dotclear to wordpress Today. I have wanted to migrate for a while but never had the chance to do it.A few reasons why I switched to wordpress from dotclear:

  • Dotclear is a French project, made by French people for French people. This is rather limiting since the UI is all messed up (a few elements are in French others in English even if the default language is set to English). The code is also all Franglish (Franglais) which the stupidest and most annoying thing ever.
  • I wanted something flexible that would let me write HTML directly (no BB codes and whatnot).
  • I am going to write blog posts in English and French and wordpress correctly supports UTF-8 so there shouldn’t be a problem would I want to write something in Arabic
  • Because I can !

Bash cookbook review

September 13th, 2007

Thanks to O’Reilly I had the chance to read ‘Bash cookbook’ and this is what I think of it…

Read the rest of this entry »

C’est quoi qui prend tant de place ?

August 15th, 2007

Comment savoir ce qui occupe beaucoup d’espace disque en une commande.

Read the rest of this entry »