Ken's Meme Deflector

Peddling the same prosaic resources you can get from a simple Google search

Wednesday, March 30, 2005

What Is Real? What Is Phony?

In What Is Real?, Evelyn Rodriguez writes:
I'd rather be real than great. I have never gained anything I truly wanted from a pure pursuit of greatness. I'm not saying these two are mutually exclusive, but the focus can lead one astray. Nothing kills relationships - personal and professional - quicker than when I stop being real. It's costly in the tangible cash realm too.
If phoniness is so harmful, why is it so common? Here's my guess.

Being real carries a tremendous social risk. For every Evelyn receiving praise for writing a heartfelt blog post, there are plenty of children being scolded by their mothers for vocalizing a embarrassing observation; and junior-highers being ridiculed by their peers for revealing an affection for an unpopular classmate; and employees being labeled a renegade for pointing out a fact that makes their managers look bad. From a very young age, we are trained to shut up about every uncomfortable truth we discover, and in the process learn to punish those that don't.

It takes courage to be real, but every attempt fortifies the soul, building more courage for the next attempt.

Phoniness works the same cycle in reverse. Being a phony doesn't require any special effort, but every act of phoniness kills a bit of one's soul, draining one's courage for the next opportunity until one slowly turns into Bill Lumbergh (who has my disdain and pity in about equal measure).

So here's my theory on why phoniness is so prevalent: as it requires no special effort to be a phony and there are many social forces pushing people towards it, phoniness becomes the common style of interaction.

Tuesday, March 29, 2005

Why Blog Now?

On the Applied Improvisation Network, Denzil Meyers asks:
Everyone and their dog seems to be blogging, except for me. What's the big deal?
I can't speak for everyone or their dogs, but I can tell you why I blog. Here are my motivations:
  • to connect with others who share my interests
  • demonstrate some ability in my profession (i.e. personal marketing)
  • improve my writing skills
  • learn more about the world
  • ...
  • Aw, who am I kidding? I'm in it for the sex, drugs and rock 'n roll, baby!
Can't say I'm making much progress, though.

Sending a Trackback Ping with HaloScan

Hats off to How To Blog for tipping me off to Haloscan's trackback sending feature:
According to their tutorial on sending a trackback ping, each time you want to send a trackback from Blogger (or similar tool), you have to
  • login to HaloScan
  • click 'Manage Trackback"
  • click "Send a trackback ping"
  • Paste the TrackBack ping URL into the edit box for 'URLs to Ping'
  • Fill in your blog name
  • Paste YOUR permalink URL
  • Paste a copy of your Post Title
  • Paste (or write) an excerpt from your post
  • Click the 'Ping Now' button.
Yikes - that's more work/typing/copying & pasting than I want to bother with.
Worth trying out, I'd say.

TI C55x Greatest Innovation in 15 Years?

I nearly fell off my chair laughing when I saw this come across my blogline:
Texas Instruments Incorporated (NYSE: TXN) (TI) today announced that its digital signal processors (DSP) that helped spawn the wireless communications revolution were named the "Greatest Innovation of the Past 15 Years." Honored by EDN magazine, TI's TMS320C55x DSPs were heralded as the most significant design innovation in the last decade and a half, beating out the likes of Intel's Pentium processor and products from HP, ADI and others.
The reason I laughed so hard doesn't come until the end of the press release:
A panel of EDN technical editors meticulously worked to identify the list of finalists in each category before EDN readers crowned TI DSP products winners in an online ballot [emphasis added].
When I was an employee at TI I would occasionally receive an email from some unknown marketing droid in Texas informing me of an online "reader's choice award" survey, encouraging me to vote early and often for all the TI products listed. If I wasn't terribly busy, I'd go to the website and fill it out. If I remember correctly, rumour at the time was that some of the marketeers had written a script to continuously submit ballots until the polls closed, but I could never bring myself to believe they could ever be that smart. Anyways, it seems that whatever they did paid off for them this time. They produced the greatest innovation of the last 15 years, even if it is by virtue of having the largest number of bored employees.

Alright, alright... To be fair, TI DSPs have had a huge impact on the world we live in. When I left TI in 2001, they dominated the cell phone market. I'm just having trouble imagining that any magazine readership would ever recognize it.

Monday, March 28, 2005

The Nameless Dread

The Nameless Dread
Family Circus cartoons put to the words of H.P Lovecraft at The Nameless Dread (via jwz).

Update:The blog has apparently been shut down. Too bad.

Update:And now it's back.

The Long Road to MathML

Anybody following my progress with the exercises in SICP will have noticed that it's been a while since I last posted a solution. I'm at problem 1.13, which turns out to be a mathematical proof. A mathematical proof requires a mathematical notation, so I'm taking a small diversion into the land of MathML to learn how I might present the equations on this blog. Fortunately, the W3C has an article on how to embed MathML in a website.

I've been using OpenOffice to generate MathML, but I'm not entirely happy with the output, which contains several mysterious unprintable ASCII characters; parentheses, I think. Any suggestions on a better MathML editor? The W3C maintains a list of MathML editors, none of which seem particularly remarkable to me. Basic requirements: free of charge, for Windows.

Update: After wrestling with MathML for most of the morning, I've completely given up on it. In order to work (on Firefox, at least), the page containing MathML must be named with an .xml extension. Compare this XML MathML test page from the W3C MathML site versus the HTML equivalent. Same contents, different renderings.

Note: Do not attempt running either one through the W3C HTML Validator.

So why don't I just rename my files to have the .xml extension? Besides the fact that there are gobs of files to rename and as many redirection pages to create, if I were to rename all my files to xml, I could no longer use PHP, because my webserver uses the .php extension to identify PHP files. Even though I don't use PHP for anything right now, it is the only server-side scripting language available from my hosting service and I'm not ready to throw it way so I can display a few equations.

I've started looking into image-based solutions. Eric Raymond's eqn2graph seemed very promising until I ran it under Cygwin and discovered that ImageMagick's convert tool was inexplicably generating blank images.

I'd consider using MathType if it cost a little less. The $129 they are asking is too steep for the amount of use I plan to get out of it.

There is some almost helpful information in Math Typesetting for the Internet, which has me almost considering manually manipulating screenshots of OpenOffice, though the very thought sickens me.

Saturday, March 26, 2005

Dinner at Bhima's Warung

When Mandy and I were married in June 2003, we received some gift certificates for Bhima's Warung as wedding gifts. We finally got around to using them on Thursday night. The food was remarkable; quite possibly the best meal I have ever eaten in Waterloo. For an appetizer I had what turned out to be a gargantuan spring roll stuffed with smoked chicken and other vegetables served on a spicy chutney. For an entree, I had some monkeyfish tail with a cashew curry sauce with pineapples. Dessert was some dark chocolate ice cream. Excellent food! It was quite reasonably priced, too... if you happen to have a $100 gift certificate. If not, it is a little pricey, but you get what you pay for.

Courtesy Call from Crystal Clear Water

Somebody from Crytal Clear Water dropped by for a courtesy call on Thursday to take a look at our broken water softener. He looked at it, told me that its make is Autotrol and that it looked serviceable. If I want it serviced, I have to set up a service call for $60. Thanks a lot! But really, what should I expect for nothing?

Basement Renovation: Lumber Received

The lumber was delivered on Thursday, as I expected. I haven't done anything with it, yet, except move it from the driveway to the basement, which turned out to be a rather draining job in itself.

Thursday, March 24, 2005

Vonage Adds 911 Dialing in Canada

When I logged on this morning, I was happily surprised to see that Vonage Canada has finally added 911 Dialing. Mandy and I have been using the Vonage VoIP service as our primary phone service since we moved in October. At $19.95, we pay much less than we would for a traditional line with Bell, but I was always a little uneasy about not having 911 service. Now that we have it, I can rest easier, though I realize their service isn't perfect: if I dial 911, my location will not be automatically transmitted to the operator so I'll have to tell him my address in the call.

Woman Finds Finger in Chili at San Jose Wendy's

Chili cookA woman bit into a severed finger while digging into her bowl of chili at Wendy's yesterday:
The restaurant at 1405 Monterey Highway was temporarily closed Tuesday night to allow health officials to impound the remaining chili, which was prepared on site, using a variety of ingredients. Health officials also seized all of the restaurant's remaining stock of ingredients, which will be inspected, and traced back to their manufacturer.

Since all of the workers at the restaurant were in possession "of all 10 of their fingers," health inspectors assume the finger likely entered the food chain as a result of the manufacturing process, according to county Environmental Resources Director Ben Gale.
How does a severed finger slip through the QA process at food processing plant? If the finger belongs to one of the workers at the plant, somebody must have known about it. Presumably the person who lost the finger knew about it. If there was reason to believe that the finger made it into the food, why didn't they scrap the entire batch? Did they think nobody would notice?

Of all the fast food chains, Wendy's is the only one that I like. I still plan to visit there occasionally, but I'm going to avoid the chili from now on.

Water Softener Breakdown

DrainI'm not sure how long it has been out, but our water softener is not working. I noticed on Tuesday that our water no longer had the slimy feeling of softened water that it did when we moved into the house. I took a sample into Crystal Clear after work yesterday to have it tested. The softener is having no affect on the hardness of the water. The consultant from Crystal Clear offered to drop by our place for a courtesy call. I'm expecting him this afternoon.

Wednesday, March 23, 2005

Basement Renovation: Purchasing Lumber

Stacked lumberI ordered the lumber for the basement renovation tonight. I ordered it from Fairway Lumber, the only retailer in Waterloo that I know of that offers delivery (and free, no less), though my search was far from broad.

It should arrive tomorrow afternoon. In the meantime, I'll start marking out wall locations.

Tuesday, March 22, 2005

Solution to SICP Exercise 1.12

Structure and Interpretation of Computer ProgramsSolution to Exercise 1.12:
(define (pascal row col)
(cond ((or (= 0 col) (= row col)) 1)
(else (+ (pascal (- row 1) (- col 1))
(pascal (- row 1) col)))))

Solution to SICP Exercise 1.11

Structure and Interpretation of Computer ProgramsSolution to Exercise 1.11:

A recursive process:
(define (fr n)
(cond ((< n 3) n)
(else (+ (fr (- n 1))
(* 2 (fr (- n 2)))
(* 3 (fr (- n 3)))))))
An iterative one:
(define (fi n)
(define (f-iter i f-i-1 f-i-2 f-i-3)
(if (> i n)
f-i-1
(f-iter (+ i 1)
(+ f-i-1 (* 2 f-i-2) (* 3 f-i-3))
f-i-1
f-i-2)))
(if (< n 3)
n
(f-iter 3 2 1 0)))

Monday, March 21, 2005

Paul Graham Briefly on Writing

Paul Graham has written a brief essay on writing essays:
I think it's far more important to write well than most people realize. Writing doesn't just communicate ideas; it generates them. If you're bad at writing and don't like to do it, you'll miss out on most of the ideas writing would have generated.
Every time I read one of Paul's essays I feel inspired to write one myself. It's a pity I have the attention span of a gold fish.

Basement Renovation: Getting A Permit

I heard back from city hall about the permit:
A building permit is required to finish a basement when you are creating a bedroom, doing any plumbing work (including a rough-in or bar sink) or making any structural changes (including new exterior openings, moving posts/beams etc.). A permit is not required if you are installing fixtures on an existing rough-in. Electrical permits are done through the electrical safety authority, you can contact them at 746-3040.
No bedrooms. No plumbing. No structural changes. No permit required.

Global Warming Could Trigger Ant Invasions

Insect invaderAccording to a New Scientist story, global warming could trigger ant invasions:
The study of 665 ant colonies in environments ranging from tropical rainforests to frozen tundra suggests that in warmer environments the ants' body size shrinks, on average, while the number of individuals in the colony booms.

Global warming might shrink ant workers by as much as a third, says Michael Kaspari at the University of Oklahoma, US, and the Smithsonian Tropical Research Institute in Panama, who carried out the study: "And since ant species with small workers appear to be particularly successful at invading, ant invasions - already destructive - may become more common in a warming world."
I'm looking forward to reading the inevitable query letter.

Sunday, March 20, 2005

Basement Renovation: Getting Started

A few weeks ago Mandy and I decided to start renovating part of our basement. Our 30,000ft plan is to transform about a third of the basement into a rec room, into which we'll move the big screen. The family room, which currently houses the TV, will become a reading room/office, a more appropriate function considering all the built-in oak cabinetry.

Sponsored Link: Chicago Basement Remodeling

I like to think of myself as a fairly handy guy, so I'm planning to do most of the work myself. From what I've read, doing it myself should cut the cost of the reno in half. I don't have much direct experience in many aspects of a basement reno — I've never framed a wall, added new wiring, or hung drywall before, for example — so I expect I will have a lot to learn in the process.

My first adventure in renovation education was a trip to our local Rona store in early February. They had advertised a session on framing a basement for the Saturday morning, and a related session on wiring in the afternoon. I showed up for the morning session only to find, after waiting for an hour, that the instructor was not able to attend. While I waited a took a look around the store and jotted down some prices for materials and browsed through their book section, which clued me into the idea that an instructed session was a waste of time. I should just order a book on basement renovations that teaches me what I need to know.

When I got home, I surfed Amazon until I found Remodeling a Basement: Expert Advice from Start to Finish, which seemed to have the most favourable reviews, and ordered it. It arrived a few days later. For the next few weeks I didn't make any noticeable progress on the basement. I was just reading through the book.

The next step was drawing up a plan for the basement. This turned out to be more work than I expected, especially considering how simple our plans are — basically just closing in an open space. I found one very helpful tip in the book for this step. Make a scale drawing of the existing layout on a piece of grid paper first. Photocopy it. Then draw your design in pencil on the copy. With the existing layout in permanent ink, it is easy to try different ideas and erase the duds without having to redraw everything.

With a plan in hand, I finally got started on some actual work last weekend: demolition! This was almost entirely brain-dead grunt work, something I've discovered to quite enjoy. I lifted some tired old carpet, dismantled a wall removed a bunch of drywall around the stairway.

On my day off last Friday, I rerouted some central vac conduit. I had to go to a local vacuum store to pick up the necessary fittings; Canadian Tire does not carry them because, according to a salesperson there, they vary in size from brand to brand.

Now I'm all ready to start framing. Well... almost ready. I don't have a building permit yet, and I'm not sure that I need one. I emailed city hall yesterday and unsurprisingly haven't heard back from them yet.

I'm hoping to get some quotes and place an order for the lumber this week. Trying to price this stuff online is hopeless. Home Depot doesn't even acknowledge that they sell lumber on their website.

If I can get the permit and lumber lined up by Wednesday, I can start working on Thursday, which I'll be taking off. I'll try to keep track my progress here more regularly in the future.

Solution to SICP Exercise 1.10

Structure and Interpretation of Computer ProgramsSolution to Exercise 1.10:
> (A 1 10)
1024
> (A 2 4)
65536
> (A 3 3)
65536
(f n) computes 2n.
(g n) computes 2n for n>0. For n=0, it is 0.
(h n) computes h(n) such that if n=0, h(0)=0; otherwise h(n)=2h(n-1).

Solution to SICP Exercise 1.9

Structure and Interpretation of Computer ProgramsSolution to Exercise 1.9:

The first procedure follows a recursive process:
(+ 4 5)
(inc (+ (dec 4) 5))
(inc (+ 3 5))
(inc (inc (+ (dec 3) 5)))
(inc (inc (+ 2 5)))
(inc (inc (inc (+ (dec 2) 5))))
(inc (inc (inc (+ 1 5))))
(inc (inc (inc (inc (+ (dec 1) 5)))))
(inc (inc (inc (inc (+ 0 5)))))
(inc (inc (inc (inc 5))))
(inc (inc (inc 6)))
(inc (inc 7))
(inc 8)
9
The second follows an iterative one:
(+ 4 5)
(+ (dec 4) (inc 5))
(+ 3 6)
(+ (dec 3) (inc 6))
(+ 2 7)
(+ (dec 2) (inc 7))
(+ 1 8)
(+ (dec 1) (inc 8))
(+ 0 9)
9

Solution to SICP Exercise 1.8

Structure and Interpretation of Computer ProgramsSolution to Exercise 1.8:
(define (square x)
(* x x))

(define (cube x)
(* x x x))

(define (cbrt-iter guess prev-guess x)
(if (good-enough? guess prev-guess)
guess
(cbrt-iter (improve guess x)
guess
x)))

(define (improve guess x)
(/ (+ (/ x (square guess))
(* 2 guess))
3))

(define (good-enough? guess prev-guess)
(< (/ (abs (- guess prev-guess))
guess)
0.001))

(define (cbrt x)
(cbrt-iter 1.0 0.0 x))
This solution uses the guess evaluation strategy of Exercise 1.7.

It seems to give reasonable results:
> (cbrt 8)
2.000000000012062
> (cbrt 27)
3.0000005410641766
> (cbrt 64)
4.000000000076121

Solution to SICP Exercise 1.7

Structure and Interpretation of Computer ProgramsSolution to Exercise 1.7:

The results for small values become very inaccurate. For example, the root of the square of 0.001, which we might expect to be itself is found to be off by a factor of ~31.3 times.
> (sqrt (square 0.001))
0.031260655525445276
As the values grow larger, the precision of the guess comes into play. Eventually the computer becomes unable to represent the guess to a precision of 0.001. In such cases, the program can endlessly alternate between two guesses that are more than 0.001 away from the true square root. On my x86 machine with DrScheme, this can be seen with the following expression
> (sqrt 1e13)
Here is an implementation of good-enough/ that follows the alternative strategy given in the exercise
(define (good-enough? guess prev-guess)
(< (/ (abs (- guess prev-guess))
guess)
0.001))
The x parameter is replaced by prev-guess, which necessitates a change to sqrt-iter and sqrt, as shown here:
(define (sqrt-iter guess prev-guess x)
(if (good-enough? guess prev-guess)
guess
(sqrt-iter (improve guess x)
guess
x)))

(define (sqrt x)
(sqrt-iter 1.0 0.0 x))
I've used an initial prev-guess of zero, which ensures that the initial guess of one is never good enough, thus forcing at least one iteration of the algorithm.

This implementation performs much better on the two troublesome examples given above:
> (sqrt (square 0.001))
0.0010000001533016628
> (sqrt 1e13)
3162277.6640104805

Friday, March 18, 2005

Support Mandy in the Weekend to End Breast Cancer

The Weekend to End Breast CancerIn September, Mandy will be walking in The Weekend to End Breast Cancer, a two-day, 60km walk to raise money for the Princess Margaret Hospital Foundation, Canada's largest institution devoted to cancer research and treatment. She writes:
I will be walking for my stepmother, Linda, who is a survivor and I will be walking for and with my sister, Lauren, who I hope will never have to go through what her mother went through. Please help make this possible.
You can donate online through Mandy's donation page.

Monday, March 14, 2005

Solution to SICP Exercise 1.6

Structure and Interpretation of Computer ProgramsSolution to Exercise 1.6:

Because new-if is a function, both of its parameters are evaluated before the operation is performed. Since one of the parameters is a call to sqrt-iter, the first operation of which is a call to new-if, an endless loop is formed and the function never completes.

Sunday, March 13, 2005

Solution to SICP Exercise 1.5

Structure and Interpretation of Computer ProgramsSolution to Exercise 1.5:

With applicative-order evaluation, the expression that Ben entered for evaluation will fail to terminate. The reason for this has to do with expression (p) evaluating to itself. When evaluating with applicative order, every combination within an expression is evaluated before the expression itself. The (p) combination never finishes evaluating because it keeps evaluating to itself.

With normal-order evaluation, the expression will be evaluated to 0. The reason is that the (p) combination is passed to test unevaluated. According to normal-order evaluation rules, it isn't evaluated by the interpreter until its value is needed. The condition of the if expression in test is satisfied (because the expression (= 0 0) evaluates to #t, so the test procedure evaluates to 0. There is never any need to evaluate (p).

Solution to SICP Exercise 1.4

Structure and Interpretation of Computer ProgramsSolution to Exercise 1.4:

If b is positive, the + operator will be applied to a and b. Otherwise, the - operator will be. This results in the absolute value of b always being added to a.

Solution to SICP Exercise 1.3

Structure and Interpretation of Computer ProgramsSolution to Exercise 1.3:
(defun square (x)
(* x x))

(defun sum-of-squares (x y)
(+ (square x) (square y)))

(defun sum-of-squares-of-two-larger (x y z)
(or (and (< x y) (< x z) (sum-of-squares y z))
(and (< y x) (< y z) (sum-of-squares x z))
(sum-of-squares x y)))

Solution to SICP Exercise 1.2

Structure and Interpretation of Computer ProgramsSolution to Exercise 1.2:
(/ (+ 5 
4
(- 2 (- 3 (+ 6 (/ 4 5)))))
(* 3
(- 6 2)
(- 2 7)))

Solution to SICP Exercise 1.1

Structure and Interpretation of Computer ProgramsThis morning I began my third attempt at reading the programming classic Structure and Interpretation of Computer Programs, otherwise known as SICP. My earlier attempts stalled for various reasons, but this time I hope to get through the entire book. As an incentive to finish, I'm publicly promising to post my solutions to all the exercises in the book on this blog, starting with Exercise 1.1:
>10
10

>(+ 5 3 4)
12

>(- 9 1)
8

>(/ 6 2)
3

>(+ (* 2 4) (- 4 6))
6

>(define a 3)

>(define b (+ a 1))

>(+ a b (* a b))
19

>(= a b)
#f

>(if (and (> b a) (< b (* a b)))
b
a)
4

>(cond ((= a 4) 6)
((= b 4) (+ 6 7 a))
(else 25))
16

>(+ 2 (if (> b a) b a))
6

>(* (cond ((> a b) a)
((< a b) b)
(else -1))
(+ a 1))
16

Thursday, March 10, 2005

What Should I Do With My Life?

What Should I Do With My LifeMaybe its just the beer after having just given blood, but I found Po Bronson's article, What Should I Do With My Life moving and inspiring, if not a little depressing. To quote:
Asking "What Should I Do With My Life?" is the modern, secular version of the great timeless questions about our identity. Asking The Question aspires to end the conflict between who you are and what you do. Answering The Question is the way to protect yourself from being lathed into someone you're not. What is freedom for if not the chance to define for yourself who you are?

The article is based on a book by the same title, which, after reading the article, I feel deserves a place on my wishlist.

Tuesday, March 08, 2005

Simply del.icio.us

Monday, March 07, 2005

Costco Canada Finally Goes Online

Costco.caWarehouse behemoth, Costco, has finally opened an online store for Canadians. Still no listing for the Nautilus NT-CC1.

Hedgehog

Hedgehog: Never underestimate the power of a small tactical Lisp interpreter.Hedgehog is a bytecoded Lisp designed for use in small embedded applications:
Hedgehog is a very concise implementation of a Lisp-like language for low-end and embedded devices. It consists of a compiler and a byte code interpreter. The byte code interpreter is written in standard conforming C, is efficient and easily portable, and can be compiled to a very small executable of only some 20 kilobytes in the smallest configuration for the Intel x86 architecture.

The Hedgehog Lisp dialect has proper support for local and lambda functions, lexical scoping, variable argument functions, garbage collection, exceptions, macros, and over a hundred predefined functions or special forms. The built-in types are lists, symbols, strings, 32-bit integers, AVL-trees, and tuples up to 16 elements wide. Proper 32-bit wide integers are necessary for various bit-level operations in embedded systems.
As a Lisp enthusiast who spends his days developing programming tools for extremely resource-constrained DSP systems, I've occasionally wondered if it would be possible to run a Lisp on AMIS's processors. At 20 kilobytes, the Hedgehog folks are getting surprisingly close. Neat stuff!

Thursday, March 03, 2005

More notes from EclipseCon

More notes:
  • Google fellow, Urs Hölzle, gave an talk about how Google search works, telling how they cluster their machines in two matricies (one for indexing and another for content). He talked a little about the Google File System (GFS), and MapReduce. More details from Urs' talk here. Fun stuff.
  • Ed Warnicke is trying to generate and organize interest in dynamically-typed languages — such as Perl, Python, Ruby, and especially TCL — in Eclipse. Though I have my doubts whether there is much demand for scripting language IDEs, I am curious and hopeful that something comes out of it.
  • Randy Hudson gave an talk on obstacle avoidance in GEF that I found interesting.
  • Mark and I took a short stroll along the waterfront between sessions yesterday. I can see why this is such a popular place to live: flowers bloom in February!
  • After hundreds of years of eating at tables, why hasn't anybody developed a place setting that unambiguously identifies a diner's water glass?

Wednesday, March 02, 2005

Some Observations from EclipseCon

Some brief observations from EclipseCon 2005: