Friday, August 10, 2007

Audio/Video

Nick arrived for good yesterday, and he and I spent last night fooling around with his big 60's era speakers. They're set up in our living room right now, and they're mighty powerful. I was able to set up my old iBook to hook into the CD player and receive music streams from the computers in our bedrooms. Matt should be moving in today, bringing his new 37" flat panel HDTV with him. Add that to the mix and we've got a home theater paradise.

Tuesday, August 7, 2007

What I Saw at the Rec

Yesterday I saw a car accident when I was leaving the Rec Center. It happened right in front of me, not more than 15 feet away. There was a blue Ford Focus coming down the parking lot and a Ford truck that was backing out of its parking spot. The guy driving the truck just hit the gas, swung out of his spot, and crunched in a headlight on the Focus. The man driving the car had no time to react - he stepped on his brakes but wasn't even able to honk in time. I had one of those slow-motion moments and yelled to the driver of the truck, but it was too late. Everyone was shocked for a second, but then both parties just parked their vehicles and began exchanging information. I was glad to see that both of them were pretty calm about it. Remember - always look behind you when backing up, and proceed with caution. I think parking lots are just really accident prone.

getopt Keeps Internal State

Here's the solution to a problem that's been bothering me at work for two days now:

If you want to use getopt more than once within a program, across different inputs, you'll need to reset its internal state counters before each use:

printf("%d %d %d\n",optind,opterr,optopt);
... do getopt stuff ...
printf("%d %d %d\n",optind,opterr,optopt);

This outputs the following:

1 1 63
3 1 63

the '3' in my case is because I only had one option + parameter (+ program name == 3).

So, if you reset optind, opterr and optopt to 1, 1 and 63, before each new use of getopt, you should be fine.

-- Courtesy of DanielLawson and the Waikato Linux Users Group

Sunday, August 5, 2007

Shake Hands with the Devil

When I was in Rwanda last summer, I spent a few hours as an extra on the set of a new movie about the genocide called Shake Hands with the Devil. I just read a news article that said Rwandan president Paul Kagame is attending a private showing this week and that the film will be submitted to film festivals in early September. Later that month, it will be released to the general public. I wonder if it will hit wide release in theaters across the US.

Old Movies

There's really something to be said for old movies. Lately I've watched quite a few, courtesy of my Blockbuster Total Access account. They include On the Waterfront, Some Like it Hot, and The Grapes of Wrath. I've appreciated these movies because they have great acting and wonderful writing. Back in those days, the actors carried the movies, not special effects or creative editing. A good movie is escapist: it moves you from your world into that of plot. A great movie does this, too, but it also makes you realize that the people you're watching on screen are true masters at their art.

Friday, August 3, 2007

Unit Testing

I started unit testing for my project at work today. A unit test is a program that goes through your program line-by-line, following every branch and conditional. Unit tests aren't simple to write, especially when you're trying to cover unusual conditions or large functions. I was dreading these tests, but they've actually been really fun so far. I think it's because I'm no longer just reading code or translating it. I'm actually writing it from scratch. I have much more freedom, plus it's kind of like a game to try to get 100% coverage of the code. Maybe I'll get sick of it in a while, but for now I'm enjoying it a lot. For my next project, I'd like to try writing the unit tests as I develop the code. That's more of an extreme programming approach.

Remote Control

If you're like me and you have so many computers that you don't know what to do with them (or just two that you can't use at once), this is exciting. I found an open source application called Synergy, which allows you to control multiple computers with one keyboard and one mouse. You choose one computer to be the server and the rest are clients. After setting up a simple TCP connection, you can move the mouse cursor off one screen and onto the other. Right now, I'm typing this post with the keyboard on my Ubuntu laptop to the browser window on my MacBook. The mouse is a bit jerky on the client computer, but the program works great overall.

Thursday, August 2, 2007

Anticipated Movies

In summer of 2008, about one year from now, there are two movies that will be coming out that I would like to see. The first is Star Trek XI.
There were ten movies previous to this one, and one of the most exciting things is that this movie will be directed by J.J. Abrams, whose works have included the television series Alias and Lost. Abrams now represents a possible new life to the Star Trek franchise. He offered to take up a new movie project for the Star Trek franchise and his project is now pretty much confirmed. According to sources on the net like Rotten Tomatoes, the movie is set for a summer '08 release date.
There is a high likelihood that the movie is going to be set in TOS era (that's acronym language for "The Original Series") due to reports that an actor named Zachary Quinto (who has also played in the TV series Heroes) will be playing Spock. Oddly enough, Spock will also be played by Leonard Nimoy, the original Spock. Could we be looking at some type of flashback situation here? Perhaps a 200 year-old Spock at the end of his days is recounting some tale to a friend or some young Starfleet Academy cadets? We'll surely see.
The second movie to look for in a year is The Dark Knight. For all my Batfriends out there, you know what I'm talking about: the next installment of Christian Bale's portrayal as Batman. For those of you who saw Batman Begins, the latest news on this project appears to be just as compelling as the first movie in this series.
Once again, Rotten Tomatoes is helpful in getting the scoop, including information about a teaser trailer. Not much on the visual side, but the audio is quite exciting, at least to me. The basic idea is that Bruce Wayne is consulting Alfred on his frustrations, most likely at this Joker character (played by Heath Ledger... Better than Jack Nicholson? We'll see.) and saying that he's tried reason and fear, but Alfred explains that some men are just pure evil. And that isn't far from belief as The Joker gets the last few lines in, saying, "People are gonna die. I'm a man of my word," followed of course by the creepiest cackle you've heard since Nicholson in Burton's 1989 Batman. It sends chills down my spine just to think of this movie.
Anyway, those are my two anticipations in the movie industry a year from now. Keep on the lookout...

Model Rockets

My roommate John an I are talking about building some model rockets to shoot off in the field by our apartment. The plan is to build the rockets before school starts and have the maiden voyage around the time everyone is returning to Pullman. I'm planning to start on mine this weekend.

Speaking of returning to Pullman, I'm available if you need any help moving in. Just give me a call or shoot me an email.

Tuesday, July 31, 2007

Planet EECS

I ran across something new on the EECS website today. It's called Planet EECS, and it's an aggregation of blogs authored by students and faculty of the EECS department at WSU. Cool idea. It makes sense that the most tech-savvy people at the university might have some pretty cool blogs. I've already ready a couple that I'll probably end up subscribing to.