I'm doing my monthly offsite backups and am seriously frustrated by the limitations of the FAT32 file system again. FAT32 is something of a de facto standard since most external hard drives and USB flash storage devices come pre-formatted with FAT32. However FAT32 carries with it the limitation that the size of an individual file may not grow beyond 4 GB. Many backup programs don't handle this limitation gracefully since this requires the backup program create multiple output files.
So what are my options for getting around this limitation? I'm currently using external drives with 2 partitions equally split between FAT32 so the Windows machines can write to it and HFS so our Macs won't be limited by the arbitrarily small maximum file size. Another option is formatting the entire drive with NTFS and using MacFUSE/NTFS-3g to allow the Macs to read and write to the NTFS partition. I like this approach better as it doesn't force me to correctly predict how much space I'll need for each type of machine.
Ultimately I think I'd prefer to use drivers to allow me to mount, read, and write to Linux EXT file systems but this requires more investigation. This is mainly because I really hate the thought of trusting my Mac data to NTFS.
This blog gives me a place to comment on things which strike my fancy, hence the title. Topics may include computer software/hardware, science, space, beer, books/movies/television programs of a geeky nature, or almost anything else. It is not marked as containing adult content but be warned that I occasionally post about beer and sometimes forget to watch my language. I've been writing systems software since the days of core memory, paper tape, and front panel lights/switches.
Saturday, March 28, 2009
Vim continues to amaze me
Every time I think I've learned all of Vim's tricks, it manages to surprise me with some new feature. There are two things I've discovered recently which have made it more enjoyable to use.
The first is Vim's ability to edit files on remote systems which can be reached via scp or ftp. Since I frequently need to edit files on embedded Linux systems which don't have X11 installed, this feature is a huge timesaver for me. The following commands illustrate the basic commands for either editing a file over scp or ftp.
gvim scp://username@system//home/username/filename
gvim ftp://username@system//home/username/filename
This feature is referred to as NetRW.
The other thing I discovered was completely by accident. I was using MacVIM (my favorite Mac port of the GUI version of Vim made available from the fine folks at Google) when I found I could drag the file icon off the titlebar and into a bash shell. Once dragged into the window containing the bash shell, the full pathname of the file being edited was placed on the command line. Granted this isn't something I need to do often but when I do, it saves me from having to manually type a long pathname.
The first is Vim's ability to edit files on remote systems which can be reached via scp or ftp. Since I frequently need to edit files on embedded Linux systems which don't have X11 installed, this feature is a huge timesaver for me. The following commands illustrate the basic commands for either editing a file over scp or ftp.
gvim scp://username@system//home/username/filename
gvim ftp://username@system//home/username/filename
This feature is referred to as NetRW.
The other thing I discovered was completely by accident. I was using MacVIM (my favorite Mac port of the GUI version of Vim made available from the fine folks at Google) when I found I could drag the file icon off the titlebar and into a bash shell. Once dragged into the window containing the bash shell, the full pathname of the file being edited was placed on the command line. Granted this isn't something I need to do often but when I do, it saves me from having to manually type a long pathname.
Saturday, February 28, 2009
Python is slowly winning me over
I've been learning Python at work and I have to admit that it's slowly winning me over.
I was skeptical at first. I've been a low level programmer (firmware, diagnostics, operating systems, device drivers, etc) for most of my lengthy career. A mixture of C and assembly language has served me well for most of that time with a little shell scripting thrown in for good measure.
When I started my current job, I discovered they use a mixture of C and Python. The parts of the product which aren't performance sensitive such as the GUI are implemented in Python. This code is much smaller than C code to accomplish the same purpose would be. Thanks to the interactive nature of Python it's also much quicker to develop this code and to get instant feedback.
What finally won me over was examining a short script designed to generate some proprietary TCP/IP packets. This script had a small problem when talking to one of our products. It produced the integer and float portions of the structure with the wrong endianness. A little searching with Google showed me that adding a single "<" character to the format string used by the "struct" module (which prepares individual fields within a structure) would correct the problem.
It took a minute for the full impact of that to sink in to my deeply ingrained C mindset. A single character would correct my problem. Couple that with the fact that the script to generate these packets was probably less than a third of the length of a comparable C program and I was forced to admit that Python is much more useful than I originally thought.
I was tempted to end with a comment about old dogs learning new tricks but I suspect that phrase is far too tired to carry the proper impact. I am finding that old engineers can learn new tools with sufficient incentive. Seeing how much more productive I could be with solid Python experience under my belt is more than enough incentive.
I was skeptical at first. I've been a low level programmer (firmware, diagnostics, operating systems, device drivers, etc) for most of my lengthy career. A mixture of C and assembly language has served me well for most of that time with a little shell scripting thrown in for good measure.
When I started my current job, I discovered they use a mixture of C and Python. The parts of the product which aren't performance sensitive such as the GUI are implemented in Python. This code is much smaller than C code to accomplish the same purpose would be. Thanks to the interactive nature of Python it's also much quicker to develop this code and to get instant feedback.
What finally won me over was examining a short script designed to generate some proprietary TCP/IP packets. This script had a small problem when talking to one of our products. It produced the integer and float portions of the structure with the wrong endianness. A little searching with Google showed me that adding a single "<" character to the format string used by the "struct" module (which prepares individual fields within a structure) would correct the problem.
It took a minute for the full impact of that to sink in to my deeply ingrained C mindset. A single character would correct my problem. Couple that with the fact that the script to generate these packets was probably less than a third of the length of a comparable C program and I was forced to admit that Python is much more useful than I originally thought.
I was tempted to end with a comment about old dogs learning new tricks but I suspect that phrase is far too tired to carry the proper impact. I am finding that old engineers can learn new tools with sufficient incentive. Seeing how much more productive I could be with solid Python experience under my belt is more than enough incentive.
Sunday, January 25, 2009
The Neuros OSD is so cool!

I just watched part of the first recording from the Neuros OSD (a Linux based DVR) my wife got me for Christmas. What a cool little device! I'm serious about the little part... it's only about 5.5 inches square and just 1.25 inches tall. Just check out the image. The device itself isn't much bigger than the small remote included. It records programs onto SD or compact flash cards. There's also a USB port so you can record to a USB thumb drive or hard drive.
The first order of business was to upgrade the firmware. There are two ways of doing that. If you've connected the Neuros OSD to an ethernet port, it can upgrade the firmware directly. If you don't have a network connection, you can download the new firmware image to a flash card and upgrade from that. During the ~10 minutes which the upgrade requires, the Neuros shows you a little pong game on the TV screen. The on-screen score appears to be the percentage of the upgrade currently completed.
Is it perfect? Not exactly but it's pretty darned close. It's especially attractive given the low price. It appears to have been primarily created for recording a single recording at a time. That fits my requirements nicely since this was just intended to supplement our existing full-featured DVR. Occasionally my wife will have a couple simultaneous recordings set up which takes up both tuners. It's nice to have the option of not worrying about how much space is used on the main DVR or whether both tuners are spoken for at the time my obscure SciFi program is on. There's a couple other restrictions. Your connection from the set top box must provide composite video (one of those 3 connector cables with 1 video and 2 audio connections).
The other restriction is not really a shortcoming of the Neuros but rather of the FAT-32 format used on many of the flash devices. FAT-32 has a maximum file size of 4 GB. That's probably somewhere between 3 and 3.5 hours of recording. So you might need to choose a flash device capable of recording the maximum length program you'd be interested in watching. If you're keen on catching some type of program marathon, you're probably looking at a small portable hard drive rather than a flash device.
Well, enough of my blathering on about it. Check it out for yourself at the links above. It's a very nice gadget and a useful too.
Thursday, January 01, 2009
The sound of many Zunes freezing...
My neck is sore from so much head shaking over the Zune freeze problem. I would have hoped that the development teams at Microsoft would have held regular code reviews which should have caught a glaring error like this one. I understand why they may not have done so. It's quite hard to get people to review your code if company procedures don't demand it. This is especially true in consumer electronics where the schedules seem to be compressed to ridiculous levels.
So what do we learn from this public relations fiasco?
1) Code reviews should be mandatory, not optional.
2) Developers must do much better unit testing. In the past I've had coworkers criticize me because I insist on running functions under a debugger to force execution of tough to test code paths.
I'm always amazed that software engineers can take such a cavalier approach to verifying their code performs as expected. Then again I'm old and cranky. Hey you kids... get off my lawn! :-)
So what do we learn from this public relations fiasco?
1) Code reviews should be mandatory, not optional.
2) Developers must do much better unit testing. In the past I've had coworkers criticize me because I insist on running functions under a debugger to force execution of tough to test code paths.
I'm always amazed that software engineers can take such a cavalier approach to verifying their code performs as expected. Then again I'm old and cranky. Hey you kids... get off my lawn! :-)
Monday, December 29, 2008
The new printer is working... finally!

I finally got our new Epson Workforce 600 all-in-one printer working properly today. It wasn't an easy installation by any stretch of the imagination. Their setup software isn't what I'd call user friendly. I was close to having it work on several occasions but something always went awry. The most annoying problem was when the printer found the WiFi network during setup and allowed me to enter the WPA key even though it refused me to allow me to paste the key into the form (try entering a 64 character hexadecimal key manually twice with no errors). The printer sat there trying to connect via WiFi in excess of 10 minutes. When it finally failed, it gave no indication of why the connection attempt didn't work.
I won't bore you with a step-by-step recounting of all the problems I encountered. Instead I'll present a list of lessons learned. Most of these only apply if using the WiFi connection.
1. Make sure your WiFi router has some of its IP address range reserved for statically assigned IP addresses (as opposed to DHCP assigned addresses). Using a static IP address for your printer will make the installation go easier.
2. If you're using WPA-PSK, specify the key as a 63 character ASCII string. The Epson doesn't seem to do well with a hexadecimal key. I used Steve Gibson's Perfect Password page to pick a strong random WPA key.
3. Use the printer's front panel to enable and configure the WiFi adapter. Sadly this procedure isn't covered in the manual which insists you use the software to configure everything.
4. Configure the WPA key for the WiFi adapter. This is done with the up and down arrow keys. You can toggle among the uppercase, lowercase, and numeric/special character sets by using the menu key located at the bottom left of the menu navigation keypad (the keys surrounding the "OK" button).
5. Assign an IP address which was excluded from the router's DHCP range in the first step.
Now that the printer is configured, it works like a dream. Don't be put off by this confusing WiFi setup. I've read worse stories about configuring the WiFi adapters for all-in-one printers from other manufacturers. There are far too many combinations of WiFi routers and broadband providers for any manufacturer to ensure no problems will arise during installation. I'm sure at least part of the problems are a result of the router supplied by our broadband provider. I've encountered problems attempting to connect other devices to it in the past. If it weren't for the requirement of MoCA connectivity I would have replaced it with a better router because of the issues encountered.
Monday, December 22, 2008
My new gadget fix

Last week I finally got fed up with the numerous quirks exhibited by the cheap flash only MP3 player which will remain nameless (suffice it to say I should have never strayed away from the Apple fold for price alone) and ordered a refurbished iPod Touch. I figured I could use it as a light MP3 player when I was exercising or walking the dog. Plus it gives me the ability to play with some of the more compelling iPhone features without having to pay the monthly fee for the data service.
It arrived a few days ago and I've been having a great time playing with it ever since. I think it's as very nearly as revolutionary as the original iPod was. The first thing which struck me was how thin it was. I'm amazed at how such a tiny device can perform such an amazing number of tasks.
The mobile version of the Safari browser works well for light web browsing. I get a big kick out of using the gestures to zoom in and out on portions of web pages. Being able to rotate the device and having the display orientation automatically adjust itself is also very cool. Having a built-in IMAP email client is pretty darned handy too. I've also discovered a few free applications which complement the standard set nicely.
I like the mobile version of the NetNewsWire RSS reader. I've been using the Mac version for quite a while now. I discovered that I had to sign up for a second NewsGator account since my old account contains a lot more RSS feeds than the mobile version of NetNewsWire can comfortably handle.
I also downloaded Labyrinth LE, a game which takes advantage of the orientation sensors in the iPod Touch to allow you to control a ball's movement through a maze by tilting the Touch. It's more fun than I would have thought.
I'm sure I'll be discovering more cool applications for the Touch in the coming weeks. In the meantime, I'm having a blast playing with this clever little gadget.
Subscribe to:
Posts (Atom)
-
A long time ago I was given a bit of advice that has served me well over the years. An engineer with much more experience than I had at the...
-
We lost our very special dog to an osteosarcoma a few days ago. He started limping a little over 4 months ago and it took a while to dia...
-
Most of the longtime Unix users like me love grep. Regular expressions make the silly wildcards available in Windows seem completely underw...