?

Log in

No account? Create an account
On being me
 
[Most Recent Entries] [Calendar View] [Friends]

Below are 20 journal entries, after skipping by the 20 most recent ones recorded in Dale's LiveJournal:

[ << Previous 20 -- Next 20 >> ]
Thursday, February 16th, 2006
8:43 pm
On overflow errors
I was asked to create a simplified shortest-path generator.
"Simplified" meaning, in this case, "On every step go from the current point to the nearest unvisited point", which is, fortunately, just O(n^2), not NP-hard.

Now, the sample data I was given consists of 13312 points, spread out in a circle of radius ~45000. I spent a little time determining that attempting to calculate Euclidean distances between any two points could result in a 32-bit integer overflow, so I very carefully used 64-bit integers (uint64), as follows:
uint64 distsquared;
/*...*/
uint deltax = abs(point[j].x - point[i].x), deltay = abs(point[j].y - point[i].y);
if(((uint64(deltax))*deltax + (uint64(deltay))*deltay) < distsquared){
    distsquared = deltax*deltax + deltay*deltay;
    /* Other stuff */
}
Anyone spotted the problem there yet?

I didn't, until I trimmed the data-set down to only ~5k points, and pinned down the exactly which point caused the "nearest" algorithm to skip to the other side of the disk, and watched exactly what happened.

If you are still looking for the bug, quit reading until you give up.

The bug? At that point, the square of the distance from the current point to the next point was then about 4.30 billion. Unsigned 32-bit integer overflow happens at about 4.29 billion. And that fifth statement is missing the all-important casts to make it 64-bit multiplication and addition, instead of 32-bit. So, instead of assigning 4.3 billion, it helpfully assigned 10 million. And things proceeded to go downhill from there.

Does anyone have a DWIM module[0] I can borrow? And no, not interested in ACME::DWIM or Parrot::DWIM.[1] Those are for Perl, which doesn't help me much here.

[0] You're on the Internet; look it up!
[1] You're on the Internet; loo^H^H^Hyou're better off not knowing.
Saturday, January 14th, 2006
8:37 pm
On 10-mbit ethernet cards and WinXP
They don't mix.

OK, so I don't have anything particularly substantial to back me up. What I do have is a computer that had Windows ME installed and was working just fine. Then its owner installed WinXP. And the ethernet card quit.
Correction. Reproduced. And then both cards quit.
Yes. Under WinME, there was one working ethernet card. Under WinXP, there were two different cards. With only one Ethernet port between them. And neither of them worked.
No matter how much anyone insisted that there was only one ethernet port, XP was completely convinced that there were most definitely two ethernet cards.

So, I get paged to fix things.

The apparent problem is that the computer is not getting a DHCP lease. First, I assume it's a network problem. Because that's one of the router's standard failure modes. Bouncing the router didn't fix the problem, so I went on to other things. The first was starting my packet sniffer and sniffing for DHCP packets. --- There weren't any. So I look at the blinkenlights. And I discover that the blinkenlight that should be on isn't. Therefore, it must be a cable problem. I plug both ends of the cable into the switch to test the cable, and ... the blinkenlights turn on.
This leaves only one possible problem. The ethernet card must have died.
Yes, I know. Having hardware die exactly when you install a new OS. Quite a coincidence, isn't it?
For some reason that I can't remember now, I rebooted the computer. Maybe I pulled one of the other PCI cards? Anyway, as the computer started up, I noticed: "Hey! The blinkenlight is ... ... ... *was* on." At this point I became rather curious.
Off goes my computer, out comes its ethernet card, and into the other computer it goes. Boot, and once the drivers are installed, my 10/100 ethernet card works. I go to Windows Update and Google. Neither of them knows about new drivers for either of the two old cards.
To prove to myself it's a driver problem, I inserted an Ubuntu LiveCD and boot off it. My idea was that I could then say "Your card won't work under XP, but it will work under Linux; and you can use that instead, at least until you have time to order a new ethernet card." Of course, in keeping with everything else that's been happening, the CD is corrupt. So I burn a new one. The new one is corrupt too. In the same place, no less. A little peeved at myself for not having done this earlier, I checked the MD5 sum of the CD image. And discovered that the checksum is correct. At this point, I decided that the world hates me and it is time to admit defeat.[0]
I returned the computer to its owner, she acquired a 10/100 ethernet card, and I installed it, turned the computer on, and babysat it while it installed the drivers and commenced working.

The other "ethernet card" turned out to be a modem, BTW. As in one of those things you plug a telephone line into.
Permission to shoot whoever thought that it was a good idea to provide drivers that made XP think a modem was a ethernet card? Please?

[0] I have ordered pressed CDs now. I didn't want to do so; I thought I was perfectly capable of burning my own CDs, but obviously I'm not.
Saturday, December 10th, 2005
11:57 pm
On csrss and eelbwx
Some of you may recognize the second word in that subject line.

In this case, though, it's *NOT* the Microsoft client/server run-time subsystem; rather it's a rather nasty piece of malware, that puts itself in %SystemRoot%\system32\eelbwx.

Its effects are to:
1) Watch for and kill-off/disable all instances of any active firewall or anti-virus, and the same for regedit.
2) Block all outgoing going connections to ports 443 and 1863; possibly others too.
3) Block, via 127.0.0.1 entries in the HOSTS file, access to all common AV download and update sites (avast, symantec, grisoft, mcafee, &c.)

So far, I have managed to keep it from respawning and restarting by manually deleting it in Safe Mode and denying everyone Full Control to eelbwx[0]. A reboot proved the at which point I discovered that it spewed its startup entries in HKLM/Software/Microsoft/Windows NT/CurrentVersion/Windows. Those were removed, and the hosts file was repaired, removing effects 1 and 3, but #2 is persisting. I don't feel like reinstating access to eelbwx; that feels entirely too much like "Why try your luck?"

If this were my computer, Windows would have been reinstalled some time ago, but it isn't, so I have to try and clean it the correct way, instead of the easy way.

Effects #2 does not appear in Safe Mode with Networking, so some things (like updating AVG Free) can happen. Others (like Windows Update) cannot, because they require unsafe mode only things.

[0] *nix equivalent:
# chown root:root eelbwx
# chmod 0 eelbwx
Thursday, December 8th, 2005
10:08 am
On Weather
The National Weather Service says:

Today...Snow in the afternoon. Snow accumulation around 3 inches. Highs in the mid 20s. East winds 5 to 10 mph. Chance of snow 100 percent.
Tonight...Snow in the evening...Then chance of snow after midnight. Snow accumulation around 3 inches. Total snow accumulation around 6 inches. Lows around 14. Southeast winds up to 10 mph shifting to the west after midnight. Chance of snow 80 percent.

Six inches of snow on the ground tomorrow. Provided I don't have to actually go anywhere, I'll be great. I've tried the road-bike-on-powder thing before. It doesn't always work very well.

Hmm... I know I've seen road tires for a mountian bike (2+ inch tire); I wonder if the other way around exists.
Wednesday, December 7th, 2005
10:18 pm
On cooperative stores and behaving bicycles.
That innertube that blew at the valve stem was returned to the store today, for a free replacement, and I purchased another one so I'd have a spare[0]. I installed one of the tubes, and everything seems to be behaving. I also practically soaked my chain in WD-40, since I had the rear wheel off, and it (the chain, not the wheel) usually needs oiling, especially during the winter.

Can anyone explain why is it *always* the rear wheel that has problems? The last time I had to do anything with my front wheel was on the bike trip back in August.


[0] It's a whole lot more pleasant to bike to the bike store to get parts, so I keep at least one spare brake cable, shift cable, and innertube on hand at all times.
1:58 am
On shininess and misbehaving bicycles.
http://www.artlebedev.com/portfolio/optimus/
I just *had* to share that little bit of shininess.

In other news, I discovered yesterday that my rear tire was quite low.
So, I took the tube out, inspected it, found nothing, put it back in, pumped it up, and BOOM!!!
So, I took it out, got out my spare tube, put it in, pumped it up, and POP!! SSSSSssssssssss......

The former was your standard blowout, including the blow-the-tire-out-of-the-rim part.[0] The latter was the result of having a hole materialize in the valve stem, of all places. And I'm not in the habit of keeping two spare tubes.

Dale was *NOT* a happy camper. (Still isn't, actually.)

[0] As far as I could/can tell, the tire is undamaged.
Monday, December 5th, 2005
2:50 pm
On Drop Ceilings
Several of the rooms here at Aldersgate have those things. They're great for hiding cables and other unsightliness, without actually cutting into the ceiling, but...

They're called "drop ceilings" for a reason. Because they do. Sometimes as much as six inches. Then people come knocking on Dale's door and asking him to "take a look at"[0] the dropped ceiling.

As far as I know, the ceiling hasn't dropped again, but I'm not going to break into someone else's room just to check.

[0] A not uncommon mispronunciation of the word "fix".
Friday, December 2nd, 2005
2:17 am
On Blinkenlichten
OT: I like the sound of "blinkenlichten" better than that of the official term, "blinkenlights", and the former is the original form anyway, so I'm going to use it.

I'm trying mightily not to end up in my corner whimpering again.

I just moved 11 of my blinkenlichten out of my room, and the remaining 9 down where I can't see them. I didn't realize they were so important to the atmosphere of my room. It's disconcerting not to have those nice pretty blinkenlichten flickering at me while I sit here.

"Blinkenlichten" comes from an old joke sign in broken German that ends "relaxen und watchen das blinkenlichten". In my case, that last line apparently holds quite true, even though their only use is to tell me what I have to reset when things break.
Wednesday, November 30th, 2005
2:34 pm
On John Hancocks and expressions
And, four hours later, and less than 38 hours after I placed my order, I've affixed my John Hancock to that pad the UPS driver carries and I have the stuff is in my hot little hands.

...

Quit looking at me like that. I know my hands are usually cold and are not exactly little. It's an just an expression, OK?
10:23 am
On Mail
Pardon me; I need to plug a certain mail-order website briefly. Specifically Provantage.

I went there to order some network equipment yesterday. (Admittedly, 0:36 yesterday, but that's still yesterday.)
In that list of things was a 25 foot ethernet cable for $5, including shipping. Which is about *half* the price I paid last time I bought such a cable (from a brick-and-mortar store). Their other prices manage similar feats, though not usually so substantial a difference.[0]
I mentioned when I ordered it for a reason. I paid for ground shipping. Which is supposed to be 3-5 day. Now, less than 34 hours later, UPS reports that it is "out for delivery". This is standard when ordering from Provantage. You can pay for next-day or two-day shipping, but why bother? You get it anyway.

In the "Extremely logical things" department, we recently received a piece of junk mail. This is not usually news. Getting ten or more in a single day would be news, but not just one. But this is extremely special junk mail.
1) It arrived in a hand-addressed envelope,
2) It was addressed to "Aldersgate Student house", and
3) It was advertising in-home care as an alternative to a nursing home.
In case the "Student" in #2 didn't make it obvious, we're mostly in our twenties.

[0] How do they get their low prices? Their return policy. Make sure you know what you want before ordering; the usual rule is return accepted only if it's unopened or dead-on-arrival (DOA). Some products can be returned only if DOA.
Saturday, November 26th, 2005
10:54 pm
On Amtrak and other vacation-type-stuff
It's vacation time. This particular time, Dale took Amtrak to Charlottesville[0], where his sister is going to school, crashed in her room Friday night (11/18), went to the football game, watched the band perform, and then our parents came to pick us up Saturday afternoon.
Monday morning (11/21) we left to visit various places in and around the east coast of Virginia, including DC, Colonial Williamsburg, and First Landing State Park. Jamestown was on the list, but we didn't make it there; we spent extra time in Williamsburg instead.

As usual, taking Amtrak involved arriving at the station several hours after the train was scheduled to depart. Amtrak is great, as long as you can deal with the fact that the train *WILL* be late. Fortunately, the website and computerized phone help are usually accurate to within fifteen minutes or so, greatly reducing the required sitting-out-in-the-cold time. (Indoor waiting rooms cost too much, and aren't here to stay, anyway.)

About an hour before I left, I released a new version of NFORenum. I went to special trouble to ensure that, should I have released a broken version, I'd be able to compile and post a previous, unbroken version. Thanks to Murphy's law, this ensured that I would not, in fact, need to be able to do so. (Note to self: ask SROTU for space on users.)

We got back late Friday. Today we did the usual Thanksgiving stuff: a smörgasbord for lunch and turkey, stuffing, mashed potatoes, &c. for dinner. Tomorrow, it's back to Charlottesville, and from there, back on the train to WL.

[0] .va.us, in case there are any other Charlottesvilles of which I am unaware.
Tuesday, November 8th, 2005
8:54 pm
On not listening to music.
I knew there was a reason I don't listen to music.

Sony is apparently including rootkits on their "audio" CDs.

First I heard of it was this:
http://www.ubersoft.net/d/20051107.html
I passed over it as something that couldn't *possibly* be. (Come on, Dale. Corporations do enough stupid stuff, do you really think webcomic authors need to make things like this up?)

I have since been pointed to "Rootkits Are Okay, Because No One Knows What They Are":
http://techdirt.com/articles/20051108/0117239_F.shtml

And link chasing has turned up this too:
http://www.sysinternals.com/blog/2005/10/sony-rootkits-and-digital-rights.html

I'll just be hiding in my corner whimpering quietly about now. Don't mind me.
Wednesday, November 2nd, 2005
12:59 am
On extremely logical things
From Yahoo's account information page:
"Please add an address if you would like to indicate a contact preference (including declining to receive some types of postal mail)."
"Please add an phone number if you would like to indicate a contact preference (including declining to receive some types of call)." (typos left intact)

And then there's *this* file: http://www.charlottesville.org/content/files/3775B608-1EC0-4D23-B7C8-3F98AB86A7A9.pdf
Which, as I'm sure you can tell, contains the route map for the free Trolley between the University of Virginia campus and downtown Charlottesville.
Saturday, October 29th, 2005
12:03 am
On Halloween Parties
We had a Halloween party tonight (Yes, I know "tonight" is now in the future. You know what I mean.) here at Aldersgate.
Pumpkin carving, candy, games, bobbing for apples, It's the Great Pumpkin, Charlie Brown, the whole nine yards.

I also managed to get the theme from The Andy Griffith Show stuck in my head. Please don't ask me how. It's a catchy little tune. An entirely too catchy little tune, and it's starting to drive me up the wall.

Even so, I wish I could find that show; it deserves to be watched properly. (In this case, "properly" does not mean "in one sitting". According to IMDb, there's a little over five days of video, nonstop. You're welcome to attempt that. I won't.)
Saturday, October 15th, 2005
12:14 am
On Updating
I've used that title before, haven't I? Oh, well.

I had the feeling that this would happen, I'm kinda surprised it didn't happen earlier, though. Eventually I just feel that there's nothing new to report. (Or that everything new is too geeky.) This'll be a geeky post, so bear with me, or just skip it, in hopes of a better one in the near future.

I'm still trying to make NFORenum do absolutely everything, with limited success. Try as I might, the TODO is growing in only one direction, and that direction isn't "smaller". My latest project is getting NFORenum to create a "Renumber" entry in the right-click menu, but that involves manipulating the registry; something I had been hoping to avoid. So far, every time I attempt to read the appropriate MSDN page, the only actual result is that I come back with a very addled brain. I'm rather tempted to shuffle this work off onto MFC, but that'll won't do much for this "portability" thing I'm attempting to preserve. (Not that the registry manipulations help that "portability" claim any.)
Assuming I get the right-click menu working, I'll probably add a key to tell NFORenum where it put its data directory, so it's harder to end up with multiple .renum folders.

Yipe! Messy hands. Computer was making strained-motor noises. The procedure here is to open it up, blow out the dust, and see what's up.
Except that the "blow out the dust" became "scoop out the dust" and "scrape out the dust". The dust had piled on so thick it had jammed up the processor fan. (Which is a Bad Thing, in case you weren't clear on that.)
Monday, October 3rd, 2005
12:17 am
On silver integrated circuts.
Housemate Lindsay came walking into my room tod^H^H^Hyesterday, with one of those "please tell me I haven't broken anything too badly" smiles on her face and silver-colored centipede-style integrated circuit, about half an inch wide and maybe three inches long.

The poor brain had quite the time trying to figure out what she had done, and why.[0]

It finally figured out that the "integrated circuit" was *not* an integrated circuit at all; rather it was a ball bearing carrier for drawer or slide-out shelf and several (twelve of the sixteen, as it turned out) loose ball bearings. Things started making a whole lot more sense (when is the last time you saw a *silver* IC, anyway?), but I still wasn't quite sure what exactly had happened.

Turns out her keyboard shelf had vomited the guts of one of its sliders out onto the floor.

Once I realized that I had to take the track off of the desk to reload the bearings, everything went pretty well. Until I went to put it all back together, and realized that shelf side of the other track was bent by about 5°. I'm still not sure whether I should be more worried that it was bent in the first place, or that I was able to bend it back with almost no effort.

Apparently, it works better now than it did before it broke. I hope no one else gets wind of this, lest all the other computer desks around here suddenly start mysteriously breaking.

On a slightly related note, I have *got* to find some more controlled way of pouring cooking oil on my hands than "open bottle, pour." That's the only thing I've found that can dissolve the grease I use, and I usually end up with far more oil than I actually need. That, or a different solvent, but neither hand soap nor dish soap seem to do the trick.

[0] Why she was coming to me was not a question that ever entered my mind; for some reason, everything even vaguely computer related (such as programming VCRs, running TV cable, fixing computer desks, &c.) is automatically my domain.
Wednesday, September 28th, 2005
2:03 pm
On majoring in Liberal Arts
"I think saying you are in Liberal Arts makes you dumber. I can feel my smart level dropping increasly." -- A liberal arts major, at last night's impromptu campfire and campout at Aldersgate.

I participated in the former, but not the latter; my bed is rather more comfortable than a foam pad.
Monday, September 26th, 2005
12:22 am
On playing Ultimate in a hurricane
OK, fine. So it wasn't a hurricane. But "... in the rain" just doesn't sound quite as impressive.

According to the National Weather Service, by the time we had quit playing, we had had 1.32 inches in previous 9 hours; 1.25 of that in the previous 6. And we were playing on a grass and dirt^Wmud field. (Grass where the marchers don't spend much time; mud where they do.)

Eleven people showed up; and I think it those two games were about the most fun I've ever had, despite not being able to see the Frisbee half the time (bad lighting) and getting covered in mud, grass, and the like. I managed not to collide with anyone (although I did come within inches once), and I don't recall spending more than the usual quantity of time on the ground. There were some pretty impressive falls, both in our group, and in the group of people playing football just before we started. I mostly managed to avoid that fate; maybe my habit of always sliding to a stop is a good thing. It did come back to bite me once, though. When trying to stop quickly, I drop down on one or both knees[0], and slide.[1] Well, this particular time, I planted my knee right into a mud puddle, and got one quite ... nice shower.

[0] There's a reason I always wear pants, and never shorts.
[1] When the ground is slippery, this is by far the fastest way of stopping; beating out both sliding on my feet and continuing to run as I slow down. Although less controlled than the second option, it eliminates the very real possibility of falling that comes with attempting to stay on one's feet, and, given the available traction, the third simply did not work.
Saturday, September 17th, 2005
9:03 am
On Reinstalling Windows
Some time (several months to a year) ago, either my NTVDM[0] or my WoW[1] Executor quit on me. Translation: 16-bit Windows programs would start, but not actually *do* anything. The only way to get rid of them was to kill off the NTVDM.
I finally got fed up with this notworkingness (the two forced reboots in about 30 minutes helped too), and decided that it was time to reinstall Windows.

Previously, this procedure has taken me one day to locate, compress (as necessary), and back-up data, one to two days to do the install and updates, including necessary utilities, and several weeks to realize that I still haven't restored most of my backed-up data.

This time, however, I had a true User/System setup (one partition for the OS, and a separate partition for all my junk). This completely removed the first step, and between experience and a not-working XPSP1 CD, the second was severely reduced. I don't know why I didn't do this ages ago; my computer is running with 37 processes where it would normally have about 50, notably smaller memory usage, and at least a gig(!) of free space that wasn't there before.

Due to the notworkingness of the XPSP1 CD, I did the vast majority of my updating from Windows Update. It is a very strange beast. My first visit there, and I quote "In order to use Windows Update, you must update the following core Windows components." Which it quite happily proceeded to do, using ... you guessed it ... Windows Update. Second visit, it gave me several updates, but XPSP2 was mysteriously absent from the list. Third visit was a repeat of the first, except with different components. Fourth visit, it started to give me SP2, at which point I realized why, exactly, MS offers free SP2 CDs. I stuck said CD into the drive and installed from CD instead. I think it was five or six visits before I had everything downloaded.

If you'd like to go the user/system path, it is very nice to have the config files stored on the user partition, not the system partition. Most of the config should be deleted on the general principle of cleanliness, but some of it should stay, and not having to back it up is a good thing. The benefit of this setup only becomes evident the reinstall *after* you set it up, though.
To move the config files, several of the values in HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders need to be changed. "AppData", "Local Settings", and "Local AppData" are the three that I changed. XP provides a utility to move your My Documents folder, which will adjust "Personal" and the three keys that match "My *". It is probably ill-advised to do anything except the My Documents move on other than a clean install.

With any luck, this install will last as long as the previous (over a year), but even if it doesn't, it'll only take me about 24 hours to bring this whole system up back up from CD, user-partition backups (firewall, anti-virus, &c.), and Windows Update.

[0] NT virtual DOS machine
[2] [16-bit] Windows on [32-bit] Windows (Why this runs under the NTVDM is something I don't really care to understand.)
Sunday, September 4th, 2005
1:03 am
On roommates
I have a roommate. An incredibly annoying roommate. Said roommate will never leave me alone, unless I leave the room, and then greets me even more annoyingly when I get back. It's driving me up the wall.

If something doesn't change soon, I think I'm going to kill my roomie.

I'm going to go find that flyswatter and rid myself of this flying six-legged pest of a roommate.

I'm not sure if it's always the same one, but there always seems to be exactly one fly in my room. I still don't understand why it won't go fly out of my room, though.
[ << Previous 20 -- Next 20 >> ]
About LiveJournal.com