Wednesday, March 31, 2010

Dear Amy Adams (the actress),

Why are you preggers and have a fiance? I would say life is cruel sometimes, but then you'd say "Ya snooze, ya lose!" In the meantime, thanks for being in great movies and making them awesome.

Love,
Will
(for the non-Amy readers out there: http://www.imdb.com/name/nm0010736/bio)

Tuesday, March 30, 2010

Don't Eat the Poisoned Meat

Good idea: cooking spaghetti for dinner
Bad idea: using meat from the freezer - I couldn't remember when it was purchased

Result: 2 Am rolls around and I know I'm going to be sick, just not right now. 3AM still impending sickosity, grabbed a bucket to be ready. 4AM "Hey, I might make it through this without getting sick". 4:15AM made good use of bucket next to my bed.

The lesson learned is to stay away from old meat, it will make you regurgitate your meal. Interpret that however you want.

Monday, March 29, 2010

Factory Patterns

In my book I covered two kinds of factory patterns, the Abstract Factory Pattern, and the Factory Method Pattern. Both are used to decouple concrete class creation from the objects that depend on them. Let's say I have a company and the company has a Department class. And in this company, each department has one of three job types: full-time, part-time, and contractor. I could have a method in the Department class like create_job(job_type)that takes a type and goes through a switch statement and coughs out a concrete job class.

Or, I could do something that will let me easily extend my Department with new job types in the future and apply the Factory Method Pattern. In this case, I make Department an abstract class, and create concrete classes called FullTimeDepartment, PartTimeDepartment, and ContractorDepartment. Each one will implement create_job() in their own way to return the appropriate job for that department. This rocks because now I can do something like:
my_department = FullTimeDepartment.new
job = my_department.create_job() #this returns a full time job!

Later, I can add a new department, the FullTimeButOnlyShowUpToWorkOnDaysThatDontEndInYDepartment without changing any existing code. I would then call .fire(:all) on that particular department, but we're making jobs here. So that's the Factory Method Pattern.

The other pattern is great for when you need to create families of stuff. Let's say you need a system for ordering office supplies for your department, things like staplers, paper clips, ink, and post-it notes. In most departments, a stapler can be just a standard black stapler. But those tricksters in the IT department love them some red Swingline staplers for some crazy reason. Here's a great time to use the Abstract Factory Pattern. In this case, each Department will have a OfficeSupplyFactory. Now both the Department and the OfficeSupplyFactory are abstract, and each concrete implementation of Department will specify which concrete OfficeSupplyFactory it will use. For instance, our BoringBusinessDepertment might use the PlainOfficeSupplyFactory, but the HipCoolWebDepartment will certainly be using the StuffWeSawInTheMoviesSupplyFactory.

Clear as mud right? Don't worry, basically the idea is that when you go to instantiate a concrete class in one of your objects, consider using a Factory Pattern of some sort.

Do It

I dare you.

Sunday, March 28, 2010

Personal Calling Card

Just placed an order for some personal calling cards. I hate handing out my business cards to friends even though it has my personal cell phone number on it. So I crafted a new card and ordered it through VistaPrint. It's got some art, my first an last name, cell, and email. It also has a big QR Code (2-D bar code) that you can use your phone or web cam to scan and you get all my contact info in your device without typing a damn thing. Sadly I bet only super geeks have an app to read a QR code, so I don't know how much utility it'll get. Alas, I'll love handing them out and talking about it.

Saturday, March 27, 2010

Friday, March 26, 2010

New Plan: Make an Omelete

Time to start being ok with breaking some eggs.


UPDATE: The full story starts like this: I was watching the Eddie Izzard documentary Believe and someone in there said "It's like he's trying to say 'Love me' in the kindest, gentlest way possible." and that struck a chord with me. But really, I don't need  everyone to like me, just a handful or two. Thinking about it, I decided that I've lived the last ten years in a way where I was trying to please everyone, and I realized that I can't remember the last time I expressed a contrary opinion (save one incident in Egypt).


When I thought about this more, I couldn't really tell myself what I thought about anything. Do I like the way the public transit system is being run? Do I think the tax system needs reform? Do I prefer the color green to the color orange? I've been indifferent for so long I think that I lost a lot of my identity and substituted fencing in the process.


By "breaking some eggs" I meant that it is time to decide who I am, and that process may mean that some people I meet in the future might not like me. But I'm making an omelet here, one that has a kick-ass Will Read inside. I don't expect that any of my close friends will notice any radical change, but I do expect that the new people I meet will come to know who I am more quickly because I'll have more of a distinct personality, as opposed to a personality designed to appease.

Thursday, March 25, 2010

Delicious Beer

... in a glass boot!

Wednesday, March 24, 2010

Tonight's Design Pattern - The Matryoshka Doll

The commonly accepted name for the pattern I just read about is the Decorator Pattern. The idea is that you decorate your objects with responsibilities and you do this by "wrapping" them in classes with the same interface. So if you're decorating a couch object with wooden feet, custom fabric, and a fold out bed then you end up creating this Russian Matryoshka Doll system of a thing inside a thing inside a thing inside a thing.

To me, it's kind of a shitty pattern. To use it as described, you have some interface that the couch implements, but then so do the wooden feet, the bed, and the fabric. Those other things, in the examples I've seen and can thing of, don't  really share some common set of behavior, but the pattern necessitates that they do, so it's an artificial interface. Like putting 60 people in a room and telling them they all enjoy golf.

It's also a bit of crap because of this crazy wrapping. If you get a base object that has ten responsibilities tacked on, then you've got to drill down ten layers to see what the hell is going on in this code of yours. However! What you get out of it is the ability to add these responsibilities at run time as opposed to design/compile time, which is pretty cool. Also, you cut down on class-explosions. The big OO win here is that the classes are closed to change, but remain open for extension. So Boris can come along and add functionality to my class without changing a lick of my code.

When I Was the President

It was an elected position, president of the Purdue Fencing Club, but when I ran, I ran unopposed. There was no one else who even wanted to do my job, let alone have the skill set to pull it off, which meant I was it. I had to be the president, there was no other choice.

In everything I've done since fencing, I've never had to be that thing. Someone else has been willing and able to step in and fill my shoes if I were to vacate the post. I've never had to convince myself in the last two years that I am a kitesurfer or that I am a glass maker or that I am a software engineer. I played the part, but I haven't believed.

Tuesday, March 23, 2010

Software Design Patterns

I'm reading, which is not something I do normally. But I'm reading Head First Design Patterns. Design patterns are templates for solving common problems in software. It's as if I came to you and said, "I have this amazing gadget I want manufactured!" And you might say, "Well Will, you should build a factory!" The pattern is "build a factory". That's a common way to get stuff manufactured. But you can't really make a factory that builds any factory I want, no, you have to apply the pattern yourself, it isn't pre-made.

The first pattern was the Strategy Pattern. This pattern lets you swap out and encapsulate algorithms easily. I might use this pattern if I'm making software for a GPS unit. When the unit ships, the company wants two algorithms availble to determine the route. 1) Shortest distance, 2) Fastest time. If I apply this pattern correctly, it'll be a piece of cake when they come back and ask me to implement a third "scenic route" algorithm. If I suck at applying this pattern, the logic for 1 & 2 will be all strewn about the code, it'll be a pain to sort it out, and adding a third will only make a bigger mess of things.

The next pattern is the Observer Pattern, which I really think of in my head as the Stalker Pattern. The Observer Pattern lets things know when another object changes state. For instance, let's say I have a stalker. The stalker is interested in knowing when I do stuff, so she starts to observe me (via binoculars). When I change state from dressed to clothed, she gets notified (and very excited). Later, she finds out that Justin Beiber lives a few doors down, and she stops observing me, so she no longer knows when I'm wet and naked and when I'm not. Stalker patterns happen in JavaScript ALL THE TIME. I use this pattern with great ease. Think about when a user clicks and drags some movie in his Netflix queue. Here' there's all kinds of code that observe the movie for a state change to "I'm being clicked and dragged!" and they do stuff like show  where you can drag it to, or maybe they update how the movie looks (transparent). The code stalks other code, and when the other code is out of the server, it sneaks in and sniffs its underwear drawer. Stalker code is creepy like that.

The reading is for work. I need to get better at what I do so I can better do what I do. I'm writing about it so that I know I've retained something and that I've processed it. If I can't apply it to code and the real world then I've done a crap job of learning and might as well not waste the time. I think most of the names suck, and the two sentence explanations are too abstract, but the book does a good job so far of working through what it means to use a patterns and where it does or does not apply. If I can be successful in this effort and subsequent ones that are along the same lines it'll be a big deal for me as a software guy, so thanks for listening.

I Hate Point of View

Tonight at improv was a review of "universe", but like all games, they all cross over the material they cover. We're working on one called "doorways", and the idea is that you pantamime going through some kind of door/portal/whatever without saying a word, then your partner comes on stage and verbally indicates where you are or what you're doing based on what he saw you do to get through this door.

Some people went through sliding doors, others faced a garage door, and some swept beads to the side to attend a yoga class. The real struggle with doors is that they're made to be easy to get through without a lot of interaction. I wanted a hard door and I wanted to leave a place instead of go inside.

I begin by pulling a thing from behind something. I'm making a sawing action at something over my head. I pause, look around, and continue. I saw and I saw, and finally I cut through, and toss the remaining bit aside. I jump up. I bend at my side. I get through. I realize I forgot something. I go back. I push it through. I return to the other side. I open up the bundle, and step in to some pant legs. Then I pull on the rest of the outfit. I put on a hat. All the while looking frantic. Then I realize, I'm in the clear, I'm home free.

Where was I?

Well if you were my partner who walked in you might have said this: "Long day at the slaughterhouse, wasn't it?" And you'd be right, because you said it. I had been sawing down cattle and ducking and jumping between giant carcasses and then finally put on clean clothes to go home for the day.  Meanwhile, I thought I had pulled a file from behind a pillow, and gotten through the bars on the window of my prison cell. Forgotten my civilian clothes, put on those clothes and then casually walked to freedom a la Sawshank Redemption. But no, I was in a slaughterhouse, and I looked back and I knew he was right. and the audience, while they were with me on the prison break, needed to see me deal with the slaughterhouse now.

Walking up to the stage, I thought I had an awesome door, easy to guess, fun to play with on the outside. I was reminded tonight that it didn't matter how much it was like a real prison break to me, I don't count. I know what "door" I'm going through. I have to figure out what my partner and the audience see.

Just like real life.

Mailbox Monster

Monday, March 22, 2010

Lonely Toothbrush Holder

In the Great Drout of 2007 I threw away my only other toothbrush
holder. They came in a set of four - a rat, a chicken, a cat, and the
dog you see here. Two went to friends who thought they were funny, and
I kept the cat and dog thinking one day I'd have someone who liked
cats and was over enough to leave a toothbrush. For years my mirror
had two holders, and only one tooth brush. It was a daily reminder
that I was missing a toothbrush myself in the metphorical sense.

"Brain Fart"

I wonder if I'll say things like "brain fart" when I'm 40. I would say many of my peers already have eliminated "childish" vocabulary from their diction, but as we know, I am a different beast. Inside me is a little adult, desperately trying to assert his responsibility in the grown-up world, but still entirely too youthful to put away fun activities and phrases.

Saturday, March 20, 2010

I am an Idiot

Amongst other reasons tied to my Sacramento SNAFU that have yet to play out, I am a dumb ass. I brought my laptop on the train. No, it didn't get stolen. I did intend to use it, to write a blog and just bask in having phone-tethered-internet-everywhere glory.

The train pulls in to the station at 11:20, just a few minutes behind schedule, and I climb on board. People say "climb", but really it is just a step. No one says, "I stepped on board the train." Why is that? Anyway, I start looking for a seat and it is worse than the movies. All the chunks of seats are either two people or four, and everyone needs their bag to have a seat as well. I'm walking down the isle and I spot a four seater with the nice table for my laptop, so I give it a good look.

While no one is present, clearly someone is sitting here. I judge from the flowery tweed glasses case it's probably an elderly woman. There's also some notes an a pencil, but not much else to indicate anyone else is sitting there. So I unpack my laptop, plug in, and settle in.

About this time I look up and notice that there's not one, but two tickets above this nook, she must have a companion with her. I pause, I contemplate if I should move, and I conclude that two people do not require four seats, surely there'd be room for me and my laptop.

When the ladies return they're quick to inform me that I'm sorely mistaken. "You see we're playing a card game, and well we need the entire table." I'm sure that I looked at her, looked at the enormous table, and looked back at her with an incredulous stare. She wasn't giving me an opening. I debated the merits of making a scene. One of two things were likely to happen, either a) I pis her and her friend off, but they let me sit down anyway, and I have to sit with people who hate me to save face, or b) I simply embarrass two old ladies who just want to play cards on a train.

I opted for plan c) "I understand, I can move if you'll just unplug that cord for me... thank you." And I went and sat down next to the hottest girl in the car. She starts up a conversation after I get the ok to sit by asking if those old ladies kicked me out. I sheepishly replied yes, made a few more exchanges, then proceeded to put on my headphones and watch a movie. THIS is why I'm an idiot.

Thursday, March 18, 2010

Irish Confidence

Every March 17th I get to be anybody. It's better than Halloween because I always have the best costume. In past years it has been a blinking bow tie and green suspenders. This year it was a nice green vest and a bright orange hat. The clothes serve two purposes.
  1. Attract attention. Even if it's dudes, you look like you're having more fun when there's a crowd around you and you're cheersing the hell out of the night. 
  2. Create a "weakness" that I then overcompensate for.
 If you're wearing a bright orange hat, you are not the best looking guy in the bar, period. But, the hat can get you a 'hey, nice hat' and I've found that when I know I look ridiculous, I can carry that conversation on as long as I want to. It's weird, I could dress normally, but I'd be way less confident. Almost like the hat was just enough distraction that I felt safe.

So this happens every St. Patrick's Day - I become the guy I really ought to be 100% of the time. I'm funny, I stand up straight, I look at myself in the mirror and smile, I speak my mind, I listen and play off what she says. I am irresistible, or more so than on any other Wednesday. I stop being the wall flower, and I stop questioning my actions or what she's thinking. I move on easily if I get the sense that I'm not holding her attention and I find someone new. Things that I make to be a huge deal in my head most days are insignificant. Magically, I stop second guessing myself.

What I want to figure out is how to make every St. Patrick's Day. I could be a non-assassinated  version of JFK with that kind charisma. I know it is in me, I just have to stop being afraid.

And like past St. Patty's Days, this one worked out really well for me. I met a really cute girl who ended up buying me a really special beer originally made by some Belgian monks and we had a lot of fun. I also managed to wake up feeling tired, but ok, and work was pretty breezy. The weather in SF has been amazing as of this week to boot.

Tuesday, March 16, 2010

While a "Luck Dragon" Seems Handy

It didn't help out "The Neverending Story" very much. Zing!

Monday, March 15, 2010

Comedy Will Make an Adult of Me Yet

I went to the SFCC's Frisco Sunday Night Jam. They do the short form games, and long form, then open it up to the audience to get on stage and try it out for themselves. In thinking about last week's performance along with some jokes tonight about local places/events I realized that there are plenty of easy laughs if I just read the news.

I have my blogs and tech sources that keep me up to date about stuff I'm interested in. But the audience doesn't care that there's new hardware coming down the pipeline in five years. They care about what's playing in theaters right now, what changes the city is making, and what's going on with the national budget. To be highly effective at what I want to do, I'll have to grow in areas that I've been trying to avoid. I'll start by subscribing to the NY Times, and eventually I'll probably have to round it off with a lot of geography and immersion into other cultures.

Next improv class starts Tuesday!

The Genius of Stan Lee

Women as a whole loathe spiders. I don't really know why. To me, bees are much more frightening (a la "I'm covered in beees!!!!). Put a spider in a room and girls will want to be any where else. Similarly, geeky guys who wear glasses, enjoy genetics and chemistry and physics, have much the same effect on those of the female persuasion.

Spiderman however, has great success. Take a nerd, give him the power to climb walls and sling web, and suddenly they're putty in his hands. We can prove this scientifically, because when Peter Parker takes off the mask and starts acting like a powerless human being, he gets the same reaction that all men of science get (sorry Jeff Goldblum, this applies to you too). Yet, we see that as soon as he reveals his spider-like abilities to a prospect, the panties fly off.

Would you like to make out with me?
Eww! No! Get away dork-face (they still say this well in to their late twenties)

Would you like to make out with me while I hang upside down despite the downpour of rain?
Oh hell yes! Give me some of that sweet spider-lovin'!

I rest my case.

Sunday, March 14, 2010

Alice in Wonderland

Despite the played out relationship that Tim Burton and Johnny Depp have, I went to see Alice in Wonderland tonight. After which, I have but two comments: 1) the March Hare and the monkeys are hilarious, and 2) the subtitle for this movie should have been "We'll Poke Your Eye Out". Go see it! (Pun intended)

Thursday, March 11, 2010

Smoking doesn't make you cool

But it can be a thing to do in the park.

Tuesday, March 9, 2010

Camels, Condors, and Comedy!

Monday was the graduation show for my improv comedy class. Thanks to everyone who wished me well and/or broken legs. A big thanks to the people who made it out to the show. It was a lot easier being on stage knowing that there was support in the crowd. I did, in fact, graduate and I signed up for the second level class, which begins next Tuesday. So if you missed this show, you can catch the next one five weeks from today. Extra big shout out to Lara for recording most of the show - she had to fight off laughter and arms falling asleep and had a battle royal getting the disc door to open. I'll be getting clips on the lazyriver (internet) as soon as I figure out a way to read these tiny discs (damn you slot load!!!!!)

The class was great, and I would highly recommend the SFCC to anyone who wants to get into comedy. The instructors do a great job of keeping morale high and giving you just the right kind of feedback that helps you grow and learn. The people in my class totally rocked it and I'm looking forward to playing with them in Tuesday Company.

Will this be a new career path? Doubtful. Will I have fun doing it? Oh hell yes. Does it remind me to get excited about life? Certainly. Will it bleed in to all that I do? I hope so.

Saturday, March 6, 2010

Monday, March 1, 2010

Day of the Lizard Skin

Tomorrow I'm sure my face will start peeling. For future reference, spray on SPF 30 does not cut the mustard on the slopes of Utah. I did take a half day snow board lesson and I can carve some gnarly s-curves down green circles now, but my butt and my knees hurt (not in that way) from all the falling. Day three I grabbed skis again and went down some hills with my good friends Matt, Lauren, and Scott. It was also a blast hanging out with Scott's extended family playing "Pass the Poop" for a two dollar buy in. My miniature playing cards saved the night on Friday when we realized we had no other cards to play with. Also for future reference, Utah, being a Mormon state, has "near beer", meaning your usual 4.5% by volume is now more like 3% by volume. Sure, you can buy/drink more, but then you're just missing the point completely.