Quiz from inky

November 30, 2005

W O U L D Y O U R A T H E R . . .
1) Pierce your nose or tongue: Tongue
2) Be serious or be funny: FUNNEY!
3) Drink whole or skim milk: What’s that?

A R E Y O U . . .
4) Simple or complicated: complicated
5) Flowers or angels: Grey
6) Grey or gray: Grey
7) Color or black-and-white photos: Color photos, black and white drawings
8) Sunrise or sunset: Sunset
9) M&Ms or Skittles: Peanut M&M’s
10) Rap or rock: Rock
11) Staying up late or waking up early: Stay up late
12) TV or radio: Radio
13) Apples or oranges: Apples

A N S W E R T R U T H F U L L Y . . .
14) Do you have a crush: Yeah
15) Who is it: In rot13 (like anyone’s not gonna be able to decode that): Naar-Znevr

D O Y O U P R E F E R . .
16) Being hot or cold: Hot
17) Tall or short people: Short girls
18) Sun or moon: Sun
19) Emeralds or rubies: RUBY! CHUNKY BACON!
20) Left or right: The hair in my palm say right
21) Having ten acquaintances or one best friend?: One best friend
22) Sun or rain: Sun
23) Vanilla ice cream or chocolate ice cream: Vanilla

M I S C E L L A N E O U S . . .
24) What are your biggest fears in the world: The future
25) Kids or no kids: No idea yet
26) Cat or dog: Cat
27) Half empty or half full: Half empty, and the other half is probably gonna be taxed by the government
28) Mustard or ketchup: Ketchup
29) Hardcover books or soft cover books: Soft cover
30) Newspaper or magazine? Magazine
31) Sandals or sneakers: Sandals
32) Wonder or amazement: Amazement
33) Red car or white car: Pink bike
34) Happy and poor or sad and rich: happy and poor
35) Singing or dancing: singing

A B O U T Y O U . . .
36) What time is it: 22:22
37) Number of siblings: 2
38) Birthdate: 08-Jul-1983
39) Height: 5′7″
40) Eye color: Brown
41) Hair color: Brown
42) Piercing(s): None

W H A T D O Y O U W A N T . . .
44) How many kids do you want: Kint’s

W H I C H I S B E T T E R . . .
45) Two doors or four (on a car): 4
46) Coffee or ice cream: Coffee
47) Bridges or tunnels: Bridges

F A V O R I T E S . . .
48) Color of socks: Grey
49) Food: Sandwiches
50) Non-alcoholic drink: Water and milk
51) Alcoholic drink: Beer and Baileys

I A M . . .
52) Wearing: T-shirt, brown jeans
53) Listening to: Rent soundtrack

C U R R E N T S. . .
54) Hairstyle: Bleached tips
55) Annoyance: Everything, like usual
56) Smell: Nothing
57) Show: Montre
58) Book: Drawing for Dummies
59) Refreshment: Moosehead
60) Thought: Ooh, that’s done!


Ruby tutorials?

November 30, 2005

Chris suggested in a comment that I write a few tutorials on Ruby. I considered the idea and I like it, especially if I can do them on whatever I want. So, are there people who would be interested in small tutorials on how to do some system administration tasks with Ruby?


Worst company ever

November 30, 2005

Found this post on Digg about the bad experience of a photographer with a store. This is the absolute worst story I’ve ever heard in my life. How can a company act that way? They threaten, they scream, they blackmail. I’m guessing the Digg story will bring them a world of hurt. I wouldn’t be surprised if a benevolant computer hacker interrupted their business. Like everyone says: stay away from that store!


Ruby is *that* good

November 30, 2005

dude, wtf is up with ruby?
is it really *that* good?

That was the question I found in an AdiumX instant message window yesterday when I came back from badminton. A friend of mine, Brett, seemed to be wondering why Ruby was getting so much hype these days. Could it be that good?

Short answer: yes!

Long answer: Ruby is probably the language that has the best balance between the elegant principles of programming and practicality.

On one hand, it features blocks, which are basically anonymous functions (often called lambdas), continuations, first-class methods, dynamic typing, open classes (you can add/modify methods in an already existing class), etc. But you also have very practical features too, such as a great Array and String class, regular expressions, easy access to the file system, a nice documentation system, a very good package manager, Ruby on Rails (which is the number one reason for all the hype), etc.

Ruby is not the perfect language, but it’s pretty damn good, because you can have fun writing practical programs in a very elegant way. It is also a very productive language: some people thought it was just hype, but pretty much everyone who uses Ruby finds themselves being more productive than in Java, .NET or C++. Just read what programmers like Bruce Tate say about Ruby and Rails.

So Brett, yes, Ruby is *that* good.


Merck Frosst cutting 235 jobs

November 29, 2005

Yesterday, Merck announced that it would cut 7,000 jobs worldwide and shut down five of its 31 production sites. Merck Frosst, the subsidiary my dad and I work at is among those five. 235 jobs will be lost here, including 110 in the division for which we work.
The people most affected are the people in production who should lose their job on March 31st, 2006.

This is a really saddening and frustrating news. People here feel really down and let down. Many people who will lose their job have over 20 years of service. As a temp employee, I imagine my contract will end as scheduled on January 27th and won’t be renewed. As for my dad, I can only hope that he can continue working the few years before he can take his pension. I keep my fingers crossed.

Have a nice day.


Mario 64 and Othello

November 26, 2005

I saw the Mario 64 tool-assisted speedrun this week, and it got me remembering how fun Mario 64 was. So today, I decided to get the N64 out of the closet, plug it and have some fun. Ah, the memories, this game is just as I remembered it: frustrating like hell when you fall into an infinite hole and it makes me want to punch holes in the wall. I started a new game, and am already up to 35 stars; only 85 more to go :)

On another note, do NOT play Railthello, unless you want to be interned for the rest of your life for the 2 murders you comitted while insane. Othello is one of the most frustrating game ever, no way to win. They should just outlaw it before it hurts someone!


Rails question

November 24, 2005

People who are familiar with Ruby on Rails, please go read this thread and tell me if you can help. Many thanks!


Pseudo random number generator

November 24, 2005

Digg linked to an article that explained how pseudo-random numbers were generated. The formula was simple enough and the article mentionned that the real challenge was coming up with a good seed. I wrote a little method in Ruby to generate a random number, and I used an equation with the current time (in seconds with the decimals) to make a seed. Does that seem reasonably random? Should the method return an integer instead of a float?

def random_number
  t = Time.now.to_f / (Time.now.to_f % Time.now.to_i)
  random_seed = t * 1103515245 + 12345;
  (random_seed / 65536) % 32768;
end

And here’s a sample run

irb(main):099:0> 20.times { puts random_seed }
10960.046875
11691.03125
6374.328125
26752.921875
28869.171875
14963.625
30334.25
15930.8125
30066.5625
23285.0
15296.703125
3166.296875
12232.296875
32135.703125
24721.375
17301.765625
25407.796875
11514.828125
9394.5
30683.4375
20
irb(main):100:0>

That looks pretty random to me, wouldn’t you agree? Thanks for the input.


Happy Thanksgiving

November 24, 2005

To the Americans who read my blog, I wish you a happy Thanksgiving.


Forth is exciting

November 23, 2005

Well, judging by the “effect” on the guy, it’s a wonder Forth isn’t a more popular programming language :-P