Archive for the 'geeky' Category

sp3 fixes memory leak

Wednesday, June 25th, 2008

I run Windows XP in a Vmware Server VM on an Ubuntu workstation in my workplace cubicle. Every Monday when I come in I routinely reboot the XP machine in order to free up memory, which invariably will have crept up to > 1G used after a week of running time. I’m not sure if the leak is caused by my six instances of perfmon which I use to monitor server resource utilization, or by some other app which I use every day* — I never have been able to pinpoint the culprit, and learned to live with the workaround of weekly reboots. This is not a bad thing for a Windows machine, according to many IT folks.

So anyway I installed SP3 for XP a couple of weeks ago, and lo and behold (sic) — the most amazing unexpected thing resulted — the memory leak disappeared! I have now been running the same instance of XP for 11 days and memory utilization is only 667M.

Have to congratulate Microsoft on this quiet little bug fix. (Although how long did customers wait between the release of SP2 and SP3?)

* Groupwise, AD Users & Computers, cmd, errlook, taskmgr, SQL Management Studio

hofstadter’s interview about his new book

Thursday, June 12th, 2008

Is here. Read it and leap.

playing with similarities

Wednesday, June 11th, 2008

Q: How is playing guitar like shooting pool?
A: They’re both all about leave.

Viz. when playing guitar, in order to sound like less of a klutz and move smoothly to the next note or chord, the player needs to be thinking ahead about which fingers will be used in that next note or chord…and that means making sure those fingers are available by using other fingers now.

And when shooting pool, in order to sink more than a single ball, the player needs to be thinking ahead about positioning the cue ball to leave makeable shots.

Q: how is playing tennis like playing go?
A: they both can be approached using a certain style of play; i.e. keep making good returns or moves and wait for your opponent to make a mistake — then capitalize on it. With each mistake your opponent makes, he or she is more likely to try to overcompensate…to your advantage.

outage notice

Friday, May 30th, 2008

Intrepid blig readers may have noticed that the frig blig was down for a couple of weeks. This was caused by the death of the primary (and only) router in the data center. A replacement ordered from ebay took two weeks to be delivered; if I’d realized up front that it would take so long I would have purchased one locally.

Tech info: the old router was a Linksys WRT54G (the original model, about 5 years old); its replacement is a Buffalo WHR-HP-G54. I replaced the original firmware (in both devices) with spiffy and robust dd-wrt.

Our router is also a wireless access point. I considered getting one of the new 802.11n models, but since this protocol is still in draft I decided to wait until the final version is released, currently scheduled for 2009.

After setting up the new router, I upgraded our wireless security to WPA2 but alas, discovered that this protocol is not supported by the Dell Latitude C400 — waaah! Maybe there’s an inexpensive usb-based 802.11g device that supports WPA2 I can get for the C400.

what a fool believes

Tuesday, April 22nd, 2008

Met a gentleman the other night who adamantly insisted that global warming is a hoax. What’s more, he claimed that he had two college degrees in physics and a PhD in mathematics, and was an active participant in the scientific community, having just published his n-teenth research paper last month.

Very curious. His primary argument was that it’s impossible to accurately predict the weather, citing the Lorenz effect as proof.

Before I could muster my defense he baited me into saying I wouldn’t believe his story about how spotted owls also were a hoax — then triumphantly exclaimed “why should I bother explaining it to you when you won’t believe me anyway.”

His preemptive strike successful, he sat back smugly in his happy little room of delusion.

I spent the next few hours thinking about what’s up with him. First, I noted that he was a refugee of the USSR, and had up-close familiarity with state propoganda from the left. This made him skeptical of official explanations, sensitive to propoganda, and wary of being fooled again.

Clearly, forecasting climate change is vastly different from forecasting the weather. But he had shut me down before I could even start a rebuttal, and I suspect should I have started he had more tactical verbal weapons at his disposal.

I also noticed that he believed in god, and clearly there is less evidence for the existence of god than for the existence of global climate change. I didn’t mention this either.

His foolish beliefs made me question the veracity of his claims of education. Of course I kept mum on this too,

And so the evening ended with the Russian emigre and myself both convinced we were correct, smiling and shaking hands taking our leave.

mac n00b tries to copy a dvd and fails

Sunday, April 20th, 2008

Since I’ve already learned that the only way to burn a DVD on my mac is by using the iDVD program, I figured this is probably the way to copy a DVD disc as well. My bad, there’s nothing on any of the menus about copying discs. So my next thought was to try the Disk Utility (although the spelling of Disk vs Disc gave me a small pause… are disKs magnetic media and disCs optical media?).

Didn’t find anything about copying on the menus there either so I entered ‘copy dvd’ in mac help and lo and behold, it told me exactly how to copy a DVD using the Disk Utility! Apparently you have to create a disc image first, then burn copies from the image.

So feeling optimistic I loaded the disc into the drive, and WHAM! The Mac’s DVD player autostarts and wants to know my region. I don’t want to play the disc, only copy it. I quit DVD player, and it conveniently ejects the disc. Doh!

I tried sticking the disc into the drive again, and obediently, up pops the DVD player app. This time before closing it I look at the options preferences, and uncheck ’start playing disc when inserted’. Quit DVD player, it ejects the disc, I reload the disc and the !@#$*& DVD player app starts up again, even though it’s not playing the disc. When I quit it, of course it ejects the disc.

At this point I decide to use the linux box, where you can simply copy a disc and the OS doesn’t try to outsmart you. But before going downstairs, I look in Control Panel System Preferences and under ‘CDs and DVDs’ I see ‘when you insert a video DVD’ is set to open DVD player — I change that to ‘ignore’ and insert the disc once more and — voila! the DVD player doesn’t startup, I select it in Disk Utility and successfully burn an image! Woo-hoo! Frog 1, Mac 0.

updated getlnk

Thursday, April 17th, 2008

I updated my getlnk utility (available for free download on the Bamboo Utilities page) to return the icon location and index, in addition to the executable path and args.

black algae, learning make & ugly code

Friday, April 11th, 2008

sky
Today I’m posting on three little unrelated topics.

algae: S was showing off his aquariums while A was preparing dinner and he pointed out that one aquarium had an algae problem. He told me that fish poop contains phosphate and algae thrive on that. But the most striking thing, to me, was that the algae in this tank was black and spiky. I’d just assumed that all algae was green and slimy. Not!

make: I’m learning to write gnome programs, and they are built via make (like most gcc programs). After adding dirent functions scandir and alphasort to my code, gcc emits errors that look just like it can’t find the function defs. Although the c source contains #include <dirent.h> and the Makefile contains CFLAGS = -I/usr/include `pkg-config --cflags libgnomeui-2.0` (and dirent.h exists in /usr/include) so what’s up? I’m not looking forward to using autoconf — which seems like overkill for a project with a single source file — but I certainly AM looking forward to figuring out what’s wrong and fixing it. Googling make and gnome builds and stuff yields results that are either for rank beginners, or advanced coders — nothing for intermediate-type programmers like me. Waaaah!

ugly code: The current (May 2008) Dr. Dobb’s Journal’s editor’s note quotes Alberto Savoia with a pithy definition: “Ugly code is code that someone else wrote.”

‘Nuff said!

mac n00b tries to copy an audio cd

Wednesday, April 2nd, 2008

I bought a Mac Mini a couple of months ago and am still struggling with learning how to do the simplest things. For instance, tonight I told S “sure I’ll be happy to copy your CD of dance tunes.” And figured, let’s try to copy it using the Mac. I mean, how hard can it be?

Inserted the CD, it appears on desktop and iTunes autostarts. I select all tracks and click ‘copy’, then close iTunes (after searching every menu and not finding any items remotely resembling ‘copy CD’), I then eject the music CD and insert a blank disk which appears on the desktop as ‘Untitled CD’. When I click on it and select ‘Paste’, I get the following message:

The items on the Clipboard cannot be pasted to this location. One or more of the items may have been deleted or are no longer available.”

Nice, very nice. I go through the entire process again, ejecting the blank, inserting the source, copying the tracks to the clipboard, ejecting the source, inserting the blank, with the same result (proof that I’m crazy).

What else to try? Oh there’s a Disk Utility program, that sounds promising. I fire it up and it has a ‘Burn’ item — cool… but when I click ‘Burn’ it wants an image. It won’t burn individual files. Hmmm…do I actually have to create an image of the source CD first? Well sure, why not, I’ve already wasted enough time…

I eject the blank CD, insert the source CD, iTunes autostarts, I select all the tracks and click ‘Copy’, and quit iTunes. Switching to ‘Finder’, I notice that ‘paste’ is greyed out in the Edit menu — telling me that whatever iTunes copied, it wasn’t to the clipboard. So I click the CD icon on the desktop and select ‘Copy Audio CD’, and check the ‘Edit’ menu in Finder. This time ‘Paste’ is enabled. OK, I eject the source CD and insert the blank. Click the ‘Untitled CD’ icon on the desktop and click ‘Paste’… and up pops the message

The items on the Clipboard cannot be pasted to this location. One or more of the items may have been deleted or are no longer available.”

Hmm… didn’t I figure out I needed to create an image that I can burn? How do I create an image from the source CD? I eject the blank and reinsert the source CD; iTunes dutifully starts, I select all tracks and Copy just for good measure before closing iTunes. Now I’m looking at the menu of the ‘Audio CD’ desktop icon and notice the item called ‘Duplicate’. Is this the answer to my quest? I take a breath and click it, and immediately a folder is created on the desktop labelled ‘Audio CD’ and a Copy dialog pops up, with status of copying the items. Well at least it’s copying something to somewhere — seems like progress. Hopefully when it’s done I can copy the folder contents to the blank CD. Stay tuned for the exciting conclusion of “Frog learns to use a Mac” right after these messages…

Allright, the copy completed, I ejected the source disk and inserted the blank disk and it appears on the desktop and I open the ‘Audio CD’ folder and select all items and click Copy and click on the ‘Untitled CD’ icon and click Paste and… nothing happens.

Just for giggles I click ‘Open’ on the ‘Untitled CD’ icon and am amazed — all 19 files appear in a Finder window, and there’s even a ‘Burn’ button on the upper right corner! Yes! I click the ‘Burn’ button, and after an ‘are you sure?’ dialog, the Mac displays the following message:

“Untitled CD” is too large to fit on the disc. Remove some files and try again.

This is weird since the files were just copied from another CD which originated from the same stack that this one came from. It seems unlikely that the files got bigger just by being copied from the CD to the desktop folder. What’s going on here?

Well the short solution is, go downstairs and copy the darn CD using my linux laptop. But I’ll give the Mac one last try. I click on the ‘Audio CD’ folder icon and open it in Finder, then see on the Finder menu the item ‘Burn ‘Audio CD’ to disc’ — cool. I click it, and the ‘Burn Disc’ dialog appears stating “This disc will be burned with the contents of ‘Audio CD’. You need a disc with a capacity of at least 780.5 MB.”

Well shiver me timbers matey — both of these CDs are 700 MB Verbatim brand disks from the same spindle. Why does Mac want to make the copy bigger than the source?

OK downstairs to the linux box. Wasted too much time already. Stupid Mac.

flawed fingerprint authentication

Friday, March 14th, 2008

When my employer assigned me a new Latitude D430 laptop I noticed it had a fingerprint scanner between the left and right touchpad buttons. And it came with Embassy Wave security software, which replaces the Windows GINA among other things. I decided to give it a try.

Once installed I successfully registered my index fingers, setup my account to authenticate using my fingerprints OR my password (just in case), and was happy to be able to login by swiping my finger across the scanner rather than typing in my password. Sweet!

Unfortunately I found that I was unable to register my fingerprints for any other account. This is a problem — I have two local machine accounts (one admin, one nonprivileged), I also have unprivileged accounts in two different AD domains at work, as well as use the admin accounts in each of those domains. But the Embassy software only allows my fingerprints to be registered under a single account. A conceivable workaround would be to use a different finger for each account — this would get me ten accounts. But I would have a problem remembering which finger to use for which account.

Long story short — I uninstalled Embassy and reverted to the 20th-century authentication method of choice: passwords. Yes, I use a different password for each account, I’m not sure why I find that acceptable but remembering different fingers not. An illogical quirk I suppose.

So what about linux fingerprint authentication software (this D430 dual boots FC8 & XP)? lsusb lists the device as a SGS Thomson Microelectronics Fingerprint Reader; googling this reveals a linux driver called thinkfinger, which installs easily and cleanly via yum. So now I’m off to RTFM…

…a quick documentation read reveals that it uses thinkfinger which appears to require enabling PAM authentication, which appears to mean setting up an LDAP server…which is overkill for my little home network. So no fingerprint authentication for me!