Saturday, March 22, 2008

Ubuntu and WEP


I installed Ubuntu Linux on my old work laptop. I'll probably have to give this back to work at some point, but I have the option to buy it too. It's an old Dell Latitude (D600) that's a bit banged up from lots of time on the road. But it still works.

So I grabbed Ubuntu 7.10 Desktop and installed it. The LiveCD runs fine, but slow as it's all off the CD. Installing to hard disk is really straightforward, but it kept hanging at 90% when it was detecting hardware (or configuring hardware depending on when it actually hangs). Googling around a bit lead me to the answer to add "-noapic" and "-nolapic". It took me a minute to figure out where to do this, as the launcher for the installation program clearly wasn't the right place since these are basically options for starting Linux rather than an application. But the boot screen options from the LiveCD lets you add parameters then, so I stuck these on to the end of the initial startup command. The OS loaded OK again, and this time the installer completed. Reboot, everything looked good (better than "Error with OS" or something when rebooting after the stalled attempts).

The next step was to get wireless networking working. I've been working with Linux off and on for years, but never on a laptop. I'm very familiar with tools like "ifconfig" and "netstat" to get network bearings, but this doesn't help with wireless. I finally found "iwconfig" but couldn't get it to accept any settings -- just telling me it couldn't do the "SET" operation. The installer let me set up my username and password, but not the root password (I still need to figure out what that is!). Without the root password, I couldn't run "su" and test it as a permissions issue.

So I dug around the Internets a bit more and eventually hit somewhere and clicked the remnants of Linux days in my brain. The key of course is to use "sudo" which then just asked for my user's password (super user rights, without actually using root).

To cut this to the point, the key is to use "sudo" with "iwconfig" to set the key pieces of your wireless setup, as follows:

sudo iwconfig eth1 essid mysid

sudo iwconfig eth1 key a1b2c3d4e5

Just set the ID and the WEP key. And I just use 64-bit WEP, which needs just 5 hex bytes. Finally you need to set it up to use DHCP:

sudo dhclient3 eth0

Now, in theory all of this could be done in Ubuntu's Network Manager thing, but for some reason whatever I set there just wouldn't stick. I confirmed the Internet existed through Firefox, then rebooted and everything still worked. Wonderful.

I'll probably let the kids use this for a while for their Webkinz stuff and general email (how may 4 and 6 year olds can say they use Linux??). We'll see if it's actually worth buying from work, since I'd need to replace the battery to make it at all worthy.

Thursday, March 20, 2008

Resurrection Eggs ?!?


OK, I have lots of issues with Easter to begin with. Like any other Christian holiday, much of the themes are from much earlier pagan or local traditions. You bring fir trees inside at the winter solstice to celebrate life through the cold bleak winter season. You celebrate the rebirth of the earth in spring using symbols like eggs and bunnies. But Christian Easter jumps in here with their version of the resurrection story.

Of course, many grade school children who are forced into Sunday school eventually question what eggs and bunnies have to do with Christ being crucified and then apparently rising from the dead. Plus, if it's a Christian holiday, why does its date follow the Hebrew calendar? Except for "educated Christians" who have done their share of reading and comprehending the history of such holidays, most people would probably create some kind of kludgey circular answer.

Now in an apparent attempt to close this gap, some marketing genius has created "resurrection eggs" where you take plastic Easter eggs and fill them with little Christian symbols and hide them around the yard. Now you can turn that fun time into a "fun faith-filled Easter egg hunt". Woohoo - just what every kid wants is more brainwashing while hoping for chocolate goodies.

But just be sure to re-read the gospels before hand and highlight anywhere in there where eggs (plastic or otherwise) are mentioned. (hint: don't spend too much time on this, as there are zero references)

For another year in my household we will be celebrating the coming of spring. This will be via the American traditional Easter basket with colorful fake grass, various egg-shaped objects (plastic or jelly beans), and a chocolate bunny or two.

Happy Spring!

Thursday, February 21, 2008

Book recomendation


The God Delusion
I just started reading this book, but already can tell it will be a winner. It's extremely well written with a very logical style. Of course logic doesn't matter that often when speaking of religious topics, but it's necessary when "discussion" turns to "debate". It is also a wonderful source for finding other sources. The varied sources and references are very wide and thorough, so those interested in going deeper have lots of places to start.

I've always loved a good quote, and this book is full of them too. I usually dog-ear the bottom corner of a page where something catches my eye or there's a quote that I want to come back to later. My copies of books like The Moral Animal and The Doors of Perception are full of a dozen or more bent corners, sometimes with margin notes or underlined sentences. I was of course tempted to start doing that while reading this book as well but quickly realized almost every page of the first two chapters would be marked! There are too many good examples and applicable quotes to start marking anything. Plus, I look forward to loaning this book out, and I don't want to bias future readers.

I'll close with the quote with which he opens the book:
"Isn't it enough to see that a garden is beautiful without having to believe that there are fairies at the bottom of it too?"
-- Douglas Adams
(Adam's books)

Highly recommended - the paperback version can be found in any bookstore or ordered online.

Thursday, January 24, 2008

A good day for the kids


As my wife picked up our daughter from school yesterday, the Headmaster (Headmistress??) pulled them aside for a moment to show off what happened today. She showed our daughter a couple flash cards of short words with short vowel sounds (beginner reading words like CAT, MAT, BAT) and Audrey actually read them! Then they set out a string of words to make a sentence: SAM IS A MAN. And she read it. We worked some more after dinner last night writing more of those short beginner words and she was doing really, really well. Sounding things out properly, though not quite squishing the sounds together efficiently yet. Of course, her brother was constantly hinting as well, so sometimes it was hard to tell where her attention lies. Still, I'm impressed - at just over 4 years old she's picking this up very well!

Every morning at the breakfast table while I referee the kids, I'll read the morning paper over my cereal. On the weekends, I do the puzzles - Sudoku on Saturday, and Kakuro, Sudoku, and a crossword on Sunday. Of course the weekday papers have Sudoku as well, but they range from Very Easy on Mondy through Medium on Friday - the weekends are the only days with Hard puzzles. So every morning recently when I get to the end section, the kids are watching alertly for the number grid and then point out the difficulty and gauge how fast I could solve it. Yesterday, Jacob asked if he could start doing the easy ones. This morning's paper had a Medium puzzle, but Monday's paper was still in the recycling bin. I pulled it out and folded the paper up so he could work the puzzle. I told him the rules and started him off with a couple obvious entries. Then I jumped in the shower to return to a completed puzzle, but a mildly disappointed boy. Seems that towards the end he transposed a 6 and 7, throwing off two other numbers. He was frustrated because "there needs to be a 9 in this box, but this 9 is blocking it." But considering he worked through 90% of it alone and only goofed a bit at the end, I'm pretty impressed. He won't settle for the slow pace, but I'm planning on letting him do the Monday puzzles for a couple weeks before moving him up to Easy. I'm sure he thinks he's ready for Medium tomorrow, but I'm very proud of how well he did today!

Wednesday, January 23, 2008

High Def Resolutions

While setting up my new Home Theater PC (HTPC) the past week or so, I've been doing some reading online and some comparison of different resolutions. There's quite a bit of confusion floating around out there about the differences between 720p, 1080i and 1080p. I decided for my own reference to jot down some numbers and clarifications. As usual with this blog, this is 90% for my future reference, but maybe somebody else will find it useful too.

Let me go through the basics of the math I'm using here with an explicit example, then I'll report various numbers of a number of different resolutions. Starting with the standard HD resolution of 720p, in counting pixels we have a resolution of 1280 x 720 pixels = 921,600 pixels on the screen. This is a progressive scan resolution, so each pixel is updated every refresh. In speaking of standard resolutions, this means 60 Hz for the NTSC world. (The PAL world is 50 Hz, but I don't want to introduce that confusion here -- just know the US is NTSC.) So refreshing at 60 Hz (60 cycles per second) means we're looking at 1280 x 720 x 60 = 55,296,000 pixels/second. This is a number we could use to compare all different resolutions, but let's take it a step further to get into more familiar units, even though the values just change linearly. To get more information, consider 24-bit color - this is where each of Red, Blue and Green values are defined by an 8-bit number. Since 8 bits are 1 byte, we have 3 bytes of color per pixel, so we can multiply the pixel/sec number by 3 bytes/pixel and get a number in more familiar bytes/second unit. Since the numbers are large, we divide by 1024 to get KiloBytes/sec or again by 1024 to get MegaBytes/sec.
For 720p, the whole calculation is 1280 x 720 x 60 x 3 /1024 / 1024 = 158.2 MB/sec.

With all that verboseness out of the way, a 720p display pushes through 158.2 MB/sec. One more word on progressive scan versus interlaced to have the following numbers make more sense. In an interlaced world (standard TV resolution is this), every other row of pixels are updated with each scan, which requires exactly half the bandwidth of a progressive scan at the same resolution. Standard TV is 480i and you'll see "progressive scan" DVD players that have been available for a long time that output 480p pictures. On even a low-end HDTV, you will see a nice difference here - basically twice the resolution from the same source. This translates to 30 Hz in the numbers above - 30 frames per second is standard interlaced display.

On to the numbers. To standardize more, I'm using 16:9 wide screen resolutions here.

480i = 853x480@30Hz = 35.1 MB/s
480p = 853x480@60Hz = 70.2 MB/s
720p = 1280x720@60Hz = 158.2 MB/s
1080i = 1920x1080@30Hz = 178.0 MB/s
1080p = 1920x1080@60Hz = 356 MB/s

Some conclusions:

480i sucks. At least play all digital content (DVDs, etc.) on an HDTV in progressive scan mode if possible. The difference is clear to just about anyone on any TV - we are talking a full factor of 2 here.

1080i versus 720p is a judgment call. Lots of people claim one is better than the other, but these numbers show 1080i is only slightly better than 720p. So don't bash your neighbors 720p HDTV compared to your 1080i -- hardly anyone will be able to see much difference. Exactly, there's a 12.5% difference. When talking about what's noticeable and what's not, 40% is usually the key minimum value.

1080p rules. It's literally twice as good as 1080i. You can argue weather upscaling a standard resolution DVD to 1080p versus 1080i is much different, and that's really kind of a judgment call there. HOWEVER, 1080p sources (Blu-Ray, HD-DVD, .mkv files, etc.) carry twice the amount of information as a 1080i source and 10 times that of standard TV. Incredible.

Finally, for the rest of the internet out there -- YES both 1080i and 1080p can be characterized as 1920 by 1080 resolution. However, the difference between an interlaced and progressive scan display is a factor of two in true resolution, giving a much smoother picture at 1080p.

Personally, I've been keen on 1080i because that's what my TV and cable box both support. Hooking up the HTPC, I've got both 1080i and 720p running well, but have to say that I'm probably going to stick with 720p almost all the time. First, as shown above, upscaling standard DVDs to either is going to result in almost the same quality. Since I can do both, 1080i makes sense -- but there's the pragmatic side too. At 1920x1080 my icons and text are TINY. Even on a 52" screen, it's really hard to see. Plus, with so many pixels and a trackball/keyboard setup it takes a long time to scroll across the screen. at 1280x720, the icons and text are much more visible, and navigation is a lot easier too. Finally, most of the true high-def content I've been downloading is 720p already. It does look good at 1080i, but not worth dealing with tiny icons. I will of course set things up to switch between, but unless I see artifacts or am working with 1080i sources, I think I'll be sitting at 720p most of the time.

Wednesday, January 9, 2008

Looks like it's Blu-Ray

I was holding out for HD-DVD. I'm not sure why, but it's probably because I'm still fairly anti-Sony. But lined up against each other, even I would admit the Blu-Ray spec sheet looks a bit better (old info, CNET info). Recently the producers making both having been choosing sides, as Warner Brothers just announced. And now Microsoft says they might support Blu-Ray on the Xbox. Another reason I was hoping for HD-DVD was that my XBox 360 would be the inexpensive move to this technology for me - but if they support Blu-Ray, there's no motivation left for HD-DVD as everyone moves aways. I'm just glad I kept waiting to see who would win. Sorry to anyone who's invested in HD-DVD. Time to store that next to your BetaMax stuff

Thursday, December 20, 2007

I don't like gin


I don't like gin! My father-in-law is a big gin & tonic person. I've always preferred a vodka tonic personally, usually with a bit of lime. Especially in the summer. I was traveling recently with an older guy in our company. It was a week long trip to Reno, so we a) spent a good bit of time together and b) spent a good bit of time drinking. He's a martini guy. Figuring it's too cold for vodka tonic but wanting something different, I started ordering vodka martinis. These are good. Even green olives (which I normally can't stand) are kind of a little punishment for me to get over the guilt. Ha! Soaked in vodka, they're not that bad.

Long story longer, when I got home I got the fixings for vodka martinis - which really just meant picking up green olives and Martini & Rossi Extra Dry Vermouth. In my mixer, it's a hand full of ice (5 cubes), 2 shots of vodka, 1 shot of vermouth and then shaken until my hand is cold. Strained into a glass, then stab 4 olives and drown them. Not bad. One or two after dinner occasionally is quite nice.

Don't worry, I'm getting to the gin.

This month's Maxim magazine had a section on booze. I didn't learn anything from the vodka, whiskey, rum and tequila sections, but was a little surprised to see a bit on gin. I just don't really count that in the top 5 boozes I guess. I've also seen shows on Discovery channel and such about the distillation process for various spirits, learning a lot about gin there. I've always thought it was a little flowery for my taste. Not like a flowery wine, but a bitey flower that's pretty pissed off. Anyway, I read up some online then about 'real' martinis. Apparently a true extra dry martini is a touch of vermouth then a glass of gin and ice. Knowing I didn't want to jump in like that, but curious if my tastes have changed, I made a regular stirred martini. 5 parts gin (in the cabinet already from the afore mentioned father-in-law) and 1 part vermouth over ice in the shaker, swirled around so as not to 'bruise' the gin, then strained. Stirred, not shaken. Drowned olives as before.

But here's the thing: it sucks.

It smells like potpourri and tastes like my lawn. Holding my breath to block out the smell helps it get down, but what kind of after dinner drink is that? Plus I've read that people drink this stuff to cleanse their palette before a meal. I guess it's better than cleaning off your tongue with sandpaper -- but I'd rather give that a try before I have another gin drink.

I really like scotch and have appreciation for how different brands bring a different smokey aroma and peaty taste. And each has its own aftertaste too. Maybe I've got a bum brand of gin here, but scotch differences are sometimes quite subtle. It's all still scotch using the widest brush. So you can keep your variations on the theme of turpentine filtered through decaying flower petals.

I don't like gin.