Archive for category Uncategorized

√2 is irrational: proof by poem

Posted by on Tuesday, 7 October, 2008

i found this scribbled in chalk one day, on the sidewalk outside the University of Chicago math department:

Double a square is never a square,
and here is the reason why:
If m-squared were equal to two n-squared,
then to their prime factors we’d fly.
But the decomposition that lies on the left
had all of its exponents even,
But the power of two on the right must be odd,
so one of the twos is “bereaven”!

Here’s my translation of this poem. It’s a simple proof by contradiction.

  1. Assume sqrt(2) is rational, so sqrt(2) = (m/n)
  2. By squaring both sides and dividing, we get m^2 = 2*n^2
  3. Reduce m and n into sequences of prime factors:

    (p1 * p2 * …. * pv)^2 = 2 * (q1 * q2 * …. * qw)^2

  4. Apply the square to each element in parenthesis:

    p1^2 * p2^2 * … * pv^2 = 2 * ( q1^2 * q2^2 * …. * qw^2)

  5. Examine the right side, remembering that all p’s and q’s are prime numbers. One of the following things must be true:
    • There exists a q = 2. In which case, we can combine our lone “2” into it, giving us a 2^3 term.
    • There is no q = 2. In which case, our power of 2 is simply 1, i.e. 2^1.

    Either way, we’ve proven the the right side contains an odd power of 2.

  6. But, the right side contains only even powers of primes. Contradiction.

Isn’t math fun?

Dear Mycologists

Posted by on Sunday, 28 September, 2008

Following on the heels of this old post, can someone tell me what the heck this weird fungus is? It popped up on top of a pile of mulch in our backyard this week:

Review of D&D 4th Edition

Posted by on Sunday, 20 July, 2008

Well friends, it’s time for my uber-geeky D&D post. I figure that if you can bear listening to me blab about version control software, banjos, and canned tuna… you can listen to my review of the new 4th Edition D&D rulebooks that came out this summer.

My affair with D&D has been on-and-off my whole life. I played 1st edition in 2nd and 3rd grade, then lost interest. I somehow missed the entire 2nd edition of the game completely. When the 3rd edition came out in 2000, I had just gotten back into the game by playing in NASCRAG touraments, so it was like learning the game all over. And now, eight years later, it’s time for the owners-du-jour to do another round of tax collection: everyone buy new books, relearn the rules.

As usual, the internet is full of people screaming about how the game has been ruined and destroyed, how Wizards of the Coast is evil and greedy and oppressing the freedom of gamers everywhere, forcing us into a treadmill of upgrades. Just like what happened back in 2000. 🙂 This time around, the biggest screams have been “OMG they dumbed it down into a video game!” There’s a grain of truth to the accusation, but I decided to give the new rules a good sincere try before condemning them. So I invited some friends over. Everyone rolled up a character, and we did a three-hour test game.

The verdict is: I really like 4th Edition. It was super fun. And everyone who played was raving about it as well. We’re talking about continuing the game now. The common quote was how somehow the new rules (with all the “powers”) essentially made 1st-level combat feel like 5th level. No more 1st-level magic users with 3 hit points and 11 AC expending a single magic missile, then hiding in a closet until the next morning. Nope, the 1st level wizard was kicking ass just as much as the paladin, and having a blast!

The new edition seems to be mainly a rewrite of combat rules, and done such that combat is much much much more fun. Not less complex, but way more entertaining. No more endless rounds of “I swing my sword for the 17th time” — it’s all about doing funky ‘powers’ each round, which keeps things interesting. (The comparison to World of Warcraft is justified here!) However, my players weren’t spacing out when it wasn’t their turn — instead, they were on the edge of their seats to see what kind of crazy stunts their allies were going to do. When was the last time you saw that happen?

The other big change is that using a battlemat and miniatures is sort of a requirement now. In 3rd edition, the board-game aspect was an optional enhancement, one which made combat more visually accessible and strategic. In 4th edition, many powers are described in terms of the grid (“explodes in a radius-3 burst”), so it’s kind of hard to not have one now. Maybe this doesn’t bug me, because I’ve always used a battlemat anyway.

If anything is to be criticized, it’s the writing and artwork in the new rulebooks. The art is cheap and cheesy looking. Imagine the worst fantasy art you can, and then take it down a notch. It’s almost like the cover paintings on bodice-ripping romance novels. And the writing is horrible as well: a much bigger font, with writing style apparently targeting 9 year olds. I think it’s noble that the new owners want to indoctrinate a “new generation” of roleplaying gamers, but in the process the books have turned into what reads like a cartoonish self-mockery of the entire genre. For example, here’s a lovely excerpt from the new Player’s Handbook:

“Imagine a world of bold warriors, mighty wizards, and terrible monsters […] ancient ruins, vast caverns, and great wild wastes where only the bravest heroes dare to tread. Imagine a world of swords and magic, a world of elves and goblins, a world of giants and dragons […]”

Gag me with a spoon.

Ultimately, though, if you’re an experienced D&D player, this corny writing doesn’t matter at all. There’s nothing stopping you from running a dark campaign, creating characters of real depth and motives, and doing serious roleplaying as you’ve always done. The only “new” thing here is excitement of combat; the storytelling and improv acting hasn’t been taken away.

As I was reading the rulebooks, I took notes as I went. You can read my notes here which compare the old and new rules. I hope they’re useful to people thinking of trying out the new edition!

I’m off to OSCON in Portland tomorrow, and Fitz and I are scheduled to give four joint presentations. I’m sure I’ll have blog updates forthcoming!

Haiku

Posted by on Sunday, 3 February, 2008

Read Watership Down
on the plane; it’s like Tolkien,
except with rabbits.

Missing the Party

Posted by on Wednesday, 19 December, 2007

I’ve had “download the free Radiohead album” on my to-do list for many weeks. The website allows you to download the mp3s, and allows you to make an optional donation of any size. So I finally went to download it today, and the official website says it’s no longer available… though I can order the “discbox” for a mere 40 pounds. Um, no thanks.

I can understand Radiohead launching their album download-only as an interesting experiment in a world that is busy questioning copyright and distribution systems. I can understand them adding a “buy the CD” option later on, after the experiment is over. But why would they possibly have to take away the download option? People who want real-life objects such as booklets, CDs and vinyl should be able to pay for that, but I can’t understand why it’s mutually exclusive with electronic distribution.

It’s too bad, I was planning to give them some money via their original “tip jar”, but £40 is way too much. Hello, bittorrent.

The Long Road to Vegetarianism

Posted by on Monday, 1 October, 2007

All my life I’ve had a secret wish to be a vegetarian. Hm, no, scratch that… but I’ve had the wish for at least the last twelve years, ever since I met my wife. Why? Because after over a decade of discussing and thinking about it, I’m persuaded that (1) it’s generally healthier, (2) it’s better for the planet, (3) it moots the entire issue of trying to define “animal cruelty”.

It all began when I met my wife in college. She told me she was a pescatarian. Well, actually, nobody used that word in 1995, but it’s basically someone who won’t eat any animals other than fish and seafood. I asked her if it was a moral/ethical issue for her (“meat is murder?”), and she calmly explained that she had stopped eating birds and mammals at age 13 because she didn’t want to support animal torture via “factory farms”. (At this point in my blog entry, I don’t have time to go into a long diversion about what factory farms are… but they are terrifying things that torture millions of animals and poison the environment. And they’re the norm for all animal farms; 99% of all meat you consume comes from them. To learn more, read the famous book Diet For a New America.)

I was horrified to learn about factory farming, but was also relieved that my wife didn’t actually believe that eating animals was a sin. I’ve always been of the opinion that there’s nothing inherently unethical about eating animals, considering that millions of years of evolution (and the planet’s entire biosphere) is based on the idea. What matters is the way in which you participate in the food chain. Do you do it respectfully, the way the Native Americans did? Or do you systematically torture creatures and destroy the planet in the process?

Unfortunately, there’s always been one big obstacle between me and vegetarianism: I love meat. I was raised in a meat-centric U.S. culture, doubled by a meat-centric Jewish culture of deli-cured delicacies. My childhood and teen years are peppered with fondly-told stories of how much meat I ate at various events. The taste is in my mouth… I drool when driving by the hot-dog factory, despite my knowing of what disgusting animal parts are poured into a hot dog. When I want to really celebrate, I still have initial thoughts of finding a fancy steak somewhere. In a nutshell, whenever I’ve experimented with vegetarianism, I’ve always crumbled after a week or two, like a nicotine addict reaching back for one more cigarette. It’s embarrassing. (People are sometimes surprised when they find out that we’re raising our kid pescatarian; I think of it as an act of mercy, sparing him from a lifetime of guilty cravings.)

However, there’s finally some hope to my story.

When I moved in with my wife, I learned to live by the rules of her kitchen and house. Her rule was simple: no meat in the house, ever. Throughout our marriage, we’ve kept that rule as our own personalized sort of ‘kosher’ law, and our friends are all aware of it and respect the rule when they come over. Why would I go along with this rule, you might wonder, when I’m not a vegetarian myself? Easy. It’s a nice halfway-point towards my ideal. If I can’t go totally pescatarian like my wife, I can at least dramatically reduce my meat intake. I’ve learned to cook without meat, order meatless dishes for take-in, and just eat meat “outside the house” when the opportunity arises. It simplifies our domestic life as well: no need to worry about my accidentally cooking food with meat, or whether or not I can share my meals with my spouse and son. And because our guests respect the rule at parties and such… well, that’s ten fewer Mu Shu Beef entrees ordered from the local Chinese restaurant, which nudges our economy just a bit more away from meat. Hooray.

Still, though, I’ve become less satisfied with this halfway point. I still eat meat for lunch every weekday (whether it be at a restaurant, or Google feeding me lunch)… and the ethics of eating tortured animals has slowly been gnawing at me over the years.

So my latest experiment is to do what my friend Karl Fogel did: become a pescatarian who only eats untortured meat. This decision has no effect on my domestic life, where I eat 2/3rds of my meals. But it’s made eating food outside the home much more tricky. The fundamental problem is: how do you define animal cruelty? No doubt my vegan friends would describe any sort of meat consumption as inherently cruel, but I’ve already explained how I disagree with that. Well gee, you say, what about all those corporations advertising “free range” animal products? Aren’t I the target for their marketing?

Sure, but while the U.S. Government may have tough standards defining “organic”, they’re really flimsy on defining “free range”. The realm of animal cruelty is a big fuzzy space. If a chicken is allowed out of its tiny cage (just barely big enough to hold it) for 5 minutes a day, to walk around in a 3’x 3′ pen exposed to the sun, is it now a “free range” chicken that lays “free range” eggs? There’s barely any regulation on this stuff.

I was hoping that Whole Foods would be my refuge. I’ve heard all sorts of great rumors about how Whole Foods only sells free-range meat. But when I went to their meat counter last weekend, I found no labels on any products. The phrases “organic”, “local”, and “free range” were nowhere to be seen. When I asked the butchers behind the counter where the various meats came from (“which farm? how was it raised?”), they all hemmed and hawed and scratched their heads. (“I think some of it comes from um… Arizona? No, maybe Colorado?”) The only literature they were able to give me was a generic brochure talking about how the company had created a whole new foundation to increase animal compassion in farming techniques. Hooray and applause for Whole Foods, but… that still dosen’t tell me whether their hamburger is cruelty-free. Even the Information Desk was unable to help me.

When I got home and did some Googling, I found out that Whole Foods only buys meat from farms that meet some pretty hard-core requirements. The farms can’t use hormones or antibiotics on the animals, nor fed animal by-products. The whole system must be heavily documented and re-audited each year. The thing that stood out, though, was the requirement that “the time on a feedlot cannot be more than one-third of the animal’s life.” Hm. Two-thirds of a life grazing freely in a field, but one-third of one’s life in a feedlot? A feedlot is basically thousands of cows crammed into a giant lot of hard-packed dirt. It’s hard to move, there’s nothing to graze on, and the animals are force-fed grain to give their muscle tissue more fatty “marbling”, something they’re not evolved to eat at all. Once again, Whole Food’s definition of “compassion” is just one point along a fuzzy scale, and I’m not sure it’s compassionate enough for me. It makes my quest for humane meat all the more challenging. :-/

My wife imparted words of wisdom to me. She works Heifer International, a huge non-profit organization that teaches sustainable agriculture to impoverished communities around the planet. As you might expect, a number of their employees are either vegetarian, or at least extremely conscious about eating sustainable, ethical, locally-produced food. For most of her co-workers, the general rule of thumb is: if the cook can’t tell you exactly where the animal came from (i.e. “Joe Blow’s farm, 7 miles northwest of here”), they won’t eat it.

With that idea in mind, I will admit to eating meat twice in the last month. First, I bought some buffalo-burgers that came from a specially-advertised farm I could read about. Today, I went and ordered a pork burrito from Chipotle Yes, you read right: the scary burrito fast-food-chain that was once secretly owned by McDonalds. Despite my general revulsion to fast-food, their website actually tells you about their standards for raising pork, and when you walk into the restaurant, there are signs that say exactly which farm it came from!

Net result: I think I’ll be able to survive as a full-time pescatarian, provided I’m able to get a once-every-two-weeks “meat fix” from a source that I’ve ethically pre-screened. It’s going well so far. My drastic reduction in meat consumption also has me feeling lighter and healthier than I have in years. The planet is being slightly less ravaged by my decrease in consumption, and even when I do eat meat, I have no ethical qualms at all.

As a postscript and reward for reading this far: a fascinating book related to local food production is The Ominvore’s Dilemma. It really makes you aware of how we produce food, and why it matters what you eat.

Speaking of text adventures…

Posted by on Thursday, 6 September, 2007

Back in my prior post, I was advertising a new text adventure I wrote for a contest. Wow, what a learning experience that was. My original goal was to learn the Inform programming language in a week, which was accomplished. But despite five friends beta-testing the game over a day or two, the game ended up being way too frustrating for most other players and judges.

Moral of the story? Learning the language doesn’t make you a good game designer, not any more than learning to chop vegetables makes you a good cook. I made all the classic newbie mistakes that first time text-adventure writers make. I’m busy working to clean them up and make the game more playable. I’ll do a new release at some point!

Text adventures really have gotten a bad rap among most gamers, though. It’s not really about “oh noes, where are my graphics?” — rather, it’s that most people aren’t aware of what the parser can and cannot understand. People who write (or play) the games have got the whole vocabulary ingrained, but not the general public. My friend Chris has a nice portrayal of his experience with text adventures:

The terrifying monster runs toward you!

> SHOOT GUN

What do you want to shoot the gun at?

> MONSTER

What about the monster?

> SHOOT MONSTER WITH GUN

I'm sorry, I didn't understand you.
The monster is getting closer!

> SHOOT MONSTER

What did you want to shoot the monster with?

> GUN

What do you want to do with the gun?

> EAT FLAMING DEATH

With a quick swoop, the monster scoops you up in his jaws.
*You have died*
Too bad, you should have shot the monster with your gun!

You know what annoys me?

Posted by on Sunday, 1 July, 2007

…when paper bills arrive pre-tri-folded (to fit in the envelope), and the “detachable stub” has a perforation that is just barely below the fold. It makes it impossible to just tear off the stub without the whole thing tearing into a mess.

I’m just sayin’.

Mushroom?

Posted by on Sunday, 13 May, 2007

What is the weird… fungus… I found in my backyard? I did my best to take a photo of it. Any mycologists out there?

Apache Podcast

Posted by on Wednesday, 21 March, 2007

The Apache Software Foundation’s podcast — Feather Cast — just posted a new episode that features me and Fitz talking about Google’s current Summer of Code project.