RevolutionCalling

There’s a revolution calling

March 16th, 2008

Healthcare debate bait-and-switch

caduceus The following was just sent to the Star-Ledger’s letters-to-the-editor in response to an article that appeared on today’s front page.


It’s worth having a discussion about the costs and benefits of providing a means of healthcare security for those who can’t find what they need through the traditional channels. If we believe that the foundations of our society require us to help those who find their lives in danger through no fault other than the draw of an unlucky card, then we ought to look at how we can provide what these people want, and if it can be provided at a cost that society can bear. This seems to be the promise of the March 16 article “Universal health plan: ‘This is the moment’" by Susan K. Livio. Unfortunately what it delivers is a dishonest diversion in a wholly different direction.

The article quotes State Sen. Vitale’s concern over residents’ “fear they will lose” their health insurance. The article quickly veers off course, though, suggesting “residents would be required to prove they have medical insurance”. This is not the discussion that was promised.

Offering to those whose circumstances make healthcare insurance important yet unachievable is one thing, but what is now on the table is forcing all residents — even those lucky enough to be twenty years old and never sick a day in their lives nor responsibility to anyone but themselves — to purchase insurance even if their health and responsibilities don’t require it. One can make a philosophical argument over the unfairness of denying healthcare to those less fortunate, but that would be a significantly different debate than one justifying that all people must, under penalty of the law, value their health in exactly the same way.

The sleight-of-hand is obliquely acknowledged when quoting Assemblyman Neil Cohen, who references those forced into the program against their will as a “captive audience”. But the charade is continued in the statement from the AARP that indicated “a vast majority of its members believe all state residents should have access to ‘affordable, quality healthcare’”. There is a world of difference between “having access” and being forced to purchase something regardless of your needs.

This is not just splitting hairs. Although the article uses the fact to make a different point, it contains the evidence that this is unwanted. It cites a plan to allow 50,000 children to get care through New Jersey FamilyCare, but only 14 have thus far been enrolled. Having 0.03% of their goal achieved after three months, it’s clear that the people are staying away in droves. No one should be surprised: people really are diverse, holding different values — including for health — and the government is trying to force everyone into the same mold.

The author fails to see this distinction, and similarly fails to employ critical thinking in other areas. “Three states that dared” are cited, conveying an entirely positive connotation, without taking any notice of their success. Indeed, at least the Massachusetts plan to cover the uninsured has been as unsuccessful as the recent FamilyCare initiative in New Jersey. It seems that there are some people who genuinely don’t believe that healthcare is at the top of their priorities, and even for those who do, a government-defined plan isn’t able to adequately meet the needs of everyone.

Neither is the author critical of the dubious funding prospects. That the vehicle for funding the program seems a longshot is besides the point. The real problem is that it’s quite impossible to finance an ongoing program in perpetuity by money derived from a one-time windfall. Of course, those advocating the plan aren’t concerned with funding: “this would be worked out at a later date” because money “wouldn’t be needed until the final stages”. The implication is that we should jump into this blindly, without considering whether the benefits are greater than the costs, or indeed if the costs can be born at all.

What our responsibilities are to our less-fortunate neighbors, and how we can make good on them, is an important question. By diverting the discussion into a domain of coercion and signed blank checks, we obscure the real question and prevent any constructive debate.

October 15th, 2007

Spin: Grand Idea Sci-Fi the Modern Way

image On the plane to China I read Spin by Robert Charles Wilson, the 2006 Hugo award winner. Many people have noted that, following its golden years through the moon walk, sci-fi was painted on a galactic canvas, envisioning man’s potential throughout the universe. Since then, sci-fi has become more inward-gazing (e.g., cyberpunk), as our society seems to be wallowing in its own self-pity rather than dreaming big dreams. This novel is a return to the grand ideas of classical sci-fi, but through a 21st century realist’s lens.

Highly recommended.

http://en.wikipedia.org/wiki/Spin_(novel)

September 11th, 2007

What does 9-11 mean?

Today’s the 6th anniversary of that dayNational_Park_Service_9-11_Statue_of_Liberty_and_WTC_fire . The only other event in my memory that brings back memories in everyone of what they were doing that day was the Challenger explosion. I’m told that the assassination of JFK was another such milestone.

There’s a lot you can say about this event politically, but for a change that’s not the point that I want to make. I want to question what, quite literally, does "9-11" mean?

Why do we refer to the event as simply a pair of numbers? Other events get names: "JFK assassination", "Challenger explosion", "Pearl Harbor day". Why don’t we ever say "the Terrorist attack", or "al Qaeda attack", or "the World Trade Center disaster"? The numbers 9-11, or even spelled out as "September Eleventh", does nothing to convey the events of that day.

imageWas it that the event was so horrible? I don’t think it can compare to Pearl Harbor. Is there something specific about that date? That date has come and gone since the Gregorian calendar was invented.

But it reminds me of another date whose meaning is nearly forgotten: July 4th. Every year we celebrate "the Fourth of July", and virtually no one stops to really contemplate that. The day is really "Independence Day", but who actually says that. The result is a holiday from work, some hamburgers, and fireworks. There’s nothing in there about remembering our independence.

So today, we’ve long since forgotten what it means to be truly independent. And we’re forgetting what it means to be a single people under terrorist attack as well.

July 20th, 2007

Looking for DB test support tool

I’m on a quest for a way to load test data into my DB for running my unit tests. Maybe someone out in the blogosphere can help me.

The most effective method for testing my SQL Server stored procs that I’ve found is to build a script that

  1. Opens a transaction
  2. Sets up test data
  3. Calls the proc to be tested
  4. Checks the results
  5. Rolls back the test data
  6. Reports success/failure

This is all facilitated by the “Data Dude” extensions to Visual Studio Team stuff.

My difficulty is #2 above, setting up my test data. I can’t just leave it in the database, because inevitably, other data gets created that points to it, so I can’t ensure that what I expect are the only records affected, and I can’t just delete freely because of referential integrity.

So I’ve been creating “TestSetup” stored procs that insert the test data with just a series of INSERT statements. But I’ve gotten to a level where the amount of data required for many far-reaching operations is way too cumbersome to try creating in this way.

What I envision is a tool that’s called from inside my test script so it does its thing within the scope of the transaction I opened and can be rolled back to remove the test data. Presumably it’s written in .Net and the assembly is installed into the database. I would create an XML file describing the test data, and point this tool to that file. It would read my description and insert the indicated stuff into the DB.

There are a few complications, like tracking the identities of parent records in order to insert children properly. And it would be nice if unique columns — names and the like — could have a test-identifying random element appended so that there aren’t name clashes.

The closest I’ve come to finding this is a tool called MassDataHandler (http://www.codeplex.com/Wiki/View.aspx?ProjectName=MassDataHandler ). This isn’t designed to work inside the DB, but I imagine it could be adapted to do so. However, the tracking keys for parent/child relationships doesn’t seem to be sufficient (it appears to allow you to point to, e.g., the third record in the table, but not to “whatever ID was the result of inserting that record up there”).

Can anyone suggest something to fit the bill?

May 11th, 2007

The Non-Credible Guy

And that’s how I invented “Reality TV” … And then Einstein asked me to entertain his relatives…

The Dilbert desktop calendar is currently going through a bit on the “Non-Credible Guy” who makes outlandish claims about his achievements and brushes with greatness. I have a couple of true stories of this sort.

The Dark HalfBack around 1987 or maybe ‘88, my college buddies and I went to Florida for spring break. Most frat guys would go to Daytona beach (this being between the eras of Fort Lauderdale and Cancun), but we were a little different: we went to Disney World. We all wore identical Mickey Mouse T-shirts, and went around the park not by walking but by skipping (except for Greg; and when we counted off to make sure everyone was still there, he didn’t have a number, he was “the other guy”).

We found ourselves waiting in line for Mr. Toad’s Wild Ride (since closed; see article). Right in front of us was a familiar face sitting on top of a Harley-Davidson T-shirt and camo fatigue pants. We thought we recognized him as Stephen King, there with one of his kids.

Stephen KingI’m sure that people all the time go up to him and say “Hey, aren’t you Stephen King?”, so we didn’t want to do that. But we were college guys and couldn’t just leave it alone. We came up with the idea to ask him if he’s Richard Bachman (which is a pen name that he sometimes used), thinking that might be a little bit funny. Eric having a little more temerity than the rest of us, he volunteered to do it.

Mr. King was gracious about it, and chuckled a little. He politely asked us to let him enjoy his time with his family. No problem there. (And thanks, Mr. King, for being gracious with a bunch of annoying college kids)

The interesting part comes a year or two later. Stephen King published a book called The Dark Half. The plot of this novel involves a writer whose pen name takes over his life.

I like to think that our mistaking Mr. King for his pseudonym may have planted the seed that led to his writing that book. We’ll never know, but it’s at least plausible.

March 18th, 2007

Review of 3D Topicscape

I’ve been complaining about the problems inherent in mind mapping long and loud enough now that I was excited to find a new application that promised a fresh approach. Having played with it for over a week now, I find myself with strong feelings, both positive and negative. 3DTS really does provide capabilities that I haven’t seen in any of its better-known competitors, in a way that caters to a user serious about organizing himself. But while it’s a leap forward in mind mapping, it carries much of the same paradigm that I’ve complained about.

An extremely effective mind mapper

3D Topicscape’s eye candy is the dialectic that sets it apart from other applications. At first glance one might think that its UI paradigm of three-dimensional flight over a plane of topical pyramids is a gimmick to draw the eye past conventional applications that draw clipart-like graphics on a paper. 3DTS uses its model effectively, delivering a heavy-duty model that MindJet and others can’t touch in most ways.

The illusion of space is important to 3DTS because its model of relationships between topics is much richer than other MM tools. These allow you to draw octopi that enforce strictly hierarchical information, really no different than a text outline drawn graphically. The real world doesn’t work that way, having complex interrelationships between any set of topics you might dream up. And so mind mappers that acknowledge this at all allow dotted-line connections between topics, which in the flat octopus world can obscure as much information as it reveals.

3DTS realizes this, and its fundamental design is intended to facilitate a more robust picture of the relationships between ideas. Most significant is the ability for a topic to have multiple parents – which is frequently how the world works (consider baseball players: you might view them as athletes, celebrities, union members, or frequent flyers, all at the same time). In a world where the lineage of an item shifts depending on the aspect under consideration, the ability to fly around to literally consider the problem from multiple angles is invaluable and unique to Topicscape.

Sibling relationships can also be drawn, but because these can cross the boundaries of families, it’s still possible that they result in “tangles”. Topicscape addresses this by way of its dynamic view. Since its information doesn’t sit on a static page, the selection of a topic can cause its neighbors to reveal their relationships in ways that make them stand out from the other topics. This is done by a combination of repositioning and sizing other topics about the focus, and drawing relationship lines and “lollipops”. Thus, when considering any given topic, its relatives and its weak-association “tunnels” are called out to clarify the picture.

In conventional mind mapping programs, the maps become less useful very quickly as you exceed the size of your monitor. Not only do relationships get tangled (if they can!) and the view zoomed out to illegibility, but in those tools that allow links between cousins, it can be very difficult to scroll to find the other end of a desired relationship. Topicscape offers a feature that’s quite innovative, providing a sort of extra hand that can hold onto a link being dragged, while your mouse is freed for flying.

Topicscape’s topics themselves are infinitely richer than that of the typical mind mapping tool (Axon being a notable exception, in its way). Lesser applications allow you to provide a label, an icon, and perhaps a textual description. In 3DTS, a topic can really be a collector for many instances of information concerning the topic. That is, it can contain notes or files of any type (or even Outlook objects – messages, contacts, etc.) about the topic. These files can be included with the 3DTS repository itself, or can be links to documents in their “natural habitat” – e.g., your project repository.

Balances several tradeoffs

All of these capabilities come with some cost. The first that you’ll notice is the learning curve. Topicscape is extremely sophisticated, but sophistication is the opposition side of the same coin as complexity. The availability of controls that go beyond manipulating the information itself, but also simultaneously moving your viewpoint through its space, results in a very broad control surface, one that will take time to master. The problem is exacerbated a bit by the fact that it’s not a native Windows UI (it happens to be built in Java, as far as I can tell), so you will encounter GUI widgets that present visual cues somewhat different from those you’re used to. I’ve been playing with it for a week, and I’m getting the hang of it; I think it will be worth the while.

The developers have gone to great lengths to help new users. For example, there is a UI mode that hides expert features to help novices from being overwhelmed. And when you first set out to use the application, I urge you to give yourself half an hour to work through the Quick Start guide. There are also in-application user-driven demos to familiarize oneself with the controls, implemented in a way that other developers would do well to take note of, and the web site offers a number of example of scenarios demonstrating how to apply the program to various problems. Also offered is a slimmed-down Lite edition, but I have not evaluated this.

The dynamic 3-D view provides opportunities to work with your data in ways that wouldn’t be possible any other way, but they too have a price. The first thing I noticed was the busy look of its UI. For my tastes, anyway, the “grass” planar surface underlying the topics really distracts me. The developer pointed out to me that the texture helps the user feel the perspective in space, and this is a legitimate explanation. I played around and found an alternate texture and color that’s less bothersome. But I wish that one of the choices was just a very pale graph paper.

The developers have fallen victim to some conceits in their 3D world. By default, searching for topics (which is otherwise a very powerful feature) yields results that are stretched out in full perspective, lying as if they are cards on the ground. This is pretty, but not too helpful when you want to scan those results. Luckily, there’s an alternate view that’s more useful.

Most significant, though, should have been obvious to me when considering the dynamic nature of the view. If the user is flying around in space, viewing topics in a context that’s constantly shifting, then printing must be quite impossible. The developers attempt to mitigate this through a variety of export options.

Indeed, this shortcoming reveals the fundamental difference between Topicscape and other mind mappers. The conventional tools are what you want if you need to put together a cute and concise chart to stick in your PowerPoint ™ presentation at a meeting. But if you’re using the tool to really accomplish the organization of your information, then Topicscape is going to bring you much farther than its competitors.

Some of my mind mapping concerns remain

Unless you’re creating the map for nothing but a prop in a presentation, Topicscape is unequivocally a better mind mapper. But it’s still fundamentally a mind mapper.

In my perfect world, we wouldn’t be thinking about the relationships between topics in terms of parents and cousins at all. Topics would be related or not, and related to as many other nodes as necessary. These relationships could be of various types, and carry information of their own (e.g., does the link indicate that one topic is a generalization of the other, or maybe a counterexample?). Topicscape makes an overture toward this, but is still fundamentally hierarchical (i.e., parent-child oriented). I don’t expect that it would be able to make the full leap and shake off that paradigm. However, I do think that it would be possible for them to enhance relationships to carry information – at least a label.

My perfect world also allows multiple views of the information. Topicscape does something of this sort, but not in the way that I envision. My dream would allow me to create multiple static views, each arranged to accentuate the issue it addresses, possibly by excluding some topics and by moving things around. 3DTS allows me to move my point of view any way I choose, but it doesn’t allow (as far as I can tell) to temporarily obscure particular topics. Nor does it allow you to reposition topics outside of its own chosen layout (as far as I can tell). One suggestion I would offer the developers is to provide a way to save and restore specific points of view (currently it’s possible to save Favority selections, which results in a similarly organized view, but not necessarily the same “camera” positioning).

Leaving a guardedly positive conclusion

My emotions are mixed as I use the tool, and consider how to review it. While I’m using it, I’m quite excited. It’s fun to use, and it’s very robust and well-considered software. But when I sit back and look at what I’ve accomplished, I’m still bothered by what is still left unaddressed by this and any mind mapping tool I’ve encountered.

The bottom line is that I expect to continue using Topicscape for the foreseeable future. It’s not perfect, but it’s the top of the heap of mind mappers that I’ve experimented with.

Finding 3D Topicscape

3D Topicscape is available online at http://www.topicscape.com/ , currently for $79.99, an eminently reasonable price for any mind mapping software, let alone one of this caliber. Also mentioned in this review was Mindjet’s MindManager (see http://www.mindjet.com ) , which has a Basic edition starting at $229.

Full Disclosure: This review was based on the use of a free license courtesy of the developer, but no commitments were made regarding the outcome. No animals were harmed in the creation of this review.

Cross-posted for discussion on Donation Coder.

March 6th, 2007

Why do cops have SUVs?

I’ve wondered this for a while. The job of the police is, generally, to catch people. This is not something that SUVs are noted for.

So why the heck do they issue these vehicles to the police? I can see having one on the force in very rural communities, or having one to tow that bomb squad trailer. But this is one car that’s not for chasing down bad guys.

I was hardly surprised when I saw an article in Sunday’s Star Ledger: Car chase in Newark kills police sergeant: Stolen police cruiser collides with officer’s SUV. Now, Newark doesn’t have very many rutted dirt roads to scramble over, so I don’t see why they need an SUV at all.

But here’s the punchline (with due respect to the officer and his family): in an SUV, why would you be responding to a drag racing complaint? What do you hope to do, roll over a little sports car like you’re in a tank?

My best guess is that it’s a power thing. The police want to feel like they have the upper hand, and sitting high above those of us in our sedans make them feel superior.

Well, the cop in this story might have been feeling superior while he was sitting pretty in his truck… just before it killed him. Make no mistake, I assign blame here to the police department for purchasing trucks, and to the officers for failing to use proper judgment in their pursuit, just as much as I do to the criminal they were chasing.

The Simpsons - Canyonero Jingle

Can you name the truck with four wheel drive,
smells like a steak and seats thirty-five..

Canyonero! Canyonero!

Well, it goes real slow with the hammer down,
It’s the country-fried truck endorsed by a clown!

Canyonero! (Yah!) Canyonero!
[Krusty:] Hey Hey

The Federal Highway comission has ruled the
Canyonero unsafe for highway or city driving.

Canyonero!

12 yards long, 2 lanes wide,
65 tons of American Pride!

Canyonero! Canyonero!

Top of the line in utility sports,
Unexplained fires are a matter for the courts!

Canyonero! Canyonero! (Yah!)

She blinds everybody with her super high beams,
She’s a squirrel crushing, deer smacking, driving machine!

Canyonero!-oh woah, Canyonero! (Yah!)

Drive Canyonero!

Woah Canyonero!

Woah!

Simpsons 5F10 2/22/1998

March 2nd, 2007

A site worth reading

There’s a new blog in town. The “NJ Libertarian News” blog aims to keep us informed about how living in New Jersey we’re giving up a little more of our freedom every day. Since this is an important topic, this link is now in our Blogroll.

Take a few minutes to go see what’s happening in the state. Unfortunately you’ll be sorry that you did.

February 27th, 2007

UI Testing, pt. 2

Next problem: UI testability. It’s hard. There exist tools for testing web pages, but I’m pretty well confident that none of them will work well with AJAX. Compounding the problem is that it’s not going to be practical to fully test everything at the UI level. Naturally we’ll need to test there as well, but we won’t be able to rely on it the way we do today. That’s because AJAX will make the user interaction much richer, so we would have many more Factors in the Factor-Action Matrices, and because the emitted code will differ for each of the target browsers (IE6, IE7, Firefox 1.5 and Firefox 2), we’d have to test all of those cases 4 times. That’s way too many tests.

A big part of the reason that testing the outer-most layer is hard is the design of web forms that ASP.Net impresses on you by default. If you just follow the way things work out-of-the-box, you wind up with code that looks quite a bit like a VB form. In particular, the way that data is extracted from the incoming datasets (or whatever) and placed into fields; the way that user interactions cause changes in the data or in the UI state; the way data is validated, etc. are all intertwined. There’s no way to verify that your code is correctly saying “value X is 0 so button Y must be grayed out” without contriving to assign X=0, and running the form interactively. This is time-consuming and prone to being skipped over.

The idea is to separate the behavior from the UI at the very highest level possible. This way you can test the behavior itself without having to put a real UI onto it. You can actually call your code directly from a test harness with X==0, and ensure that your code responds by calling the function to gray out Y, even though there isn’t really any button at all in the current environment.

The best way I know of to accomplish that is using a Model-View-Presenter pattern. There seems to be quite a lot of documentation out there already on applying this to ASP.Net2. These two articles appear to be good starting points:

However, we’ve still got to figure out how we fit together all of these various requirements we’ve been talking about over the past few days (and the other requirements that we haven’t yet discussed!). Putting all of that together, maybe this approach doesn’t make the most sense. But if not, we’ll need to come up with some alternative, because we can’t afford to skip testing at this level.

February 27th, 2007

Unit Testing, pt. 1

I’m involved in setting up some new testing standards at work, and I’ve provided the following thoughts in the debate:

Today we have code that looks like this:

class MyBusinessRules
{
public Dataset GetSomeData()
{
MyDataAccess da = new MyDataAccess(); /* create my own data accessor */
return da.GetSomeData();
}
} 

The problem with this is that there is no way to test this without using the database. And (a) having to reset the database for every test is a huge pain in the butt; and (b) it won’t work (without using the right DB concurrency settings, which has other implications, and careful transaction rollbacks) with multiple simultaneous tests.

To make MyBusinessRules testable, you need to implement an Inversion of Control pattern:

interface IMyDataAccess
{
public Dataset GetSomeData();
}
class MyDataAccess : IMyDataAccess
{
public Dataset GetSomeData(){ /* … */ };
}
class MyBusinessRules
{
public Dataset GetSomeData(IMyDataAccess da) /* give it a tool for access the DB */
{
return da.GetSomeData();
}
} 

Now I can trivially write a test to call GetSomeData, and by passing in something that implements IMyDataAccess, I can pass in either an instance of the regular data access code in MyDataAccess, or something else that pretends to talk to the database so that I can work independent of changes that other people are making in the real data.

“OK,” I hear you saying, “now I have to write twice as much code. I have to write dummy stubs for everything.” Nope. Two of the things that makes .Net elegant are reflection and dynamic code emitters. It’s possible to inspect a class at runtime, and dynamically generate a class that behaves exactly like the original. In fact, there are many tools out there that do just this (see: http://csharpfeeds.com/post.aspx?id=3959 ); these are called Mock Object Frameworks; we should pick one. You can then “teach” it how it’s expected to behave by, e.g., giving a set of data to return when the code being tested calls it.

This is pretty much where the unit-testing community is at right now. But there is still further work being done to make it even easier to build tests.

For database interaction, there’s a type of specialized solution (http://weblogs.shockbyte.com.ar/rodolfof/archive/2006/08/16/8657.aspx ) that will generate and load its own data automatically. It’s possible to use a proxy for the actual DB provider, and go through an initial real run while recording all of the data interchanged and saving to disk. Subsequent runs through the tool don’t talk to the real database at all, but just retrieve the appropriate data from the disk, as it was saved the first time around.

Another complaint is that this scheme forces everything to carry too many parameters – not just for its own proper input, but for the IoC stuff. There’s no question that it’s way ugly. You might get around this by providing overloads, one with and one without the extra stuff. Another solution is to use a framework like the Windsor container (http://wiki.castleproject.org/index.php/Container) which allows you to configure a set of providers, and then have your code request their needed providers; Windsor will hand off what fits the bill, be that a “real” object or a mock object.