Recently in Programming Category

A few weeks ago, when Brian was on vacation, some of the rest of us had a communication breakdown about creating new user accounts, and several new employees had to wait entirely too long before they could log on. This was at least partially my fault.

Brian is going to be gone again next week, but this time we won't have these problems because we've improved the process. First of all, we found out why most of the notifications were misrouted and fixed that. Also, I've added some more automation to the faculty/staff account creation system, so there's less work to do. I can't really talk about the details because that would mean giving out too many specifics about our servers, but several steps that formerly had to be done by hand now happen by themselves. The weird part was how easy it was to do, once we took another look at the process; once upon a time it had to be complicated, but thanks to various changes we've made in the last few years, a bunch of stuff was no longer needed.

Anyway it's way the heck late at night and I need to get out of here. At least the prettymail stuff is working , um, pretty well. (Yeah, this is my 2AM sense of humor.)

allfacstaff 2.0 AKA prettymail

| No Comments

Well, I just rolled out the new version. It's been tested against all messages sent during the time we last tried this, and they all worked, but software releases don't tend to survive contact with the users, so we'll see what happens. Let's just hope the bugs are tiny.


| No Comments

OK, it's a quarter to two, I've been here since noon (you can criticize my schedule when you start working fourteen-hour days) All week I've been wracking my brains over one single annoying bug in the new prettymail system. Three messages out of 100 come across completely blank, for no apparent reason whatsoever. Their source code looks exactly as it should -- even though these are annoying MS-Word copied emails with hundreds of lines of insane proprietary CSS code, I'm pretty sure of that. I've read pages and pages of documentation, I know all about how to build multilevel MIME-type email messages in five different encodings, I've gone so far as to manually change the source code in every way I can think of, and pipe the message through the mail system over and over and over again.

But they don't show up. Completely blank. No matter what I do. It blows my mind. I've tried everything I can think of.

This kind of thing is just part of being a programmer. Something will stop you cold in your tracks and you have to beat your head on the wall until you find that one letter that's supposed to be capitalized but isn't, or that one variable that got replaced by a local value when you weren't looking, or whatever.

The problem is, I really need to get this done because people are waiting on me. Other projects are waiting on me. I can't afford to take this long on something like this. One thing I do know, though; it's 2 AM now. I'm sure not going to solve it right now. Time to have a weekend and try some more next week.

Pretty email

| No Comments

You may or may not remember that for a while we converted the all faculty/staff email list to a system of multiple categorized list that people could opt out of. The mechanism basically grabbed email out of the inbox, turned it into plain text, wiped out attachments and replaced them with links to copies of those same files on the website, and put the messages into a database where certain people could approve and categorize them. Another process then searched for approved emails and sent them to the lists belonging to the right categories.

This system turned out not to work well enough, especially the part where it converted everything to plain text. Email messages can have all kinds of cruft in them, including buckets of formatting codes from MS Word, weirdly encoded characters from odd email systems, forwarded messages with attachments, messages forwarded AS attachments, etc. So we had too many messages coming through the system all messed up, and we had to switch back to the old way of doing things.

Since then I've been working on a better system and it's finally coming together. Instead of converting to plain text, I'm converting to the standard multipart/alternative format that contains an HTML body to be used in HTML-capable email systems like the WOU webmail, and also a plaintext body for email programs that can't display HTML (or where people don't like HTML and have turned it off.)

It's a pain because I still need to parse an unknown number of attachments, forwarded messages, etc. The attachments have to be removed and copied to the webserver so we don't have to cram each one through the mailserver a thousand times. I need to replace image links within the email with links to the website copies, and remove various kinds of custom formatting... blah, I'm tired. More later.

Change in wou_ldap.vnum_to_uid

| No Comments

Fair warning: this entry will make little or no sense to you unless you work in UCS and do PL/SQL programming.

I've made a change to wou_util.wou_ldap.vnum_to_uid, specifically to the way it deals with V-numbers that are attached to multiple user accounts. Before, if you passed a usertype as the optional second parameter, and it couldn't find a uid matching that type, it would still return a uid if it found one of another type that had the given V-number.

As of today, passing the second parameter will make the function behave more strictly; if a user account of the given type cannot be found, the function will return zero even if there is a user account or another type that has the given V-number.

In other words, passing a usertype to vnum_to_uid() means you want a matching uid only if it also matches the given usertype.

If you only pass a single parameter, the function will behave exactly as before; if multiple accounts are found, it will return the last one found. This is usually the most recently created account, but don't rely on that always being true.

Oh, and one other note: there is a new usertype, "Alumnus". All LDAP accounts of people who have graduated from WOU have this type. It is possible for someone to have both Student and Alumnus, for example if they graduated and then returned for a Masters program.

User account renaming

| No Comments

One of the big projects I'm working on right now is user account renaming. All of a sudden, this term we've got a bunch of requests from people wanting to change their usernames; usually either because they got married and changed their name, or because it wasn't spelled right in the first place. We rarely ever got these before, and the standard answer used to be "We can delete your account and make you a new one, and if that's not acceptable, you'll have to live with your current username."

Now, though, we've got a process that can actually change a username. This is harder than you might think; a username is stored in a lot of places, and affects a lot of things under the hood of several servers, so there are lots of t's to cross and i's to dot.

For instance, changing your username means changing the location where your personal files are stored, which in turn means that several settings in your blog have to be changed, along with (of course) moving your files. We have to change your email address, the location where your messages are stored, any email aliases you may have, any email list memberships. We aren't even going to try looking in everybody else's address books to see if your old email address is in there. It's bad enough that, because of the way the Communications Express address book is stored, we have to make a behind-the-scenes change to every address record in it.

The real sticking point of all this is your online calendar, also part of Communications Express. Because Sun originally bought the calendar server from some other company, it uses a database that's pretty different from other Sun products. Partially because calendars are so interlinked with each other, and also because of some fundamental choices made by that original company, a calendar simply can't be renamed without shutting down the calendar server and rebuilding the entire database of all calendars, just in case they have any links with your calendar. I've pretty much given up on being able to do that with an automatic process. There's just too many things that can go wrong.

The good news is that almost everything else is now changeable, and most of it is automated. If you need your name changed, contact the Service Request Desk and they'll get it to me.

PL/SQL developer notes

| No Comments

OK, so it's been a while. Seeing as I'm supposed to be the blog server admin and all, I suppose I should actually post a blog entry once in a while.

From now on, I'm not going to be aiming all my blog posts at the general WOU community; some will, but there will probably be more stuff for the UCS folks in particular, especially the other admins and programmers.

So, for the PL/SQL programmers, a couple things about PL/SQL developer.

In case you've been wondering how to get the HTML documentation installed, I finally figured it out. I had to download it from Oracle, but it's now on the T: drive in the PL/SQL Developer folder, under the name Here's how to install it:

  1. Unzip the file to some appropriate place like C:/orant/htmldocs. This took a while on my machine.

  2. In PL/SQL Developer, go to the Help menu and select HTML Manuals.

  3. You should see a dialog box, with a textbox near the top. It will probably have your local oracle home in it; change it to the folder where you unzipped the HTML docs.

  4. Click Build. On my machine, it showed progress, then appeared to hang for a couple of minutes, but then completed successfully.

  5. On completion you should see a long list of book titles with checkboxes. Scroll down to verify that the following are checked:

    • Oracle 9i Database Error Messages

    • Oracle 9i SQL Reference Release 2 (9.2)

    • PL/SQL User's Guide and Reference

  6. Click the Apply button

  7. That should be it! If all went well, you should now be able to use the Search tab in the HTML Manuals dialog box, and the Help buttons on error messages should now take you to actual help. (Since this is Oracle we're talking about, though, the help isn't always especially helpful.)

Another thing related to PL/SQL Developer 7.11: Has anyone else noticed weird characters in the code help dropdown menus? Dale and Michael Ellis clued me into this. I can't reliably reproduce it and am wondering if anybody else can.

About this Archive

This page is an archive of recent entries in the Programming category.

Info / Explanation is the previous category.

Wiki server is the next category.

Find recent content on the main index or look in the archives to find all content.