The content of this blog is my personal opinion only. Although I am an employee - currently of Nvidia, in the past of other companies such as Iagination Technologies, MIPS, Intellectual Ventures, Intel, AMD, Motorola, and Gould - I reveal this only so that the reader may account for any possible bias I may have towards my employer's products. The statements I make here in no way represent my employer's position, nor am I authorized to speak on behalf of my employer. In fact, this posting may not even represent my personal opinion, since occasionally I play devil's advocate.

See http://docs.google.com/View?id=dcxddbtr_23cg5thdfj for photo credits.

Sunday, December 28, 2008

One of those days: PhoneTools, Mozy

This has been one of those days. Well, afternoon and evening.

My goal was to write and run my first Java applications on my phone - the Motorola Ming A1200 a friend had loaned/given me.

Lots of time spent downloading various SDKs and REs and .PDF manuals from Motorola and Sun. Apparently Java is not like Perl's CPAN: you can't just download one module, and have it pull all the rest of the modukes it requires. No, you have to download them one at a time.

Along the way had to install Motorola's USB Driver. I hoped that this would allow me to look at the cell phones files without using Motorola's phone tools, which I hate. Yes and no: the phone appears to be a mass storage device, but try as I might I can't find the files. Thew directory structure appears to be empty.

So, it looks like I will have to install Motorola Phone Tools. Did I mention that I hate Motorola Phone Tools? They are a cobbled together user interface for synchronization. They have their own file copy GUI. In the past, I much prefer to just access the files directly. But since I can't figure out how to do so...

But where is my copy of PhoneTools? Google Desktop can't find it on the laptop I am using. Was it on the laptop whose disk I reformatted a while back? ... Gosh darn, not only do I hate PhoneTools, but I have already purchased it twice, once with a physical CD, once just as a download. But I can't find either, so I purchase the download again...

Perhaps I left it on my Teraserver? But I haven't used my Teraserver since my upstairs Comcast cable modem failed - since it needs to be close enough to the WLAN router. It's not worth moving the machine around.

Although, as Murphy would have it, when I have paid and am downloading, *that* is when I find the existing copy. Apparently Google desktop was not indexing plain old directory names.

Determined not to let this happen again, I try to burn a CD. Nope, can't... for some reason this PC can't burn a CD. I suspect because it is my work PC, and IT may have disabled.

Hmmm.... if I can't use my Teraserver as my "permanent" storage, at least not until I rearrange networking, or at least get the upstairs Comcast tap fixed, perhaps I should store such paid-for files on some web based storage.

Google Docs? No, restricted file types and sizes. the Google mail filesystem? No, restricted size.

How about one of those services like Xdisk or Mozy?

AOL is closing down Xdisk - nice of them to allow folks to offload their data as a .ZIP file.

I start installing Mozy, but then realize that it is trying to backup large parts of my PC, not just the single file I want. So I hit cancel... What is it about "backup" tools like Connected and Mozy, that they can;t behave well to a cancel button? Eventually I had to reboot.

I considered uploading PhonTools.ZIP to Geocities, but I wonder of I would be accused of illegal file sharing. Geocitis allows uploads, and has the space, but doesn't provide a way to make things private.



TANSTAAFL: there appears to be no such thing as free web storage.

But it sure would be nice. I am becoming more and more web centered.

Make sure that you have an exit strategy, a way to recover your data, before becoming dependent on something like Xdisk or Mozy. Or, for that matter, Yahoo Mail, Geocities, or Google Docs or Mail. Yesterday I realized that I could not manage stale yahoo mail en masse. I don't have the faintest idea as to how hard this will be if ever Google Docs or Google Mail evaporates. t least Google Mail allows POP and IMAP>

Perhaps the real moral should be that I should own all of my storage, and that my storage should be on the web. But I grew so tired of managing my own web exposed servers. I want to pay somebody lse for the privilege of applying all of the urgent patches.

Saturday, December 27, 2008

Financial websites - why not read-only access?

I've been thinking about switching from Quicken on my PC, to a web-based financial tracking site.

Something like
  • Quicken Online - lousy features compared to Quicken PC, mainly for beginners
  • Yodlee MoneyCenter
  • Mint - apparently professional, but a bit fascist, doesn't make it easy to have user defined categories
  • Wesabe - emphasizing social networking

There are many, many, others.


  • I have too many computers. I want o be able to access from work, and from home, and from my phone, and...
  • I'm tired of having to re-set things up when I switch PCs. And, no, the migration tool seldom works, usually because I can't power up the dead machine to migrate from.
  • I want my wife and I to be able to simultaneously access
  • Basically, I have just about given up on having a personal computer. Or is that "a single personal computer". If my company IT allowed me to use my personal machine at work, then maybe; but they don't, so I am being pushed away from the PC-centric model to the web-centric model.

The security implications are scary: one website, with access to all of your passwords and accounts for other financial websites.

Wesabe makes a point of its security model: apparently they store the passwords, etc., on your PC, and never put the passwords onto their server. I imagine they run some client side code that accesses your other financial sites, and then filters it to upload to Wesabe.

  • But, then Wesabe may not allow the sort of ubiquitous access I desire. Does it?

Mint emphasizes that their access to your financial data is read-only. They also emphasize that the actual passwords, etc., are stored. not at the Mint site, but at Yodlee - which apparently provides such services to many banks already.

  • One poster points out that this is all well and good, but if the hacker is inside Mint or Yodlee, then... Well, this poster says that they should at least be bonded to indeminfy the user against that risk.
  • Wesabe says the developed their own screen-scraping approach to accessing finanicial websites, in part to allow them to be free as long as possible, and not to have to pay fees to Yodlee.

OK, okay, so security is an issue.

So, the thought occurs to me: why can't I give this "aggregating" sites like Mint and Wesabe read-only access to my other financial websites? Read-only access to my bank, my 401K, etc.?

Most of the things that I want to do on such a site are read-only - track my investments, look at my asset allocation and ensure that it is balanced across all of my investment accounts at different sites, etc.

I'm reasonably happy NOT to be allowed to make changes to my investments from the central site - to have to log in to my stockbroker or 401K site separately.

Sure, even read-only access to my various fnancial account websites would be a treasure trove for the ID thief. Account numbers, maybe even SSNs (although one might hope those could be filtered out). Things that a social engineering attacker could use on the customer support phone line. Nevertheless, such read-only access would be a lot less risky than allowing read-write access, with the ability to change mailing addresses, etc.

Trouble is, all of my financial services web.accounts give me one account login, and one password, that provides full access to the entire account.

It seems that this could be changed... Let's start writing letters...


This is just yet another example of the Principle of Least Privilege. Of how it should be possible to split a particular security role into smaller pieces.

I switched the site that I keep my resume and CV on to Google Docs: http://docs.google.com/View?docid=dcxddbtr_6dvpxg2cj

Hitherto it was on geocities. I have left the geocities site around, with forwarding: http://www.geocities.com/andrew_f_glew, but I will no longer update it. Actually, I haven't updated it in years, since it was too painful.

It's a little bit sad. The Geocities/Yahoo site gives me reasonable URLs, while the Google site gives me ugly, goobledeygook, URLs. But the Google site is much easier to use for me, the content creator.

Also, the annoyance: I retargeted links from my LinkedIn pages, but there will probably be other stale links around that I will not retarget.


More annoyance: as I say above, I had not updated the Geocities site in years. And, apparently, I had not read any email at the corresponding yahoo account in years. I had completely forgotten about it.

Yahoo won;t let me forward email as it comes in, or use POP, or even bulk forward a mass of email - so the email accumulated there will moulder. Pity - I saw some email from friends I had fallen out of touch with.

But at least Yahoo allowed me to put a vacation message on it. Although I will have to remember to extend the vacation once every few years.

Moral: don't use a web based service, such as a webhost or webmail, unless you can automate getting your data off,

Hmm... how hard is it to download all of my Google data? Mail? Blogs? Docs?

Friday, December 26, 2008

Apple Store account management - NOT

As mentioned in the iPod blog, I ended up signing my wife up for an Apple Store account, when she already had a different iTunes Apple ID.

Since only the latter is required, to ensure authorization of iTunes music files to a limited number of PCs, I would like to delete the other account.

Worse, while thrashing to try to get my wife's iTunes purchases authorized, I entered a credit card number into the second, bogus, account. So now I have a bogus account with a valid credit card number.

I would like to delete the bogus account, or at least the credit card number.

Apple, apparently, has no way of doing so.

Apple Store support chat says that the account should time out if unused. But they cannot answer how long that will take. And they warn me that checking the account status will reset the timeout clock.

Q: will Apple indemnify me if the account is broken into?

Apparently, once you have entered credit card info, there is no way to remove it, except by replacing it with another valid credit card number.

Hmm... perhaps I need to use a one-time credit card number that will immediately expire.


No need. I can garbage the login and password, and Apple seems to allow me to enter blanks for the credit card number. Not quite as confidence inspiring as a "Delete my CC info" button, but, I hope, good enough (although I have this nagging feeling...)


But more: there is no way to log out of the Apple store.

Sure, Apple pages are uncluttered. By omitting necessary, although perhaps rarely used, functionality.

Disabling Verisign / FingerPrint

Oh, I forgot to mention: one of the biggest timewasters while moving my wife's iPod and iTunes tioher new PC was that, somehow, the process of signing her up with iTunes resulted in Internet Expolorer going into a frenzy, forking new windows, whenever I (actually, she) signed into Google mail.

I suspect because I put Apple and Gmail into IE's "Trusted Sites" list to make Apple's iTunes password recovery email click through.

Anyway... by the time I worked through that, not only had I undone the Trusted Site settings, but I had also uninstalled the Verisign Identity software that managed the fingerprint reader, preinstalled on the PC.

I'm a little bit sad, because I really liked the fingerprint reader. It makes Vista's constant "authenticate as an administrator" tolerable.

But, the Verisign software went beyond fingerprint. It wanted to be single signon for all websites, and was quite obnoxious. Worse, while I figured out how to disable this behavior for an administrator account, it would not let my wife's non-admin account disable.

Moving an iPod between PCs

Before Christmas, as late as December 23, my wife told me that she didn't want anything for Christmas, except my help in moving iTunes friom her old PC to her new PC.

Now, I didn't believe the "not wanting anything else for Christmas" bit - we weren't married yesterday - but I did take this as a clue.

The complication: Her old PC is hardly functional. She got her new tablet PC last Christmas. Apparently she has been using her old PC for iTunes, tolerating, barely, its slowness. 6 years old, and slow even when new. Network no longer working: wired Ethernet connector broken, wireless PCMCIA card non-functional. I would not be surprised if its slowness was due to malware, although McAfee's scans found nothing.

How hard can it be to move an iPod from one PC to another? It holds all of my wife's songs, not a subset. Surely I can install iTunes on the new machine, synch up, and be done?

Not so easy. Apple has not made it easy to migrate. Of course, things ae not helped by Apple's iTunes user interface, which I find idiosyncratic, differing from standard PC applications' UIs in ways that make it hard to figure out how to do things. For example, I went looking for the UI options to put the iPod into "disk" mode, but it was not until I googled that I found it.

I'll make a long story short, by NOT going through every wrong step I made. But I'll list a few.

Googling "moving ipod between PCs" found several pages, the most useful being:

(1) Apple support, http://support.apple.com/kb/HT1329. Useful as far as it went, although it was impossible to follow the instructions (a) because some were wrong, or at least did not apply to my wife's old iPod, and (b) some could not work, because, for example, they suggested consolidating the librray on the old PC's disk under the iTunes' Music folder - but my wife's old PC disk was full, and did not have the space required for such consolidation.

(2) The DIY article http://www.makeuseof.com/tag/how-to-move-music-from-your-ipod-to-your-pc-in-5-easy-steps, which gave the most important clues, although it ommitted how to transfer playlists,. Again, I suspect that some of its instructions applied to newer iPods than my wife's.

Early on, I tried iTunes ... Export, but on my wife's old iTunes this exported only an XML playlist file. Importing that onto the new PC gave me empty playlists. Apparently the new iTunes has "Export Library" versus "Export Playlist".

Early on, I tried just plugging the iPod in to the new PC. But there was no option to synch FROM the iPod TO the PC, only from the C to the iPod. I started being careful, not to lose the only easy to access copy of my wife's music.

When I plugged the iPod into the new machine, iTunes warned me that an iPod could only be hosted by one Library at a time. At first it also warned me about songs on the iPod that had been purchased from iTunes, which the new PC was not allowed to play until authorized.

My wife, of course, did not know what her Apple account was. Googling her gmail, I saw that Apple was sending email to my 9-year-old daughter, and my wife. Neither seemed to have Apple store accounts, although my wife's email did seem to have a MobileMe account. What the heck is a MobileMe account? I eventually signed my wife's email up for an Apple store account. But the warnings about unauthorized songs persisted.

Eventually, I got the old PC up enough to see that it was signing into iTunes with yet another email account. That fixed the "purchased songs" problem. But now the new PC iTunes just wanted to delete all of my wife's iPod.

I tried making a disk backup on my wife's old PC iTunes... 6 disks later, it hang. Unsure how complete the backup was, I resorted to the DIT technique.

I opened the iPod as a disk. I set folder options to view the hidden iPod files. I copied all of the iPod files, *.*, into a single flat directory on the new PC. (Actually, I searched *.m*; at first I searched *.mpg, but there were a lot of *.m4a, as well as a few MPEG-3 *.mpg downloads from NPR. *.* caught everything.) I made sure to tell the copy NOT to discard files with the same name, but to create extra versions.

I then imported these files into iTunes, using File ... Add Folder to Library. Having learned my lesson from the old PC, I had already set, per the DIY arrticle, Edit / Preferences/ Advanced / Copy files to iTunes folder and Keep iTunes Music Folder Organized.

This left me with the music files, but the playlists were messed up.

The smart playlists, e.g. "All songs by Jimmy Buffet" worked, but the manual playlists failed. I must confessed that I had hoped that the playlists would have some sort of content-ID, and would magically detect when the song was installed. Not so.

I reimported the XML playlist friom very early on. This time, they found the songs, and the playlists were populated.

This result in duplicate playlists. The smart playlists were almost identical - except for the versions that selected 100 random songs from a genre. The manual playlists had one empty playlist, and one full. Deleting the duplicates was straightforward.

Annoyingly, the "Purchased" (from iTunes) playlist was empty, and there was a manual "Purchased" playlist. But i could move the files back and forth.

Annoyingly, the "Recently Added" playlist was messed up, since all of the songs were recently added.

Wrapping up by authorizig the new computer, and de-authorizing the old PC. As you may recall, the old PC's network was dead, so that last involved minor hackery. Q: what does somebody do if their old PC is dead, dead, dead? Waste an authorization out of the limit of 5 PCs allowed to play a somg from iTunes?

Summing up:

1) I copied the music files as described in the DIY article

2) I transferred the playlists via iTunes' export XML format

3) Authorize the new PC using the iTunes account, de-authorizxe the old.

Fairly straightforward. And yet it took an embarassingly long amount of time to accomplish - many hours. I had pooh-pooh-ed my wife's request for help, but I can avow: this wasn't as straightforward as it should have been. Apple's support was incomplete and inaccurate.

Things would have been much better if there was a way to extract the playlists friom the iPod itself. The data is undoubtedly there..

Things would have been even worse if my wfe had used any of the iPod's other features - contacts or calendars or ...

Sunday, December 21, 2008

Concurrent programming bug in X/VNC/sysadmin distributed config files

Below is a bug report, relating to the timing of a windowing system and window manager.

It is caused by abc in the UNIX shell,
and the fact that X and VNC do not really bind programs to a particular instance of a display.

It amuses me that, after all this time, even such a simplistic concurrent programming example can have a bug. What dos this say about the brave nw world of multicore?

There is a timing bug in eclogin - the files installed by eclogin -i -f - $HOME/.vnc/xstartup.
The file ends

xmessage -geometry -10-10 "FATAL ERROR - NO WINDOW MANAGER FOUND in vnc/xstartup" )

This looks innocuous.

But, if the user typs in something like the following
vnserver -kill :2; vncserver
then the fvwm2 of the OLD vncserver will fail, leading to the invoking, say, twm.
but the NEW vncserver may start up before the twm of the old vncserver starts up; indeed, it may start up before the old fvwm2 fails.
in any case, the mwm from the old vncserver may start up, and be connected to the new vncservr session.
resulting in very odd, hard to debug, behavior - like "Why am I getting mwm, or twm, or whatever, when I am trying to use the EC standard fvwm2 window manager?

I conjecture that this behavior was not seen on old machines, that were slower and/or did not have multiple processors.
I conjecture that it ois almost impossible to reproduce this behavior unless you type vncserver -kill :2; vncserver; it can happen if the machine is slow, but is much more likely.
I conjecture that only an anal retentive compuer user like me would have found this bug - particularly one who is an old sysadmin, who has seen bugs like this.


The fix:
A partial fix is to do:

elsif [ -x $PATH_TO_TWM/twm ] ; then

i.e. this prevents the frm falling through if the fvwm2 command was found, and executed for a while.
A better fix would be to se if fvwm2 executed. Checking exit code 0 is not sufficient, since it is usual and normal for fvmw2 to return non-zero when vncserver -kill :2 is called.
A stopgap would be to just document this in ~/.vnc/xstartup - noting something like "You either have to wait a while, or shutdwn your window manager before starting a new vncserver".
A better long term fix would be for vncserver to create a nonce, or some other identity cookie.


By the way: it is possible that this could be a security hole - I have not checked. E.g. an attacker could be constantly trying to attach a window manager to a vncserver he dos not own.


In case you do not beleve this is real, here is a shell session showing me killing such wm one after the other
I had been thrsahing, killing and creating new vncservers in a fairly tight loop, debugging a problem,when I noticed it:

/users/glew/ 86 : vncserver -kill :2 .../vnc/E4.2.5/vncserver -kill :2Killing Xvnc process ID 3471

/users/glew/ 87 : ps x grep wm
5869 ? S 0:00 twm

3953 pts/16 S 0:00 mwm

3955 pts/16 S+ 0:00 grep wm

/users/glew/ 88 : kill -9 39533953: No such process

/users/glew/ 89 : ps x grep wm
5869 ? S 0:00 twm

3988 pts/16 S+ 0:00 grep wm

/users/glew/ 90 : kill -9 1593

/users/glew/ 91 : ps x grep wm
5869 ? S 0:00 twm
3992 pts/16 S 0:00 twm
3996 pts/16 S+ 0:00 grep wm

/users/glew/ 92 : kill -9 3992

/users/glew/ 93 : ps x grep wm
5869 ? S 0:00 twm
4024 pts/16 S 0:00 mwm
4028 pts/16 S+ 0:00 grep wm

/users/glew/ 94 : kill -9 4024

/users/glew/ 95 : ps x grep wm
5869 ? S 0:00 twm
4036 pts/16 S+ 0:00 grep wm

Code inspection reveals the problem. Of course, anyone at all familiar with concurrent programming should recognize the problem.

Wednesday, December 17, 2008

Automatically Deducing Build Dependencies => Cross ToolRecursive Builds Work

Recursive make sucks. As presented by the Peter's classic paper "Recursive Make Considered Harmful", http://aegis.sourceforge.net/auug97.pdf

Toolssuch as Peter's Aegis and Cons and Scons "automatically" deduce dependencies for an entire project - but only semi-automatically, since they rely on knowledge of the tools you are using. E.g. they know about C++ #include files, but not about languages that are not on their list. Not about things in your shell scripts, unless you tell them, e.g. in the SConstruct file or by writing a special scanner for your language.

I have long been a fan of truly automatically deducing dependencies: run a build, and use a tool like strace to observe the files that get read and written.

Moreover, their whole project dependency analysis only works if all of the project uses the same build tool.

Unfortunately, that is not true for large projects that have subprojects. I am working on asimulator that was originally built using Make. Later it started using Cons,but kept some make around - i.e. the project starts off as a hybrid of Make and Cons.

But now I want to import tools, libraries, I have written. Reuse, eh? But I used SCons.

Having to rewrite all of my SCons into the project-wide Cons is a barrier to reuse.
Similarly, getting the whole project to use SCons is a barrier to reuse.

Basically, any statement of the form
"All of our problems would be solved if everybody did things the same way"
(a) might be true,
but (b) is bigoted, stupid, intolerant of diversity, etc.
Such statements are the root of all evil, and the cause of much ethnic cleansing.
But, ahem, we are talking about programming, aren't we?

I just realized that true automatic generation of build dependencies
would allow projects to be built up out of different build tools.

Best if all of the build tools used "true observation of dependencies". Then tool #1 would just have to know that it should tool#2 to do the build.

But I think that it can also be used to build a true, project wide, dependency system out of
not-fully-automatic build tools. E.g. this meta-builder could call less intelligent tools such as make, or cons, or scons.

It might also be possible for such a meta-build to call another build tool, in a guaranteed-build-from-scratch situation,
and then observe the commands invoked and rerun those.

I.e. such a meta-build might make recursive make correct.


John Ousterhout may have created an automatic build dependency tool,
in his company Electric Cloud.
At least the whitepaper
Solving the Dependency Problem in Software Builds
implies that it has been solved.

Unfortunately, I can't click through to be paper,
so I can't really tell.

Past conversations, either with Ousterhout or with EC sales folk,
lead me
(1) unsure as to whether they have done the truly automatic thing for dependencies
(2) sure that they are not "diversity tolerant"
- they are yet another tool that requires everyone, the whole project, to use their build tool.

I.e. they may have invented the automatic dependency idea -although I doubt it.

They do not seem tohave realized that it can be used to allow diversity of build tools.


My friend Mark Charney grew frustrated with Cons and SCons, because they could not handle truly dynamic systems that create objects. Mark, therefore, wrote his own build tool that was not limited by the phase ordering restrictions of Cons and SCons.

I wonder if the automatic, diversity tolerant, approach I describe above handles such truly dynamic builds. I suspect taht it does.

(With the usual caveat of there being no time dependent behaviour. It is okay to log a timestamp, but it is not okay to create different numbers of files on different days, just because the day is different. Tools must have the property: same inputs, different day => same outputs, at least same output names - although times may be embedded in the output.)

Tuesday, December 16, 2008

I have a new BKM for argument list parsing in Perl, similar to my longstanding BKM in C/C++:

my $argv = {};

for( my @tmp_ARGV = @ARGV; my $arg = shift @tmp_ARGV; ) {
if(0) {}
elsif( $arg eq "-short" ) {
$argv->{test_length} = 'short';
elsif( $arg eq "-full" ) {
$argv->{test_length} = 'short';
else {
die "unrecognized command line argument: <$arg>";

I rather like creating a hash of options,
but if you prefer variables:

my $short;

for( my @tmp_ARGV = @ARGV; my $arg = shift @tmp_ARGV; ) {
if(0) {}
elsif( $arg eq "-short" ) {
$short = 1;
elsif( $arg eq "-full" ) {
$short = 0;
else {
die "unrecognized command line argument: <$arg>";

This can be made extensible, by calling subfunctions to parse, so-called argv-recognizers. These can recognize individual options, or parse a long way.

my $short;

for( my @tmp_ARGV = @ARGV; my $arg = shift @tmp_ARGV; ) {
if(0) {}
elsif( $arg eq "-short" ) {
$short = 1;
elsif( argv_parser1(\@tmp_ARGV) {}
elsif( argv_parser2(\@tmp_ARGV) ) {}
else {
die "unrecognized command line argument: <$arg>";

The following may be more uniform:

for( my @tmp_ARGV = @ARGV; my $arg = @tmp_ARGV[0]; shift @tmp_ARGV ) {


Why use this instead of Getopts? Getopts::Lomng? Etc.


a) Getopts does not compose modules with different parsers

b) the above is trivial, easy to remember, and can be extended to handle any different argument syntax.

Saturday, December 13, 2008

I want an apprentice

I want an apprentice.

I want a junior program who can work with me. Not necessarily pair programming.

An apprentice at my beck and call, who I can call over to my screen when I realize "Here is a little bit of automation that needs to be doing" - who I can explain, verbally, what needs to be done, and whose job it is to make enough notes, and then just do it.

There are always a lot of little programming tasks that need to be done, but which I deliberately neglect in the rush to get urgent, quick and dirty, results. Darn! That may be a career limiting admission: sometimes I do not go and clean up the code or write utility functions when I see the need. Most people would accuse me of not being quick and dirty enough.

It's hard to balance "Getting to the answer as quickly as possible" and "programming well".

part of the problem is that, as a computer architect, my output is not really the simulator. My output is the hardware recommendation, the perf data, the simulation results. The simulator is just a tool, and if it were throw-away, that would be great. But, the simulator is not thrown away, except maybe once a decade. It is an asset that is constaly built upon.

And it is hard to balance getting the answers vers keeping the simulator clean.

Many programmers don't have this problem.

Usually because they simply just aren't as good programmers as me. They don't know how to do things right.

But sometimes because they don't know some of the really fancy quick and dirty programming tricks that I know.

I.e. because I am a pretty good programmer, better than most, I can write really good code -or really quick and dirty code.

The balance is hard. Sometimes I am rushed.

Hence the apprentice. If I had two apprentices, one could be devoted to pair programming, and the other to "doing the right thing". Basically dedicating 50% of apprentice resources to making the code better.

Plus, the apprentice making the code better does not have to thrash. His job is to make it better. Period.

Why RAII is convenient

RAII is convenient in C++.

Essentially, it is the trick of using the destructor to do something like arrange flr printing of a data structure.

Essentially, it is a trivial form of introspection.Practically the only way in C++ than you can automatically traverse a type, and al of its members.

Today, I would like to automatically create a print function. I am tempted to use RAII, so that it gets printed at destruction. That seems silly, however; but it is the only way I know to autromatically call a method on all members.


I fear this is the start of one of those days.

I'm working on Saturday, instead of getting a Christmas tree, putting up Christmas lights, etc. Big review meeting on the 22nd or 23rd.

Walk the dogs at 5am. That was okay.

Can't find hummus in the only grocery store open at 6am.

The UsualPC Startup Hassles:

At work at 6:30. The usual PC startup hassles, which I am sure that anyone who has ever read my blog is bored with, but which venting about keeps me sane. Bottom line: I'm just starting to work at 7:35.

Laptop PC comes out of standby. The usual circa 5-10 minutes of inability to type. I go and get tabouli from the fridge.

Laptop responsive, but slow. The Connected DataProtector backup is running. This backupprogram has a dialog box with a cancel button, but experience has shown that it doesn't respond quickly to the cancel button - 10 minutes being not unusual. Experience has shown that the fastest way to cancel Connected DataProtector is to restart the PC. (Killing the process damages some database that the backup program uses.) So, I hit the cancel button, and also try to go Start/Shutdown/Restart, which takes about 6 minutes because the machine is so slow. But, as usual, restart happens before Connected DataProtector has noticed that I wanted to cancel.

(My laptop was plugged in at home all night - but the backup program was apparently unable to detect idleness and thus did not start until after aI reopened my PC at work.)

Along the way, noticed a new IT patch, probably a security patch, is also slowing things down.

Restart eventually happens. I log in, and then walk away - I am learning that I might as well go and get a tea while waiting for all of the startup and login stuff to settle down.

Company now has free drinks (coffee, tea, and soda) as well as free fruit. One of the nice things that happened since the new guy became CEO. But, no free drinks on the weekend, only when the cafeteria is open.

Disincentives to Working Extra Hours:

As I walk off to get my tea, I think to myself "Why should I bother coming in on the weekend?"

a) My computer is so slow - I will have wasted half an hour (that was before I realized it was turning into a full hour wasted) just waiting for my PC to become usable.

During the work week, say, if I come in at 9am, I can usually find somebody to talk to while waiting for my computer. In fact, such informal, drop-by-their-cubicle, conversations are one of the best ways of staying in touch. Not just socialization, but work related conversations, asking for help, advice. But, if you come in on the weekend, or even early on a workday (say, 6am, or even 8am), this way of overlapping the time wasting of PC startup is lost.

b) I can't even get free tea when the cafeteria isn't open.

Two disincentives for working extra hours on the weekend.


But, more: I find a vending machine to buy a back of almonds and tea.

The almonds cost 1.10$. I use a 20$ bill. Usually the vending machine provides change mainly in Sacagawea dollar coins, but today:

20$ - 1.10$ = 18.90$
= 4.25$ in quarters + 10$ in dimes + 2.65$ in nickels
= 16.90$ => I was shortchanged 2$

Yes: I sat on the floor and counted all 170 coins. Do you know how hard it is to make 20 nickels into a stack?

When I was young, I used to obsessively count my change. I do so less often now, in part because I use credit card so often. I wonder how often I have been short-changed or long-totalled?


But even after all of this, my PC is not quite usable.

Are Slow PCs good for the Environment?:

I probably should just not get stressed about my PC startup times. I probably should just plan on starting my PC, and going and getting tea first thing in the morning.

Currently, I try to save time by parking such that I walk by the cafeteria to get tea on the way between my car and my desk. Unfortunately, I do not carry a reusable mug with me,so I end up usimng a disposable paper mug. I.e. just adapting to my slow laptop might be good for the environment: park, go to my desk, start my PC, pick up my mug, walk to the cafeteria, get tea, walk back to my desk, and, one might hope, find that my PC is up and ready. Although probably it is asking for me to click on some dialog box.

Getting off to a Quick Start

Why does slowness in PC startup bother me so much?

I am a morning person. I wake up raring to go, wanting to start work RIGHT NOW!

I have often thought about a solution to a problem overnight - often while drowsing in bed. Should I admit that I often dream about work problems, computer designs?

When I get up, I want to start work right away. If I don't, sometimes the solution drifts away.

I resent something so basic as having to feed and walk my dogs in the morning. I resent wasting time driving to work. Actually, I more resent time spent in busy work such as feeding the dogs; I can think about work in activities such as walking the dogs that I can do fairly automatically, although there is always a risk of forgetting.

I used to wake up regularly early in the morning or in the middle of the night and hope ontomy computer. Now, since it takes a randomly long time to start up, I no longer do so.

I resent the fact that I get so frustrated by my PC's slowness that I am impelled to blog about this. Writing this blog has taken 45 minutes. I would rather not have this to bitch about.

I would rather that I had speech recognition, so that I could speak this blog instead of typing it. I speak much faster than I type.

Resuable Mugs:

Recently, a few months after my company started the free drinks policy, signs started appearing saying "Please use your reusable mug instead of paper."

That's fair enough - although, as I mentioned above, one does not always carry the mug around. I already carry enough crap around that I roll my bag.

Methinks it would be better for the cafeteria just to provide washable mugs: I go to the cafeteria, pick up a mug. Probably with a lid. Drink it. Eventually, leave it in the vending area along with the food trays. Eventually it gets taken back to the cafeteria and gets washed.

Downside: more cafeteria staff effort required to pick up the mugs. Some possibility of theft, lossage, breakage. I suppose that giving people their own mugs moves responsibility to the end user.

But then don't bitch if you don't get as much reuse as you might like.

Change people's habits, or adapt to them. I am people centered: I prefer to adapt the system to the people, rather than vice versa.

Friday, December 05, 2008

I bitch a lot, but what can be done about it?

I bitch a lot about how slow my computer is, but what can be done about it.

First, my job is to make computers faster. I am working on one aspect of speeding this up - but I am frustrated that executives do not perceive that this is a problem. Probably because they have faster, newer, computers than me.

Second, I wish that my IT department would give me a desktop PC rather than a laptop. The point of my bitching is that my laptop is becoming less and less useful with these slownesses. My productivity at work would be sped up having a desktop, that did not need to go slow as often.

Actually, I would rather have a Linux PC than a Windows PC. All I really need is an X Windows terminal on my desk that I can open up on some interactive compute server. Such a configuration probably saves money. Or, if you have desktop PCs, the desktops can be used for "cloud" computing.

I wish that my IT department would allow me to "dial in" to work using my own PC. Anything to avoid the slowness of a Windows PC with an IT load of software coming out of standby.

Third, I would like my IT department to seriously consider giving me a device like a BlackBerry. Many of my supposedly quick attempts to access my computer are to check my calendar, with checking email a little bit less frequent. Something like a BlackBerry would help (at least until BlackBerry gets lots of virus scanners).

Since my IT department does not want to spend the money for me to have a BackBerry, I wish that my IT department would allow me to purchase a BlackBerry, and allow me to spend the money, circa 50$/month, to have it connected to the corporate network.

Finally, again on a personal level, since my employer's IT department doesn't seem to be willing to do anything to resolve these slownesses, at some point I am going to have to follow the adage "If you can't change your organization, change your organization." I want to see my current project to an end, but after this (which may be 5 years from now) I will go looking for a new employer unless this IT stupidity is resolved. Criterion for such a new employer, apart from the usual interesting work, and sufficient money, will definitely include IT support:
* "instant-on" mobile PCs
* dedicated desktop screen access to compute servers
* ability to dial in from a personal computer, not a corporate laptop
* remote access to calendar (and email) from a SmartPhone
* willingness to upgrade my PC more than once every 4 years

This economic downturn is probably not the time to be ranting, in public, threatening to leave my job. But this IT situation is driving me crazy!!!!!

I don't want to leave my job before the end of my current project. I like seeing my projects through to completion. But it is almost ready to roll on its own - it no longer needs the original inventor and architect (me), to drive it along.

So, if a recruiter and headhunter wants to contact me about some other company --- well, if you can promise me a better IT situation, I will seriously consider it.

However, although I get a headhunter circa once a week, I doubt very much that any of them will google me this much. And I will probably scare off any mediocre hiring exec, who will read this public bitching. So be it! I do not want to work at such a company anyway.


But, overall, I hope that my project, and others, will improve this crappy situation.

More slowness coming out of standby?

Meetings all morning.

At 12:08 start trying to use laptop - bring it out of standby.

I can't read Outlook email until 12:36.

@8 minutes. No rebooting, no patches (that I know about). Just slowness.

So much for "quickly checking my email".

Thursday, December 04, 2008

Yet another tale of IT upgrade woe

I got into work at 9:05am - late for me.

5 minutes to boot my notebook PC. Then I see "There is a client optimization pack..."

Not a security patch. Not urgent. But the last 2(actually, first 2) "client optimization packs" took 5 minutes to install, and ended up giving me an on-the-fly degfragger, Diskeeper 2008 Pro Premiere. It's not clear that the defragger really helps performance, although one would hope that it has; but the defragger has removed IT's standard time-wasting excuse when I complained about PC performance "first defrag your disk", adding a day or so to getting any problem resolved (i.e. enough time for IT to deem me unresponsive, and decide that my problem has gone away). I.e. the on-the-fly defragger has been a win, possibly a real win, but certainly a win in accountability.

So I figure "I can waste 5 minutes; I hope this optimizationm pack is as good as the last".

1.5 hours later, I am finally able to work once again.

At least I cleaned my desk; read the economist; brushed my teeth; read some slides that I had printed for my exercise bike; cleaned up my personal cellphone voicemail.

Unfortunately, I got no real work done. I have no access to a second computer. I can't even clean up my company voicemail, since that is no acessible only from my PC.

Back when I had my long-lamented but fragile AT&T Tilt SmartPhone, I would have cleaned up my personal, Google, email. And maybe web browsed a bit. But that phone was fragile, although great up until it broke.


This is just the usual sort of computer problem:

* I cannot rely on my PC to start up in a timely manner

* the time to apply patches and upgrades also needs to be taken into account in benbchmarking startup.

I.e. from my, the user,point of view, it is the time to being able to do useful work. I don't care if what is stopping me from getting work done is coming out of standby, virus scanning, thrashing as multiple applications wake up and perform timer based actions, or security upgrades: they ALL get in the way.

Heck, add to these the frustration that impels me to spend two minutes blogging about my frustration. That's another 2 minutes wasted.


More and more I want to have a second computing device, so that I can work on the second when the first is blocked, and vice versa.

I want to have all of my data on the network - NFS or, better, Google apps -so that I can migrate machine to machine without loss of access. It's ironic that I say this - I, the often disconnected one, who wants to work where there is no Internet. But when I have Internet, I want to use it.

I want to have a desktop PC at work, and not just carry my laptop back and forth. I want thedesktop PC to start doing all of this startup crap overnight or, to save power, just before I get to work -so that it is ready to work when I am. E.g. I want to be able to remotely power it on when I start driving to work.

If I am forced to use alaptop as my primary device, I want to be able to have the laptop boot, come out of standby, while I am driving to work and walking up the stairs. I don't want to have to park its disk when I am moving. THIS may be the big benefit of solid state disks.


I want to stop wasting time and get to work right away.

Wednesday, December 03, 2008

Frustrating Evening of Webcams

My daughter wanted to take a photo of her gingerbread house and attach to a school report.

Normally I would use my cell phone camera. But it was full, and I could not find a mini-USB cable to offload. And I am too cheap to pay for a data plan.

But, hey, there are 3 PCs at my house with (almost-never-used) webcams.
Let's try to use them.

Actually, only 2 types of PCs, since 2 of them are OLPC XOs, almost identical.

We quickly took a photo with the OLPC XO. But I made the mistake of closing the clamshell while walking back to a printer. Photo lost.

Sophie took more photos, and walked back to me un-closed-down. But, 1 hour of poking around on Sugar, and I could not figure out (a) how to save the photos, either to a Linux file or to a flash drive, or (b) print.

Probably I need to upgrade the OLPC XOs' software. But, in case it needs saying, the OLPC XO's Sugar user interface is one of the worst in the world. The OLPC XOs were part of my "year of stupid and useless computer purchases", along with my Toshiba M400 tablet PC, and my AT&T Tilt cell phone. he computers sucked; the cell phone was okay, more useful than the computers, but the screen broke, wasn't covered by insurance or warranty, and I don't want to spend the money to replace it.

OK, how about my wife's HP Pavillion tx1420us? We print from that all the time. We even use the WebCam.

However, the only capture tool I could find was HP Quickplay. This gives every sign of being a lousy vendor provided minimalist multimedia player, to which somebody had the bright idea "Hey! We need to have a way that the customer can test their webcam, without having to pay for any useful software. How about adding video and still capture from the WebCam to Quicplay? After all, it's just media."

I hate software provided by manufacturers like HP, Dell, Toshiba, IBM. I think that I would rather have a totallyt vanilla Microsoft Windows system. The vendor provided software is nearly always junk, like this QuickPlay, yet you are never sure of you should delete it, because it seems to be used, or recommended, by some of the tech support.

Anyway: QuickPlay captured the photos. But, where the hell did it store them? How do I print them? No way that I can tell from inside QuickPlay. Why do these media players have to have completely non-standard user interfaces? Where is the "file" pull-down?

Eventually I use Vista's search. I find the webcam files, in a non-standard place. And I print.

Did I mention that my daughter long since gave up on me,
and went to bed?


I often worry that I have handicapped my daughter by getting her an OLPC XO. It is such a useless box, and the user interface is so non-standard that she doesn't know how to use the Windows PCs at school.