Why I’m a Libertarian and Glenn Beck is Not

A while back, cporter commented on my blog:

My only issue with voting Libertarian is its longtime identity with drug legalisation advocacy, and its public persona of anarchist-leanings. I feel that this makes a libertarian unelectable, and therefore a wasted vote.

Take a look at the collateral damage from the Drug War and tell me why prohibition such a good idea? Watch episode after episode of Gangland and tell me why prohibition is such a good idea? Drug prohibition is simply a failed policy. It always has been and always will be.

Ya know, recently the bankrupt economic policies of the Republicans have become so glaringly obvious that even Glenn Beck thinks he’s a libertarian. He’s not. No way in hell is he a libertarian, except a libertarian-of-the-moment or a libertarian-of-convenience-so-long-as-republicans-are-doing-something-stupid.

I’m a libertarian (and a Libertarian) because they stick to their principles and don’t pull their punches. They come right out and say the honest truth, and America could use a little more of that in their politics instead of endless “Slick Willie Syndrome” and “Bush Derangement Syndrome” tit-for-tat name calling and hatred that all too often passes for informed commentary in our political sphere.

Anyone can take a principled stand when its butterflies and lollipops all over the political landscape. The true measure of a man’s character is when he stands up for the things he believes in and knows to be right, even when they aren’t popular. Sure, standing up for the end of drug prohibition isn’t a popular stance, but its failure is glaringly obvious to anyone other than the blind. That’s the damned honest truth and its about time we faced up to it.

[Update: Dealing With Drug Violence in Mexico]

Direct3D Programming Tip #4: Check All HRESULTs

Checking for errors is a good programming habit, but new programmers haven’t yet learned this habit. Most of the methods and functions you can call in Direct3D return an HRESULT, or a COM “handle to a result”, that indicates success or failure. Most of the time, your expectation is that these calls should succeed. This leads people to write “happy path” code that assumes that the call will succeed instead of verifying that it succeeded.

Read the rest of this entry »

Direct3D Programming Tip #3: Use Smart Pointers

Direct3D exposes functionality through COM interface pointers. Managing the reference counts on the obtained interfaces is a common problem for new Direct3D programmers. Managing the reference count on an interface becomes trivial if you use a smart pointer wrapper class, such as CComPtr<T> or boost::shared_ptr<T> and keep in mind the ownership policies established by the smart pointer class.

In addition to managing reference counts for you, smart pointers can make your code exception safe. When an exception is thrown, if an interface pointer is held within a CComPtr declared on the stack, then its destructor will be run when the stack is unwound. The destructor for CComPtr will call IUnknown::Release on any interface pointer it holds, thus cleaning up any locally obtained resources as the exception unwinds the stack to the nearest exception handler.

Read the rest of this entry »