Where have all the mailboxes gone?

This morning, I stopped at Almaden Plaza on the way into work to grab a cup of decaf from Starbucks and to drop a check in the mailbox there (I don’t leave checks in my mailbox at home any more for fear of theft). I failed in both missions.

The decaf of the day at Starbucks was Decaf Verona Blend; I don’t like the regular Verona Blend, and didn’t think the decaf would be an improvement.

And the mailbox across the parking lot was gone — there was still a UPS dropbox, but the mailbox vanished with no forwarding address. You’d almost think the Post Office didn’t want people to mail things any more….

*sigh*

Today’s technical tidbit

The following code fragment works fine in Firefox but fails in IE:

myform.appendChild(tags);
tag = document.createElement("input");
tag.name = "button";
tag.value = "Tag";
tag.type = "submit";

But reordering it to set the type before the value works fine in both browsers. To play it safe, I decided to set the type immediately after creating the element.

myform.appendChild(tags);
tag = document.createElement("input");
tag.type = "submit";
tag.name = "button";
tag.value = "Tag";

Morse Code Ringtone Generator

And now for something completely different — actual working code!

A long time ago, I decided I wanted a very distinctive ringtone for my cellphone, so I wrote a Morse Code ringtone generator in Rexx, which produced Nokia ringtones in a format suitable to cut-and-paste to AT&T Wireless’s text message sending page.

AT&T Wireless is gone now (although I wouldn’t be surprised to find the name revived once SBC…err, AT&T…buys BellSouth, and, along with it, the rest of Cingular), and so is my Nokia phone. And I find myself writing very little Rexx these days.

So I reworked the code, this time in Python, and now it creates an iMelody (.IMY) file, suitable for several brands of phone, including Motorola. Getting the file to the phone is up to the user (the easiest way, if your phone and PC support it, is Bluetooth file transfer).

One reason I haven’t posted this code before is that I thought it would be difficult to get IBM’s permission to do so — even though I wrote it on my own time, IBM has rights to it through it. But it turned out to be surprisingly simple; since it was clearly not competitive to IBM business, my manager was able to give me permission to post it, as long as I included a suitable license and made it clear that it was my personal work and not the company’s.

Cut and paste the following as morsemelody.py or download it here; share and enjoy.

#!/usr/bin/python

# MorseMelody.py
# Copyright (c) 2006, David Singer (https://readthisblog.net)

# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:

# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.

# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

import sys
if 1 >= len(sys.argv):
  print sys.argv[0], 'word1 [words]'
  print
  print "Creates an IMelody file which plays its argument in Morse code."
  print
  print "The output file is named 'word1'.imy"
  sys.exit(0)

code = {}

code['A']   = '.-'
code['B']   = '-...'
code['C']   = '-.-.'
code['D']   = '-..'
code['E']   = '.'
code['F']   = '..-.'
code['G']   = '--.'
code['H']   = '....'
code['I']   = '..'
code['J']   = '.---'
code['K']   = '-.-'
code['L']   = '.-..'
code['M']   = '--'
code['N']   = '-.'
code['O']   = '---'
code['P']   = '.--.'
code['Q']   = '--.-'
code['R']   = '.-.'
code['S']   = '...'
code['T']   = '-'
code['U']   = '..-'
code['V']   = '...-'
code['W']   = '.--'
code['X']   = '-..-'
code['Y']   = '-.--'
code['Z']   = '--..'
code['0']   = '-----'
code['1']   = '.----'
code['2']   = '..---'
code['3']   = '...--'
code['4']   = '....-'
code['5']   = '.....'
code['6']   = '-....'
code['7']   = '--...'
code['8']   = '---..'
code['9']   = '----.'

input = ' '.join(sys.argv[1:])
outfilename = sys.argv[1]+'.imy'
outfile = open(outfilename,'w')
outfile.write('BEGIN:IMELODY\n')
outfile.write('VERSION:1.2\n')
outfile.write('FORMAT:CLASS1.0\n')
outfile.write('NAME:%s \n' % (input))
outfile.write('BEAT:700\n')
outfile.write('STYLE:S1\n')
outfile.write('VOLUME:V15\n')
outfile.write('MELODY:\n')

note = '*5f'
song = []
for word in input.upper().split():
  for letter in word:
     if letter in code.keys():
       char = code[letter]
       for element in char:
         if element == '.':
           song.append(note+'3;')
           song.append('r3;')
         else:
           song.append(note+'1')
           song.append('r3;')
       song[-1] = 'r1'
       outfile.write('  ')
       outfile.write(''.join(song))
       outfile.write('\n')
       song = []
  song.append('r3;r1')
# We'll be left with an unwritten wordspace, but no harm done.
outfile.write('END:IMELODY\n')
outfile.close()
print outfilename, "created successfully."


Shana Tova 5767

It’s been a busy week, and, indeed, a busy year.  And although many things went well this year, I’ll always remember it as the year I lost my Mom.

I’m looking forward to 5767.  Shana Tova, and may you be inscribed for a good year!

Work is the curse of the blogging class

I barely got out of my chair today at work; I was nearly heads-down designing and coding enhancements for an upcoming project.  I didn’t even check my e-mail from noon till 5, which is almost unheard of.

But now I’m home, and the laptop is safely hidden away in my briefcase, at least until Sunday.  Good thing I have other computers.

Jeff’s at a party in Morgan Hill, and since he doesn’t drive yet, we had to schlep him.  So Diane and I took advantage of that to go to Rosy’s at the Beach, where she had Pepper-encrusted Salmon and I had Salmon Tacos.  We both enjoyed our meals; I’d go back cheerfully (in fact, we will be going back in a week and a half for my 30th service anniversary lunch, though that meal will probably be without beer or wine).

I think I know what I want for my birthday

Even though I have no real use for portable video, I want one of the new 80GB iPods.  Or maybe I want an iPod nano, because it’s small and has no moving parts.  I don’t think I want an iPod shuffle, though it is awfully cute.

I’m glad I don’t have to pick out my own present.

Limping along with USB

I didn’t have to dig out the other 3.5″ enclosure after all — I switched to a USB connection, and suddenly the Mac can see the hard disk.  I can’t boot from it, though, so I’ve had to rerun all of the updates I’d made since I switched.  But my data is back.  For now, anyway.  With luck, I’ll have some time this weekend to do some better diagnosis.

My data is on vacation

I wanted to check some stuff on my Mac mini, but when I turned on the display, I was greeted by a black screen, and nothing I could do would provoke any activity.  I also couldn’t ping it, so I decided it had died.

After hunting for the power button, which I hadn’t used in a long time, I rebooted…to no avail.  So I dug out my copy of “The Missing Manual” and tried some of the exciting power-on keystrokes.  Apple-V gave me a very short bootup console log, ending with something about being unable to find something on /sbin.  So I tried again, this time with the Option keystroke to let me choose my boot device.

When I chose the built-in disk, all was well — it was even able to mount the disk in my expansion unit.  But I didn’t leave well enough alone, since I really wanted to boot my new disk; instead, I powered off, and then powered off the expansion unit.

When I tried to turn the unit back on, I didn’t see the blue power light.  But by wiggling the power cables, I got it to come up again…but not enough to boot.  So I went back to the built-in disk, and this time around, nothing I could do would mount the external disk.  I could, however, see a USB flash drive that I connected to the expansion unit, so it’s not completely dead.

At least there’s no unrecoverable data on the external disk (or, for that matter, the internal disk) — I hadn’t gotten around to moving anything critical to the Mac, just lots of media which would be tedious to recover.

I guess the next step is to dig out the 3.5-inch USB enclosure I decided not to put on craigslist and see if the disk is the culprit.  Feh.

Jeff’s thoughts about 9/11

I’m going to turn over my blog to Jeff for his thoughts about 9/11.

I was very conflicted about whether to write about 9/11. When I was debating whether or not to [continue my] blog, one of the considerations was that I’d be writing today. It came down to whether I had anything about 9/11 that I wanted to tell people. I did.

I didn’t lose any friends or family members that day. I don’t know anyone who was near Ground Zero. I didn’t sing God Bless America on the steps of Capital Hill. Yet, the Attacks did change much of my outlook on the world. Before, I didn’t care much about the rest of the globe, outside of Israel. And why should I? I was only 11. My largest priority was surviving my first month of Middle School.

Somehow though, 9/11 changed that forever. Suddenly for me and perhaps the whole country in general, what mattered in the middle of Asia meant a great deal. The entire world slowly became important to me, whether each country had anything to do with 9/11 or not. I don’t know why: perhaps when I suddenly realized that I was interested in Afghanistan, I became interested in Italy. And here I am today, naming the capitals of countries many people know nothing about.

I suppose this led to my interest in American politics too. Oh, it didn’t exactly spring from nowhere. Even at the age of six I had hoped Clinton would be reelected; when I was ten on Election Day a few of my friends and I screamed “Bush sucks!” on the playground, only to be answered with “Gore sucks!” But after 9/11, I actually knew why I thought this way, aside from my parents thinking that.

One more way the 9/11 Attacks changed my outlook: my determination not to stereotype ethnicities. When we invaded Afghanistan, I decided that I would not judge Afghans based on the actions of the Taliban and Al-Qaeda. I don’t know what brought this on, but it carried over to Arabs and Muslims in general. I guess I have to thank my history teachers in 6th and 7th grades for making clear the difference between the terrorists and all the other Muslims and Arabs. Perhaps I should even thank President Bush: he made it clear in a speech nine days after 9/11 that most Afghans and Muslims were just regular people, not murderers or people who wanted us wiped off the globe.

Whatever the case, 9/11 affected me. The impact it had on me can’t be compared to that on the people who lost loved ones, but still, it affected me. For better or worse, much of who I am today is because of 9/11 and what happened afterwards, globally and personally.

In my CUPS

This is going to be one of those postings that my mother wouldn’t have understood. But I thought I should save what I’ve learned today about setting up printers on Mac OSX 10.4 so I’ll have them next time around.

I was trying to solve two problems when printing from the Mac:

  • When I printed to my Samsung ML-2151N, it would take minutes per page
  • I couldn’t reliably print to my Brother MFC-7820 at all

I could, of course, print just fine from my Windows XP systems.

For the Samsung, I suspected I had a bad driver. The system showed three different drivers which claimed to be for the ML-2150 family, two of which had the same name. So I went to linuxprinting.org, which pointed me to the new Gutenprint drivers. I tried installing them, but trying to print failed. I suspect the problem was that I didn’t have a proper level of Ghostscript, but while reading the site, I eventually found a claim that there was a good Mac OSX driver on Samsung’s German site. After some searching, I found this page, which contained an archive of new PPD drivers.

I uncompressed it and tried to install the English-language file. It didn’t ask for permission to run as root, so the install failed; I tried again, this time just “installing” to my desktop. Then I dug into the file to find the actual PPD file at

~/Desktop/Library/Printers/PPDs/Contents/Resources/en.lproj/Samsung ML-2150 Series.gz

I needed to copy it somewhere the system could find it, and I also wanted to get rid of the bad drivers, so I went hunting, and discovered I had Samsung printer drivers in two different locations on the system:

  • /Library/Printers/PPDs/Contents/Resources/en.lproj
  • /usr/share/cups/model

I deleted the ML21xx drivers in both locations, then copied my new driver to the first location, since that’s where the installer wanted to put it.

And it worked — I can now print to the printer at something approaching full speed.

The MFC-7820N turned out to be much easier; Brother had posted a driver on this page. The page shows a PPD file and a CUPS driver, but they both link to the same package, which expands into a self-installer, which worked just fine (although it required a system restart, which probably shouldn’t have been necessary). I also found a firmware update, but I haven’t gotten around to trying it yet.

And in the meantime, I’ve also installed a new version of Ghostscript, just in case.

I remember when I thought I was going to treat the Mac as an appliance. *sigh*

1006 pages, and worth it

I finally finished last year’s Hugo winner, Jonathan Strange & Mr. Norrell, by Susanna Clarke.  The paperback edition is 1006 pages long (I guess the hardback was only about 800 pages), so I wasn’t able to read it in a single sitting…or even a single month.  But I’m glad I didn’t let the length discourage me.

And even though the book is rather long, loaded with footnotes, and only intermittently filled with action, it was well worth the time.  I raced through the last 200 pages or so, wondering how the author was going to tie together the threads of the story — I wasn’t disappointed, even though not everything was neatly wound up (much like life itself).

Recommended.

Remembering simpler times

I was sorting through some old papers tonight, including old tax returns.  I decided I didn’t need to save the instruction booklets, but I’m glad I didn’t just recycle them.  Until the 1994 tax year, the Feds printed our Social Security Numbers right on the mailing label; starting with that year, they moved the peel-off label (complete with SSNs) inside the booklet, at least through 1996, which is the last booklet I found.  The State of California printed the numbers on the mailing label at least through 1997.

I bet they don’t do that today.

Wakeup call

I woke up in the middle of the night with the phrase “federal pinhead” going through my mind.  I wish I knew what my subconscious was trying to tell me…it couldn’t have anything to do with the current Administration, could it?

The question is, “Do I feel lucky?”

I reached Magnolia today, and they think the problem with the TV (for those tuning in late, it’s a Panasonic PT-52DL52 DLP) is likely to be the lamp.  I’m somewhat dubious, because I only replaced it 15 months ago, and we don’t use the TV all that much (maybe 3 hours a day on average) — but Panasonic does have a history of lamp problems (in fact, the same year’s Panasonic LCD TVs are now the subject of a class action settlement based on lamp issues).

The new bulb would be a bit over $400.  They did say that if it doesn’t fix the problem, they’d take it back and apply the cost towards a service call — the next likeliest problem is the ballast, which would be about $450.

So I went shopping this evening; Costco had a bunch of 720p sets for about $1800 (with stand).  I didn’t see any 1080p sets there (but they had a great buy on toilet paper, so the trip was well worth it).  Circuit City had a Sony KDS50A2000 (1920x1080p) for $2250 (no stand) — the picture looked great in the minute I spent, and the A2000 line is getting good reviews on AVSForum.  They also had a few other 1080p sets, but mostly DLP, and I’m not sure I want to go that route again.

Tomorrow, I hope to visit Magnolia and see what they’ve got; I’m partial towards them because I can actually talk to the technical people, unlike, for example, the authorized service center in this area.

If I knew I could fix my existing set for the price of the bulb, I’d go for it — no, it’s not 1080p, but then again, I don’t have any 1080p sources.  But if I might be looking at $850 or so to fix the set, it’s a different story.

So I guess I have to decide whether I’m feeling lucky or not.  *sigh*

Of space and time

Today was a good day at work; one of my colleagues celebrated her 25th service anniversary with serious chocolate for all.  And I got another gigabyte of memory for my ThinkPad.  The memory, of course, was a small DIMM, packed in an appropriately-sized cardboard box, which, in turn was shipped in a 9x13x5 box.  Fortunately, instead of using foam or peanuts to pad the box, the company used Sealed Air’s inflatable padding, so there’s far less junk for me to deal with — but it still seemed all out of proportion.

And tonight at home, we had another organization session with Lisa.  At the end of nearly three hours, we’d filled three bags with stuff to be shredded (not to mention the few documents I shredded on the spot), as well as several bags of recycling.  And now there’s space in two of the drawers in our office — next time, we’ll try the other side.

I also went through the last of our diskettes, degaussing the few that had possibly interesting information, and putting the others (along with the degausser) in a bag to go to work for recycling or reuse there.  One of the guys in our stockroom takes things to RAFT on an occasional basis, which is one of the few places which can probably put diskettes to productive use these days.

If I knew what I was doing, it would go faster

I spent all day Friday trying to get MoinMoin, Apache, and an IBM-internal authentication/authorization module to play nice together.  I would have been better advised to leave early in the afternoon like everyone else.

Today, I was back at it again; and by lunchtime, I thought I had it nailed.  Until, that is, I showed a colleague, who noted that I wasn’t really using SSL for the userid/password.  And then I also noticed that only the front page of the wiki was visible at the root of the server — all of the other pages were down a level in names.

Fixing those problems took me the rest of the afternoon.  But now I’ve got it working, for sure.  Except for a couple of corner cases, and maybe they don’t matter that much anyway….who needs informative 403 responses, anyway?

I’m ready for another three-day weekend.  Unfortunately, the next one is Yom Kippur!

Old books from LACon

One of the nice surprises at LACon was to be found in the Con Suite. LASFS stocked the suite with books from their library — books that they were discarding, and that attendees were urged to take home.

Not all of the books were gems, but I kept finding ones I needed. I even read one during the con, The Syndic, by C. M. Kornbluth. I’d read it once before, back in elementary school or junior high — I’m sure I got more out of it this time. I also picked up a copy of Bester’s The Demolished Man, as well as Volume IIB of the Science Fiction Hall of Fame. But it turns out I already had both Volumes IIA and IIB in SF Book Club editions, so I guess I’ll pass that one on to someone else.

And I’m still sorting through the books I picked up in the huckster room; I’ve already finished one, Poul Anderson’s Operation Chaos.
Now I’ve returned to the book I was reading before (and during) the con, last year’s Hugo winner, Jonathan Strange and Mr Norrell, by Susanna Clarke.  I’m not quite sure why it’s fascinating, but it is — I can’t wait to find out what happens to English magic.

I know more than I think

We’re just back from friends who hosted a Labor Day weekend barbecue and games party.  One of the games we played was the TV edition of “Scene It”.  I thought I’d do terribly, because I watch almost no TV (about the only show I watch routinely is Monk).  But I guess I’ve absorbed more than I realize, because I was able to identify shows like Survivor, The Simple Life, and Major Dad, none of which I’ve ever seen.

I don’t know whether to be proud of this or ashamed, but there it is.

We may be back in the TV market

Our not-so-trusty Panasonic PT-52DL52 is flickering more and more every day (we are not alone in this), and it’s getting to the point that I’m giving serious thought to replacing the set (though I’ll call Magnolia Hi-Fi first — that’s where I bought it, and they fixed it the last time we had problems, at a reasonable price).

I don’t want to buy another DLP set (I can see the rainbows at times), and I don’t want to buy a Sony. We still watch enough 4:3 material that burn-in might be a problem on a plasma.

Any suggestions? Any recent experience to share?

[updated:  I don’t want to go any smaller than the 52″ set we have now, and probably nothing over 56″ would fit.]

Nostalgia? I’m soaking in it!

As promised, XM’s 60’s on 6 did an all-afternoon “Sonic Sound Salute” to the late, lamented WLEE/1480 today. I grew up with WLEE, so I wanted to be sure to hear as much of the show as possible; I even figured out how to record from DirecTV to my DVD burner, something I hadn’t done since the end of Enterprise Season Three.

I did get one thing wrong: the start time. The show started at 1pm Pacific; I thought it was 2pm. But I tuned in on my way back to work and only missed a few minutes.

XM’s DJ, Terry Young, had actually worked at WLEE from 1973-1977, so he was spot on with the local color, knowing how to pronounce all of the local businesses’ names correctly, as well as getting all of the high schools’ nicknames right. On the other hand, I don’t think all of the jingles were authentic WLEE jingles, at least not from the ’60s — and they never referred to themselves as “148”…always “1480”. I’m also a little dubious about the voice of Shane; I remember it as being deep, full and rich, not strained.  [ahh, I listened to a bit more, and Terry admitted to mimicing Shane.]

But despite the little glitches, it was great to hear Big ‘Lee again!