August 2006 Archives
It's pretty much every day that I run across a program on windows that wasn't coded correctly to function in a multi-user enviroment as a good program should. It's not every day, however, that I come across a program that is so horribly coded I decide to create a "Hall of Shame" consisting JUST of that ONE application.
I'm not talking just "bad", I'm talking HORRIBLE. There's a line, and this single application crosses that line in multiple ways at once.
I work for a small law firm, and we recieve massive PDFs of legal
documents all day, in any one of a good ten different file viewers and
file formats with different file extensions (although I have yet to
find a single format that wasn't either a PDF or PCL doc with just
that: a different extension and a differently branded viewer). I just
had to help a user get their document package to print, and let me tell
you, it was a doozy.
First off, I present you with DesertDocs. This is the offender's website, but the website is half the problem. More on that later.
The e-mail in question had nothing more than a document number and a link to this website. If you click on the "WebPost General Inbox" on the side, it'll bring you to a rather confusing page. The nature of the documents include personal information (likely SSIDs, names, addresses, etc.). Nothing that we would knowingly spread around, in other words. So, we picked the "Private Inbox Login" button. Username and password? Not in the e-mail. So, we go back, and pick the "Download Docs" button.
... to be presented with an EULA. Scroll down, click agree... hmm. Now it wants me to install a document viewer for this. Why I need a seperate viewer to view these docs is beyond me, but I've also grown used to it over time (refer to the previous paragraphs). So, I install it (the user in question has guest priviliges, I had to install it personally as the administrator), and try the website again.
Only to be prompted to download the viewer again.
*twitch*
At this point, the user I'm helping has to get this done now, and further, has a migraine. She also had the winning idea: call them. So, we find the toll free number, and call them up.
After explaining the problem to the person who answered, I could tell instantly that they had encountered this problem before. Their solution? "Delete your temporary internet files and cookies, that is what is preventing you from getting the docs you need."
"Okay, done, and it's still not working."
Upon hearing this news, he directed me to the application's Program Files directory, and instructed me to start the "wpcookie.exe" application. (Side note: he directed me to the directory in question by having me right-click the doc viewer shortcut, hit properties, and then 'Find Target'. This is actually ingenious, and probably the only correct thing that I got out of the entire call.) I ran it and it seemingly did nothing. He then told me to open the website up and try again. Tada, it worked.
"So, what did that just do?"
"Place a cookie in Internet Explorer."
Problem one: when enough users call in and whine that it doesn't work, causing you to package a seperate program just to set a cookie on the computer, you have issues.
As pissed off as I was then at how horribly broken their program was, I continued on with the guy, because plain and simple, we needed it to work. I was able to then get to the link to download the documents. I click the link, and naturally, it opens in a popup (which is blocked).
Problem two: when your tech support takes it in stride to tell you to allow the popup that was just blocked, take a clue yourself, 'developers': stop using popup windows.
"Hey! That's what I need!" the user exclaims. "Good," I'm thinking to myself, "I'm almost done." (Hint: I wasn't.)
I was then told to click on 'Print', 'All', and then 'Okay', and I would then be asked a printer to print the docs on. Sure enough, I was, only instead of printing, a 500kb file downloaded, and the viewer program that I had downloaded launched. Only to error out in a horrible way: "Permission denied." I then read the error message.
Problem three: the %TEMP% dir exists for a reason. Quit thinking you can write to Program Files\Your Stupid App\temp, because you can't. Copying the downloaded file from the Temporary Internet Files directory to a temporary directory in Program Files is just plain stupid. Use the %TEMP% dir, that's what it exists for. By doing this, not only are you assuming that the user is running on Windows 95/98, or that they have Administrator rights (which they don't, not on my grounds!), but you're adding multiple security holes into your application and breaking all forms of file system quotas automatically. Oops.
At this point in time, I was laughing to myself, and just blindly following the guy's instructions. Two more attempts were made to fix this. One of these included copying the file from the Temporary Internet Files directory to somewhere else, and then opening the utility to click File --> Open ("Double clicking on the file will not work."). I forget the other.
At this point in time, he said something that was honestly quite amazing: "Huh. Well that's weird."
Someone has never used a windows computer as a guest, have they?
At this point in time, I just told the guy to hang on while I tried something of my own. That something involved giving the user permission to write to the application's own temporary directory. Guess what? It worked.
Guess what else? That little 500kb file? Was an archive. In the archive, was a .pdf and a .html.
Problem four: quit re-inventing the wheel with applications that don't work. I just spent the last 15 minutes on the phone with you trying to fix this, only to find out that you just as likely could have given me a link to the .pdf (the .html wasn't really needed in this case), or, thought of all thoughts, a link to a .zip.
Luckily, this can easily be rectified.
- Stop pretending that the user WILL had Administrator rights.
- Stop breaking file system quotas by thinking you're better off using your own personal %TEMP% dir.
- Stop making up your own file types, and
- Start using existing ones (no, your way is NOT better in ANY fashion).
- You could make me eternally grateful by firing your programmers and just giving me a link to the .pdf on the website. Really.
I use a combination of liferea and akregator to read a fair number
of blogs. I also use rssreader on windows. Also of note, I dumped
akregator in favor of liferea over time. Why? I'm still not sure. (KDE
is my desktop, always will be.)
At one point in time, I had nearly a gig of stored plaintext blogs. That's a lot of text.
Given that I can take a fair share of blogs and note how they either sport tags or categories, and I can likewise view that blog by all posts tagged or categorized, if I want to read about a specific subject someone blogs about, that's 100% doable. Face it, if you couldn't, people would wine. Hard.
So why doesn't my RSS reader software have this? Why can't I label digg.com as "stupid", "retarded", and "marginally interesting"? I'd tag my local newspapers as "news" and "local", and the other larger ones as "news" and "global".
Then I want a little search box up on top that will let me search though and view my tags. If I wanted local news, I'd just type in "local news" and tada, all of my local paper's RSS feeds would pop up. "internet news" would give me /. and digg. etc.
I'd really, really appreciate such a program that would let me tag blogs like that. It really would make my reading so much more enjoyable.
The other day, I resized my NTFS partition from taking the entire disk, and made some others: a 100MB partition at the beginning of the drive, and then 15GB at the end. The 15GB was split into 1GB/14GB. I'm sure that most of you can imagine what each partition was for: /boot, swap, and /.
I popped in my gentoo livecd, fired up gentoo-nofb, and went to work installing gentoo. Firing up fdisk, I saw that my partition table was out of order. And hey, it was! I had only resized my existing partition, not made additional ones. Likewise, the large NTFS partition sitting in the middle of the drive had partition ID #1, and the 100MB before it had ID #2. "Why not" I said, and told fdisk to fix the partition table order for me. Which, hey, it did, and did perfectly.
Recall from previous posts that Window's boot loader (NTLDR) is a little finicky. It was installed to the first partition, likewise, when starting Windows, it tried to load files from partition one.
Which, was now 100MB in size and formatted ext2.
To complicate the matter, I had left my CD binder at a friend's house the day before, preventing me from popping in the XP CD and hitting the "Repair" option. I also needed to boot into Windows (hey, don't judge me!), and by fixing the problem, I had broken it. I recall a small bit of IRC chat that occured while I was trying to fix this:
him: iirc, fdisk has a fix partition order option, maybe that'll help?
me: That's what I used, I need it in it's broken state to work
him: oh, okay.
So, fdisk is not of use, and I need to change my partition table entry. Luckily, the MBR (which houses the partition table) is only 512 bytes in length, and the partition table is an even smaller subset of that. So, what do you do when you have a linux livecd to repair your partition table?
Google, `dd`, and `echo`.
- Google the partition table format and location
- Use fdisk to dump the current partition table (it dumps it so that I can see offsets, enter fdisk and then press 'x', 'd' to see what I mean)
- Backup the current MBR (dd if=/dev/hda of=MBR.bin bs=512 count=1; scp MBR.bin user@host:~/)
- Use a combination of `echo blah > file` and `dd if=file of=/dev/hda bs=1 count=1 seek=blah` to change the partition table order.
- Reboot and hope that it works at all.
And guess what?
It worked, first try.
I might have gone absolutely nuts once I saw that it worked.
I wound up deleting the initial /boot partition, and resizing the
NTFS partition to take that initial hundred megs. I'm booting without a /boot partition, but hey, it isn't exactly required.
Of course, an hour later, I realized that I could have just:
- Deleted the /boot partition
- Deleted the swap partition
- Made a new /boot partition, numbered one, after the number two (NTFS) partition
- Re-fix the partition order (again)
Oh well. At least I can say that I've manually re-written an MBR now using echo and dd.
For anyone who thinks to themselves, "You know, changing the domainname is fine while the system is running [X]", think again.
Change the domainname while X is running causes X to die in horrible, horrible ways.
Taking your glibc compile along with it. Oops. So much for the past half-hour.
