Darrell Hawley: Home Page

Thursday, January 11, 2007

Philosophy of If

After AADND last night, a bunch of us went to the Ann Arbor Brewing Company where I had quite an interesting conversation with Josh Holmes and Jason Follas. It turns out that during one of our many CodeMash conference calls, I mentioned that we needed to have a "default answer" in the event were unable to come to clear conclusion on a difficult decision. Meaning, if we were still shrugging our shoulders at crunch time we had a way of proceeding. Well, since Josh spends a lot of time in the car, he has been thinking a lot about how to apply this idea to all aspects of life. Though I was only using it as purely an analysis tool, he was looking for default answers throughout his entire life. And interestingly he realized, he didn't like most of them.

How about an example? A little over a year ago, Josh was a smoker who really wanted to quit. He noticed that when he was on the phone his default answer was to light up. To successfully quit smoking, he knew he had to change this as well as several other habits. So he successfully changed those habits (i.e., default answers) and THEN quit smoking.

Doesn't this sound like an If statement? I originally had thought of this as a switch since default is a keyword you commonly nest with in, but the more I think about it, I'm not sure that I like the switch or the use of "default", for that matter. Here's why. First, the example the above example written in code would look something like the following:

if (onPhone == true)
{
 Smoke
}

Note that the activity triggered the habit, not the lack of the activity. Let's look at how we would use this idea during a decision making process where we need a "default answer":

Answer answer = [some value]
while (DecisionHasBeenMade == false)
{
 if (haveNewInformation == true
   && mustChangeAnswer == true)
 {
  answer = [some new value]
 }
 if (needAnswer == true)
 {
 GiveAnswer(answer)
 DecisionHasBeenMade = true
 }
}

A bit more complex this time, but "if" is still at the core - with no "else" statement anywhere in sight.

Since every great philosophy needs a name, I propose that we call this philosophy "Ifism"

Labels:

2 Comments:

  • Had a conversation with Josh today about this one. Unfortunately Matt Winkler was caught in the crossfire. Josh is still carrying the DefaultAnswerism Banner. He is claiming it makes a better life philosophy than ifism. I'm not so sure, but I'm looking forward to his rebuttal sometime this weekend.

    By Blogger Darrell Hawley, at Thu Jan 11, 08:05:00 PM  

  • And I want to see DefaultAnswerism done in code. A fairly reasonable request, I think.

    By Blogger Darrell Hawley, at Thu Jan 11, 08:06:00 PM  

Post a Comment

<< Home