<CharlieDigital/> Programming, Politics, and uhh…pineapples


“Free” Money? Think Again…

Posted by Charles Chen

Michael Kinsley has some sobering commentary on the economic stimulus package idea that's floating around in Washington right now, perhaps one of the most hairbrained ideas to come out of DC in recent years.  Kinsley's subtitle says it all: "We need a 'fiscal stimulus' the way a drunk needs another drink.  Let's sober up first."

Kinsley brings up the core reason why this idea is doomed to failure: in a time of impending recession, it is only natural that a good portion of the beneficiaries of the rebate will act responsibly and save it or use it to pay down debt instead of instantly pumping it back into the economy.

"Direct government spending is a more efficient stimulus than an equivalent tax cut because all of it gets spent.  When actual people get hold of the money, a few might have an unpatriotic tendency to save some of it."

Kinsley further chastises this proposal by pointing out the obvious:

"My gripe is that telling Americans that they need to borrow and spend just a little bit more to get us past this recession -- and then reform their ways -- is like telling an alcoholic he needs one more drink before sobering up."

It is amazing that, quite possibly, a large percentage of Americans must think that money comes out of thin air and the gubmint can just print more of it; personal and government fiscal responsiblity is a distant reality, someone else's problem.

Like adhering to that New Year's resolution to lose weight or start saving more money, if the promise of a magic pill or surefire investment seems too painless to be true, it probably is.  There is still no substitution for daily exercise and, likewise, financial responsibility.  Kinsley points out:

"If we must have a fiscal stimulus, let's make sure it's not too enjoyable."

Spending our way out of a recession driven by a debt crisis just seems too enjoyable to work.  It is the proverbial magic diet pill or instant get rich scheme...doomed to fail.

Filed under: Rants 3 Comments

Bill Gates on Farming

Posted by Charles Chen

Nothing against the OLPC project, but I like Bill's idea a little bit better.

Microsoft billionaire Bill Gates announced a new direction Friday as he pledged $306 million in grants to develop farming in poor countries and leading the charge for for corporate responsibility at a major meeting of business chiefs.

"If we are serious about ending extreme hunger and poverty around the world, we must be serious about transforming agriculture for small farmers, most of whom are women," Gates said.

I'm not much of an anthropologist or historian, but it just seems like common sense that in order to help the most impoverished nations, the right way to go about it is to develop sufficient agricultural infrastructure and supply (and of course, cheap, renewable sources of energy (solar, wind) and clean drinking water).

As much love as Steve Jobs gets from the hipster crowd, I think Bill deserves some dap as well for his truly humanistic altruism.  If anyone can make some true headway in solving some of the most difficult humanitarian problems in the world, it's Bill Gates.

Filed under: News No Comments

Confucius On Programming

Posted by Charles Chen

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 😀

Filed under: .Net, Rants No Comments

Three Ron Paul Videos That You HAVE To See.

Posted by Charles Chen

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.

Filed under: News No Comments

Making Sh*t Up…

Posted by Charles Chen

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?

Filed under: lulz No Comments

Most Awesome Pic You’ll See This Week…

Posted by Charles Chen

Maybe even month.

Check out the full story here.

Filed under: Awesome 1 Comment