Monday, June 30, 2008

New Song, New Album, New Drummer, and You!

I noticed that I haven't posted any news about Glamour Shot (my band) in quite a while, so I thought I'd send out an update.

We've posted our latest song. This one is entitled "My Every Whim," and you might find it a refreshing detour from some of our other work. Additionally, the song "How You've Changed," which I didn't announce here before, has also been receiving quite a bit of play time.

In other news, our search for a drummer is going well, and we should have an announcement in that area very soon.

We are now officially announcing our intend to record our first album within the next few months. We plan to release this album independently, with our primary distribution method being digital. There will be a CDs pressed as tour merchandise and for promotions, and we will also be pressing a limited set of Vinyl.

In other news, if you hadn't noticed a bulletin that I posted on MySpace, Peter Hook (of Joy Division and New Order) will be DJing a set in Phoenix on July 4th, and Ben (our friendly neighborhood Guitarist) has been asked to perform a set in support. We're all very excited about this, and will be attending the event as well.

Oh, and we recently surpassed 30,000 MySpace friends. The vast majority of you (90%?) are people who have 'actually' listened to our music, and like it enough that you've decided to add us to your worlds, so we really would like to extend our heartfelt thanks to your continuing support.

You like us! You really do!

Thanks,
Thom, Ben, and Scott (Glamour Shot)

Technorati Tags: , ,

Thursday, June 26, 2008

Ruby is Object Oriented?

Well, for better or worse, I've been doing a lot of Ruby coding lately.

One of the first great selling points that Ruby developers like to flaunt is that their language is 'truly object oriented' in that everything is an object, even numeric literals. Really? Cool! Well, I've done a lot of object oriented programming over the last twenty years... You know, languages like Java, C++, Objective-C, ObjectPascal, and yes, even a little SmallTalk.

With the exception of SmallTalk, all of these languages feature visibility modifiers that allow you to identify a method as public, protected, or private, and all of the languages present consistent behavior when you tag your methods as such. In particular, private methods allow you to write code that is specific to the internal implementation details of your class, and those methods are never exposed outside of your class.

Ruby has private methods too... or does it? Take this code for example:
class BaseClass
  private
  def private_method
    puts "base class private"
  end

  public
  def public_method
    private_method
  end
end

class SubClass < BaseClass
  private
  def private_method
    puts "sub class private"
  end
end

d = SubClass.new
d.public_method
According to the traditional rules of object-oriented inheritance, what should the last line of this snippet display? If you were thinking "base class private," you'd be thinking like an object oriented programmer who has spent more than three minutes writing code in Java or C++, but according to Ruby, you'd be completely fucking wrong.

Why? Well, Ruby, while it doesn't allow you to call private methods from outside of their classes, does allow you to override them in subclasses. That's okay, other OOP languages allow you to do that as well, except for one thing: other OOP languages don't add private methods to the class's virtual method table, and so there's no risk involved in defining methods of the same name in descendants.

Ruby makes it even worse by making private methods accessible to subclasses. That's what protected methods are for! So what used to be the proper way of hiding implementation details from consumers of your APIs has now become a fucking minefield. The Ruby developer stance regarding this mess is "well, you should be familiar with the code you're extending, or you should just write an adapter."

I'm sorry, I thought the value of object-oriented programming was to allow developers to utilize or inherit the public functionality of APIs, while remaining buffered from the internal details of those APIs. It was supposed to save us time and allow us to concentrate only on the functionality that we needed to implement rather than the inner workings of functionality that we're leveraging.

As Ruby developers, I suppose if I decided to open a socket and send a byte buffer from point A to point B, you'd also recommend that I learn the internal workings of the Linux kernel? In that case, I should probably also know the inner workings of the BSD kernel as well, because it also has a socket() call.

Ok, so let's say I follow your advice and I refer to the code that I'm extending and purposely avoid the definition of methods that duplicate the names of private methods in a base class. What happens if the upstream vendor of an API that I'm using decides to add a private method to their base class that duplicates the name of a method in my class? Should they keep tabs on the thousands of potential 3rd party extensions to their classes? Should we be forced to perform code reviews every time we update a dependent API?

What the fuck, Ruby people?! I shouldn't be seeing "sub class private." Fix this!

Technorati Tags: , , , , ,

Saturday, June 14, 2008

An Open Letter to Democrats in Congress

An Open Letter to Democrats in Congress:

As our representatives, you have sworn an oath to uphold the Constitution of the United States. You have also been elected for no other reason than to represent the will of your constituents. Several days ago, thirty-five articles of Impeachment were presented against President George W. Bush, and while a few of those articles were clearly not impeachable offenses, the vast majority of those articles were substantive, and should be pursued for the sake of maintaining any semblance of freedom and representative democracy in the United States of America.

As the people of the United States, we compel you to press forward with impeachment proceedings and to cease being so wholly consumed with your own political careers that your actions are to the detriment of the United States as a free and just people. We also make it clear to you, our Democrats in Congress, that your inaction in this matter is itself both unconstitutional and illegal inasmuch as you are aiding and abetting high crimes and misdemeanors that have been committed in plain view and with reckless abandon.

When over one-third of a country's population insist upon impeachment, sending this matter to a committee wherein it will exist in limbo for eternity is clearly an obstructive course of action and completely misrepresents the will of the people. If you, the Democrats in Congress, insist upon this course, know that you will have directly contributed to the further disintegration of both constitutional government and representative democracy, and know that the American people will make their disapproval known in future elections.

The American People will not stand for this. We will not urge you to change your minds on this matter, instead we demand that you perform your duties as our representatives and as constitutional officers by moving forward with impeachment proceedings against both George W. Bush, President of the United States, and Richard B. Cheney, Vice President of the United States.

Sincerely,
The Voting Citizens of the United States of America

Technorati Tags: , , , , ,

Monday, June 9, 2008

Why Don't We Impeach Nancy Pelosi?

This evening, Dennis Kucinich stood before Congress for a few hours reading off an extensive list (thirty-five, to be exact) of charges against President Bush, and in the process formed what I thought to be a reasonable argument to support impeachment of the President. After watching this, it occurred to me that even though C-SPAN was carrying the coverage live for hours, and even though the story had been picked up by all the major wire services, the story hadn't made it to the front page or politics sections of any of the major news web sites. It made me wonder why.

Has the Bush administration successfully manipulated the major media such that the only stories they're willing to publish have to do with his succession rather than the actual news of the day? That can't be the case because only a couple of the major networks have a glaringly conservative and pro-Bush leaning... You know which ones they are, I needn't tell you.

Then I remembered something. Kucinich presented similar charges against Vice President Cheney a while back. These charges received a little more attention by the press than today's story, but Nancy Pelosi again reminded us that she has no intention of leveling impeachment charges against the current administration. Her claim is that such charges would be divisive and likely unsuccessful. Divisive for whom? The American people? Congress? The Democratic Party?

I've long believed that the Democratic party, while appearing to be sympathetic to the American people, are no better than their Republican counterparts in that their only duty is to themselves. The only major difference between the two parties is that at least Republicans don't pretend to care, so you can take them for their word (as ridiculous as their words may be).

On the other hand, it's quite obvious that Nancy Pelosi acts neither on behalf of the will of her party nor that of the American People. I seem to recall that a couple of years ago, the American People chose to overthrow Republican rule of the Congress to expedite an end to the war and a return to sanity in American politics. What happened to those promises? Why have the Democrats failed us and who is left in American politics that we can trust? I fear not a single person.

So I think the simple answer to my original question is that the mainstream media is ignoring the story because they know that any efforts to impeach members of the current administration will be completely wasted to afford members of the Democratic party more leverage in the coming election. Because of the Democrats' failures over the last few years, the race will be very close, and so their party can't afford to alienate independent voters and those Republicans who are so fed up with their party that they might be willing to jump ship for a couple of years.

Having just written this, I can't believe I had to. I'm reporting on politics as usual, and so I should have known better. We should all know better by now.

Technorati Tags: , , , , , ,