March 26, 2011

New look for the site

Last year I put some work into moving our personal site off of a Python code base running on Apache to a Java/Wicket/Hibernate code base running on Tomcat, and I finally got around to getting it on the live site today.

I made the change for a couple of reasons. The first was that I was going to be moving to a new position at Cisco, which was using Java/Wicket/Hibernate, but the move was not going to happen for a couple of months, and I wanted to ramp up early on the technologies, so what better way than to re-write our site from the ground up - jump in the deep end as it were.

The second reason was that while I like Python, it really is more of a scripting language than something that is good for writing applications in, and it does not encourage you to maintain good code hygiene, and thus I had let the code become something of a tangled mess that was hard to make changes to unless I was in it pretty often. I think I have structured my code a bit better with the new site, so I should be able to come back to it in 6 months and make some changes without trying to figure out what moron wrote the code and why he did it the way that he did ;)

Third but not last, the newer technologies are going to make it easier to add dynamic content to the pages that do exist, without doing complete overhauls of the pages. Hence the links to current blog and twitter posts from the front page.

Hope you like the new look!

Posted by Scott at 12:31 PM | Comments (0)

November 10, 2008

Spy camera lens

I want, Want, WANT!

Posted by Scott at 11:10 PM | Comments (0)

May 10, 2008

New life for the laptop

We got a new laptop because the old one was dying - the final straw was that the power cord had a break in it somewhere, so you had to hold the cord just so or it would not charge.

I went at it this morning with a razor blade and 2 lbs of solder later, it works again! The patch is of course ugly, but it works - now what to do with this computer? I think I might try to install Ubuntu, but um, well, the CD player does not work ;). Of course half the memory slots don't work, the wireless card gave out years ago, and every once in a while you have to press the power on button repeatedly to get it to turn on, but it has a few month miles to go now!

Posted by Scott at 10:32 AM | Comments (0)

December 9, 2007

eColumn

Way back in the day my friend and co-worker had this idea for web site where a couple of different authors (myself being one) would put articles on various subjects - he was going to call it something like mrmojo.org. I know, doesn't sound very revolutionary, but keep in mind this was back in at least 1999, before everyone and their sister had a blog.

Not sure what else to do with it, and it gave me a laugh re-reading it, so enjoy or don't - your call...

To e or not to e...

eBusiness? must be cutting edge. eCommerce? Have it or die. Right? Fedex.com? What was wrong with Federal Express? Today's business world seems stuck on catch words and phrases, with no real idea what they are saying - or maybe they don't know what to say, so they use "cool" words to make them sound cutting edge. After all, if cutting edge is good, then bleeding edge is better, right?

Engineers and those in the computing world have always been in love with making new words. DOS (Disk Operation System), IBM (International Business Machines), ASCII (American Standard Code for Information Interchange) are just a few of the new words that have become standard - at least in the geek world that I live - but which we have either forgotten what they mean or don't really care. There are some words, such as CMOS, whose source - I guess I should be ashamed to admit this - is completely lost to me. Feel free to correct this shortfall in my knowledge, or to submit obscure contractions of your own.

Thus eMail was a natural contraction of Electronic Mail, but how do you justify calling something eBusiness? As it is commonly used and understood today, eBusiness is generally used to mean the process of a company selling its products on the world wide web, but how is this any more electronic than the grocery store that allows you to pay for your groceries with an ATM or credit card? Where does it stop? eToys - buying a board game on the Internet makes it electronic? eBay - who would guess that they do online auctions? The marketing departments have run rampent naming their products using words whose meaning they have no idea. If it sounds so good, how can it be wrong?

And since when did adding a .com onto the name of your business make any sense? Besides Saks Fifth Avenue, when else has a business named itself after its address? Federal Express decided that they could not keep their name as it was, but instead they felt that they needed to rename themselves after their web address. 1800flowers.com? is that their web address? Their phone number? Their name? I guess in this case it is all three, but couldn't they have put a little more effort into comming up with a real name? I guess it is just an attempt on the part of the marketing departments to make themselves sound like a company on the cutting edge of technology.

The current fad of adding a e to the front of what you do, or a .com to the end of your business name will sometime lose favor when too many businesses have done it and it is everywhere and no longer is it something that sets apart the company. Then it will (hopefully) lose favor and then all the companies will need to change their names or look like the are selling out of date products or that their business is behind the times.

Thanks for reading my eColumn.

Posted by Scott at 2:12 PM | Comments (0)

November 1, 2007

I'm Drooling

I now have a serious case of "want it, Want It, WANT IT, WANT IT NOW!"

I knew someone would do this someday, I just did not know it would be so soon - this is cooler than cool!

Wi-Fi SD Card for Cameras

My only complaint - they should have made it Bluetooth so that it could go straight to your computer and not need the Wi-Fi network... Carry around your computer, and every picture you take, anywhere, would be more or less instantaneously on your computer.

Posted by Scott at 11:34 AM | Comments (1)

March 11, 2007

I know Linux is better, but...

Sometimes I just don't have the time for it.

I realize that some of the reason that it takes me so long to get anything setup in Linux is that I am not a Linux guru, but it is also just plain hard and time consuming sometimes, and I consider myself reasonably competent when it comes to working with *nix OSes ;)

Once a box is setup, it is great, will run forever, doesn't need in the way of maintanance other than to keep up with security patches, but that intial setup always seems to take forever, specifically when I want to do something in the laptop/desktop/user realm.

For example, I have a Linux print server that I setup, and I added a new printer to it the other night. Took me 5 minute to set it up on the Windows machine, took over an hour to setup on Linux. Find the RPM, oh wait, this is Ubuntu, that doesn't work. Find a version with src, try to compile, doesn't work with my version of cups (missing cups-config, I have cupsconfig, but that does not do it). Figure out how to make an RPM work on Ubuntu, install all the different things that are needed to make that work, and the install still does not work. Dig through what the RPM installed, find the .ppd file, unzip it, upload it through the web interface, now it works.

Network cards. I know, I should figure out ahead of time if the thing is supported, but when I am putting something together from a bunch of scavenged parts, that is not in the cards. I installed Fedora Core the other weekend, spent more or less the whole blankity blank weekend trying to get a PCMCIA network card, a USB network card, then a different USB network card, to work. It did not help that USB was not working out the box, and it took 3 hours or so to work through why that was not working.

At some point I gave up on that for a bit, and tried to get the sound card to work, and that would not work either...

Once I got those working, I was going to have to install and get working the UpNP music server, and that was likely going to be an adventure in itself, I am sure.

Again, freely willing to admit that a Linux guru could probably have had it up and going immediately, but I am not, but I am competent, and a pretty good Googler, so this stuff should not be impossible.

I finally gave up and installed Windows, and 1.5 hours later, I had sound working, I had network (with any of the 3 different NICs), I had the application humming along, ready to go, and WORKING!

Like I said, I really like Linux in the abstract, when it is already setup and configured, and as a server, but in my experience, using it for things in the user space that require things like wireless networking, sound, graphics, that sort of thing, I just always seem to strike out.

Please don't kill me for being critical of Linux, I really tried :(

Posted by Scott at 3:40 PM | Comments (0)

February 17, 2007

Code Monkey

A good friend of mine sent this to me - it is hillarious! A classic!

Code Monkey

Posted by Scott at 11:06 AM | Comments (0)

October 8, 2006

Samsung d807 Initial Impressions

So our Nokia 6200 phones that have served us well for somewhere between 3 and 4 years have finally started to not keep a charge - we have to charge them every couple of days or so, which is just annoying. So we decide to replace them.

We initially go looking for phones like what we have. Solid, well built, cell phones. Not a camera, not a MP3 player, not bluetooth, nothing fancy. But apparently these days, there are no inexpensive phones, only cheap ones. We both got the impression that any of the phone phones that we looked at would crunble into dust if they were taken more than a few miles from the store. So we settled on the Samsung d807, which seems like a good quality phone, but it is also, you guessed it, a camera, a MP3 player, and of course it has bluetooth.

I already have found some features that I know I am going to miss. The first is that there are no sound profiles. With the Nokia, it had this very useful option that you could put it into the silent profile for a period of time, so for instance, every Sunday, I put it into the silent profile mode until 12:30 or so, so that it will not go off in church, but I won't have to remember to turn it back to the normal profile mode. I usually don't feel the vibrate, so if it stays in silent mode, I am going to forget, and miss calls. I know this.

I went quite a saga to get my old contact on the new phone. At the store, the sales rep was kind enough to download the contact off my old phone onto the new SIM card, but he was not able to upload them to the actual phone, so we had to work with the limits of the SIM card, namely a limit in the number of characters in the name, and a limit of one phone number per contact.

I figure there has to be an easier way than to re-enter all the phone numbers, so I give it a shot. It took quite a few steps, but I got it done faster than Jesse going at it the manual data entry way, so go technology! The steps were:

1) Download and install the Nokia PC Studio.
2) Download my contacts from the Nokia into Nokia's proprietary format.
3) Open said proprietary format, see that (yeah!) it is text based and comma delimited.
4) Notice that there is way more than just contact info, and it is not well defined how it is going to work.
5) Go for option 2, sync the contacts to (yuk) Microsoft Outlook Express / Windows Address Book. At least I did not have to have the full blown outlook!
6) Search, dig, hunt, and after finding the answer in the Samsung FAQ that says that you cannot download Samsung PC Studio, you have to buy it, and oh yeah it is $80, I find the link to where you can in fact download it off the Samsung site. Go figure. Download the software.
7) While waiting for the software to download, use Google to find out that it seems that no one has been able to use the software without the USB data cable, and Bluetooth does not do the trick. :(
8) Not one to be easily discouraged, and being a bit of a hacker, I decide to try it anyway. Just because others could not do it, does not mean that I won't be able to, right?
9) Install the software. I have wasted many long hours doing things based on the above premise (just because others were not able to does not mean that it cannot be done), but in this case it worked out, and was actually pretty straight forward.
10) Sync the contacts from Windows Address Book (ignoring the pop up complaining the it was not able to initialize Outlook, which is not installed).
11) Notice that all the contacts only have last names, no first names.
12) Notice that when the contacts were synced by Nokia, the Nokia utility synced them to Windows Address Book this way.
13) Being a bit of an anal retentive kind of guy, this is not good enough, so I:
14) Export the contacts from Windows Address Book into a CSV format.
15) Throw together a Python script (Python ROCKS!) that parses each line of the file, reading the last name and parse the first and last name from the last name field by splitting on the last space, and if there is no space, just putting the last name in the first name spot, and leaving the last name blank. Dump the parsed lines out to a new file. Examine the file, notice that it screwed up the header line of the CSV file and fix this manually rather than changing the script.
16) Delete all the contacts from the Windows Address Book.
17) Import the contacts from the new CSV file into the Windows Address Book.
18) Delete the contacts previous synced to the new phone, luckily this is easy enough to do using the Phone Explorer utility in the Samsung PC Studio.
19) Sync the contacts again, this time with much more satisfactory results.
20) Do some quick cleanup with the Phone Explorer utility to fix the non people entries so that they had a first name of "Acura Sunnyvale" instead of a first name of "Acura" and a last name of "Sunnyvale". Have I mentioned that I am a little anal retentive?

Whew! Done, and before Jesse :) I did have to manually go through and re-add the groups, but hey, there is only one grouping that I have (Family), and I had not kept a very accurate group in the previous phone, so it would have needed some work anyway.

For posterity, here is the Python code that I used to convert the file. So simple, straightforward, elegant, and it took me only about 5 minutes to write!

input = open("in.csv", "r") output = open("out.csv", "w")

for line in input.readlines():
line = line.strip()
fields = line.split(",")

lastname = fields[1]
lastspace = lastname.rfind(" ")
if lastspace != -1:
firstname = lastname[:lastspace]
lastname = lastname[lastspace+1:]
else:
firstname = lastname
lastname = ""
fields[0] = firstname
fields[1] = lastname

output.write(",".join(fields) + "\r\n")

input.close()
output.close()

There are a few bugs (or things that I consider bugs) that I have found. First is that, since it is a slider, when you slide it open, it unlocks, and you slide it closed and it locks. Very cool. Except that you can unlock it without opening it, but you cannot (that I have figured out) lock it without sliding it closed. So if you want to lock it after unlocking it without opening it, you need to open it and then close it.

Second bug is that it has this annoying beep each time you press any of the keys. I was pretty sure I was going to go into shock or something with it beeping all the way home as Jesse checked out all the settings. Turns out that there is a setting, so you can choose from 5 or 6 different sounds for the key presses, and you can control the volume. Or so you would think. Turns out that any of the choices for the sounds and the volume only control the number keypad, when you are dialing a phone number. The rest of the keys stay at full volume, and use the annoying beep. Unless you choose "off" instead of one of the sounds, and then it really does turn off the beep for all the keys. Huh?

Keep in mind that since I don't make all that many phone calls, I have only briefly used the actual phone so far, so bear that in mind about my complaining above. I am pointing out the faults, with of course none of the benefits. And I have all this swirling through my mind at 1 in the morning, so I am not able to get to sleep. Hence this post, not because it needs to be written, but more so that if I write it down, it will leave my head.

One very nice thing about the phone is that it has a very nice screen, full color, nice resolution. So true to form, one of the first things that I try to do is to modify the wallpaper. Bad move, this things in very non-intuative when it comes to the wallpaper.

First I notice that the easiest way to create a new wallpaper it to take a picture with the camera and then make that the wallpaper. I notice that the max resolution of the picture is 1280x1024, nice and standard, but landscape mode, wider than it is tall (as opposed to portrait mode, which is taller than it is wide), and it seems to crop the sides off the picture to allow it to display nicely on the portrait mode screen. I figure, what the heck, why be difficult, I will just create a 1280x1024 photo, and put it on the phone, see if that works.

I try to upload a picture to the phone, but oddly enough you cannot store the picture into the folder that the photos go into, you have to store them into a different folder, oddly enough namely the downloaded graphics folder.

This de-rails me a little, and I forget about doing the easy thing, so I decide to create a portrait mode picture, 1024x1280, but when I upload the picture (to the downloaded graphics folder), it complains that it cannot take a picture bigger than 1600x1200. Hrm, ok, I am 80 pixels too wide, ok, lets forget about the portrait mode, lets go back to the landscape mode idea, and just leave the extra space on the side for it to cut off.

Next try - a 1280x1024 landscape picture, well within the stated limit in the error message above of 1600x1200. Hrm, a new error, this one different, stating that the resolution of the picture that I am uploading is too big. HUH?

So I begin stepping down the size until it fits, which it finally does around 640x480. Great, now we are getting somewhere! I go select the picture as the wallpaper, and go look, and . . . crap! Nastly, ugly white bars like you would see when watching a wide screen movie on a TV with a normal aspect ratio. Grr!

I have beat my head against this brick wall for too long, so I decide to take a step back, and try a new approach. I remember seeing something about the actual size of the screen on the box or somewhere, so I go look that up and see that the actual size of the screen is only 176x220 pixels. OK, so I will make the picture in portrait mode, exactly 176x220 pixels, so the phone will not need to resize the image, and I might save some space as well.

Finally this works, the picture uploads fine, it fills the screen, no white bars, but it looks like CRAP... Going on instinct and quite, um, frustrated with the phone, I crank it up to 352x440, upload, and it looks better. Which makes no sense whatsoever, it does not matter how many pixels you have, as long as you are not making the picture display on a screen that has more pixels than are actually in the picture, you should not get a better picture by using more pixels and then shrinking down. If fact, if the algorithm for shrinking down the pixels is not so good, the picture can even be worse if you start with more pixels.

Oh well, don't try to figure it out and make sense of it, just go with it. Turns out that the biggest (and best looking) picture that I can get on the phone is 3X the screen size, so 528x660.

Makes no sense, but why tempt fate, just go with what works... I hope to post some pictures showing examples of the reasoning above with the extra pixels not looking any better, and showing a stretched picture that the 176x220 picture looked like, but it is late and hopefully now I will be able to get to sleep.

I am still slightly irritated that the pixels on the phone do not seem to be exactly square, in that the pictures that I have uploaded so far tend to look a little stretched from top to bottom, as if you were looking in a convex circus mirror (the kind where the middle is bowed out, but only from top to bottom, not side to side. Going to have to let that one go though, not worth figuring out the distortion factor and compensating for it in the Gimp.

To end on a positive note, I love the fact that you can create your own ringtones from MP3s! I wasted a lot of time playing around with creating cool ringtones from songs that I like that have a nice intro!

Posted by Scott at 12:30 AM | Comments (0)

March 8, 2005

Solution for slow printing to a Samba server from Win XP SP2

Shortly after upgrading my Win XP box to SP2, I noticed that printing became very slow, MS Word and Excel became very slow and would just freeze up for minutes at a time. I ran across this post about advice from a MS tech, and it worked for me.

1. Click Start, click Control Panel and open Printers and Faxes.

2. In the left column, please choose Add A Printer.

3. Click Next and choose "Local Printer attached to this computer" and click Next.

4. The printer wizard will search the printer and it will prompt you that it cannot find a plug and play printer. Please click Next

5. Click to choose "Create a new port" and choose "Local Port"; click Next button.

6. Type in the server and printer name for the printer in \\ServerName\PrinterName syntax in the pop up open box. Click OK.

7. Use the new port for the local printer.

If you are prompted for a password, there may not be a field in Windows XP in which to enter a password. Reset the password on the destination computer to be blank.

Restart the computer and test if your printer issue has been resolved.

Posted by Scott at 9:15 PM | Comments (0)

February 26, 2005

iPod shuffle, or more generically, randomness

I ran across an article discussing randomness, specifically as it relates to the iPod, both the high capacity units, and the iPod Shuffle. The article took us right to the point of getting interesting, and then boom, it was done. The basic idea is that people are seeing patterns in the shuffle, and calling foul. The author cites Paul Kocher, president of Cryptography Research, as saying that "Our brains aren't wired to understand randomness," but leaves the topic to die on the vine.

I think that the reason that we see patterns where there is only randomness, is that we tend to treat the group as a whole, and try to see causality, rather than individual, completely (well almost) unrelated transactions. In card games of chance, for instance, most people seem bound to the idea that what has come before somehow affects what will come after. This is true to some extent if the sample size is small enough, but when you go to Las Vegas, there are so many decks of cards mixed together, that taking one card out of play does little to change the chances of that card showing up again.

A more concrete example would be coin tosses - when you ask the average person on the street what the chances are for heads or tails in a coin toss, you will get an immediate, no hesitation answer of 50/50. As an aside, it actually is not 50/50, but that is another story entirely. But ask the same person what the chances are of getting heads after getting after getting heads 5 times in a row, and you get some hesitation, some confusion, and (usually) an eventually admission that there is still an even chance of getting heads vs. tails. This is usually followed by a strongly stated claim that the chances of getting 6 heads in a row is astronomically huge, and very unlikely, and this is where the train leaves the rails. Because in actual fact, since there is no causality between tosses, the chances of getting 6 heads in a row is exactly the same (1 in 512, or 1 in 26) as the chances of getting 1 head, then 2 tails, then 2 heads, then a another tail. Note that I implied some chronological ordering of my second, seemingly more random set, and I did not claim that the chances of 6 heads in a row is the same as the chances of getting 3 heads and three tails, with no ordering involved. The statement only works if order matters, which I think is where many people get thrown into a tizzy.

In the case of the shuffle, the idea is to play each song once and only once, before doing a reshuffle. To quote the article,

More specifically, when an iPod does a shuffle, it reorders the songs much the way a Vegas dealer shuffles a deck of cards, then plays them back in the new order. So if you keep listening for the week or so it takes to complete the list, you will hear everything, just once.

What people do not seem to understand is that where they see patterns, for example, a couple of songs from the same artist in a row, they are seeing randomness, because in order to actually prevent such a occurrence, the shuffle algorithm would actually have to reduce the randomness by taking into account the artist and album, and trying to spread songs from a particular artist and album evenly across the ordering of songs. This seems to be the other place that people get confused, is when they expect that random == even.

To see this a little more clearly, lets take an example of a collection of 500 songs, where each album has 10 songs, and we will ignore artists for now (partially because artists cannot stand to be ignored.) If I were writing the randomness algorithm, I would index all the songs, so the first song on the first album has index 0, the second song on the first album has index 1, the first song on the second album has index 10, etc. (Sorry for the 0 indexing, I just cannot help it.) Lets say the first song that gets picked is 58. What are the chances that the next number is 59? 1 in 499. What are the chances that the next song picked is 487? 1 in 499. But people are looking for ordering in the randomness, so lets look at songs from a particular album. In this case the chances of the second song coming from the same album as the first song are 9 in 499, or about 1.8%, meaning that if we were to run through this scenario 1000 times, the next song would be from the same album 18 times. The chance of getting a song from any other specific album is 10 in 499, or about 2%. Not much of a difference.

Another way that our perception makes randomness look patterned. In the scenario above, people would say that song 59 should not be next because it is in the same album, but if the first song picked were 59, they would have no problem with the next song picked being 60, because that is from a different album, even though it is the next song in the indexing sequence both times.

I guess the more succinct way of saying this, is that a random distribution is not the same as a even distribution.

The human mind pulls for even distribution, without an implicit acknowledgment of such, because people would complain about the even distribution as well. Would you accept something as a shuffle if you got to hear the first song from each and every album, then the second song from each and every album? I think not. The instant that you build in pattern avoidance in a randomness algorithm (well I just played a song from that album/artist, I had better pick one from a different album/artist), the algorithm is no longer pure, and certainly does not conform to the dictionary definition of random.

Posted by Scott at 12:37 PM | Comments (0)

February 25, 2005

Programming today

Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
(Rich Cook)

Posted by Scott at 9:07 AM | Comments (0)

January 17, 2005

DIY Digital Picture Frame: Part 3 (curses, foiled again)

Just taking a moment to write a review of the IDE to CF adapter that I chose for this project.

Except that I can not. Because I don't know if it works yet. Because it DOES NOT FIT! ARG!!!

Currently waiting for the male to female 44 pin extension cable to arrive, so that I can forge ahead to the next roadblock.

Yes I am feeling a little frustrated.

Posted by Scott at 7:17 PM | Comments (0)

January 14, 2005

DIY Digital Picture Frame: Part 2 (lilo.conf)

I started with the lilo.conf from the /etc/lilo.conf, and customized it from there. I changed the layout from the cdrom slightly - instead of having the files under /boot/XXXXXX, I copied everything into /boot.

I don't remember all the changes, and honestly I don't feel like looking up the starter lilo.conf, but I will go through what I am currently using:

# /etc/lilo.conf - See: `lilo(8)' and `lilo.conf(5)',

lba32
boot=/dev/hda
install=/boot/isolinux.cfg
backup=/dev/null
map=/boot/map
timeout=30
vga=791
default=Knoppix

image=/boot/linux24
append="lang=us hda=scsi initrd=/boot/minirt24.gz noicons nomce noapm nopcmcia noapic noagp noswap noddc quiet restore=hda1 BOOT_IMAGE=knoppix BOOT_IMAGE=linux24"
initrd=/boot/minirt24.gz
root=/dev/hda1
label=Knoppix
read-only

Some of the options may be different, based on your particular computer - I am pretty sure that it customizes the lilo.conf a little based on what it finds. Some of the more interesting things are:

install - I had to change this to point to the right place in /boot.

map - honestly not sure what this is for, but it is an output file, so don't stress that you cannot find boot.map before running lilo. A real map is generated on the fly at boot time, so this could probably be deleted after lilo.conf is run, but it is small, so I have not tried to do this.

vga - YMMV - this is the value that I used, which gives me 1024x768x64,000 - if you want need something different, based on your hardware, Google "vga lilo", and you will get a lot of hits with tables to figure out what you want. I think this may actually only affect the screen size during boot up - once it got into X, it went to full size even when I had this set to a different value, one that only used up a small part of the screen.

image - had to change this entirely - pointed at vmlinuz, but after a lot of trial and error (I am a hack at this sys admin stuff, I only scrape by), I figured out the linux24 is the boot image that I needed.

append - this is the interesting part - this allows you to pass boot options to the Knoppix boot process. There was originally a vga=791 in here, but I had to take it out because lilo.conf choked all over it. First thing that I had to change was lang - it was set to German, which made things interesting when it booted the first time. Basically I had to boot from the cdrom again to fix that one ;) There were quite a few hdx=scsi lines, I nuked all of them except for hda, since I am never going to have more than one "hard drive" in the system. I had to add initrd=/boot/minirt24.gz - I think this was what finally got me booting off the hard drive, with the system convinced that it was booting off the cdrom. You can look in the /cdrom/boot directory for the details on the noXXXX options, but I just pretty much turned everything off that I knew I was not going to need. For a future project, I am pretty sure that I am going to need pcmcia since it does not have a USB port, so I will obviously remove the nopcmcia option. The restore option I set to the hard drive - I am making the hard drive mounted read only, so it does not actually successfully back up on shutdown unless you change the mount options after booting - you may need to do this a couple of times until you get everything right. Even though the backup does not work all the time, since the option is there, once the backup is there - it will restore just fine, which is really all you want anyway, because once things are set, they are not going to changing, so you don't need to back it up evertime that the system shutsdown cleanly. BOOT_IMAGE - yes two of them, and trust me on the order - you can play around later, but this way works.

initrd - not sure why this has to be there twice, but again, change at your own risk from the value that I have here.

root - needs to be set to the root partition - unless you are feel strongly about it, leave it be, and only set yourself up with one partition - it is not like this is a workstation or server, this is a embedded Linux appliance ;)

label - leave it be if you know what is good for you.

read-only - of course - that is the theme of this project!

Getting late, will make more entries later on the Perl script and the Compact Flash details. At this point I am really frustrated with the Compact Flash to IDE adapter details - it came with 44 pins, not 43, but of course the interface in the laptop has one of the pin holes filled in - Grr! Good old metal fatigue, 10 minutes of bending back and forth, and walah, no more pin. But of course it still does not quite line up correctly, a little high and a little left, so I need to go scrounge up a male to female 44 pin 2 inch ribbon from Fry's tomorrow. I also need to post details on the other changes that I made to make the 7 in 4 USB adapter work.

Posted by Scott at 10:59 PM | Comments (0)

January 13, 2005

DIY Digital Picture Frame: Part 1

I ran across a couple of articles about DIY digital picture frames, and decided that I just had to try it myself. With an old laptop, a little elbow grease, and a lot of duct tape, it should be easy enough to do.

Turns out, all the articles detailed the easy part - the hardware. The hardware part has been easy so far, but I have had a time of it with the software. My requirements are:

- Cheap
- Decent Looking
- Easy to use
- Bulletproof
- Quiet

So of course I am going with Linux, since there is no way that I am going to pay for a Windows license for this thing. That would immediately nuke cheap and bulletproof.

I initially figured that I would try to go with a non X install, to keep the hard drive space and memory needs low, but the only thing that I could find to display the images was xgv. I guess others have had good results with it, but I have not been able to get it to display images well - they look really bad and blocky. YMMV. After a few evenings mucky around, I finally decided that this was not going to work. The other problem that I was running into was that doing a RedHat install, a "minimal" install was still almost 500 MB, way over the 64MB limit that I was shooting for (more on why later).

After doing some more surfing around, I ran across Damn Small Linux, sometimes known as DSL. It is derived from Knoppix, a Linux install that is meant to be run from a bootable CD. But this guy just could not leave well enough alone, and he wanted to be able to run not off any old CD, but off a business card sized CD, so his target limit was around 50MB. Perfect! And everything is mounted pretty much readonly, except for some parts of the filesystem, which are mounted in memory. Even better (more on why later)!

It took some poking around on his site and on the Knoppix site, to figure out how to get this to work off a hard drive, rather than off the CD. The instructions for running off a hard drive ended up with either an installation that knew that it was on a hard drive, and it acted as such, ie, no read only file systems and such, or ended up taking a lot of space. I finally figured out that once it is booted up, you just need to copy everything from the /cdrom directory to the root of the otherwise empty hard drive. Then you unmount the /boot directory, and remount it onto the hard drive (to make running lilo painless) on the /boot directory. Then copy over the lilo.conf from /etc/lilo.conf to /boot/lilo.conf, and run lilo with the option specify a particular lilo.conf file. I plan to post explicit instructions in a future post, a) to help anyone else, and more importantly b) so that I have a reference when I forget how ;)

I mentioned earlier that I wanted an install of 64MB or less, and that I wanted everything mounted readonly. My hope is that this will lead to a more robust system, since if nothing is ever written to disk, then nothing can be half written if the thing gets unplugged, and so a sudden loss of power should never be a problem. The other reason is that since hard drives (especially in an older laptop) are noisy and hot, I wanted to replace the hard drive with flash memory, using an IDE to Compact Flash adapter. Compact Flash has pretty unlimited reads, but there is a limit on how many times you can write, so I did not want to have any writes going on, or it will just stop working at some point. I got the IDE to CF adapter from ACS, but I have not installed it yet (still tweaking the settings), so I cannot recommend it just yet, but it seems to be well put together so far.

So at this point, I have the laptop apart, the power supply out of the laptop docking station (the external power supply is AWOL), and the OS install is almost ready to go. I am done with the perl script that will be handling the image display duties, and the 7 in 4 flash media to USB adapter is working.

I plan to post explicit instructions on installing to the hard drive, the lilo.conf file that I am using, the perl script, and instructions on getting the flash media adapter working.

Thanks go out to my mother in law, for kindly donating a couple laptops for my project.

Posted by Scott at 10:53 PM | Comments (0)

December 29, 2004

Cart before the horse

Last time I checked, it was the movement of tectonic plates that caused most earthquakes, not the other way around.

Posted by Scott at 8:33 PM | Comments (0)

November 17, 2004

OTP (One Time Pad)

There seems to be a huge misconception about what a one time pad really is and how/why it works. Bruce Schneier wrote a very easy to understand article on the subject, for those that would like to know.

Posted by Scott at 6:32 PM | Comments (0)

October 23, 2004

Nice Try!

nicetry.gif

Who can spot the bug? (I did not see it myself until it was pointed out to me by a more observant reader)

Posted by Scott at 11:50 PM | Comments (0)

September 29, 2004

Tabbing and Emacs

To make tabbing work better in Emacs when other editors are being used as well, i.e. display 4 spaces for a tab character, insert spaces instead of tabs when you hit tab:

;; Turn off tabs
(setq indent-tabs-mode nil)
(setq-default indent-tabs-mode nil)

;; Set the tab width
(setq default-tab-width 4)
(setq tab-width 4)
(setq c-basic-indent 4)

Posted by Scott at 8:53 AM | Comments (0)

September 20, 2004

How to tell everyone what an idiot you are

Hit reply-to-all on an email that you have not read.

This email went out to (what I now know is) a large email alias about a migration of information. Apparently there are many people on the alias who do not know what to do about this information or why they are getting the email. So they replied. To everyone. So far over 100 have replied. To all.

And the kicker is, the email clearly says that this migration will happen automatically, and you probably do not need to do anything. If you do need to do anything, an email will be sent to you with details and instructions on exactly what to do.

At this point, the number of people replying to all, pleading with others to stop replying to all is running neck and neck with the number of people replying to all to say that they don't know why they got this email. if you don't get the irony, please stop reading my blog - you won't understand most of what I have to say.

I think that the best reply to all was a random recipe...

Posted by Scott at 2:06 PM | Comments (0)

September 18, 2004

WinAmp/DoSomething/MovableType --> Now Playing

This is pretty cool... Thanks to a post on A Whole Lotta Nothing, I now have an automatically updating "Now Playing" section!

(UPDATE) And since I almost never listen to music now, it is sitting idle and I have commented it out...

Posted by Scott at 6:28 PM | Comments (0)

April 5, 2004

Score one for the good guys!

Down with Spam!

Posted by Scott at 8:32 PM | Comments (0)

December 17, 2003

Waiting

The frustration of waiting for a compile to finish. Time stops. Productivity stops. When the build be done?

Tomorrow is another day.

Posted by Scott at 5:45 PM | Comments (0)

November 24, 2003

Finally...

All ISOs are safely downloaded and on the fileserver. Tomorrow, burn them, then maybe build the box on Friday.

Gone are the days in which I would stay up all night mucking around on the computer. Not sure if that is a loss of youthful vigor, or a gain in wisdom. Now I just cannot fall asleep because I am thinking about that which I am not doing. I give it five more years, and I will be able to sleep like nobodies business.

Posted by Scott at 10:19 PM | Comments (0)

Dual booting here I come (maybe)

So it is not so straight forward after all. First Partition Magic would not work, which should not be a surprise, as my version is almost 10 years old. Then ntfsresize, a little known Open Source project that ships with Mandrake and other Linux distros, could only reclaim 2Mb from the NTFS partition. I tried to defrag to free up more space at the end of the hard drive, but of course the MFT was at the end of the drive.

Finally success! Thanks to Diskeeper, I was able to defrag on a reboot, allowing me to move the MFT to the begining of the disk. 8 whole Gigs I was able to free up for the partition.

Now all I have to do is to wait for the Red Hat 9 ISOs to download, burn them to disk, and I am set to go. 8 Gigs should be plenty, right? At least until I ditch WinXP and make the whole hard drive Red Hat. Hmm, maybe not.

Just need to remember to burn the keep the CD install around for when Red Hat has stopped letting you install, and forces you to use Fedora.

Posted by Scott at 9:50 PM | Comments (0)

November 23, 2003

RedHat Linux 9

Going to try to install RedHat on my laptop, hopefully without killing the WinXP install. Dual boot, here I come.

I have at times been a MS basher, and at times looked down on Linux for being "mainstream", but you know what? Whatever works for the job, should be used for the job. Guess I just have gotten more pragmatic as time has past.

Posted by Scott at 7:06 PM | Comments (0)