Archive for December, 2004

Um…

December 22nd 2004

Gervase Markham, a Mozilla programmer, has an interesting viewpoint on macro-evolution. Basically, he is trying to say that although evolution as a process is pretty much not in dispute, that doesn’t mean you can just work backwards and say that evolution is how life came to be on this Earth.

Like Gerv, I’m a Christian, which is relatively rare for those in the computer programming field. However, I’ve had little trouble through my years reconciling my faith in God and Jesus with what we know regarding the nature of life. One of the things that has helped me was an excellent book my roommate let me borrow, Finding Darwin’s God.

First off, I think that we need to understand that whatever theories scientists can come up with regarding the creation of life, it’s going to be necessarily separate from evolution. Evolution is just a filter, that rewards types of life that are more suited to their environment than others. It’s just statistics taking its course over time, and as such requires that there be life beforehand. However, what evolution does for theories regarding the creation of life is that it drastically lowers the bounds for the creation process. Creation doesn’t have to involve starting with nice cuddly animals and fish, or even anything we call alive. It merely has to be something that can reproduce.

The current scientific theory regarding this seems to be the RNA world hypothesis, which essentially claims that the first self-reproducing chemical component was RNA (a nucleic acid, found in every living thing) which was formed in the turbulent conditions on primordial Earth. This RNA strand couldn’t reproduce by itself, but in combination with another strand would be able to duplicate limitlessly. So, this requires that two different, but compatible RNA strands manage to form, and come into contact, with conditions suitable to reproducing, before the strands are broken back down by cosmic rays. And this doesn’t even include such niceties are forming the cellular membrane, and turning from something akin to a virus into an actual living, metabolizing organism. But then again, however implausible it sounds, it could happen, and it’s not a horrible stretch to imagine that over 2 billion years, it would have happened somewhere, and stuck. Of course, the RNA hypothesis could be completely wrong. But my point is that it’s not a huge leap to get from a primordial goo into something that evolution could work on.

Gervase has a 3-point definition of a doctrine, which is what he says both macro-evolution and Christianity are. Or in other words, if you’re a Christian, you have no place even thinking that macro-evolution could be true. Here are his points:

  1. It’s a basic position that you hold about the nature of reality that’s not provable - it’s a faith position.
  2. It’s something that you put your trust in, and live your life on the basis of.
  3. It’s something you urge others to believe as the truth.

Gervase says that the idea of macro-evolution is something that can’t be proven (point 1). But that’s not true, I can think of an experiment right now that can prove it: Recreate a pool or something which simulates the conditions on primordial Earth, based on what we know of astronomy and geology. This can include weird oceans composed of nitrogen or whatever, meteors falling, cosmic rays, amino acids, the works. Then just sit and wait until you see signs of something reproducing. Remember than once we have something that can reproduce, natural selection can take over. Cosmic rays can provide the mutations, and a bad mutation mean no more reproducing strands. Of course, you may have to wait a while. Judging from geology, you may have to wait 2 billion years. But if you do glimpse something like this, you’ve effectively proven the RNA hypothesis.

He also claims that macro-evolution is something people put their trust in, and use to live their life by. The first part of that is true by definition for those who think macro-evolution is true, but the second is just laughable. There is no God of the macro-evolutionists, and thinking that macro-evolution is true is hardly what I think of when I hear the word religion. In the end, it’s just another theory. I must say I’m surprised to have read that argument from someone of Gervase’s intelligence, as it could have been as easily applied to Copernicus and Newton. After all, Newton claimed that gravitation was a universal force, but for all we know there could be a planet floating out there somewhere that doesn’t obey the laws of gravitation, and so since we can’t prove gravity is universal, you shouldn’t put your faith in it. :P

Finally, he claims that macro-evolutionists are, to be blunt, evangelizing their religion. I’ll remember this next time one of those annoying Darwin’s Witnesses comes knock, knock, knocking on my door at 8 in the morning, trying to pawn off one of their cheesy Books of the Cosmic Chemical Incarnation.

Now, my personal opinion is that God was in some way (if not directly) responsible for the creation of life on this planet. Exactly how he did it doesn’t concern me, and I can’t see why it should concern anyone else either. I’m not so proud that my life would lose meaning if it turned out that my immediate ancestor 5 billion years ago were 2 RNA strands that got together thanks to a rude meteor knocking them together. The way I see it, if God saw fit to make the universe look 10 billion years old, and to make it look like life started at the very tiniest bacterial stage, who am I to argue? The most perfect creations are the ones that you can set in motion, and never have to touch again.

In fact, I consider it an affront to God’s wisdom and powers when I hear people try to say that God created man and woman *POOF*, just like that. Think about it: Which would be harder to do for a being of limitless (or very near limitless) power, designing a creature on a sedentary rock that you just special-made, or creating this BIG HUGE EXPLOSION that created a Universe which was just PERFECT, with all of the forces balanced just so. This Universe doesn’t cave in on itself, it doesn’t fly apart, it’s not too hot, or too cold. In fact, everything about the Universe is perfectly set for the creation of life, and sure enough, here we are today. We can build robots and talking games and computers that can beat chess grandmasters, yet we can’t predict the weather 3 days out. I think that taking an action which would, 15 billion years later, lead to intelligent life is about the most awe-inspiring feat of ingenuity that I can imagine, and is certainly befitting a being of God’s (and only God’s) incredible skill.

Posted by mpyne under Uncategorized | No Comments »

To those of you running web servers…

December 22nd 2004

… you may want to double-check your PHP-using programs, such as phpBB. There is a worm going around the Internet which uses Google to search for phpBB-using sites and then deface them automatically. The security flaw itself is a mixture of the recent major PHP vulnerabilities and the so-called highlight bug in versions of phpBB prior to 2.0.11.

The PHP bugs themselves are serious enough that you should double-check any PHP scripts you’ve written that are accessible to the Internet, especially if they use the unserialize() or realpath() functions.


Also, some people have e-mailed me about my recent DV to DVD post. The author of Kino has informed me that it can do most of what I need to do (I’ll get it installed one way or another, I promise!), while someone else has mentioned a program someone wrote to encode any mplayer-playable movie to DVD, called mkdvd. I haven’t been able to try either one, but it’s probably better than using my long and boring walkthrough of failure. ;-)

Posted by mpyne under Uncategorized | No Comments »

Cool archive

December 20th 2004

I found an archive yesterday of “speed runs” through different video games. It’s quite amazing actually, and there are different types of movies. There are people who try to beat the game in the quickest possible time, and others who try to collect all items and finish the game in the quickest time.

Some movies are by people who restrict themselves to things you can do in the game (i.e., no cheats or glitches), some take advantage of glitches but don’t use cheating devices like the Game Shark, and still others play the game on their computer using an emulator to try for frame-by-frame precision.

A few of my favorites that I’ve seen so far are:

There are also speed runs for Half Life (which I’ve been meaning to watch) and Halo, among many others.

Posted by mpyne under Uncategorized | No Comments »

Digital Video to DVD encoding under Linux

December 18th 2004

There are a few things where Linux is truly not ready to go. Converting video from a DV-capable digital camcorder to DVD is one of them.

I’ve been struggling with this for almost the past week. The biggest problem is that it generally takes too long to encode the video. This isn’t helped by the fact that you can’t just generate a 10-second test clip and see how it plays, since the encoding process may mess up later, so you need to test the whole file. However, I almost understand the process now, so I’m going to try to describe it in a step-by-step fashion. Note that I’m assuming NTSC formatting here (used in the U.S. and Japan, but not in Europe), and that since I’ve been having trouble, you may not want to mirror my steps too closely. ;-)

  1. If your computer doesn’t have a FireWire card, go get one. USB (even at 2.0) is just not suited for this kind of thing, and USB-capable DV camcorders generally require some crappy Windows program to work anyways.
  2. You will also need to make sure your kernel is Fire-Wire enabled (look for IEEE1394 in your kernel config). It may already have FireWire configured in. If so, you’ll probably have modules named ieee1394 and ohci1394 in your lsmod output.
  3. If you are not using DevFS (or udev, but I haven’t tested that), you need to make sure you create /dev/ieee1394. Note that it isn’t a device file, but a directory hierarchy, I’m not sure how exactly to create it if you don’t already have it after plugging in your digital camcorder.
  4. Also, you’re going to need a lot of hard drive space. And you’re almost assuredly going to require large file support in both your kernel and glibc, and basically any other software you might be using on the video files.
  5. Now you need to dump the video from your digital camcorder to your hard drive. There are apparently a few programs that can do this, including Kino, a GTK+-based video editor. I wasn’t able to use it since it wasn’t able to compile for some reason, but the command-line tool called dvgrab works just as well. It is by the same author, and available at the Kino site.
  6. dvgrab is more or less easy to use, although you will want to consult the man pages for it. You’ll probably want to export to the DV2 format (–format dv2) using OpenDML (–opendml). You can use the –duration command line option to capture only a given number of minutes of video, although you’ll need to fast foward or rewind to the start position manually first. dvgrab can also automatically split files if they grow too large, but this has annoyed me more than anything else, so I don’t use that. This process happens in real time, so if you’re capturing an hour of video, expect to have dvgrab running for an hour.
  7. If you’re like me, you’ll have a rather large .avi file after performing the capture. For example, a 47 minute video I have is 11277964172 bytes (11 gigabytes) large. Yikes! But whatever you do, as long as the capture process was successfu, don’t delete this file until you are positive your DVD is correct and playable.
  8. Now, you have some options. The general gist of what you’re going to do next is that you are going to be converting the video in the .avi file to MPEG 2, the DVD standard video format, with an extension of .m2v. You’ll be converting the audio in the .avi file to either MPEG Layer II (.mp2, not .mp3) or AC3, both of which are supported by DVD players. You’re going to have a pretty wide collection of encoders/decoders/transcoders at your disposal, none of which will work quite right if you have my luck.

    Some programs you can look at are:

    • Transcode, which can convert the audio and video streams of a movie simultaneously to a different format. If this program works for you, I would recommend using it. I was never able to get it to work quite right however.
    • mjpegtools. You’ll probably need these installed anyways, but this collection includes a bunch of command line utilities you can use, including the very descriptively named lav2yuv, lav2mpeg, and jpeg2yuv.
    • ffmpeg. You’ll probably also need this installed, as it provides libavcodec, and can be used to encode to AC3 if you’d like.
    • tooLAME. This is a MP2 encoder (there is also mp2enc, but it is essentially the MPEG reference encoder). MP2 apparently is the recommended audio format for DVD if you have no special requirements (like 5.1 audio) that would dictate AC3. It’s also much easier to use tooLAME than ffmpeg natively.
    • mplayer. This Linux media player includes a mode to output video and audio to separate files, and the video can be output in a format which is ready to convert. You can use this to encode practically any movie that you can play with mplayer, and is what I’ve ended up sticking with. Also, mplayer includes the mencoder tool which can be used to fix some kinds of damage in AVI files that may lead to a bad encoding.
    • xine. You’re going to need this to test the DVD before you burn it.
  9. Anyways… assuming that you have dumped your DV into a file called foo.avi, the first thing you should do is try playing it. I used mplayer, and you don’t really have to watch the whole video, but you should skip through it at least, and pay attention to the mplayer debugging output. If you see things such as mplayer complaining about the interlacing, or that there’s no index, you should use mencoder to fix the file.
    $ mv foo.avi foo-broken.avi
    $ mencoder -idx foo-broken.avi -ovc copy -oac copy -o foo.avi
  10. Now you should separate the audio and video streams of the DV avi. You can also use mplayer for this (and if you want, you can even take care of encoding the audio and video before it hits the disk, but let’s keep it simple).
    $ mplayer -vo yuv4mpeg -ao pcm -aofile foo-audio.pcm foo.avi
    The audio will be in a file called foo-audio.pcm, and the video will be in a file called stream.yuv.
  11. Then you need to convert the audio and video into their encoded variants.
    $ toolame -s 48 foo-audio.pcm foo-audio.mp2
    The audio is encoded at 48000 Hz, which seems to be the standard for DVD.

    $ cat stream.yuv | mpeg2enc -F 1 -f 8 -I 1 -a 2 -n n -o foo-video.m2v
    The video is encoded at NTSC frame rate and aspect ratio, and is ready to be converted later using dvdauthor. Note that if you get errors in the resulting DVD, you may need to play around with this command by tweaking the interlacing settings. Note also that this command will take a long time to complete.

  12. Assuming that everything went successfully, you need to reintegrate the audio and video streams. This is done using the mplex command.
    $ mplex -f 8 -o foo.mpg foo-video.m2v foo-audio.mp2
  13. Of course, you’re not done yet. The .mpg file has to be DVD-ified. The tool to do this is dvdauthor. It uses an XML file for its configuration, so I’m just going to say see the website. The XML isn’t that difficult if all you need is a single movie on the DVD with no menus. Assuming the XML is dvdauthor.xml, and that the XML specifies an output directory of foo-dvd:
    $ dvdauthor -x dvdauthor.xml
  14. You can now use xine to test the DVD, by running:
    $ xine dvd:/exact/freakin/path/to/dvd/
    Note that the path ends in ‘/’ as well.
  15. If everything is working good, use mkisofs to make a .iso:
    $ mkisofs -dvd-video -o foo-dvd.iso foo-dvd
  16. Once you have the .iso, you can burn it using growisofs:
    $ growisofs -dvd-compat -Z /dev/dvd=/path/to/foo-dvd.iso
    Of course, you may need to replace /dev/dvd with whatever the appropriate path is to your DVD drive.

There are a few GUI tools being developed to try to make all this easier, including Q DVD Author and a Java-based tool, Varsha. However, this whole experience has made me realize why it is that Macintosh is popular in the multimedia industry, as all this would be easy on Macintosh. :-(

Posted by mpyne under Uncategorized | No Comments »

Ad I saw a few days ago

December 17th 2004

As seen on a billboard on St. John’s Bluff Rd., slightly south of Beach Blvd (in Jacksonville).

Teenage drinking is down
Teenage substance abuse is down
Teenage responsibility is UP

And some people thought abstinence education wouldn’t work.

It kind of blows my mind. I didn’t know that telling kids to keep their pants on would magically make them stop drinking and using drugs. Although I find it weird that the billboard didn’t mention teenage pregnancy or rape. I suppose we should assume those both went up under abstinence education. :-(

Posted by mpyne under Uncategorized | No Comments »

Wow

December 17th 2004

These are my grades from the last 4 classes I took before graduating:

Course Description Final Grade Comments
CEN4516/018 Networks & Distributed Processing B
CIS4301 User Interface Design A
COP4610 Operating Systems A This was the class where I found a security bug in the given assignment.
COP4710 Database Modeling A I had been expecting a C or B- earlier in the semester, but apparently it was just a trial to separate the wheat from the chaff, as the professor grew considerly less strict the last half of the class, and our group’s spectacular performance on the SQL engine I was complaining about last month really helped as well.

Although the good performance helped my overall GPA, the B I earned in Networks cost me promotion from cum laude to magna cum laude, as I missed the mark by 0.01 GPA points. Oh well, it’s not like the Navy cares. =D

Posted by mpyne under Uncategorized | No Comments »

Little tin cans

December 15th 2004

Had my first accident where I was at fault today. This also happened in the Aveo, so I’ve created a new category in my blog since apparently I’m going to be writing a few something-bad-happened-in-my-Chevy stories.

Anyways, we were driving down to Ponte Vedra and we came upon some construction. I didn’t realize it was construction until after the accident, but oh well. The truck in front of me had stopped, and I assumed it was due to a red light. When he started moving again, so did I, but I made the error of looking down for a brief moment to grab my sunglasses. When I looked up, the truck was no longer moving, so I slammed on my brakes, but I ended up hitting the hitch on the back of the truck.

The collision was at a very low speed, and luckily the other driver took no damage. Unfortunately, the Aveo is apparently made from aluminum foil with plastic paneling, as the front bumper looked like someone had poked a spear right through the middle of the bumper. The force of the 3 MPH collision was also enough to pop some of the braces connecting the front bumper to the body, and to bend the metal rebar behind the bumper. One mitigating factor for Chevrolet is that I hit the cross-sectional area of a fist, not another bumper, so I’m not surprised that my car took damage.

There was an officer already there, supervising the construction or something, and she said that I was the third accident to happen there in as many hours. Not that I’m surprised or anything. A traffic patrol officer showed up within minutes, and he let me off without a ticket since neither of us wanted to report an insurance claim, and since the damage was minor. The fact that I wasn’t a big jerk about the whole thing probably helped too. ;-)

Unfortunately, although the damage was minor, both the bumper and the rebar supporting the bumper need to be replaced. The initial estimates are from $600-$700, which will be clarified after the mechanic has removed the bumper and checked for other damage. If it wasn’t for the fact that the bumper had popped some of the pieces connecting it to the body I would probably just let it be since there is still no engine trouble even after all that has happened to the Aveo. However I’m afraid the bumper will fall off later or something if I don’t get it fixed, so I’m gonna just cough it up and pay for my mistake.

Posted by mpyne under Uncategorized | No Comments »

Graduation Update

December 13th 2004

The graduation went well enough. I got to the University Arena early and met in the back to get ready, and get my name card filled out. I managed to get into the right line 15 minutes before the ceremony (the College of Arts and Sciences had a huge sign next to their hallway which dumps right into the meeting room, whereas you had to go through a few unmarked doors to get to my College’s line).

After that, I got stand up for 10 minutes, then sit down for another 20 listening to speech after speech, after which our row got up to get our fake diplomas. We then sat down for another hour and a half or so, and the ceremony was finally over and we were able to go.

We went to Olive Garden to eat after waiting a half hour for my sister-in-law’s boyfriend to come home from work. Once at the Olive Garden, we had to wait another 45 minutes or so just to get inside the restaurant. The food and service was both excellent however, at a nice price point, so I guess I shouldn’t complain too much.

There was still a lot of time left in the night, so my sister-in-law and her boyfriend accompanied me and my wife home. There we played Trivial Pursuit, and I finally won after 3 or 4 hours. On that note, Trivial Pursuit isn’t my favorite game ever. After that we played Donkey Konga, which was so fun that our guests didn’t leave until around 5:30 in the morning.

Since then I’ve tried out the updated gstreamer plugin by Chris Lee, and it now works magnificently. So I’m now working on getting SPC support for taglib so that I can play SPCs in JuK. I’ll let you all know when that happens.

In the meantime I’ve finally made another release of kdecvs-build to bring the release version up-to-date with the CVS version.

Posted by mpyne under Uncategorized | No Comments »

Graduating

December 10th 2004

I’m graduating tomorrow (or to be more specific, later today). After that, it’s time for intensive practice to prepare for Officer Candidate School (and maybe some last-minute programming if I can).

I found out that my grandma reads this as well. It’s probably for the best, since I am absolutely lousy when it comes to picking up the phone and calling people. Hi Grandma! :)

Posted by mpyne under Uncategorized | No Comments »

Update

December 7th 2004

The Steelers game was awesome.

My wife and I took a nice bus trip to the stadium, which was well worth the $10 fare (to and from the pick-up point). We arrived about an hour and a half early, and I was surprised that the time actually went by quickly, as the Jaguars had various activities ongoing on the field, and then the players came out onto the field for practice. I was very surprised at the number of Steelers fans here in Jacksonville. I thought that my wife and I would be the only ones dressed up in Steelers gear in our row, but there were many Steelers fans in attendance. I especially like that last link, which includes this quote from a Jaguars player: “That was the first time I couldn’t hear a snap count at a home game because of all the Steeler fans here.” There was an estimate of 20,000 Steelers fans in attendance, and it sounds about right. Apparently it was the all time attendance record for a Jaguars game at Alltel Stadium.

The game itself was exciting at first, as the Steelers lept to a quick lead, and the Jaguars tied it just as quickly. We regained the lead with another touchdown, and then it became a defensive struggle after that. It was a very annoying struggle for a Steelers fan to watch, as it seems that every time we were about to force the Jaguars to punt the ball back, they would make a huge passing play. Luckily, although they were able to consistently get close to the end zone, they weren’t able to make another touchdown the whole night. This type of defense is known as the bend-but-don’t-break defense, but I must say it’s quite nerve-wracking to see put in practice.

Unfortunately the Steelers were doing even worse offensively. A typical Steelers game plan this season involves getting the lead, and then calling running plays to eat the remaining game time away, relying on the defense to maintain the lead (and maybe even scoring some more points in the process). This relies on being able to get first downs with the running game, which the Jaguars did an excellent job of stopping. So the Jaguars were chipping away at the 7 point lead with a series of 3 point field goals. Finally, the Jaguars claimed the lead with about 2 minutes to go in the game, leading 16-14. The Jaguars fans were ecstatic, many started leaving the stadium.

They underestimated the resourcefulness of the Steelers quarterback, Ben Roethlisberger. Now that we had no time to muck about with the running game, the wraps came off of Ben, and he quickly led the Steelers down the field in range of the game winning field goal. During this time, he was the one calling plays, not the coaching staff, since there was no time to huddle. When in range of the field goal, he actually delayed calling the play. This confused me until he spiked the ball (an intentional incompletion that stops the game clock), and the kicking squad came onto the field to make the winning kick.

Thanks to the time that Ben intentionally leaked off of the clock, the Jaguars had only 18 seconds to score. They came agonizingly close to doing so, but in the end, it was the thousands of Steelers fans who went home happy.

For the most part, the Jaguars fans were gracious in defeat. I mean, they were peeved, but I didn’t see any cases of the fans trying to take out their frustration. This may have had something to do with the incredible number of Steelers fans around however. There was one fan who was annoying, in a New England Patriots jacket. (For those unfamiliar, the New England Patriots are the defending Super Bowl champions. They had a NFL record winning streak broken by the Steelers this year)

One galling thing I saw was a skit involving the Jaguars mascot. They sent the mascot and two people dressed in Steelers jerseys onto the field. The mascot then body slammed the two people and started kicking them. Obviously it was fake, but I think it was completely inappropriate considering the problems with violence in sports that we’ve had in the past weeks. It was almost uncanny, the announcer had got done just 5 minutes earlier reminding people that fighting was prohibited.

Overall, it was a very good game, I’m glad I saw it in person and helped keep the Jaguars from hearing their own snap count. :) I do, however, wish I had brought my camera. I thought they were banned, but apparently cameras with lenses of less than 6 inches are OK.

Posted by mpyne under Uncategorized | No Comments »

Next »