Archive

Archive for March, 2012

Do we still need phones? Really?

I have an old Nokia hooked up on the left side of my belt. With it, I can call pretty much anyone in the world, but I don’t. I consider it an emergency phone, and it costs me 100$ a year – a pay-as-you-go no-contract with Rogers that makes sure my account money will never get entirely used up. When I decide to change it, it will be worth a lot (currently around 130$), since I use the phone about one or twice a month.

I send a text message about once a year with it, and it takes me hours to prepare a simple phrase, repeatedly switching individual characters with the numbers. 4-4-wait-3-3-wait-5-5-5-wait-5-5-5-wait-6-6-6. Hello.

I also have a very basic cable phone with Videotron that costs me 20$ per month. This phone contract grants me a 10$ rebate over my internet-phone invoice, which means that the phone costs me 10$ a month to keep.

I very rarely use these two phones. With internet, what good are they, really? In a few years, VoIP phones will render the land-line phone system deprecated. What about cell phones? Probably the same thing – we’ll use Google Voice or Skype (or some similar service) more and more. The cell phone contract will disappear, leaving only a data plan to bother us with. Europe is like that – everything is on the data plan.

I’m part of the minority. It’s not that I don’t want a cell phone, but more like I think this gadget has taken too important a place in our lives. I used my boss’ iPhone 3 for four months, and gave it back to make sure I didn’t become addicted. Just the fact that I was aware that I could be addicted gave me a good hint that I wasn’t – if I was, I would be in denial.

I’ve been thinking about dropping my land-line phone system altogether, and relying only on a cell phone. When the next Samsung Galaxy smartphone comes out, I will consider buying it, but until then, and even after then, I don’t think I’ll miss anything.

Then I took the idea further. What if I didn’t have any phone? You can catch me by email, or chat with me on Google Talk or Facebook if I’m logged on. I have a main email address, and could easily have a second email address to give to people who would ask for my phone number (like a salesman, or whoever I don’t know and don’t want to give my main email address to).

I think this would be a relief. We live in a world in which everyone is increasingly connected to everyone else. People can get hold of you, wherever you are. I could finally get back home and not have to worry that there might be two or three messages on the answering machine. If it’s important, they would have my email address, and I would check that email address once or twice a day, when I want it. I could finally leave the theater and not notice a few messages or voice mails on my phone (I don’t have voice mail personally). You minimize the possible stress of always being connected and reachable.

What about the consequences of such an idea? There are a lot of times when you are on the web, and they ask you your phone number. If you are buying something, that field can be required, and as you look at that red asterisk, you wonder what you can write, or how you can tell them that you don’t have any. If you’re about to exchange phone numbers with someone, you would give an email address, look a bit weird, and be asked some questions, only to sound like a cheap person who can’t afford a phone. That, or some hippie with a crazy idea. No phone, hah! What an idiot!

The fact that I’m rarely using my phones makes this possible for me. I think this would be interesting to monitor in the near future, and take note of every time I would use my phone, give my number, or would otherwise be required to have one. If, after a few months, there is still nothing preventing me from getting rid of my phones, well maybe I will wake up and actually do it.

Because I’m free from this debilitating trend where everyone is on their phone, all the time.

 

Update: Since writing this post, I have cancelled my subscription to the phone company. I still have my 100$-a-year phone, though. I have found that many websites ask your phone number – some of them are required, and may pose a problem. Also, doing my taxes showed me that the government wants you to have a phone. I couldn’t fill my taxes without one.

Categories: Thinking

Tyrannosaurus Rex

I recently had a weird dream.

I was in my parents’ basement, being followed by something, and I went to hide in my father’s workshop. The basement was not finished, so there was only a single sheet of plaster separating the workshop from the living room. I somehow had a metal shovel in my hands – I supposed I had just picked it up.

As I stayed there, slowing my breathings, I could feel the creature approaching. For some reason, I could see its silhouette through the plaster sheet – it was a T. Rex! A small seven-feet tall T. Rex, but a T. Rex nonetheless. It stopped and looked at its side of the plaster sheet, then, incredibly quickly, went through the wall, right at me! With speed and agility only available in a dream, my shovel was what the T. Rex met head-on – or neck-on, as this was where it impaled itself. Forget the momentum of the beast, for I didn’t even move.

The T. Rex was clearly dead. There was no blood, but its head was all but severed from its body. Taking some precautions, I repeatedly hacked at the body, slicing it cleanly in half.

This was where the dream turned weird. There was still no blood, and it was not even gory. What I was hacking at looked like the meat in a huge t-bone. Then I wanted to make a steak out of it. I’m vegan (in real life), so I guess this would count as a I-don’t-care-today dinner. A huge, T. Rex rare steak – oh yeah.

I don’t recall exactly what happened next, but then I went back to the basement to show my yummy kill to someone, hoping the meat was still edible (I guess it had been a couple hours since), but more importantly, that the T. Rex was still there, because I was suddenly afraid that I had dreamed all of this. False alarm, the T. Rex was still there as I had left it. Another blur, then I did the same with my parents, with whom I was about to have that delicious dinner. The T. Rex was still there, and I woke up.

 

That was as weird a dream as I usually have, but when I thought back about it, I remembered that dinosaurs are a lot more related to birds than to mammals. Does it mean that a T. Rex would taste more like poultry than beef?

I can only assume so. If you look at the tree of life, birds are descendants of dinosaurs, which are a subset of reptiles. The tree then branches with mammals, then with amphibians to join the fishes. Mammals (red meat) are pretty far from dinosaurs and birds (white meat).

Simplified Tree of Life

A very simplified tree of life

 

Reportedly, reptiles also taste more like white meat. I’ve tasted frogs (amphibian), and they do taste a bit like chicken. Something with mammals must be different.

 

Birds are related to dinosaurs

 

Another interesting fact that most people do not want to believe, mostly because of hollywood: most dinosaurs would have feathers, or at least some ancient form of the feather as we know it (protofeather). Initially, the feather was brought into evolution because of its great insulating properties. The current belief is that huge creatures like the tyrannosaurus and brontosaurus would have no need for feathers, at least when they were big enough, because of their surface-to-volume ratio, which simplifies to a square-to-cube ratio. Being bigger means that the creature keeps its internal heat more easily, there is less heat dispersion, and the need for insulation is lowered.

T. Rex may or may not have had feathers, but it would have tasted a lot like chicken.

Categories: Thinking

The Ant and the Grasshopper

Modified story-telling from one of Aesop’s Fables.

 

In the warmer months, an ant was gathering food for the winter. It was very hard work, and time-consuming. Further down the same street, a grasshopper decided to play and go out.

When winter came, the ant had enough food to last the cold season. The grasshopper started to be hungry, and went to the ant for some charity but was turned back.

Having nothing else to do, the grasshopper had to rely on the government as food provider. He had less food than the ant, but it was free.

The ant spent the winter months comfortable, but alone. The grasshopper had enough to survive, but lived happily with the girlfriend he had met while going out.

 

Morale: The grasshopper is taking advantage of the system.

Just to make sure, the “food” is the money saved over one’s life, and the “winter” is the retirement.

 

Categories: Uncategorized Tags:

Waking Someone Up

 

Categories: Comic, Sleeping

Learning Python and Ruby – Card Object

Let’s work on a personal favorite of mine – Card and Deck objects. This will be the first time I will make an object in Python and Ruby.

The Card object represents a playing card. It has a rank value, a suit value, and a string representation. This will be used later with a Deck object.

JavaScript

function card(rank, suit) {
    this.rank = validateNumber(rank, 12);
    this.suit = validateNumber(suit, 3);
    this.value = cardToString(this.rank, this.suit);
};

function validateNumber(nb, max) {
    if (!isNaN(nb) && nb >= 0 && nb <= max) {
        return nb;
    }

    return Math.floor(Math.random() * (max + 1));
};

function cardToString(rank, suit) {
    var ranks = ['Ace', '2', '3', '4', '5', '6', '7', '8', '9', '10', 'Jack', 'Queen', 'King'];
    var suits = ['Spades', 'Hearts', 'Clubs', 'Diamonds'];

    return ranks[rank] + ' of ' + suits[suit];
};

Python

import random

class Card:
    """ Defines a Card object """
    def __init__(self, rank=None, suit=None):
        self.rank = validateNumber(rank, 12)
        self.suit = validateNumber(suit, 3)
        self.value = cardToString(self.rank, self.suit)

def validateNumber(nb, maximum):
    """ Validates a number from 0 up to a specified maximum, or a random one """
    try:
        if nb >= 0 and nb <= maximum:
            return nb
    except:
        pass

    return random.randint(0, maximum)

def cardToString(rank, suit):
    """ Returns the string representation of the specified rank and suit """
    ranks = ['Ace', '2', '3', '4', '5', '6', '7', '8', '9', '10', 'Jack', 'Queen', 'King']
    suits = ['Spades', 'Hearts', 'Clubs', 'Diamonds']

    return '{0} of {1}'.format(ranks[rank], suits[suit])

Ruby

class Card
    def initialize(rank=nil, suit=nil)
        @rank = validateNumber(rank, 12)
        @suit = validateNumber(suit, 3)
    end

    def value
	cardToString(@rank, @suit)
    end
end

def validateNumber(nb, maximum)
    if nb.is_a?(Numeric) and nb >= 0 and nb <= maximum
        return nb
	end

    rand(maximum)
end

def cardToString(rank, suit)
    ranks = ['Ace', '2', '3', '4', '5', '6', '7', '8', '9', '10', 'Jack', 'Queen', 'King']
    suits = ['Spades', 'Hearts', 'Clubs', 'Diamonds']

    "#{ranks[rank]} of #{suits[suit]}"
end

As you can see from the code, you can create a new random card by specifying no argument, or create a specific card with the appropriate arguments (if you know the code). The code handles invalid argument values, in which case it generates a random value. This is probably a bad practice, as it would not yield the expected result, but it’s a pretty simple example, and I’m not into error-handling yet. To create a Card object, you can use new card() in JavaScript, Card() in Python, and Card.new() in Ruby.

Writing the code in JavaScript was pretty straightforward, but I had to do a bit of research in order to implement the Card object in Python and Ruby. I learned that in Python, you usually don’t check for type, but use a try-except to catch the error if the variable wasn’t of the type you wanted. In Ruby, there is a difference between a single-quote string, and a double-quote string – double-quotes are for string that could get some modifications inside, such as the #{} formatting. And, although I am not completely sure why, I had to take the Card’s value property and take it out of the initialize() method. Finally, I noticed that Python and Ruby are more object-oriented than JavaScript.

Categories: Programming Tags: , ,