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.
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
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.
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.
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.
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.
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.
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.
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.
Subscribe to:
Posts (Atom)





