Random Thoughts of a Scatterbrain.
 Sunday, January 13, 2008

Confucius On Programming

1/13/2008 4:18:02 PM (Eastern Standard Time, UTC-05:00)

One of the favorite classes that I took in college was an introductory course to Chinese philosophy. 

From time to time, I found one or two passages from The Analects that I could apply to my computer science major.

One of my favorites is passage 13:3:

Tzu-lu said, "The ruler of Wei is waiting for you to serve in his administration.  What will be your first measure?"  Confucius said, "It will certainly be the rectification of names."  Tzu-lu said, "Is that so?  You are wide of the mark.  Why should there be such a rectification?"  Confucius said, "Yu! How uncultivated you are!  With regard to what he does not know, the superior man should maintain an attitude of reserve.  If names are not rectified, then language will not be in accord with truth, then things cannot be accomplished.  If things cannot be accomplished, then ceremonies and music will not flourish...."

"Therefore, the superior man will give only names that can be described in speech and say only what can be carried out in practice."

To me, this applies to software engineering in the naming of classes, methods, properties, variables, and so on.  As McConnell writes in Code Complete,

The smaller part of the job of programming is writing a program so that the computer can read it; the larger part is writing it so that other humans can read it.  let [the reader] use their brain cells to understand the larger question of how your code works rather than the syntactic details of a specific expression.  You write readable code because it helps other people to read your code.

Indeed, sensible naming is a big part of this idea of legibility.  What I dig about Visual Studio 2008 is that the installed documentation includes excerpts from Framework Design Guidelines by Cwalina and Abrams which aims to include some of the key naming and design best practices into the core literature on the .NET Framework.  It's a necessary and needed move to help forward the education of the legion of .NET developers who continue to perpetrate terrible naming practices carried over from VB.

I mean seriously: if I have to read one more method name as a noun (or a property as a verb or a class as a verb), I'll just have to start researching a way to let me reach across the Internet and punch someone in the face -- nothing ruins my morning quite like finding a new class in source control named as a verb.  I'm also midly irritated when developers choose unconventional names for object types.  For example, the use of "Checker" as opposed to "Validator" -- ugh!

Admittedly, some artifacts are just really hard to name.  But in such cases, proper naming is probably even more important since if it's hard for the writer of the code to come up with a proper name, the wrong name will make the artifact even harder to understand for secondary readers.  There have been times where I've spent days trying to come up with a suitable name for a class (I'll name it, but I'll continue to mull it over through restless nights (true story) and refactor it once I do come up with a suitable name) since the last thing I want to do is to give something a cryptic, hard to understand name.

One of the easiest ways around this is to spend some time digging around the SDK and look for similar patterns in naming and see how the .NET framework designers structured their class and member names.  I also think that Cwalina and Abrams' Framework Design Guideline is a stalwart component of any .NET developer's library.

So the next time you're about to write a class name or create a new member, just remember,  "If names are not rectified, then language will not be in accord with truth, then things cannot be accomplished.  If things cannot be accomplished, then ceremonies and music will not flourish". I mean, who doesn't want their project to end with ceremonies and music :-D

 Friday, January 11, 2008

Three Ron Paul Videos That You HAVE To See.

1/11/2008 10:51:46 AM (Eastern Standard Time, UTC-05:00)

I like how Paul sticks by his principles and doesn't take the bait. Excellent response.

Wow...the "joke" by McCain in that last video just came of as completely ignorant. Once again, Paul lays the smack down on the rest of the field. I'm not clear on the rest of Paul's views, but clearly, the man is the only honorable, principled, and honest guy in the whole Republican field.

If he doesn't win the nomination, we'll know where the Republicans stand in terms of their priorities.  And once again, these videos remind me why I can't watch Fox News.  The response that McCain gave in that third video definitely would not have made it across his lips in say a debate on NBC since he clearly would have come across as a racist and completely ignorant.  But it says something about the audience of Fox News that he felt that everyone would get a good chuckle out of it and decided to give that as a response.

 Thursday, January 03, 2008

Making Sh*t Up...

1/3/2008 9:53:54 AM (Eastern Standard Time, UTC-05:00)

It must be pretty awesome to be someone like Pat Robertson.

You can make the most outlandish, ridiculous, bullshit "predictions" -- as if God himself passed on the protip -- and then when none of them come true?

"All I can think is that somehow the people of God prayed and God in his mercy spared us.  So did I miss it? Possibly. Or, on the other hand, did God avert it? Possibly."

Man, that's awesome.  The logic is infallible!

I mean, where would the world be without a true visionary like Robertson to help guide us through the cloudy morass?  Check out these other truly enlightening predictions:

  • "He told me some things about the election, but I'm not going to say, because some old man on "60 Minutes" would make fun of me, so I'm not going to tell you who the winner's going to be." - This is reminiscent of grade school level logic
  • "[T]he Lord was saying there's going to be violence and chaos in the world." - Gosh Pat, where would we be without your enlightened wisdom!  The Lord truly hath blessed thee.
  • "[T]he Lord told me [the Iraq War] would be a disaster; well, it has been a disaster" - Hmm...so did President Putin.  You're not implying...now wait...Putin?  God?  Naaah.
  • Aside from a recession this year, Robertson suggested Wednesday that Americans will be paying much more for gas at the pump as the price of a barrel of oil rises by 50 percent in the coming months. - Pat, by God, you genius...how did I not notice the price of gas going up all this time?!?

Of course, his impeccable history of calling it should be more than enough to convince you by now that Pat has God's Blackberry on speed dial:

  • In May 2006, Robertson cited God in predicting that "the coasts are going to be lashed by vicious hurricanes this year" and that the Pacific Northwest could see a tsunami.
  • In January 2004, Robertson said, "I really believe I'm hearing from the Lord it's going to be like a blowout" re-election for President Bush.
  • Robertson acknowledged Wednesday that his prophecy of a nuclear terror attack in 2007 failed to unfold.
  • He also cited information from God when he predicted on a year go that major U.S. cities would be hit by "very serious terrorist attacks" causing "possibly millions" of deaths.

Yeah, it must be pretty awesome to be Pat Robertson; no one will be able to tell when senility sets in - or has it?

Most Awesome Pic You'll See This Week...

1/3/2008 1:38:59 AM (Eastern Standard Time, UTC-05:00)

Maybe even month.

Check out the full story here.

 Thursday, December 27, 2007

I'm Not Sure If My Taste Buds Are Ready...

12/27/2007 4:40:36 PM (Eastern Standard Time, UTC-05:00)

This is where it's at:

85% is for pansies; real men eat 99%!

Got it for Christmas...I'm about to give it a go.

Update: If I had to describe the taste, I would go with "solid black coffee", if there were such a thing (not like a coffee bean, but brewed coffee).  The texture is a bit chalky/pasty as it melts in your mouth, but not unpleasant.  Definitely a unique experience for real chocolate lovers.

 Wednesday, December 12, 2007

Verizon FiOS: DAAAAAMN!1!!one!

12/12/2007 5:58:50 PM (Eastern Standard Time, UTC-05:00)

Verizon FiOS is like:

Wow...

Screencap from FileZilla server...

 Tuesday, December 04, 2007

Notes From Austin, TX

12/4/2007 11:44:11 PM (Eastern Standard Time, UTC-05:00)

Austin is just an awesome city.  There's just something about it that attracts me to it.  I can't really say why I like it there so much.  I'm not really a clubber or a bar hopper, so the 6th Street Entertainment District really doesn't do it for me (although it was definitely fun to stroll through there with all of the live music and partygoers).  I enjoy live music, but I'm not fanatical about it (although it was awesome hearing live music all around the 6th Street area after sunset - from bands on the street to bands in open bars).  I like window shopping about as much as any guy does (but it was definitely cool hitting up the row of quirky shops on Congress Ave.).  I'm not really a food snob nor am I really picky about what's "good" and what's "bad" (but I must say, the TexMex in Austin simply trumps anything we get here in NJ).

But I leave you with a badass video from the Austin Zoo during Tiger feeding time:

While small and a bit run down, the Austin Zoo is otherwise awesome in that the crowds are small, the commercialization is low, the peacocks are just free roaming...very awesome, and they have a huge collection of large cats (not to mention a black bear display that is practically asking for a lawsuit because you can literally reach your hand in there and pet the cuddly guy).

Recent Happenings

12/4/2007 11:29:30 PM (Eastern Standard Time, UTC-05:00)

I am definitely in a funk of some sort.

I've just been completely out of it ever since I pulled a 110+ hour week at the beginning of November working towards the release of the project I'm working on: FCG's FirstPoint.

Now that we're nearing the end of the year, we're getting ready to prepare a release.

I think what I've learned from this process is, surprisingly, the importance of process in software development.  That's something I thought I'd never hear myself say (or see myself type).  Having gotten my start during the tail end of the startup era in 2000, I've been used to small teams with light processes to promote speed and efficiency.  But I think often times, people who don't have experience putting together large projects are all too willing to sacrifice "doing it right" for "doing it fast".

I've always been an advocate, but this go round, I think I might have been too soft and let off of it too soon.

One has to insist on some level of process that defines an overall workflow from conceptualization to realization, even more so for remote teams.  Certainly, these processes and workflows should not be set in stone, but they must be considered and they must be documented for the better of the team and progress.

Cooking a meal for 2 is easy enough; most recipes are written this way and most cookware is designed for preparing such meals.  But how about preparing a meal for 200?  All of a sudden, the scale of it all changes dramatically.  One needs larger infrastructure to support the ingredients, larger cookware, larger utensils, more manpower, and most importantly, there must be a process and a "glue" to hold all of these components (cooks, prep stations, servers, dishwashers, etc.) together now and ensure that the components work in unison.

Without process, planning, and infrastructure to support it, such an undertaking will surely be painful and the dishes will likely be served slightly late and a bit cold.

In writing software, the boundary between cooking for 2 and cooking for 200 is a very fine line.  It's not so much as how many concurrent users the software will support (although that does increase complexity), but how many features must be included in the software package.  When preparing a dinner for 4, preparing a two course meal will be significantly easier than preparing a 7 course meal simply due to the lesser number of ingredients to prep, store, and cook. 

With software engineering, all too often, it is simply too easy to go from preparing a 3 course meal to a 7 course meal if scope and feature creep isn't controlled.  I think process can help this by ensuring that the introduction of new features isn't simply "hey, I need this new feature, can you add it?" but more involved and includes a thorough evaluation of how the feature fits with the existing feature set, whether it is a "must have" feature (of course the boss always says yes :), and planning to consider whether it is part of a larger featureset that can be slated for a later release.

Process defines milestones and encourages visibility to the timeline of the project.  It makes the future more tangible.  If you know you have milestone 1 in three weeks and milestone 2 in 5 weeks, it makes it easy to schedule a task estimated at 4 weeks of work for milestone 2 instead of trying to shove everything into one giant release.  Process defines the workflow for introducing new features in a controlled manner such that features are not introduced in one module that breaks another module since, with the right process, those involved will have long since had a chance to review a rough design specs and will know ahead of time, the changes needed to adjust.  Process ensures that code that is commited is well written and written to a common standard.  This is done through mandatory peer reviews and knowledge exchanges on regular schedules.

But in any case, 'tis a lesson learned.

 Monday, October 29, 2007

"A Brief History of Record Industry Suicide"

10/29/2007 1:01:28 PM (Eastern Daylight Time, UTC-04:00)

Blogger demonbaby has an excellent post on the music industry spurred by the recent demise (and resurrection) of OiNK.

I myself have been having an ongoing debate with my veep regarding all things P2P taking various angles on the subject including legality, piracy, missed opportunities, and the general failure of the music industry to adapt to the digital revolution.

Rob emphasizes a point that I continually come back to in our discussions:

They had a chance to move forward, to evolve with technology and address the changing needs of consumers - and they didn't. Instead, they panicked - they showed their hand as power-hungry dinosaurs, and they started to demonize their own customers, the people whose love of music had given them massive profits for decades. They used their unfair record contracts - the ones that allowed them to own all the music - and went after children, grandparents, single moms, even deceased great grandmothers - alongside many other common people who did nothing more than download some songs and leave them in a shared folder - something that has become the cultural norm to the iPod generation.

They didn't jump in when the new technologies were emerging and think, "how can we capitalize on this to ensure that we're able to stay afloat while providing the customer what they've come to expect?" They didn't band together and create a flat monthly fee for downloading all the music you want. They didn't respond by drastically lowering the prices of CDs (which have been ludicrously overpriced since day one, and actually increased in price during the '90's), or by offering low-cost DRM-free legal MP3 purchases. Their entry into the digital marketplace was too little too late - a precedent of free, high-quality, DRM-free music had already been set.

Of course, this is no excuse for stealing or not rewarding the artists for their work, but it's clear that it is partially their own error in not creating the market conditions which would have prevented the massive outbreak of illicit P2P file sharing. 

I like to think it all comes back to Rodgers' and Jobs' assertion that a large part of the P2P network is enabled and driven by the music industry's reluctance to adopt "convenience" over "hubris" as the modus operandi.

Rob seems to agree:

Trying to innovate with a major label is like trying to teach your Grandmother how to play Halo 3: frustrating and ultimately futile. The easiest example of this is how much of a fight it's been to get record companies to sell MP3s DRM-free. You're trying to explain a new technology to an old guy who made his fortune in the hair metal days. You're trying to tell him that when someone buys a CD, it has no DRM - people can encode it into their computer as DRM-free MP3s within seconds, and send it to all their friends. So why insult the consumer by making them pay the same price for copy-protected MP3s? It doesn't make any sense! It just frustrates people and drives them to piracy! They don't get it: "It's an MP3, you have to protect it or they'll copy it." But they can do the same thing with the CDs you already sell!!

If intellectual property laws didn't make Oink illegal, the site's creator would be the new Steve Jobs right now. He would have revolutionized music distribution. Instead, he's a criminal, simply for finding the best way to fill rising consumer demand. I would have gladly paid a large monthly fee for a legal service as good as Oink - but none existed, because the music industry could never set aside their own greed and corporate bullshit to make it happen.

It's always puzzling to me when this discussion comes up because my veep is the ultimate entrepenuer.  I tend to believe that a large majority of people obtaining music via P2P networks would gladly pay for music if it were the case that the music came DRM free.  I see the legal assaults by the music labels as a missed opportunity to reinvigorate sales and reinvent the industry instead of waging a righteous battle for capitalism by suing small time thieves.

In the end, what good will the industry have gained by alienating customers and offering an inferior product (DRM'd MP3s)?  Surely, they will have gained the allegiance of a generation of lawyers whose pockets are being lined by an industry too foolhardy to recognize an opportunity when they see one.

 Wednesday, October 24, 2007

Nissan GT-R: Hawtness

10/24/2007 1:03:20 PM (Eastern Daylight Time, UTC-04:00)

http://www.autoblog.com/photos/2008-nissan-gt-r-live-reveal/454772/full/

I actually had a dream that I was driving one of these the other day.

This beast is sexy...damn sexy.

Update: See my NYIAS 2008 gallery for more pictures from the show.

RSS 2.0 Atom 1.0 CDF