Wednesday, September 9, 2009

Live Writer – First Impression

Well, for GG Hubble! I decided to give Microsoft’s Live Writer a swing. So as first impressions go, this really is quite first (I probably will never go into any depth because I don’t blog enough to do anything deep ;) ). Oh, and expect me to be excited about things that you might find mundane.

After telling the software that I already had a blog and entering my login info, it immediately downloaded various resources from the website and presented me with an editor:

Live Writer

As you can see, it determined the styles in use on my blog and formatted the editor to match. There’s a preview tab which, unlike Blogger’s preview, actually shows your new post as it will appear on the main blog page. As far as I can tell, everything else is pretty much self-explanatory.

I’m a bit surprised that it doesn’t use a ribbon, but I think the toolbar layout is something familiar to most web users. It reminds me of the various JavaScript WYSIWYG editors you see all over the web. The rest of the UI has sort of a Visual Studio meets Windows Explorer look about it which I find appealing.

I do wish that the source editor did syntax highlighting, but I don’t anticipate using the source editor much. Oh what’s this? “Add a plug-in…” I’ll have to check that out later.

Speaking of source, the code it outputs is fairly clean, semantic XHTML. It does get a tad defensive with some inline styles (only on the image so far), but there may be options or plugins to change that. I could edit it to use a custom class from the template if I wanted to.

So far I haven’t had to “fix” anything. With the blogger editor, I couldn’t get paragraphs to interact correctly, and constantly had to make minor source code adjustments. Oftentimes I’d simply give up and just write the HTML in another editor. Not anymore (so far)!

I always try to use proper Unicode code points for things like ellipses (… vs ... – three periods), quotes* (“angled” vs. "straight"), and apostrophes (don’t vs. don't). (Yes, I’ve got the windows ALT-# shortcuts for all these memorized.) Live writer does it for me!

Just before posting, I discovered the categories feature. It pulled all the tags I’ve used from blogger and included them with checkboxes.

So yeah, I’ll be using this for a while until something about it starts bugging me…


* I’ve often wished that early typewriter/computer character sets included angled quotes, if only for the sake of people who write programming/scripting language parsers.

GG Hubble!

I’ve been waiting with bated breath ever since the recent repair mission completed, and now we have pictures!

Thursday, August 13, 2009

Exceptional Logic

I’ve always felt that using exception handling for “normal” programming logic is a bit…dirty. Take the Access database I inherited at work for example. There are several UI modules in separate MDB files for various tasks like running reports, entering customers, sending mass mailings, etc. When one module needs to activate another module, the most straightforward method would be to check if the new module already open, then either open it or switch to the already open window. Instead, it blindly attempts to switch to the window and if there’s an error, it launches the module.

This is especially bothersome in VBA (Access’ scripting language) due to the way Basic handles errors. When you set an error handler (really just a glorified goto), all errors end up at the same point in your code, usually at the end of the function. This means that the code which launches a new window isn’t anywhere near the code that tries to switch to an existing window. I nearly gouged my eyes out when I first came across this.

And then there’s debugging… The Visual Basic debugger allows you to break on all exceptions whether handled or not. This comes in handy if you have a generic error handler which doesn’t provide enough information to track down the cause. By breaking on all exceptions you can find out exactly where the exception occurs and inspect the surrounding code. But if you are trying to debug code that activates another module, you’ll never be able to get past the initial exception when the module isn’t open.

That being said…

Here’s a really simple way to validate an e-mail address in .NET—no Regular Expressions or manual string parsing required:

try
{
  var test = System.Net.Mail.MailAddress(emailAddress);
}
catch (Exception)
{
  // email is invalid
}

Monday, August 10, 2009

This insanity has got to stop

If I posted links to every interesting article, video, etc. that I come across on a daily basis, this would be a much livelier place. However, something about it makes me feel a bit cheap. And usually the really good stuff is already so well cross-posted that I'd just be spamming your RSS feeds (as if anyone subscribes to my blog).

That being said... I can't adequately describe how much this story gets under my skin. Luckily PZ Myers can!

Monday, July 6, 2009

Dark Matter/Energy, Resolution of Spacetime, etc.

Warning: This is wild speculation from someone who probably doesn't know what he's talking about. Please link me to any resources that would set me straight. :)
Cliffs Notes: Could the possibility of a fundamental resolution to the universe explain dark matter/energy?
Something about the search for the nature of dark matter/energy has always bugged me. Every time I've seen the topic explored (and I admit I haven't done any really advanced reading on it), they've taken for granted that the dark matter is a real substance that we can potentially interact with, and that the dark energy is an actual force being exerted on normal matter. In some ways it reminds me of the search for the luminiferous aether. Has anyone seriously explored the possibility that it's an effect of some (simpler) underlying cause?
In my time playing around with computer graphics, I became quite familiar with various aliasing effects. These range from "jaggies" and Moiré patterns in the spatial realm, to strobe effects like reversed wheel rotation in the temporal realm. These artifacts are distracting to viewers, so we use antialiasing techniques to alleviate the problem. Jagged edges are smoothed by what essentially amounts to blurring. Moiré patterns succumb to anisotropic filtering. Temporal antialiasing, aka motion blur, is more explicit about its goal. There is a fundamental limit to the amount of information an image can store at a particular resolution. Antialiasing removes a bit of certainty about the original source in exchange for a boost in perceived resolution.
What if there's a similar story going on "under the hood" of the cosmos? The first time I considered this was when I learned about Planck <measurement>. To my compsci-biased mind, this struck me as a fundamental resolution and bit-width/dynamic range for the universe. The first thing I noticed was that the blurring effect of antialiasing is roughly analogous to the uncertainty principle, which deals with effects on the Planck scale.
Obviously this is a retcon for me. I was simply trying to put the realities of QM into terms I could easily understand. But to my surprise, there are a few ideas being seriously advanced that are along the same lines:
The holographic and cellular automata explanations would certainly vindicate my resolution idea, and the fractal universe is at least compatible. When I heard about the holographic universe on The Skeptic's Guide to the Universe (#183), it made me think a bit (har) more about the bit-width or dynamic range analogy. They discussed how gravity wave detectors weren't seeing gravity waves but were getting a fairly consistent noise they weren't expecting (reminded me--and the cast--of the CMBR's discovery). This could easily be explained as a bottoming out of the dynamic range of the gravity field. Since gravity gets weaker as you get further from the source, the ideas above suggest that it would effectively disappear at some point.
Now dark energy attempts to explain why the universe's expansion is accelerating in defiance of gravity. What if there is basically no gravity at the massive distances between galaxies? That would at least explain gravity's impotence. Perhaps the extra oomph comes from quantum fluctuations (rounding error?) in this gravitational dead zone.
Dark matter tries to explain the opposite effect. Galaxies should be flying apart given the amount of matter we can detect inside them. What's holding them together? I haven't explored this idea in as much depth, but it seems like the resolution/dynamic range ideas could help explain this extra cohesiveness. Perhaps some of the resolution errors at the small scale create significant effects at the large scale. Maybe the dark energy effect is also "pushing" inwards over a large scale that isn't noticeable in the small scale.
Again, this is all wild speculation on my part. It's a fun exercise for my gray matter, but if it's all in vain, I'd rather turn my attention elsewhere. Let me know what you think.

Friday, April 17, 2009

Correcting Misperceptions About Libertarianism

As posted on the Richard Dawkins forums (click the post title to visit the thread)


When I joined this “clear-thinking oasis” late last year, I was shocked to see such strong negative reactions to those of us advocating a libertarian position. The first couple incarnations of “How Bad is Socialism Anyway?” are rife with personal attacks triggered by nothing more than a statement of a political belief.

The more I involved myself in the discussion, the more I realized the vitriol was coming from unabashed prejudice. Even just mentioning the L word is enough to send some people into a tizzy. Once you’re tagged as a libertarian, it seems everything you say is sent through a distortion filter in these people’s minds. I’ve seen some seriously deluded people on this forum treated with more respect than libertarians.

I spent some time reflecting on and refining my own views and came back to the conversation about a week ago. With my new outlook I was pretty optimistic that I’d be able to garner a warmer reception. At least we could have some polite conversation even if they disagreed. No such luck. As soon as I indicated libertarian leanings, I was immediately subjected to the same vitriol as before. But this time I was able to examine it more carefully, and I started to see some patterns behind the reactions.

The more I argued, the more I realized I was pointing out an awful lot of straw man fallacies. When I actually managed to chip away some of the barriers to communication, I found that many people hold an extraordinarily distorted perception of what it means to be libertarian. I don’t know where the blame lies for this problem. Could it be lack of exposure? Could it be lack of investigation? Could it simply be something that’s been passed down relatively uncontested through the years? Who knows? What I do know is that challenging these misperceptions can only help to bring rational discourse back to the forefront.

The negative connotations around the word “libertarian” cause the same sorts of problems you see with the word “atheist.” Nearly every atheist in my youtube subscriptions has at least one detailed explanation of exactly what it means to be an atheist. This is because you can’t even begin to have a polite, rational conversation about atheism until people understand what you mean. The darker side of this is that people become hesitant to apply the label to themselves even if they fit the description. “I don’t really believe, but I don’t disbelieve so I’m neither atheist nor theist.” This is exactly how frustrating it is to deal with anti-libertarian prejudice.

Enough of my rant. Here are the misconceptions I have for you so far.

Libertarians are extremists

This is as silly as saying liberals are extremists or conservatives are extremists. Libertarianism is a category of political beliefs which places emphasis on liberty in both economic and personal pursuits, and attempts to keep the scope of government to a minimum. To be considered a libertarian, your political views simply need to lean in this direction more than in another. The chart used by The World’s Smallest Political Quiz gives a pretty good approximation of where libertarians place themselves on the political landscape.

Of course, there are libertarian extremists, but this is no more significant than that there are left-wing and right-wing extremists. Libertarian extremists may sometimes be seen as more extreme than other extremists, but this is really just a side effect of the fact that most people are so unfamiliar with libertarianism to begin with.

Libertarians are fundamentalists

As with extremism, some are, some aren’t. Strict adherence to the principle of minimum government would imply that every libertarian is an anarcho-capitalist. Many of their prominent figures and “role models” fit this description, but isn’t the same true for most other political philosophies? Moderate socialists still draw upon Marx even if they don’t agree with full-on communism. The idea here is persuasion with strong rhetoric, with pragmatism taking a back seat.

But this distracts us from the simple fact that not every libertarian is a fundie. Most of the libertarians I’ve met in person are a bit more left-leaning and minarchist rather than anarcho-capitalist. Again, libertarianism is a classification for a range of political views, not a strict set of criteria.

Libertarians are religiously motivated

I’ll be honest here. This was something I had blocked from my perception when I was deeply involved in the libertarian movement. I was raised practically anti-theist (though definitely pro-woo... luckily I grew out of that at a young age) so religion has never been a big part of my life. It didn’t strike me as significant that so many libertarians had strong religious views. But this also meant that I developed my own appreciation for libertarianism without this sectarian influence.

And that alone proves my point. There is nothing inherently religious about Libertarianism. Some people may be motivated by religious influences, but that doesn’t automatically discredit the philosophy.

Libertarians are dogmatically motivated

Some are, some aren’t (see a pattern? ;) ). I was when I was young. One of my childhood role models expressed his view of rights in a simple sentence: “You have the right to do anything you want as long as you do not infringe upon the life, liberty, or property of others.” This stuck with me through my high school years when I identified myself as “practically communist.” When I became interested in politics, I realized that communism wasn’t exactly compatible with this principle I held so dear. My first economics class was what finally did me in. Between learning about how economies actually work and investigating libertarianism after a fellow student asked about the teacher’s political orientation, I was hooked.

The dogma got me in, but the thing is, there are piles of literature justifying libertarianism in myriad ways. From utilitarian, to philosophical, to religious, to rationalist. Even when the literature is marginally well-known, though, it may not be well-understood (hence many of these misconceptions).

Libertarians are greedy

There are several reasons for believing this. Libertarian literature often uses the term “self-interest” in a positive light, and many people equate this with greed. However, the two terms have a specific differentiation: greed is acting in self-interest without regard for the rights of others. Libertarians believe that acting in self-interest generally promotes win-win situations. But acting greedily creates win-lose situations.

Another problem is that greed is associated with free-market capitalism (addressed next), so libertarians are guilty by association.

But the real problem is in the nature of the misconception itself: you’re making a statement about an individual’s personality based on their view of how the government should be structured. This is a blatant non sequitur. A libertarian could be the most generous person in the world and still believe that the state shouldn’t be providing universal health care. Libertarians simply feel generosity is better manifested by giving away your own money rather than giving away other people’s money.*

“Libertarianism” = “Unregulated free-market capitalism”

This isn’t a misconception so much as it is a misrepresentation (intentional or otherwise). Yes, libertarians do support deregulation and free-market capitalism, but making this statement gives a few false impressions.

First: There are plenty of perfectly rational defenses of free-market capitalism, even from non-libertarian types. This isn’t the place to get into that discussion though. ;)

Second: Many people assume everything about our current capitalist system would stay the same except for the regulations, therefore corporate greed and excess would be the new law of the land. I agree that if we suddenly dropped all regulations, all hell would break loose. However this ignores several important factors. All the power corporations have is derived from the government. The very idea of a corporation is a legally fictitious person, independent of the individuals who own it. Combine this government fiat with limited liability and you have a recipe for disaster. Another aspect of corporate excess is their grip on the government via lobbyists. With a libertarian system, the government wouldn’t have enough power to make it worth their while. These are just a couple examples. Regardless of whether you agree with them or not, I hope you can see we’re not dreaming dreams of sweat shops, dormitories, and oppressed masses.

Finally, and most importantly: Deregulation and free-market capitalism are conclusions drawn from a libertarian starting point, not core ideologies of the libertarian position. The core of libertarianism is minimizing the interference of government in the lives of its citizens. Capitalism is simply an emergent property of human interaction given the rights to liberty and property. Minimizing regulations follows from minimizing government interference.

Libertarians are all alike

This may seem a bit redundant, but I really feel it’s necessary to drive this point home. I’m sick and tired of being cornered into a little box and having to blow down straw man after straw man over many pages just to get in one meaningful argument. We are not just a mindless herd of sheeple. We are all individual people with unique thoughts, feelings, and motivations behind our libertarian beliefs. It’s been said that a libertarian is simply a liberal who understands economics. It’s been said that a libertarian is simply a conservative who’s had his ass kicked by a cop. All a libertarian really is is someone who values freedom over government interference, whatever their reasons may be.


* In fact, by some objective measures, libertarians (fiscal conservatives, in this case) are MORE generous than their liberal counterparts.

Thursday, February 26, 2009

Sheeple Report 1

In order to give my rants a bit of consistency, I’m starting a new series of posts called Sheeple Reports. A large part of skeptical inquiry is pointing out the blind following of numerous trends from religion to homeopathy. Sheeple Reports will give me a chance to vent my frustration in dealing with the various followers all around me. First on the agenda is an update to my previous snippet of frustration:

_____’s boys are still super congested and coughing horribly, but praise God they’re in good moods!

Yes, praise God for smiting my children with illness but having the decency to keep their spirits up. Such a merciful, loving god. Oh but wait… Them being sick is all part of His plan, of course. So, what if they were miserable? Would you still be praising the Lord who made them suffer in the first place? Just goes to show there’s no room for honesty in religion. Hypocrisy is the rule.

Thankfully (to the outcome, not to some mystical cause of the outcome), the children are beginning to feel better. Less-than-thankfully, as you might have anticipated, the mother is thankful to some mystical cause of the outcome (you know, the same mystical cause of the problem itself):

_____’s boys are starting to get better! Thank you, Lord!

I’m trying to think of the best way to describe the image of God she’s painting here. Münchausen Syndrome by Proxy seems to fit pretty well. This megalomaniacal being manifests illness in His children for the sole purpose of curing them and “earning” the praise of His other children. Yeah, I really want to worship Him now…

Next up we have someone who sadly confuses his own inner strength with that of God:

“Even the youths shall faint and be weary, And the young men shall utterly fall, But those who wait on the LORD Shall renew their strength; They shall mount up with wings like eagles, They shall run and not be weary, They shall walk and not faint.” - Isaiah 40:30,31

Tonight after youth group I went to the gym and got on one of the recumbent-style exercise bikes and started going (Level 12ish, kept it to about 80 rpm). Had my iPod blasting worship music by Everybodyduck. My first goal was 20 minutes or five miles, whichever came second. At 17 minutes (about four and a quarter miles), both calves started quivering; threatening to cramp at any moment. I closed my eyes, grunted once, and recited the verses above to myself. I then prayed, “Lord, please be my strength. I know you are made perfect in my weakness. Let me get to 10 miles.” At about 19 minutes, I made it to five miles and kept going. At 22 minutes, my legs started hurting a little more. I noticed my legs were hurting more when there was slack in the peddling, so I bumped up the level to 15 to keep constant resistance against my legs and pressed on. For the last mile and a half, I closed my eyes, tuned out everything and just focused on the worship songs. I finally hit 10 miles at 35:06 minutes. Pressed the cool down button and continued peddling for another 5 minutes at Level 3. In all, I went 10.94 miles in 40:06 minutes and not once did my calves go into full-blown cramping.

Yay God!

Why are you selling yourself so short? I guarantee you it’s not the prayer itself that did the trick. Here, I’ll highlight the key phrase from your note:

For the last mile and a half, I closed my eyes, tuned out everything and just focused

Any time you do that—whether it’s focusing on a prayer from the bible, visualizing some new-age imaginary energy field around your body, or listening to the violent and misogynistic lyrics of some hard metal band that you happen to enjoy—you’re going to discover an inner strength without any intervention from a divine being. Ask yourself a few questions:

  • What makes you so certain you would’ve cramped in the first place?
  • What if you had been reciting any other passage from the bible?
  • Why would God even care about something so trivial as exercise cramps when people have been praying for far more worthy goals for millennia?
  • Why won’t God heal amputees?