Archive - Jan 2009

January 31st

SimpleXML PHP and Top EntreCard droppers

Today is a day that EntreCard has asked people to highlight those that have dropped the most cards on their site. It is easy to get this as an RSS feed, and I could have just done something like thrown it into the Drupal Feed Aggregator and put it up as a block. Or, I could have used one of many different widgets to highlight top droppers.

Instead, I’ve been playing with parsing XML with using SimpleXML in PHP. I’ll be writing more about this later. For the time being, let me present my top droppers, as retrieved as an RSS feed from EntreCard, formatted for this blog, along with some of my own comments.

January 30th

twitterwordle



twitterwordle, originally uploaded by Aldon.

I wrote a program that extracts the most recent status of each of the nearly 1300 people that I'm following on Twitter.

I fed the results into Wordle at www.wordle.net to come up with this representation of what my friends are up to.

(Categories: )

Budget Deficits, Patronage, and Symbolic Gestures

As Connecticut faces its worst budget deficit in years, blogs and newspapers are providing useful information and valuable places to discuss the deficit and how it can best be addressed. Topics that have gotten discussed have included legislative salaries, patronage, and corruption.

When the General Assembly discussed deficit mitigation, Reps. Cafero, Hamzy and Klarides proposed an amendment calling for a five percent reduction in salaries for members and officers of the General Assembly. During the discussion of the amendment, Rep. Hamzy pledged that if the amendment did not pass, he would contact the Comptroller’s office and take a voluntary pay cut.

The Comptroller’s officer reports that legislative salaries are handled by the Office of Legislative Management. A call to this office revealed that Rep. Hamzy has in fact followed through with his pledge. Rep. Tim Larson has asked for a voluntary ten percent reduction and Sen. DeFronzo has asked for a two percent cut. These are great symbolic gestures and I wish to particularly applaud Rep. Hamzy for following through with his pledge.

Yet as I noted in my blog post, Republican Efforts to Protect CT Dems Majority:

Rep. Hamzy, a partner at Hamzy and Conlin, a law firm which focuses on bankruptcy and divorce can probably afford the $1,500 pay cut much easier than his clients. Yet this gets to my concern about the effort. We need to make the job of State Legislator accessible to more people in Connecticut, including people like Rep. Hamzy’s clients, and not only to successful lawyers.

The issue of legislative pay grew as an issue when House Speaker Donovan announced plans to hirer for former House Speaker Amann for $120,000 which is over four times the salary of a typical State Representative in Connecticut. Amidst the outcry, former House Speaker Amann decided not to accept the position.

Yet this got the attention of various journalists around the state. Ken Dixon posted two articles about Legislative Staff Salaries. A little analysis provides some interesting information. The total legislative staff salary listed in Dixon’s first post is nearly $14 million and the average staffer makes around $65,000/yr which is over twice the salary of a typical State Representative.

On top of that, there are some particularly notable high salaries. Joseph Quinn, Jr. is the top paid Democrat followed by Douglas Whiting at $170,719 and $165,000 respectively. They are followed by Republicans Paul Pimentel and George Gallo at $151,000 and $149,000 respectively. George Gallo is the former chair of the State Republican Party.

Coming in fifth and sixth are Democrat Kevin Graff and Republican Deborah L. Hutton at $147,160 and $144,000 respectively. Various websites make reference to a Deb or Deborah Hutton who had been listed as a VP of Government Affairs for Cablevision and Treasurer of Cablevision Systems Connecticut Political Committee back in about 2006. I do not know if this is the same Deborah Hutton, but I suspect it may be.

In addition to the annual salaries listed, Mr. Dixon posted another article listing Sessional Employees. This works out to be another $13,000 for each day that the General Assembly is in session. The average is a little over a hundred dollars a day, however there are some larger numbers with Robert Frankel leading the list at nearly $700/day.

Should any of these people be considering paycuts? Do we have concerns about their roles in the legislative process given their backgrounds? Is there political patronage going on here?

Chris Powell, managing editor at the Journal Inquirer approaches this from an interesting perspective. He suggest that Patronage is problem only if taken too far.

Amann notes that candidacy for major office imposes great personal financial burdens. These burdens discourage many good candidates, and Connecticut's new system of public financing for political campaigns does nothing about it. Indeed, promising as it is, the public-financing system may fail to achieve one of its objectives -- more competitive elections -- unless more people can afford to become candidates. That's why it might be good to extend the public-financing system to pay salaries to candidates who are challenging incumbents and who are not already on the public payroll themselves, or to allow such challenge candidates who have qualified for public financing to draw reasonable and temporary salaries from their campaigns.

I suspect that in the current fiscal climate, this idea isn’t likely to go very far, but it gets to the core of the problem. How do we get the best possible people to run for office?

The importance of this is underscored other recent events. Yesterday, former Illinois Gov. Rod Blagojevich was removed from office for, among other things, plotting to “sign legislation related to the horse racing industry”, “award a tollway contract and expand a tollway project”, “release pediatric care reimbursements to Illinois doctors and hospitals”, “appoint someone to the Illinois Finance Authority”, “award state contracts in exchange” and “award permits and authorizations” all “in exchange for campaign contributions”.

While the Citizens’ Election Program would have eliminated half of the charges against former Gov. Blagojevich, he still would most likely have been impeached on other charges.

Public financing of elections, in and of itself, will reduce some of the opportunities for corrupt politicians to act corruptly, but it won’t eliminate corruption. Instead, the key goal of public financing of elections, at least as I see it, is to help give voters better choices for candidates.

This leads me to the discussion on Connecticut Local Politics about the arrest of Hartford Mayor Eddie Perez on charges of bribery and fabricating evidence. I should note that the article was written by my wife, Kim Hynes, who is a senior organizer for Common Cause.

People who oppose public financing of elections were quick to jump on the discussion arguing that if we had public financing of elections, Rowland and Perez probably would have been elected anyway. Their conjecture might be true. Making it easier for better, non-corrupt politicians to run doesn’t guarantee that non-corrupt politicians will always, in the end, get elected.

One person suggested that “Elected officials are always accountable to voters”. Well, that is true, if they are facing meaningful opposition in elections. However, a corrupt incumbent that goes unopposed will most likely win re-election, and when a corrupt incumbent faces a corrupt challenger, you can be pretty sure that the winner will be corrupt.

The cost of corruption can be very high. So, as we try to reduce governmental costs, the question remains, how do we reduce corruption in government? Public financing of elections reduces one avenue of corruption. It makes it easier for better candidates to run. Should candidates collect salaries while they run? Should legislators be paid better so that more people can afford to take a state legislative job? Where does civic education fit into the equation, and where does the media fit in?

Here in Connecticut, it is good to see newspaper editors and bloggers grappling with these questions. It’s a good start.

(Categories: )

January 29th

Using GraphViz, a Brief Tutorial

Yesterday, I wrote a blog post about installing GraphViz on Drupal. Today, I will describe a little bit about how to create interesting images using GraphViz. This is a bit of a long and geeky post, so I’ll spare my less geeky friends the details. Click on read more to see the full blog post.

(Categories: )

January 28th

Installing Graphviz in Drupal

I have now install Graphviz on three different Drupal servers and I figure it is time for me to relate my experiences.

First, let me provide a little background. “Graphviz is open source graph visualization software.” Essentially, this allows you to represent a graph in a fairly simply format which then gets displayed as an image.

For example, I might put in:

DIGRAPH {
a -> b;
b -> c;
c -> a;
}

This would create an image with an ‘a’ in a circle, with an arrow leading to a ‘b’ in a circle, which would point to a ‘c’ in a circle, and finally an error from the circle with the ‘c’ in it back to the circle with an ‘a’ in it. Very nice. Very simple. Yes, you could use plenty of graphics programs to produce something like this, but when the graphs get a bit more complicated, it can be especially nice to have a program like Graphviz arrange all of the different pieces.

To get an idea of some of the things you can do with GraphViz, check out the images I produced with GraphViz on Flickr. I’ve created some fun images of social network graphs there.

Drupal is the Content Management System that I like to use for most of my sites. It makes it very easy to add content to a website. So, the combination of Drupal and Graphviz has some great potential.

The first site Drupal site that I installed Graphviz on was on an Ubuntu server on my internal network. Since it is Ubuntu, it is very easy to install packages. To install the graphviz package, I simply entered

sudo apt-get install graphviz

I then tested to make sure that graphviz was working by making a simple graphviz file and running ‘dot’ to convert it to an image.

The Drupal graphviz filter is dependent on the Pear package, Image_GraphViz. I didn’t have Pear installed, so I needed to do that as the next step.

sudo apt-get install php-pear

The best way to check that pear was installed properly was to use it to install Image_GraphViz. So, I executed

sudo pear install Image_GraphViz

At this point, I was ready to test it in Drupal. I downloaded the module, unzipped it and went to module administration to enable it. I then went to Input Formats to add the filter to various input formats. So far, I’ve only had it work nicely with the PHP Input Format.

My first installation was nearly a year ago, and it worked fairly nicely.

My second attempt was to install it on a shared hosting service. However, the commands that I used above weren’t available so, after a little hacking I gave up. I probably could install it in my own directory, change some paths, etc., but it just didn’t seem worth the effort.

My most recent attempt was for Toomre Capital Markets. The TCM site is running on a virtual private server running Ubuntu, so the procedure that I used for my first installation worked simply and easily for the TCM installation. Lars Toomre used GraphViz to create a great Visualization of the Madoff Feeder funds.

Included in the graph is the use of different colors as well as links from the graph into various articles that Lars has written about the Feeder Funds.

So, if you have your own server or a virtual private server, setting up GraphViz to run in Drupal can be fairly simple and straightforward. Building interesting graphs can be as well, and perhaps I’ll offer some of the hints of how to do this in a subsequent post.

(Categories: )