After the tea: Where do we stand?

Yesterday, April 15, saw something that doesn’t happen often: thousands of people around the country participated in civil, voluntary, grass-roots protests that had no central organizer. (Eventually, the scattered groups did come together, but it’s far from a top-down organization.) If that’s not shocking enough, toss in the fact that the protests were largely in favor of personal liberty and freedom against a rapidly-growing interventionist government. Now you really know why history was made!

Now that it’s over, what does it mean for us, those Americans who feel that there is a great need to right the ship? If I was to speak for the group, this is what I’d say. My statements are followed by some historic quotes on the topics of freedom and liberty.

Nearly 50 years ago, an American President said, “Ask not what your country can do for you, but what you can do for your country.”

In that spirit, we, the vast majority of Americans, have taken responsibility for the needs of ourselves and our families. We have extended a helping hand to those who need help. We have lived our lives extolling the principles of good citizenship. We have expected nothing from our country save the opportunity for life, liberty, and the pursuit of happiness, unburdened by an overreaching, overextended government.

We have done our share. Despite that, our country’s leaders are failing us.

Today, we watch as many of our elected officials – those who should be representing us – fail in their oath to uphold the laws of our country. We watch as they take more and more of our money, through direct and indirect taxes and fees, and redistribute it in irresponsible ways. Where we struggled today to save for tomorrow, they irresponsibly spent their way into irresponsible levels of debt. Where we have sacrificed today’s pleasures for the safety and security of tomorrow’s children, they have fed their own political agendas and overinflated egos, and placed huge burdens on the shoulders of our country’s future generations.

Over the years, we, the responsible citizens, the true Americans, have stood quietly in hope that our government will see us – not another country – as the example of how to build a strong society. We have been ignored by career politicians who follow unproven scientific, economic, and social policies with religious fervor, blind to their own failures. We follow the rule of law as our government ignores it, and rewrites it, as if the Constitution was subject to ad hoc whims of interpretation.

In the past, we stood quietly. We stand quietly no more.

We the people are showing that we are united in our common beliefs. We the people believe in liberty. We the people believe in personal responsibility. We the people believe in the social and economic freedom of all mankind. We the people believe in the need to defend ourselves and to aid those who lack the freedom and liberty we take for granted.

We have tried, to no avail, to convince our elected representatives that an over-reaching state is not the solution. Yet history has proven time and time again that the principles of free minds and free markets, not Statism, have been the way towards liberty and prosperity.

There is only one way to return our country to the principles it was founded on and to the values we believe in: to return to a government of the people, by the people, and for the people. To take back our country, some among us must sacrifice our careers and take time away from our families in order to replace those in office who ignore us. Further to that, those that choose to represent us need our support, financially, socially, and at the ballot box.

Our battle to take back America, our country, and to defend our Constitution, will be fought using the most powerful weapons in the modern world: the pen, the spoken word, and the facts. The fight will not be easy, but we have the voice of the people on our side.  We will be victorious, for simple reason: we are Americans, this is our country, and we will take it back.

This is what we can do—and must do—for our country.

Every revolution was first a thought in one man’s mind.” – Ralph Waldo Emerson, American Poet

Believe you can and you’re halfway there.” – Theodore Roosevelt, 26th President of the United States

Those willing to give up a little liberty for a little security deserve neither security nor liberty.” – Benjamin Franklin, Founding Father of the United States

The Framers [of the Constitution] knew that free speech is the friend of change and revolution. But they also knew that it is always the deadliest enemy of tyranny.” – Hugo Black, American Jurist

Those who make peaceful revolution impossible, make violent revolution inevitable.” – John F. Kennedy, 35th President of the United States

Freedom is never more than one generation away from extinction. We didn’t pass it to our children in the bloodstream. It must be fought for, protected, and handed on for them to do the same.” – Ronald Reagan, 40th President of the United States

With malice toward none, with charity for all, with firmness in the right as God gives us to see the right, let us strive on to finish the work we are in; to bind up the nation’s wounds; to care for him who shall have borne the battle, and for his widow and his orphan – to do all which may achieve and cherish a just and lasting peace, among ourselves, and with all nations.” – Abraham Lincoln, 16th President of the United States

Code comments: the best defense need not be offensive

I just wrote a line of code, then added a comment before it.

//these tests don’t bubble up, so…

Then I thought, “Why am I commenting that? Isn’t the code’s intent explicit enough?” It is quite clear what the code is doing (resetting a test). However, the comment is necessary to give some insight into the business reason for the code.

The comment is useful because the instructions in the code may contradict the expected business logic. If the action (resetting the test) was expected, it would not be necessary to add the comment; that wasn’t the case for me.

This is an example of what I call a defensive comment. It helps avoid the situation where someone looks at code and wonders whether it is logically incorrect. That someone may be another programmer, or it may be yourself, months after you’ve forgotten why you wrote the code in the first place.

Lots of people say that code should be self-commenting. This doesn’t work in all situations. We shouldn’t fear a brief one-line comment to help give our code context and spoken-language meaning. Comments need not be offensive when used defensively.

Do you really mean it, Mr. Obama & Mr. Biden? If so, I’m your biggest fan!

A quote of Vice-President Joseph Biden from March 12 2009, via the Associated Press:

“Six months from now, if the verdict on this effort is that we’ve wasted the money, we built things that were unnecessary or we’ve done things that are legal but make no sense, then, folks, don’t look for any help from the federal government for a long while,” he said.

This was followed up by President Obama’s equally compelling statement during the same conference:

“If we see money being misspent, we’re going to put a stop to it.”

Mr. President and Mr. Vice-President, if you are honest about what is deemed wasteful and unnecessary and senseless, there is little doubt that significant portions of the $787 billion you reallocated will prove to be just that. This inconvenient truth (ahem) will hopefully stimulate you (ahem) to stop trying to have the federal government be everything to everyone.

However, after this is the case, will you also promise to stop taking so much of our earned income (via taxes) after you stop the federal government from trying to “help” us? After all, you probably wouldn’t need it any more.

One could only hope for such change (ahem).

Mocking indexed properties with Moq

A coworker of mine (who just got back from the Microsoft MVP events in Seattle, congrats, Matt!) has turned me on to using Moq, which I must say is an impressive mocking framework that has made unit testing notably easier.

Recently I had the need to mock the IRequest interface of the Castle MonoRail framework – specifically, two properties: the indexed property and the QueryString property, both of which expose a NameValueCollection.

I found some guidance on mocking the indexed property via Stack Overflow, which turned me on to the following solution.

var request = new Mock<IRequest>();
request.ExpectGet(r => r[It.Is<string>(x => x == "someName")]).Returns("someValue");

To mock the QueryString property took a different approach: create a NameValueCollection, add my test data to it, and wire the collection to the mocked object.

var request = new Mock<IRequest>();
var query = new NameValueCollection();
query.Add("someName", "someValue");
request.ExpectGet(r => r.QueryString).Returns(query);

With this, I can now pass my mocked IRequest to other classes, which will be able to access the following:

request["someName"] = "someValue";
request.QueryString["someName"] = "someValue";

In all, it makes unit testing web requests a lot easier!