Archive for July, 2008

Firefox gets Ogg

Wednesday, July 30th, 2008

Great news, Free Software fans! As of last night, out-of-the-box support for the Ogg Theora (video) and Ogg Vorbis (audio) open format codecs was enabled on the mainline Firefox development branch. Here’s the exact diff. These two codecs work in conjunction with the new <video> and <audio> tags, which will be supported in the next major release of Firefox, 3.1. If you’re feeling impatient, you can download the nightly 3.1 release which already includes the brand new Ogg codec support.

But what is the advantage of native browser support for the new tags, you may be wondering? The HTML 5 spec has lots of details, but what it boils down to is no longer having to rely on kludgy proprietary plugins like Flash or Quicktime (which often don’t work well cross-platform, I might add) to display multimedia content. The new tags work just like the current <img> tag does: feed them the URL to the appropriate media resource and they display it, just as simply as one might include a JPG image in a webpage. It’s such an obvious improvement over the previous state of affairs of dealing with online video that it really makes you wonder why it took so long. We’re several years into the online video revolution now (led by such giants as YouTube), so it’s only fair that we finally get native browser support for videos.

It’s important to point out that not only are the Ogg codecs free (as in both speech and beer) and unencumbered by patents, but that Ogg Theora’s performance has recently been significantly improved. It’s not quite as good as H.264, but it is better than many of the previous generation’s proprietary codecs, and it’s currently the best video codec around that is compatible with the Free Software philosophy. That’s why the Mozilla Foundation chose it to provide out-of-the-box video support in Firefox — all of the alternatives currently widely used for web video, such as flv, H.264, or DivX, are copyright and patent-encumbered, and thus could not be included in Firefox. It’s worth pointing out that Ogg Theora is also the only video codec allowed on all Wikimedia Foundation projects, including Wikipedia.

Not too long from now, after Firefox 3.1 is released, a significant double digit percentage of the web will have Ogg-enabled browsers. That will be a huge achievement for the Xiph.Org Foundation. Expect to see a lot more online video in the Free Software world, and hopefully a migration away from Flash video players, which I still can’t for the life of me get to work reliably in GNU/Linux. Once the <video> tag does start cropping up in a large number of places, will the competing browsers like Internet Explorer and Safari have any choice but to support it as well? Since all of the Ogg codecs are released under BSD-style — not GPL-style — licenses, there’s nothing stopping them!

The key to getting in the mood to write

Tuesday, July 29th, 2008

Wow, William McCamment hit the nail on the head with this one: The secret to getting into the mood to write is to start writing. In other words, writing creates the mood, it does not wait on it. I can definitely empathize with this maxim. Even when I generally don’t feel like I’m in the mood for writing, if I manage to force myself to start, the words flow out naturally after that. It’s thus pretty much like any other activity: overcoming your inherent laziness and actually starting to do something is the hardest part. A good example of this principle would be exercising. It’s hard to drag yourself to the gym, but once you start exercising, you see it through to the finish — say, an hour long workout.

The advice applies to all sorts of other activities, of course. Not feeling in the mood to get off your butt and do something productive? Just do it anyway. Once you start at it, you build enough momentum to see you through to the end. It’s just a problem of getting over that initial hump.

Man, I wish I had listened to this advice, say, ten years ago.

I have some advice of my own to add to this: if you have trouble doing anything regularly, commit to doing it on a strict schedule, and then keep to it. Once you get used to doing something regularly, it becomes much easier to keep doing it, through sheer force of inertia. For instance, I wasn’t able to really commit to working out regularly until I forced myself to do it every Monday through Thursday after work. And more to the point of the original advice, I wasn’t able to start blogging regularly until I committed myself to blogging every day. Now I haven’t quite kept that strict schedule (in particular, I’m apt to lapse a bit on weekends), but it works for the most part. I write nearly every day for this blog.

Abandoned blog post ideas, part 2

Tuesday, July 29th, 2008

Following my wildly successful blog post on abandoned blog ideas, part 1 (at least in terms of cleaning up my WordPress post drafts, anyway), I figure it’s time for part 2. The idea is exactly the same: I’m going through my old WordPress drafts, many of which are nothing more than an idea stored as a post title, and combining a bunch of them into a hodgepodge post. Don’t expect any cohesiveness to any of the following paragraphs. Here we go.

We had an office party a few months ago after work with beer and videogames. Some of my coworkers brought in their console gaming systems. One of my coworkers brought in Smash Brothers Melee, which had just been released for the Wii and was all the rage. I definitely wanted a chance to play it, but I didn’t end up doing so because a few other guys and I spent the entire night playing Rock Band. So, at least in terms of choosing between games I had never played before, Rock Band won out handily. It was a lot of fun — I don’t regret it!

I was idly thinking about things, as I often do, and I came up with the word “Secularium”. I’m not exactly sure what a secularium would be, but it sure sounds cool. Maybe it’s a non-religious counterpart to a place of worship, providing a sense of community and an appreciation for the natural world? The people running a secularium (Scientists? Humanists?) would definitely emphasize rational thinking and empiricism over the faith-based alternatives. Hrmm, maybe I should start one, as a sort of sane alternative to Unitarian Universalists.

This draft title sums up the idea completely: “Embarrassing events matter much less to others.” I saved it as a draft, stewed on it for a day, then realized I didn’t really have anything to add to it, because it’s so incredibly obvious. What I at first considered profound was merely germane. But I might as well re-tell the story that I reminded myself about in the draft notes, because it is mildly funny. In my sophomore year of college, one of my roommates was sitting at his computer in his boxers playing a game. My other roommate happened to have a female friend or two over. I noticed that my first roommate was “peeking out” of his boxers, if you will. I quietly informed him and he got all embarrassed about it (I don’t think the girls ever realized). But it was something that meant absolutely nothing to me, but was quite embarrassing to him, thus proving my thesis.

I was going to embark on a lengthy journey of backing up all of my data and then writing about how I did it, focusing on all of the tools that were used (GnuPG, rsync, tar, scp, K3b, mysqldump, etc.). But then I just got lazy and never got around to it. I still do back up my most essential data across multiple computers over time, but I’m simply not very organized about it, even though I maybe should be. And if my house does burn down, taking all of the computers with it, I would be facing significant losses. I do have enough free space on this webhost; maybe I should encrypt my files (to keep them away from prying eyes in the hosting company) and store them here?

I was playing this game for the Nintendo DS called “My Word Coach” regularly, and I thought I might get a good blog post out of it. But I eventually got bored of the game and the blog post never materialized. Now, I haven’t played it in many months. The fundamental problem with the game is that it’s just not a lot of fun. Granted, learning hundreds of new words in search of an expanded vocabulary is a noble goal, but when it feels like studying, it’s hard to get excited about it, and even harder to spend 15-30 minutes doing it each day. And the mini-games in it are very hit-and-miss, with some of them emphasizing spelling over meaning. I’m not studying for a spelling bee (the whole concept of which I find insipid), so what I really need to know is the meaning of the word. I’ll always be able to recognize a word whose meaning I know when I see it, and if I feel the need to use it in a written composition but don’t remember the exact spelling, I hear there’s this Internet thing where one can look up words with amazing efficiency. But if you’re a writer looking to expand your vocabulary, definitely check it out. I thought it was hilarious that I started out knowing 55% of the words in the game’s dictionary, as judged by an “entrance exam”, while one of the reviews I read had the guy starting at 20%. Ouch.

And finally, if I wasn’t being meta enough already, one of my old drafts was itself an idea to take old drafts and combine them into a single post. What are we, two layers deep now? At least I finally did get around to it.

All right, phew, down to 41 drafts now. This is becoming more manageable by the day.

McCain is coming off the rails, ball bearings flying everywhere

Monday, July 28th, 2008

New McCain Ad Bashes Obama for Not Visiting Troops Using Footage of Obama Visiting Troops.

There’s not much I can really add to that. If John McCain was running this campaign any more incompetently, he’d be better off handing the reins to a chimpanzee. Maybe he already should.

The past few days have seen so many dishonest attacks by McCain against Barack Obama — not visiting the troops, wanting to end the war for purely political reasons — that it really tarnishes that whole “Straight Talk Express” sheen he had going for him. Without that, what else can he possibly sell the American people on? The huge similarities between his positions and George W. Bush’s?

Why Mormons evangelize in twos: The power of pairs

Sunday, July 27th, 2008

Have you ever wondered why Mormons/Jehovah’s witnesses/etc. travel in pairs when they go door-to-door evangelizing? At first thought, you’d think it would be more efficient to split up and cover more ground. But they’ve clearly spent a lot of time thinking about it, because upon deeper examination, evangelizing in pairs is actually the optimal strategy. Here’s why.

If only one person was sent out evangelizing, they’d be at a numbers disadvantage. Even in the case of only a single person being home to talk to, that’s still even. Any discussion can easily turn into a back-and-forth argument. However, with two people, a lot of situations are two-on-one, in which the evangelizers fervently agree with each other and work as a team to convert the person they are speaking with. Group dynamics is a very powerful thing, and all it takes to get absurd views considered normal is a majority of the people present subscribing to them. It really cuts down on the power of counter-arguments if none of the other people in the room see any validity in them whatsoever, whereas a back-and-forth between two people feels a lot more equal.

Having the evangelizers work in pairs also prevents that most dreaded of situations for evangelizers, being ganged up on by those they would seek to convert. The odds of running into more than two adults on a typical evangelizing run are very small; after all, the nuclear family has been an American standard for three generations now — you have to go back to before World War II before you start seeing lots of extended families all living together.

Having the evangelizers in pairs also allows them to keep each other in check. A frequent situation encountered during evangelism is when a person of a different religious strike lets the evangelizers in for the sole purpose of trying to convert them to their own religion. Reverse-evangelism, if you will. If the evangelizers were sent out on their lonesome, they might possibly be vulnerable to a really convincing homeowner. With two of them to keep each other faithful, however, the odds drop to nearly zero. No member of a tightly-integrated pair would possibly want to appear religiously weak in front of their other.

Sending trios out evangelizing, on the other hand, would simply be overkill, and is not justified in terms of the reduced area that two trios can cover versus three pairs. Two really is the ideal number for evangelizing — large enough to achieve a majority or at least parity in nearly all cases, but also as small as possible so as to not waste human resources. That is why evangelizing in pairs is actually the optimal strategy, and is thus what nearly every organization that practices door-to-door evangelism settles on.

So the next time Mormons visit your house, at least pause to reflect on the elegant logic that led there to being exactly two people getting cursed at through your mail slot.

New anti-spam measures on this site

Friday, July 25th, 2008

I’ve switched from Akismet to Defensio for my spam-stopping needs here on this blog. The change should be transparent. If anything goes wrong, like if your comments are all of a sudden getting marked as spam, you know how to contact me.

I’ve made the switch to Defensio because I’ve heard some good things about it, and decided to give it a whirl. Akismet definitely wasn’t doing the best possible job, so hopefully Defensio will fare better.

Abandoned blog post ideas, pt. 1

Thursday, July 24th, 2008

I have fifty drafts sucking all the air out of my WordPress dashboard at the moment. Very few of them are ever likely to be developed into fully fledged blog posts, but I would feel kind of bad just deleting them outright. So I’m taking a bunch of the ideas and combining them into a hodge-podge post, hopefully for your reading pleasure. So, without further ado …

Workplaces are food sinks, in that if anyone has any extra food left over from a party or other event, they can bring it to work, set it down on a communal table in the kitchen, and it’ll be gone by the end of the day. Workplaces can thus absorb any of the extra food in a society that might otherwise be wasted. I’m not sure how I ever thought this tiny little insight would be expandable into a full blog post, but there it is.

In college, I was a part of an undergraduate research program that had a team of eight people writing a 100-page research paper over the course of three years. The paper was about an educational videogame that we wrote. We all thought that 100 page paper was a big deal at the time. Well, two months ago for work I wrote a 100 page paper over the course of a month with a single coworker. It required a comparable amount of research to the undergraduate research paper. It’s funny how relative ideas of what constitutes an involved assignment change so quickly following employment. I’m laughing at the thought that we ever considered a 100 page paper written by eight people over the course of three years to be a hard undertaking.

Many years ago, when I was still in high school, I took a photograph of the Great Falls section of the Potomac River on a camp field trip. Not too long after, I uploaded said photograph to Wikipedia for use in an article. All was well and good for awhile, until it was transferred to Wikimedia Commons (an image repository run by the Wikimedia Foundation) and the person effecting the move completely munged the image attribution. He attributed the photograph to a user who did nothing more than decrease the image quality by reducing the size of the image (an action which was later reverted). I understand that thousands of photographs are processed for transfer to Wikimedia Commons every month, but you really have to get the details correct! Put in the extra few minutes to carefully check the image’s history and verify that credit for it is actually going to the one who deserves it. I’ve since corrected the attribution on the image, but now I face the nuisance of regularly trawling through all of my uploads just to make sure none of them have been mistakenly attributed to someone else. Another complicating factor here is that only administrators can view deleted revisions, and the revision that established me as the content creator was deleted on Wikipedia. So I could see it and point out the error, but the average editor/reader cannot.

I have several computers participating in the Seventeen or Bust distributed computing project, the goal of which is to prove that 78,557 is the smallest Sierpinski number (it seems a much nobler goal if you understand the mathematics behind it, trust me). If you have any idle computing power, you should join it too. The attraction it offers versus most other distributed computing projects is that it has a finish line in sight. They only have five more primes to find (out of an original 17, hence the project name), and once they do, the project ends successfully. Compare that with, say, the Great Internet Mersenne Prime Search, which just keeps looking for larger and larger primes and thus never ends. The Seventeen or Bust project currently holds the record for having found the largest non-Mersenne prime.

I’m tired of pseudoscientific pablum on television, especially when it’s on otherwise respectable networks such as the History Channel. This kernel of an idea for a blog post was inspired by an especially heinous paranormal television show on the History Channel. Luckily, Phil Plait of Bad Astronomy and others are putting together a new television show called The Skeptologists that will provide a counterpoint to all of the pseudoscientific nonsense on television. Hopefully it makes it to air.

And last but not least, I was going to write an entire blog post about a freaking screwdriver. It was supposed to be a tongue-in-cheek ode to a great tool that my dad bought for me many years ago and that has served me well all throughout high school and college (and I couldn’t even begin to tell you how many computers it has taken apart and put together). One of my remarks in the draft notes that “Its orange color makes it easy to find”. But as I wrote more and more about it, the ode became more and more serious, and eventually I scrapped the whole blog post idea as being patently ridiculous. Unfortunately, this was not before I took multiple pictures of said screwdriver, one of which I present for your mocking scorn and frivolous amusement:

And with that, my WordPress drafts queue is down from 50 to 44. I should do this more often. If you think any of the above ideas could have merited a full blog post, by all means, let me know in the comments below. I’m not promising anything though. Hopefully with most of these you can see why I decided against expanding them into full blog posts.

Some excellent advice for budding writers

Wednesday, July 23rd, 2008

If you’re a budding writer, or even an established writer who still needs a bit of help, you should definitely check out the list of Ten Mistakes Writers Don’t See (But Can Easily Fix When They Do). I’m intellectually aware of the existence of all of these mistakes, but my ability to put them into practice varies wildly. I’ll go over the list of all ten and briefly discuss each one.

1. Repeats. I will admit to suffering from this problem, not so much the phrasing variety but definitely the word variety. I rely on certain useless words with far too much frequency. I’m especially thinking of the words “really” and “very”, which I use with such depressing regularity in first write-throughs of my sentences and then have to go back and excise. At least I’m aware of the problem though, and have been working to rectify it.

The biggest example of this problem in professional fiction I can think of was in a book by either Arthur C. Clarke or Robert A. Heinlein (sorry, I can’t remember which author or what book, but if you’ve ever read it you know exactly what I’m talking about). The word “presently” was overused to such a degree that it became immensely distracting. Pick any random sentence in that book and the odds are good it started with “Presently”. By contrast, you can go through entire novels by other people and never once run across that word. It’s not a good word. It doesn’t convey much information, and there are much better conjunctive phrases to be bandied about. I’m thinking whoever the editor of that book is was derelict in their duty.

2. Flat writing. I’m thankful that I don’t have this problem (or at least I don’t think I do). If anything, I have the opposite problem: language that is unnecessarily flowery. Regardless, I have a good eye for spotting flat prose, and as soon as I realize I’m producing some in my own work, I’m very quick to spice it up. Believe me, I hate writing sentences like “He parked in the lot, entered the grocery store, picked up some milk, eggs, and bread, and brought it to the register” just as much as you hate reading them.

3. Empty adverbs (such as actually, completely, totally, and literally). I like to think I’m decent at this one, and when I’m not it’s more for a lack of editing than an inability to spot them. I believe I acquired my eye for these guys during my time as an opinion columnist for The Diamondback. When you’re limited to 600–650 words and you have a lot you want to say, you get good at making every word count.

4. Phony dialogue. Yeouch, this one gets me all the time. It’s almost a given that the first draft of any dialogue I write is usually stilted. It’s like I’m making a framework for what I want the characters to be able to say, then I have to go back and actually make it sound like those characters are saying it. Otherwise, the dialogue is likely to come out sounding omniscient and in author’s voice.

A great example of phony dialogue that I saw recently was in the pilot episode of the television show The Secret Life of the American Teenager (don’t ask why I watched that). The show is about high schoolers, but the dialogue is way out of the league of anything teenagers actually say. One kid has a long string of witty repartees with his guidance counselor which actually has the guidance counselor looking like a bit of a fool. Two other students have a minutes long conversation on religion, abstinence before marriage, and sex that sounds like a back and forth one might hear in a debate. None of the students have their own voices; they all share the intellectual, grown-up voices of the script-writers, and it’s a major failing of the show. You’d think a show all about the supposed “secret lives” of teenagers would need to get the teenagers’ voices right, but alas, they didn’t manage.

Read the rest of this entry »

The good old days of American politics

Wednesday, July 23rd, 2008

Man, how I yearn for the good old days of American politics, back when pandering to piety wasn’t a requirement of all candidates. Think Robert Ingersoll could be nearly as successful today? He was politically active for decades, yet gave huge speeches in nearly every city of America deriding religion. He was called the Great Agnostic. Yet he was respected for his views, and an adviser to presidents and candidates alike. His presence was highly desired on the campaign trail.

If you think nothing like this could happen today, you’re probably right. Religion has taken over the public sphere a lot more since those days (despite what Christianist revisionist historians would have you believe), and now every candidate on a national level is forced to pander to all of this nonsense. Obama and McCain alike have made pilgrimages to receive the blessings of various pastors of megachurches. It’s enough to make you sick.

It’s also yet more proof that, out of all minority labels associated with a prospective candidate, “atheist” is the one most likely to dissuade the largest number of voters. That’s right, more Americans would vote for homosexuals, any given ethnic minority, Muslims, women, even felons, than atheists. And people wonder why our country is going downhill — maybe if you’d stop being as damned bigoted as our enemies then it wouldn’t be!

Code commenting: one of the casualties of outsourcing

Monday, July 21st, 2008

During college I worked as a computer programmer intern at the National Institute of Standards and Technology. I had the opportunity to work on all sorts of nifty cutting-edge physics simulations using some serious science. Unfortunately, everything was written in VB 6, C++ .NET, or Fortran, but you can’t have it all, and .NET is actually pretty decent compared to some of the alternatives.

One of the programs I worked on was originally written by a Korean researcher working at NIST, thus technically not making it outsourcing, but the problems I’m about to describe are relevant nonetheless. The code was rather hard to understand, especially the variable names, which followed some kind of naming convention that was completely foreign to me. Luckily, the code was actually decently commented. In Korean. Not that it would’ve helped me if I was able to read Korean, because sometime between the original writing of the code and when it got to me, all of the nice UTF-8 comments were corrupted down to ASCII-128. So they appeared as complete gibberish that wouldn’t be understandable by anyone — if you’ve ever viewed binary executable data as text, you know what I’m talking about.

My best guess is that another American maintenance programmer before me edited the program in an IDE that wasn’t set up to understand UTF-8. He must’ve not noticed when all of the nicely formatted Korean comments turned into gibberish — or maybe he didn’t care. Either way, by the time the comments got to me, they were thoroughly worthless. Well, not quite. Their presence at least alerted me to sections of the code that required extra attention, because they were generally non-trivial.

Code maintainability is thus one of the biggest casualties of outsourcing. If the coders you’re outsourcing to don’t speak English, or if they at least don’t bother to comment the code in English, you’ll be facing significantly higher code maintenance costs down the line. That’s just something to keep in mind. In the long run, you save money by hiring local programmers. At least that’s the official line I’m sticking with, seeing as how doing so directly benefits me (hey, did I ever say I wasn’t a biased blogger?).