Tuesday, July 10, 2007

The Deal with Design Patterns


I got acquainted with software design patterns when I was in my first senior year in college (first of my two senior years, I had two because I was delayed by a year). It was introduced to me by my brother Nikki and his pal Celsus because I kept on bugging them on how to design good software. It was the term when I had to do my Special Problem (an equivalent to the thesis). Back then, I was too naive to think that having a breadth of knowledge on the patterns was sufficient to get me going on my framework project. Hell, I even memorized the patterns in the GoF book. However, that idea has driven me to a dead-end rather than a quick start because I was never aware that I neglected the base principles from which the patterns were derived.

I was more of complicating the problem than solving it.

My mistake was to NOT analyze the problem based on the principles of object oriented design. I just thought of: use-this-pattern-for-this-problem-because-the-book-says-so. Six different patterns for two dwarf-sized modules to show-off was a bad idea. I had to redo everything in the end, keeping it simple as I go and using only the necessary patterns. Using patterns in the wrong context is indeed a fallacy. It took me a while of bashing to realize that. Yeah, a common mistake among novices. I guess most of us experience that once in our software design life, huh?

That's one reason why I'd never go trolling on mailing list saying, "Hey bud, you got that wrong. Don't use that without even knowing how and why it works." Another reason is I'm too lazy to discuss it, so I'd go "Better RFTM the way I did it" at them. Haha! Though it's another story when seasoned developers play the stubborn i-know-better-than-you arrogance on misused designs.

Just recently, I had a talk with this schoolmate of mine who keeps on pushing JUST the principles. He didn't like how complex the design buzzwords were so he said that the principles alone could get him up to level among the seasoned software architects.

Good enough, but not good for long.

My take on this is he'll reach the patterns while refactoring, eventually. But knowing and applying the patterns will speed the development much faster and avoid drastic refactoring. Besides, that's what the patterns are there for--it serves as a reference to problems identified and solved before. It also provides a common vocabulary among designers. So when we discuss designs, we are sure to be on the same line of thought. It will give us some advanced level of abstraction that will ease the way we understand systems. Never before has software designing been this unburdening. I hope he gets what I mean. It's just time we take advantage of knowing more.

What's your thought on this?

By the way, nothing offensive meant in the entirety of this entry.
Flame suit on, nevertheless.

Saturday, July 7, 2007


In my routine of checking mail and feeds this morning, I chanced upon a video of Utada Hikaru's ぼくわくま (Boku wa Kuma, or I'm a Bear in English). I can't take it off my head so I felt like blogging about it.

Online Videos by Veoh.com

The video begins with Kuma falling off the bed, and that woke him up.
Shhh, I fall off the bed often too.

He does his activies indoor, so I suppose he's a homebody or he's not allowed to get out.
Like I was in high school.

Kuma starts his day reading a book, but finds it boring so he goofs around with his toys instead.
The typical me.

Then he checks up on his plant by the window, watering it with water, then milk, then juice. The plant grew right away so it pretty much surprised him.
With a plant growing that quick, who wouldn't? Maybe it's the milk.

The lyrics say that Kuma's rival was Fried Shrimp, but I don't know what that means. Maybe Kuma is allergic to shrimp? Or maybe Fried Shrimp is another character?

He plays the guitar and flies through his fantasies.
I used to play the guitar too, but I never thought of getting p4wnd by Godzilla in my fantasies!

Suddenly, a ball shattered his window and he can't seem to find who the culprit is. So he sets the ball aside, procrastinates on cleaning the window debris then decides to play silly. Kuma soon cleaned the mess at the end of the day.
Maaan, the way Kuma waited until the end of the day before doing something is so much like me!

At the end of the day, Kuma fixed his stuff and played a tune for the night before going back to bed.

Well that's all about Kuma...and me! I found many similar traits between me and Kuma. Maybe that's why I liked Kuma's video so much. I never thought I'd recall how I was years ago by watching this video.

All in all, the video was really nice and the song was easy to understand and sing along.

...was what I wanted to say, but I was thinking of:

w00t! teh bear wuz uber c00l, I had teh same b0XX0rz at $HOME and the song gave me the LSS!

Cheers! Enjoy the video!