Because I am a techie geek

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!

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.

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.

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 🙁

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 1280×1024, 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 1280×1024 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, 1024×1280, but when I upload the picture (to the downloaded graphics folder), it complains that it cannot take a picture bigger than 1600×1200. 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 1280×1024 landscape picture, well within the stated limit in the error message above of 1600×1200. 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 640×480. 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 176×220 pixels. OK, so I will make the picture in portrait mode, exactly 176×220 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 352×440, 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 528×660.

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 176×220 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!

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.

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.