Saturday, November 15, 2008

The Chirp Song (Lyrics)

When you're out in the woods
And you've lost your way.
And the trials and tribulations of the day
Lift your fingers to your pits...
Raise your elbows high...
Open up your mouth
CHIRP! your blues away...
NIGHT...will turn to day...
IT'S...the only way...
CHIRP! (chirp)
CHIRP! (chirp)

Pardon this regression back to my youthful sing-a-longs.

(Corresponding participatory movements are left to your imagination.)

Monday, November 10, 2008

Restoring the Integrity of America

Obama Planning US Trials for Guantanamo Detainees - TIME: "'In reality and symbolically, the idea that we have people in legal black holes is an extremely serious black mark,' Tribe said. 'It has to be dealt with.'"

Thank God.

And how those individuals that professed to be born-again Christians--and I grew up as one--could defend and justify torture and imprisonment without trial I find absolutely unfathomable.

What part of Matthew 7:12...

"do to others what you would have them do to you"

and Matthew 5:44...

"love your enemies, and pray for those who persecute you"

justifies this:

A lot of Christians are going to have some serious shit to answer for on Judgment Day.

Friday, November 7, 2008

Tuning out the Right Wing Noise Machine

One side effect of the Obama administration that I'm looking forward to is that I can finally stop paying any significant attention to the hard-core right wing's bloviating. Hannity, O'Reilly, Fox News in general, Limbaugh, Hewitt, etc. have their agenda, and unfortunately because for the last two decades there have been politicians wielding real power in Congress and the Presidency that supported that agenda, one had to keep up with it if you wanted to oppose it. They couldn't be ignored--"know your enemy" and all that.

Even with the Democratic takeover of Congress in 2006 there was still a Conservative president vetoing, and sufficient GOP Senate representation to threaten filibusters over anything that attempted to roll back the accomplished parts of the agenda. (This is why nothing got done in Congress for the last two years--classic gridlock.)

Now, though, with Obama soon to take office, the gridlock breaks. While the GOP can still filibuster, that's the only weapon they've got left, and they just ain't going to be able to wield it every time they don't like something.

The key point, then, is that there's no longer any political muscle left for pushing through the conservative agenda, nor to stop it from being rolled back as needed. And while Hannity/Limbaugh/Hewitt will continue blaring the tune, there's no longer anyone there to dance.

And what with the GOP and conservative right manning up their circular firing squads, ejecting those that fail the purity test from the movement left and right, the whole conservative movement is becoming irrelevant. This means I no longer have to pay any attention to them, because they're ineffectual. (Fox News is even starting to eat itself.)

Now here's the thing though, in my book anyway. I prefer a strong, "loyal opposition" to the party in charge. It keeps everybody sharp, and smart, and keeps things from getting too far out of hand.

"Iron sharpens iron, so one man sharpens another." Proverbs 27:17

The GOP needs to get their act back together, sooner rather than later, though I'm seeing no evidence that that's going to happen for awhile.

In the meantime, though, I can drop Fox News from my TV channel listings and remove the spit guards protecting my car radio, and watch and support the adults trying to get some real work done.

Wednesday, November 5, 2008

An old, staticky guy does Python

For my entire 25+ year software development career I've used statically (and strongly to varying degrees) typed programming languages: Pascal, Modula-2, Ada, C, C++, and Java. I knew I needed to get some exposure to the current up-and-comer's--or pretty-much-already-here's--and so I decided to try Python.

The experience has been enjoyable, but there have been dubious aspects to it.

Definitely on the good side is the inclusion of lists, dictionaries, and tuples as first-class constructs within the language. It is an unalloyed joy to have these constructs available to the programmer as built-in, highly capable features of the language. I can't say enough good things about them. In the last few years I've become a great fan of maps/dictionaries as a fundamental approach to solving a variety of software development issues, and Python's comprehensive support for these and related constructs simplifies so many things.

List comprehensions are another valuable member of the Python toolkit. As I came up to speed with them I was reminded of Fortran's "Implied Do Loop" that I learned about way back in my college computer science classes.

List comprehensions are certainly a very powerful language feature for constructing kernels of concise, effective code.

The personal project I chose to implement using Python was a configuration file builder for which I wanted a graphical user interface. Having a fair amount of past experience with GTK+, I decided to go with PyGTK. This worked out very well. The integration of GTK with Python is extremely well-done, very flexible and easy to use. Many of the issues I had to deal with in the past regarding transferring information between the core app and the GTK API pertaining to data formatting and management just aren't there. Definite kudos to the PyGTK team. So Python and (Py)GTK is a Big Win in my book.

Now although this is rather a minor feature of Python, I've found the ability to return multiple results from a function extraordinarily valuable as it eliminates the need to define and manage parameters that are used for nothing more than passing back two or more results that are produced within a method.

I've done very little with the functional programming features of Python, other than lifting some quick little functions from tutorials or examples that I've needed to do some special-purpose task, like simple filtering. I know the functional programming features are very powerful, and from reading up on them I can certainly see their use, so I look forward to investigating exploiting them in the near future.

Now here's the part where I've yet to see the value.

Dynamic typing.

AIEIEE!! Not the static vs dynamic typing argument!!

I won't get into a full-blown argument, just going to point out where this keeps biting me, which causes me to question whether its value is worth the cost. (And keep in mind that I come from a hard-core strong/static typing background--Ada--so that obviously distorts my perspective :-)

The benefits of dynamic typing seem to revolve around the programmer not having to worry about types, therefore compilation and link errors are reduced so one can get to executing code faster, that when there's a bug manifesting itself during run-time there's more info available for debugging, it's easier to change types to adapt to changing requirements, and you get things like late binding and duck typing.

Okay, those are all true, but a) my code blows up a lot more often, and b) with no explicit type information in the code finding out why it's blowing up takes time, where with static typing the damn thing wouldn't have compiled in the first place--and therefore not have blowed up real good at all.

Here's a method spec:

def setupEventDefinitionsList(self, availableLogEntries,
availableEventDefinitions, eventLogEntries,
eventPrereqEvent, eventEntries, eventNames):

Some of these parameters are dictionaries, some are lists, some are class instances. Which are which? If I change the implementation of this method such that, say, eventLogEntries, is now a dictionary, I won't know that I possibly missed making the corresponding adjustment to the argument in an invoking method until I actually execute that method. Which, if the caller is in a little-used part of the application, could be a long time coming.

Similarly, if I haven't looked at this code for six months, how do I quickly refresh myself with what each of these parameters is, and is for? Maybe I was a conscientious programmer and documented each parameter, but maybe not (and comments tend to rot anyway). If in a new app I want to call this function I can't just look at the signature and tell in what form I need to provide the arguments, I have to review the code itself, either in the body of the method or in others callers, so as to derive what type of argument is expected.

Versus putting my cursor on the type indicator and right-clicking "Show declaration".

function Create_Source_Stream
(Format_Kind : File_Format.File_Format_Kinds;
Filename : String;
Timestamp : Timestamps.Time_Formats;
Timestamp_Kind : Timestamps.Time_Kinds;
Supplementary_Data : Supplementary_Generator_Info)
return Log_Source_Streams.Log_Source_Ref;

Maybe it's simply a matter that I'm not yet thinking "Pythonic" enough, and that with more experience in the language the benefits of dynamic typing will become more obvious to me. Maybe I've not yet immersed myself deeply enough in the language that dynamic typing reveals itself as being critical to certain software development practices. I don't know, for me the jury is still out on this aspect of Python, and so most likely for the rest of the dynamically typed languages.

There's certainly enough clearly beneficial strengths to Python that I will continue to use it for various projects, as I mentioned above it's been very pleasant to use for creating my configuration file builder.

For the really hard-core, more expansive projects though, I'm going to be sticking with Ada or other strongly/statically typed languages (yes, not least because I know them very well) because I find tracking down type-mismatch problems occurring during run-time that could've been trivially caught at compile time very tedious.

Monday, November 3, 2008

Whoof. <snap> <crack>

That's the sound of 62+ million Americans (and hundreds of millions of people around the world) releasing the breath they've been holding, and uncrossing fingers and toes as Barack Obama is projected to be the next President of the United States.

"[I]n no other country on Earth is my story even possible."

"In the unlikely story that is America, there has never been anything false about hope."

Thank you, Barack Obama, for inspiring and leading Americans to take back their country.

It's time to start.

Bi-polar Nation

So within 36-48 hours we'll hopefully know who the next President of the United States will be.

Americans' reactions reactions will likely be split amongst:

Case 1: Huge relief/Inconceivability (with a smattering of gobsmacked)
Case 2: Crushing depression/Whooping

Sunday, November 2, 2008

Spewing for the sake of spewing


Not me, the political campaigns.

I just get this sense during the last week or so of campaign season, when all the negative advertising goes into overdrive with smears, ridiculous distortions, and bald-faced lies based on out-of-context quotes, that it's not really about convincing the remaining "undecideds" any more.

Setting aside the presidential race for a moment, I'm seeing laughably over-the-top attack ads amongst the HR candidates, judicial contests (yes, in Alabama judges are elected, which I think is stupid), and others. Many of these ads are so "out there" that they're not going to be taken seriously by (meaning, influence) anybody.

So it seems to me that this is just spewing vitriol because campaigns just don't know what else to do: they're wired up, tired, angry at having to actually compete against this putz, and so just end up with this visceral need to yell, scream, and throw shit at their opponent.

Maybe it makes the campaign feel good--though tantrums have a tendency to be self-reinforcing--but it just stinks to the rest of us.