Terry Goodkind on Philosophy

My first undergraduate degree was in “Plan II” (my second was in C.S. after 3 semesters in law school) which is an honors liberal arts degree program at UT Austin that tried to provide an “ivy league” experience — top professors and small class sizes. As a result, I ended up taking 15 hours in philosophy. Although I never would have taken any philosophy on my own, I have to say that these classes were some of the most influential and enlightening that I took.

I’m also a big fan of the Sci-fi and Fantasy book genres and I recently started reading Terry Goodkind’s “Wizard’s First Rule” on an acquaintance’s recommendation. I’ve really enjoyed the book and as I was reading it, I recognized some Ayn Rand-ish concepts (IE objectivism) so I googled Terry Goodkind and was browsing around his very nice website where I found this:

Some people use big words to try to make their beliefs sound scholarly and important or, worse, to hide the fact that their beliefs don’t make any sense. Don’t ever allow such people to bully you with their attempts to make philosophy impossibly complex, or intimidate you into accepting what they say. What this kind of person wants is for you to blindly believe them; they don’t want you to think for yourself.

Reason demands clarity. Whenever presenting your views it is essential to be clear about those beliefs and to frame them rationally. When confronted with reason, some of those without rational arguments or beliefs will frequently switch to personal attacks. Obscenities and insults are the product of an ineffectual mind, merely the crude tools of the enemies of reason and thus the enemies of life. You cannot reason with this type of person; they are incapable of reason. Clarity and reason are tools of truth. Use them to better your own life.

Now whether you agree or disagree with objectivism (I find it incomplete and overly simple, personally), you have to wholeheartedly agree with his sentiments about philosophy and clarity of thought in general. The world would be a much better place if more people took Goodkind’s advice to heart.

It’s the People Stupid!

Jeff Atwood recently posted the table of contents of “Facts and Fallacies in Software Engineering.” I’m sure it’s no coincidence that the the section on “People” is first:


The most important factor in software work is the quality of the programmers.
The best programmers are up to 28 times better than the worst programmers.
Adding people to a late project makes it later.
The working environment has a profound impact on productivity and quality.

I wish more people understood these four facts. In 24 years, I’ve watched upper management pretend these things weren’t true over and over again with disasterous results. If you’ve ever been fortunate enough to work with great people in a well-run organization and also suffered the misfortune of working with talentless people in a poorly run enterprise, you know that it’s the people stupid! You can’t make up for bad people with “good” process or methodology. The rest of the 50 item list is interesting and useful, but you could go a long way with just these first four “facts.”

I’ve often said that the best programmers are 10 times better than the worst, but I can easily believe 28 — I’ve never actually tried to measure. The sad part is that be it 10 or 28 times, you never see the best programmers making 10 times the worst — at least not in my experience.

Counting Messages in an MSMQ MessageQueue from C#

Surprisingly, this not as easy as MessageQueue.Count; When I searched for how to do this, I kept seeing solutions that required use of COM interop or Performance Counters. I didn’t really like either of those suggestions so I figured I’d just try Peek with a cursor. I was pleasantly surprised to find that this method was more than adequate for my needs. I ran this against a queue with 1000 (relatively small) messages and, including the time to open the queue, this took only 0.04 seconds. I was using private, transactional queues. I haven’t tested any other scenarios. But for my needs, this worked fine.

protected Message PeekWithoutTimeout(MessageQueue q, Cursor cursor, PeekAction action)
	Message ret = null;
		ret = q.Peek(new TimeSpan(1), cursor, action);
	catch (MessageQueueException mqe)
		if (!mqe.Message.ToLower().Contains("timeout"))
	return ret;

protected int GetMessageCount(MessageQueue q)
	int count = 0;
	Cursor cursor = q.CreateCursor();

	Message m = PeekWithoutTimeout(q, cursor, PeekAction.Current);
	if (m != null)
		count = 1;
		while ((m = PeekWithoutTimeout(q, cursor, PeekAction.Next)) != null)
	return count;			


Healthcare Costs Out of Control — My Simple Solution

Back at the beginning of February, my son sliced his finger with a linoleum carving tool in Art. Here’s a sketch he did of it later:

Alex Cut Sketch

I picked him up and took him to the ER at a local hospital. The cut required four stitches. I was reviewing the claims for this on line and noticed that the hospital tried to charge my insurance company $362 for “Misc Services” and the doctor staffing the ER charged $898 for “Op Services” and “Surgery.” I’m supposed to pay a $150 deductible for ER visits. My insurance company reduced the hospital charge to $139 and had me pay it as my deductible. They paid the $898 charge to the doctor without reduction.

The primary motivation of my call was to determine why I had to pay the $139 (which turned out to be the lesser of the allowable charge and $150 deductible). I was also amazed that getting four stitches costs $900. That’s outrageous. That’s $225 per stitch! So the total cost associated with taking my son to ER to get 4 stitches in his finger was $1037!!!

Granted, I only paid $139 but I realize there’s no free lunch. All I have to do is look at what we’re paying through my wife’s employer for health insurance — $421/month to cover a family of four. I know from my former employer that the total cost of my health insurance was over $1300 a month to cover a family of four. These costs are out of control and unjustified. There have to be other factors at work here.

One that I can easily point to is ER treatment of illegal aliens for non-emergency care. Unfortunately, I’ve been to the ER three times in the past 18 months. Every time, a majority of the people waiting were spanish-only speaking brown skinned people with sick babies. I didn’t ask for papers, but it’s not a huge leap to infer that the majority of them were, in fact, illegal. Illegal aliens don’t pay payroll taxes (they present an strong argument for consumption based taxes, actually). In fact, I see the whole illegal immigration issue as a ridiculous subsidy for certain industries. They get cheap, exploitable labor at very low cost while all the rest of us foot the bill for social services that the employer should be paying for. I’ve always been puzzled by “liberals” that support illegal immigration. They are on the wrong side of this from the “I-hate-the-evil-corporations” standpoint. In fact, they really like cheap landscaping services, maid, and nanny services.

Another problem I can easily identify is other people (legal aliens, and citizens) opting out of paying for the health care system while at the same time relying on it via ER care. If you don’t have access to health care via an employer, it’s very expensive. So people who are on the edge (and even some rich, greedy folks), so to speak, just decide not to pay for health insurance, even though they will have access to it via emergency care. This should be addressed with a catastrophic health care payroll tax. Illegal immigrants and people who voluntarily or involuntarily “opt-out” of paying for their healthcare should not be allowed to be free-loaders (in the classical enconomic) sense any more. This is a clear tradgedy of the commons situation and needs to be addressed with federal intervention.

Another major problem is the whole “employer-provided” health care concept. People don’t see how much they are actually paying for health insurance. People also don’t see how much health care providers charge for services. Sure, you get explanation of benefits, but who really reads those? I know I don’t most of the time. People with health insurance just don’t have an incentive to keep costs down because they are shielded from those costs. The other big problem with this system is that insurance providers just have to sell corporate execs, they don’t have to provide good service. If you want health insurance, it’s almost always cheapest to get it through your employer — especially since it’s not tax deductible if you buy it yourself. So if you don’t like the service you get, it’s tough shit for you and the insurance companies know it.

My solution to these problems is very simple and requires only three things.

The first is the simplest. Make all healthcare expenses tax deductible for everyone, not just corporations. Why we put a 7.5% AGI minimum on deductible health care expenses is a mystery to me. There are Flexible Spending Accounts, but these are really just a bone thrown to plan administrators (insurance companies). Why do I need to commit a certain amount of dollars up front? Why should I have to try and guess what my medical expenses for the year will be and why shouldn’t the money roll over if I don’t spend it all? FSAs as currently structured are a joke. Just make all healthcare expenses tax deductible. Simple and effective with no corporate welfare thrown in.

Second, a new federal payroll tax that would fund catastrophic health care policies for all. If you have a job, you will pay this tax. You will pay it no matter how much you make and it will be the same rate for all people. I’m a firm believer in everyone paying some taxes no matter how little they make. Everyone that earns income (no matter how small) should have a stake in how the government spends tax money. The government will set minimum policy requirements and allow private insurers to offer policies. Each taxpayer will be able to select their policy of choice each year.

Third, lock-down the border and implement a real guest worker/immigration program. By lock down the border, I mean do whatever it takes to shut it down. If they have to build a fence and man it with machine gun-toting guards, fine. I’m tired of hearing how this is impossible and will cost too much. It’s quite possible and wouldn’t cost much at all. Do the math yourself and then compare your computed costs to the national budget. Now compare them to the cost of social services, education, and health care for those workers. Yes, you see it really is possible and not that expensive.

Now, by real guest work/immigration program I mean allow millions of people to work/immigrate/apply for citizenship a year. If there’s demand for 10 million cheap laborers, then do the paperwork and get 10 million cheap laborers here legally. I’m even for a path to citizenship. See, I’m not a racist. So don’t pull that tired argument out. I’m for law and order. I’m for screening out people with criminal backgrounds or contagious diseases. I’m for creating a non-exploitive environment for “undocumented workers” that isn’t a huge corporate subsidy. And notice that I’m not even mentioning terrorism here. This is a simple dollars and sense issue with the bonus of creating a less exploitive environment for manual laborers.

The sad thing is, I know I’m not the smartest person in the world. Not even close. In fact, I’m sure many of the people running for various offices, including the presidency could think of all this themselves. I’m sure they have. You could tweak the details of my plan to make it look more “liberal” or “conservative.” But the fundamentals are sound and plainly visible to anyone that looks at this problem with some care. We are paralyzed on this issue because of the special interests that would be hurt by this plan, namely health insurance companies, health care providers, corporations exploiting cheap labor, and hypoctritical, racist latino groups that promote illegal immigration to grow their power base.

What’s That Funny Smell — Helper and Util?!?

I’ve been coding a long time and something I’ve come to realize over the last several years is that if you can’t come up with a good name for the class you’re working on, you probably have an outstanding design issue that you aren’t aware of yet. If your class includes the phrase “helper” or “util” then you need to come up with a better name. If you can’t, you’ve got a problem or you’re not really doing OOD. I’ve encountered a lot of designs filled with “Helpers” and “Utils.” I’m even guilty of writing a few in the past. But I urge you, for the sake of fellow coders everywhere, to come up with a better name and/or better design. “Helper” and “Util” don’t really tell me anything about your class other than it’s very likely to exhibit low cohesion.

If you’re writing Helpers and Utils, I bet they’re filled with static methods too. ARG!! Static methods can’t be part of interfaces which means you’ve tightly coupled yourself to a specific class, not an interface. As a result, you can’t easily write unit tests nor can you substitute a differnet implementation without renaming classes. All ugly, very ugly!!! I implore you to stop writing static methods. Object creation is highly optimized nowadays. New X().Method() is likely to be almost as (if not as) fast as X.Method(). Not that you’d really want to use that, but I’m just trying to ease you away from the static members. You will want to inject an instance of X somewhere in your run-time object hierarchy.