Monday, July 03, 2006

against abstractions

Writing tip: beware of words that seem to be concrete but are, in fact, abstract. Examples: yellow and bird. There really isn't such a thing as a bird in the real world. "Bird" is a platonic category -- an abstraction. In the real world, there are hawks and sparrows and canaries. Even these are abstractions in a way, but they get closer to something we can actually see, smell and touch than "bird."

A confused writer might think he's being specific by referring to a "yellow bird," but yellow is another abstraction. You can see yellow, true, but what exactly IS it? What is a color? Can you grasp one

"Red car" doesn't tell me much -- it doesn't engage my senses. Same with sweet drink (though sweet is somewhat less abstract), loud noise, smooth table and a stinky smell. Those "mirror neurons" don't fire when I read "stinky smell." I get the idea, but nothing happens in my nose. "a gross-tasting sausage" doesn't disgust anyone, but how would you like some of George Orwell's sausages? The taste like "bombs of filth bursting inside your mouth."

You can get away with abstract modifiers when they're used in surprising ways, such as with a blue apple. I am forced to play an interesting mental game with my concept of apple when I read that. I actually have to paint it blue in my mind. As Robert Wilson says, "A Baroque candelabra on a piano is one thing; a Baroque candelabra on a rock is something else!"

Teachers tell beginning writers to avoid adjectives, not because they are intrinsically bad. It's just that there are so many weak and vague ones. But there are great ones, too: Think about greasy hair, dung-tinted walls and rasping voices. Notice in these instances, the modifiers are tied to specific sense-words or real-world objects and the words they are modifying are more generic. If the subject itself is specific, e.g. saxophone, it probably doesn't need a modifier.

a typical day in my life

I wake up at precisely the right moment. I used to wake up all groggy, but ever since buying a sleeptracker watch, I've woken alert and refreshed. (The watch ensures you never wake from a deep sleep.) I trot downstairs to start my routine: an hour on the exercise bike before work. I used to hate riding, but now I love it; I rent DVDs from Netflix to watch while I cycle -- usually engrossing TV-series, and some morning I can't wait to ride, because I'm so anxious to find out what happens next. Currently, I'm watching "Elizabeth R" with Glenda Jackson.

After the bike, I start the coffee maker and jump into the shower. I'm one of those idiots who sings in the shower: usually old standards. This morning it's Me and My Shadow. I tapdance in the shower and make little splashes. I also like to shave after letting my beard grow for a few days. I experiment with wild facial-hair designs -- excursions into grooming that I'd never let escape the bathroom: Mephistophelian goatees, Wild West sideburns, archaic muttonchops. Then, like shaking an etchasketch, I clean my face. No one but me the wiser to my antics.

I remember it's Friday, casual day at the office. Yes! I can wear jeans and my Converse high tops, a great ensemble for the Spring weather.

Dressed and back in the kitchen, I make the perfect cup of coffee. Nowadays, I only use the coffee maker to heat water. I then pour the water into my Aeropress. It's an amazing device. It looks like a giant injection syringe, without the needle. You put coffee grounds in the base, pour in the hot water, and then push down the plunger. This magical, smooth coffee squirts out the bottom. I like the small amount of effort this requires -- not enough to be an annoying task, but just the right amount to trigger a feeling of accomplishment, which makes the coffee taste all the better for being earned.

I sit in front of the computer screen and sip my coffee. Poor Lisa, being a girl, still has half an hour of prep before she'll be ready to go. But since I don't have to curl my hair or apply makeup, I'm set. I can relax and visit some of my favorite sites. I also keep half an eye on the TV, watching the Today Show, absorbing just the right amount of the news.

Once Lisa is ready, we head for the Subway. We're both dog lovers, so this journey of a few blocks is safari for us. We ooh, ahh and aww at all the puppies out for walks. Like kids, we giggle when we see one pooing.

Usually, there are funny characters on the train and we whisper about them: the Hasidic Jew with a girlie magazine peeking out from behind his prayer book; Or the smartly-dressed business woman with toilet paper stuck to her shoe.

I have to leave Lisa in lower Manhattan. She prepares for my exit by pulling the crossword from her handbag. She can sometimes complete them in ten minutes. It's been really cool watching her improve. When she started doing them, about five years ago, a single puzzle might take her a few days. Now she can finish while I eat a sandwich.

She has her activity; I have mine. While I walk the few blocks from the Subway to work, I listen to my iPod. Sometimes I listen to music -- Bach, The Beatles, Sinatra -- but nowadays it's mostly books on "tape." I'm currently listening to a fascinating history of the English Language. Did you know that Noah Webster is partly responsible for making American English sound different from British English? He wrote primers that taught kids to spell by sounding out each syl-a-ble. These books were incredibly popular, and they prompted a generation of American kids to reject the clipped vowels of their contemporaries across the pond. We say sec-re-tar-y, while they say secret'ry. I'm so into the book that I slow my pace so that I can listen a bit longer. There's still ten minutes before I have be at the office.

Today at work, I'm teaching a programming class. I love to teach programming. Most of my students are designers, and they're afraid of code. But I've taught this class for long enough -- and worked out enough techniques -- that I know I'll win them over in the end. It's exciting to watch their eyes light up as they master concepts that formerly intimidated them. I really feel like I'm changing their lives. It's a high!

Lunch time is Big Salad time. I go to this deli that makes custom salads with yummy, fresh ingredients. I start with a base of (healthy) dark greens and request grilled chicken, cucumber, peas, corn, red onions, carrots and kidney beans. I'm proud that I don't ask for dressing, and that I've learned not to miss it. But I do ask for a topping of parmesan cheese. Occasionally, if I'm feeling naughty, I get a rice-crispy treat for dessert.

Once work is done, I walk downtown a few blocks to rehearsal. My theatre company is working on "Much Ado About Nothing," and tonight we're staging some scenes in Act III. I love flipping my brain from programming to theatre. Somehow, the two very different disciplines feed each other. The precision of code tightens my directing skills. The improvisation of rehearsal pushes me to experiment more as a programmer and as a teacher.

After rehearsal, I have to ride the train home by myself. Which means I get to read! Since my iPod is being scholarly at the moment, I'm veering the other way with print: a P.D. James mystery. I get so into it, I almost miss my stop.

On the way home, I stop at The Islands, my favorite restaurant, to pick up dinner: jerk chicken, rice-and-peas, and curried vegetables for Lisa. We'll eat in front of the TV, tonight, watching "Deadwood" on the TiVo.

After the show, we're both sleepy, so we head upstairs to bed. But not before I end the day the way I started it: coffee -- decaff this time, thank you very much Aeropress! In bed, I strap on my sleeptracker and snuggle with Lisa. She falls asleep first. I plug in my headphones and listen to twenty minutes more of my audio book. Then I feel my starting to doze. So turn off the iPod and roll over.

My last thought: tomorrow is Saturday!

programming life

1) Good programmers have the ability to step in and step back. They can spend a couple of hours focusing on minutiae and then pull back and look at the whole project and its goals -- and then step back in. It's like being a good host at a party, focusing on one person and making sure he's happy, and then stepping back and taking in the whole room, making sure there's enough beer and cheetos left for everybody. Then back to the one person.

Programming has helped me adjust my focus in other areas of life. In an argument, I am better able to gain some distance and cool off. But I can also zoom way in and point out a specific flaw in my opponent's reasoning. When I direct plays, I can see that if the current scene doesn't speed up, the entire evening will run too long. But I can also finesse the placement of a chair so that an actor can ease into after he crosses the stage. When I draw, I can see how the line I'm finishing affects the entire composition.

2) A refusal to cut corners. On a mundane level, this means naming a variable totalNumberOfSharksInTheTank instead of S. But programming is full of these sorts of decisions on large and small scales. Decisions that involve choosing between something that works and is easy to type and something that works and is more difficult to type -- but that will be easier to understand later.

Pretty much everything that makes your program easier to understand and debug is a pain to set up in the short-term. Long, descriptive variable names, comments, etc. It's so tempting to be penny wise and pound foolish. But the good programmers I know EMBRACE this extra work. They get pleasure out of going the long way around to make things clear. They love the beauty of transparent code.

I struggle to apply this tip to my non-programming life. I'm gradually improving. I try to go the extra mile, do all the dishes, clean the tub thoroughly -- not just good enough so that the grime doesn't show. When I'm directing a Shakespeare play, I look up ALL the words I don't know, and even the words I sort of know. If I only understand a word from its context, I don't really know it. So I look it up. When I teach or give someone directions, I explain everything clearly and in detail. Sometimes I'm tedious. Maybe I go overboard. But I'd rather bore people than confuse them.

3) Good programmers, like good writers, make multiple drafts. They go back over their code many times, optimizing and clarifying. Some people don't like making multiple drafts. If you're going to be a good programmer, you can't be the type of person who likes to go over something once and then be done with it.

Here, I'm a natural. Though it's undiagnosed, I may have some sort of OCD. I tend to go-over everything several times. When I go to bed, I set my alarm clock, check it to make sure I set it accurately, and then -- after I've put my head down -- sit up and check it again. I'm always stunned by the errors people make via carelessness. Friends think I'm careful. I'm not, but I check my work. When I do, I find tons of foolish errors. I EXPECT the errors. I think some people assume they're better first-drafters than they actually are.

4) Good programmers work to allow themselves to selectively forget information. The goal is to make parts of your program become "black boxes." You try to perfect functions, classes and the like so that you don't need to remember how they work any more. They are self-contained tools that you can just use. Programming needn't involve holding a zillion things in your head at once if you work this way.

The flip side of this is my item 2, a refusal to cut corners. Once you have forgotten the guts of function, there will come that inevitable day when you'll need to revisit it. On that day, you'll be ecstatic about the breadcrumbs you left yourself -- the comments, identifier names, and organization -- when you originally built the function.

This is the opposite of multi-tasking. Multi-tasking is a curse. I try to avoid it in all aspects of life ("try" being the operative word). When you multi-task, you have to keep several balls in the air at the same time, and chances are your split focus won't let any of them fly as high as they could if you threw them up one at a time. People mistakenly think that they get more work done when they multi-task. It's a lie. The trick is to finish task A -- really finish it, so that it's wrapped up and put away -- before going on to task B. You will save time by not having to return to task A again.

5) Good programmers learn from other good programmers. People have spend DECADES theorizing and experimenting, and they've learned a lot. There are all sorts of programming structures and practices that have been well worked out: design patterns, data structures, etc. These aren't things you're likely to come up with on you're own. You have to read, study and practice.

I'm saddened by the number of people who don't know how to use reference materials. This is a vital life skill. I rarely know what to do, but I know how to find out what to do. As with item 4 (above), that allows me to free up large parts of my brain. I don't have to remember how to bake sourdough bread. I have a recipe book that I can refer to.

The greatest thinkers and craftsmen know how to rely on others. Shakespeare stole plots; Stephen Sondheim uses a rhyming dictionary.

6) Good programmers (like good people in any field) work to improve themselves. I keep a personal "Syntax Error List." I tend to make the same mistakes over and over. For instance, I tend to write single equals in a conditional statement instead of double equals (accidentally making it an assignment instead of a test of equality). When my program doesn't work, instead of staring at it blankly, I go down my list and check for my common errors.

I've started using the same trick to improve my spelling. I'm an atrocious speller, and though I get by using spellcheckers, I also rely on them, so my spelling doesn't improve. It's embarrassing when I have to fill out a form and can't use MS Word. One day, I realized that spellcheckers could actually help me improve my spelling -- if I thought of them as data-collectors. I started writing down a list of words I continually misspell (I wouldn't know about these words if the spellcheckers didn't catch them) and I've begun memorizing their correct spellings.

7) Good programmers learn to debug. Debugging shouldn't be an afterthought that you do in a haphazard way. It's a specific and necessary skill that must be learned and applied. (Again, don't re-invent the wheel. Learn from people who have gone before!) You need to learn to think the way a good electrician thinks: the light doesn't come on. Is it the bulb, the socket, the switch, the wiring...? You need to test each component part to see where exactly the problem lies. Once again, it's about stepping in and stepping back.

Problem solving is a distinct mode. I must remember to click into it. I don't keep my problem-solving skills "online" all the time, because often they're not needed. When a problem arises, it's easy to forget about them and not use them. If face a problem without my problem-solving skills, I can only panic or throw up my hands. I need to step back (see item 1, above) and switch toolbelts.

Nowadays, if problem solving requires information, the web is key -- but you have to use it aggressively. Google is great, but do you know how to use ALL of it's search engines? Google Images? Google Maps? Google Groups? Google Video? Did you know that you can use Google as a calculator and a measurement converter (try entering "22 miles in furlongs")? What do you do when Google fails? Don't give up on the web yet! Use it to connect you with a person. Find the site of an expert and email him. Most people are surprisingly willing and happy to help. As a final straw, place an ad on Craigslist. Offer fifty bucks to anyone who can solve your problem.

8) Good programmers run tests. Test everything on the computer, not in your head. Unless you've coded the exact same thing 1000 times, don't assume something will work or won't work. Try it and see.

I drive actors crazy by trying everything out in rehearsal. They come to me and say, "Do you think my character is happy or sad in this scene?" I answer, "Let's try in once with you happy, and then go back and do it again with you sad." I refuse to make a decision in my head when it's possible to do it outside of my head. The world in my head is just a map of reality, and it's imperfect. If I assume anything, I might miss something. So I assume as little as possible. Over and over, this method has helped me strike gold and avoid potholes. I'm addicted to it.

Saturday, July 01, 2006

a typical day in my life

I leave my apartment and take the elevator down to the lobby. The person in the elevator with me is making a smacking sound. Please, buddy. I don't want to start the day hearing or seeing your gum. When did people morph into cows? Now I'm on the street, walking to the subway. HONK! HONK! HONK! I nearly jump out of my skin. Is the fact that you're waiting for your friend an EMERGENCY, because that's what a car horn is for: E-mer-gen-cies. If you want your friend to know you're there, don't be a lazy fuck. Get out of your car and buzz him.

As I'm waiting for the train, I'm treated to the sight of at least three guys -- never women -- spitting onto the rails. I think I'm going to get into the spittoon business. I'll make millions. No I won't. If I put down a hundred spittoons, these geniuses will just spit on the floor next to them.

As I try to get on a train, the person ahead of me pauses in the door. Okay, these doors stay open for a FINITE amount of time. And no one is going to jump you. You don't need to check out the environment before venturing in. GET IN. There are people BEHIND you. Finally, the joker gets in, finds a space and stands there. He's found the space HE wants, so he's happy. He COULD move further in, making room for the rest of us, but that would take extra effort. So everyone entering after him has to squeeze past him. This is hard, because he's positioned himself in the middle of the aisle. I say, "Excuse me please," trying to get by. He doesn't acknowledge me. I clear my throat and try again: "EXCUSE ME, PLEASE." Very grudgingly, he moves about an eighth of an inch. Listen Mac, it's not about making some sort of gesture. It's about MOVING aside so that I can actually get by!

I finally squeeze by, having to get much more intimate with his body than I'd like (is brushing-your-teeth and using deodorant a lost art?), because he's determined to move the bare minimum. What is this? Some sort of macho thing? If you move too much, you're less of a man than I am? Fine, you're the big man. You have a bigger dick than I do. Happy? Now get OUT OF THE WAY!

The train is really full, mostly due to all the guys who sit with their legs spread so wide it's like they're trying to do the splits. Thanks for the crotch-view! That's exactly what I wanted to see. Wish I had some hot coffee to spill. Since there's no place to sit (there would be if the lady in front of me would move her bag onto her lap -- I'd ask her, but I don't feel like hearing that big tired sigh), I stand and try to grab a pole so that I don't fall. But some guy is leaning against it. So I guess the pole is your personal staff, Merlin? I try to reach really high and grab the pole above his head. The train lurches before I can do so, and I stumble.

Which causes me to step on a woman's foot. "I'm so sorry," I say. "Are you okay?" She just glares at me. Okay, I WAS sorry. Now I wish I had stepped on BOTH your feet -- and your head.

I finally manage to grab the pole. As the train is pulling into the next station, a guy gets up and starts getting antsy that I'm in his way and he can't get to the door as fast as he'd like. "I'm getting off at the next stop," he says. I say, "Sorry. I don't want to fall. As soon as we stop, I'll let go so and move so you can get by." "Whatever," he says, and give me a look like, "So the wittle baby is afwaid he might fall if he wets go two seconds before the big bad twain comes to a compwete stop?" Yes, Mergatroid, that's EXACTLY what the wittle baby is afraid of, so hold your fucking horses.

The good news is that once the guy leaves, I get his seat. I assume my normal beta-dog pose, trying to make myself as small as possible so as not to disturb my seat-mates. This includes getting out a book and reading it quietly. The woman next to me is also reading, but her elbows are splayed out like chicken wings. Every time she turns a page, they poke into my ribs. I wonder how big a scissors I'd need to cut through bone. The woman on my other side is doing her version of not-bothering-anybody, which for some reason involves humming quietly to herself. But I can STILL HEAR YOU. Quiet noise is still noise. No free pass for quiet humming. Here are the things you CAN do: think, read, play a video game WITH THE SOUND OFF. Not humming.

I have to admit, though, she's not as bad as the guy two seats down who has stuck his iPod headphones in my ears. Okay, they're actually in HIS hears, but they might as well be in my ears. Turn it up, space cadet. They can't hear it in Sydney. Then there's the heavy-metal dude across from me who insists on drumming on his backpack. When I'm dictator of the world, there will be NO public percussion. And it won't be three-strikes-and-you're-out. It will be one strike and you're flung into a prison camp.

As if it's not loud enough in here, a kid comes on and starts screaming an announcement, trying to sell us candy. Then an evangelist starts telling us we're all going to hell. Is there anything ruder than playing to a captive audience? I think there's a special place in hell for this evangelist, where he'll be strapped to a chair and forced to listen to the candy kid shouting in his ear for all eternity. And he'll never get to actually eat any candy.

I finally get off the fun train, and as I'm exiting the station, a fast-moving guy bumps into me -- hard. And then just keeps going. Oh, great. A hit-and-run walker. Hey, bozo, it doesn't matter if you're late for work. It doesn't matter that we're all city people and we're all in a hurry. You need a do-over in which you stop, apologize, and make sure I'm okay.

I have to use an escalator to leave the station. All I want -- with all my body and soul -- is to be out of there. My plan is to walk up the escalator, but I can't, because 10% of the people don't know -- or choose not to follow -- the simple rule of standing on the right. But you guys are special, right? Rules weren't meant for advanced humans like you.

As I finally get out into the air, a guy pushes a flyer right into my face. TAKE TWO STEPS BACK AND GET THAT PAPER OUT OF MY FACE! I wouldn't go to your pizza joint if you paid me. Though I might have considered it if you'd chosen to use a less invasive form of advertising. Then, on my way to work, I have to step into the street (and get honked at) to maneuver around the gaggle of young women who have decided to make a busy sidewalk their meeting place. Where can I buy a giant bowling ball?

Someone taps me on the shoulder and says, "How do you get to 33rd Street?" I'm sorry. Could you try that again? This time, do the version where you acknowledge that you're intruding on my time by saying, 'Excuse me, could you give me some directions?' Because I'm a pussy, I say "It's that way."

I stop in a deli to buy my coffee. There's a big line in front of me. Soon, there's a big line behind me, too. Every so often, someone bypasses the line, crosses right to the front, grabs some candy or a newspaper and thrusts a couple of bucks at the cashier. Good job, Muchacho. It's nice to know normal rules don't apply to you. Then some lady spends ten minutes digging through her bag to find her purse, so that she can give the cashier change. You couldn't have gotten your purse out while you were waiting in line, Einstein? The big-headed , portly executive behind me is booming into his cellphone, "TELL JACKSON TO DROP THE VERIZON ACCOUNT AND FOCUS ON CITICORP. THEN CALL BILL AND ASK HIM TO SEE ME AT 11." I wonder how far I could throw a cell phone?

Finally, I get to work. I'm in a SPLENDID mood. I can't wait until the work day is over and I can start the commute all over again.