Jealousy

From NY1:

Illinois Senator Barack Obama is campaigning in Florida today. He’ll be in Connecticut Sunday to deliver the commencement address at Wesleyan University, in place of Senator Ted Kennedy.

Our speaker was alright, but he was no Barack Obama. And why did Wesleyan get Ted Kennedy, when he’s our Senator?!

Graduated

I’m now (essentially) graduated, with a Bachelor’s of Science.

As I was walking across the stage, there were five different people who shook my hand. A few congratulated me; the President beamed with joy as she shook my hand (given that I’m a W-name, her facial muscles must have been aching?). But the last guy’s words of wisdom, imparted with a serious, dignified tone?

“Do not.

Fall down.

The steps.”

Words to live by!

Laws

A long time ago I coined Wagner’s Law: “While driving, the probability of encountering a bicyclist is exponentially higher when approaching a blind curve.” Why this is, I have no idea, but the world’s bicyclists always seem to be entering blind curves when I’m driving. I very rarely get to pass a bicyclist on a long stretch of straight road where I can see that it’s clear to pass. Instead, I’m entering a blind curve, where I’m forced to slow down and stay behind the bicyclist. This probably drives the people behind me crazy, but the only alternative would be to drift into the other lane, which is downright suicidal since I can’t see oncoming traffic.

Today, I’d like to coin Wagner’s Second Law: “As an organization grows, the percentage of unnecessary members rises.” By the time you’re a college, you probably have a lot of jobs that, frankly, aren’t necessary. We were joking yesterday about how the school ought to cut about 15 jobs and merge them into a single person’s job, with the title, “Director of Pointless Memos.” They can be the one that’s in charge of taking an e-mail sent to the whole campus and forwarding it… to whole campus… And the one in charge of sending us an e-mail informing us that the work order system for submitting maintenance issues is “now available,” even though it’s been available for at least two years and was not previously unavailable, and so forth.

Yesterday I got a notice in my mailbox informing me to make sure to update my mailing address with people sending me mail over the summer. We’ve been debating whether one line was a typo, or whether it was deliberate… One assumes the former, but after getting a sufficient amount of utterly pointless memos, we’re not entirely convinced that they didn’t mean to tell us exactly what it says:


The U.S. Post Office change of address form does not apply to our campus e-mail addresses.

Awesome

There were a couple people screaming profanities outside my window. After about ten minutes one of them shouted, “Come drink with us” at some girl, and I looked out and saw that they had beer bottles.

Sufficiently irritated at this point, I called Campus Police. The dispatcher said, “I just sent someone up that way for this,” so I turned on my radio.

Sadly, the officers had the wrong location and missed them. But I was observing the whole thing through my window listening to them. I had to find a way to call back without divulging that I was listening to them, so I just stated that I’d seen the officers look in the wrong spot and leave. She asked me for a better description of their attire, in addition to my exact description of their location. I watched a couple cops slowly approach, observed the people I’d called about, and swooped in.

At this point I expected the students to stop yelling, apologize, and be asked to move back into their room. Instead, one of the students, upon seeing the police, threw his bottle down, screamed, and took off, with the second kid following him. The officers initially chased them into the woods.

One officer stopped chasing them as they got into the woods. I was slightly disappointed to see them get away, except that all I really wanted in the first place was for them to stop yelling profanities and derogatory comments at people. So I was happy.

But I was even happier when another officer radioed in that he had seen the kids come out of the woods and was picking up the chase.

At this point my batteries died, so I’m not yet sure how this ended. But suffice it to say that it ended up significantly more interesting than I’d initially expected. And the drunken jerks are gone.

As an aside, the school’s 100W repeater (into a high-gain antenna, it seems) seems to overload my poor little VX-2. I tried enabling its attenuator feature, but it still didn’t seem to cut it. I then tried removing the antenna, but then the signal was too weak. (Although still audible.) My IC-W32 holds up much better to the overwhelming nearby signal, but its batteries don’t. And my ASTRO Saber is entirely unphased by the signal, but its batteries died the other day and I hadn’t recharged them…

Computing

It looks as if we’re actually being charged $500 to take our school laptops with us (after paying $1,200 for the “Technology Fee,”) which has me scouting out prices: can $500 buy something better than this?

In the process, I came across this: a tri-core computer.

If you’re confused…. Me too!

Confirmation Bias

Have you ever noticed that someone mentions something, and all of a sudden you notice that thing multiple times? One professor mentioned that very phenomenon one week. Early the next week, I was touring Waltham’s 911 dispatch center, and noted the software they used for  (Computer Aided Dispatch) CAD, intending to look more into it. The next day, I had that professor’s class again, and, for reasons I still don’t understand, somehow slipped in a mention of knowing someone who worked at that company. So I mentioned this to him after class, and also pointed out the incredible irony of the fact that the week before he’d mentioned the “someone mentions something, and all of a sudden you keep seeing” it phenomonen. {Meta: this phenomonen may, itself, be related to a confirmation bias, but I digress.}

So Kyle mentioned confirmation bias in one of his recent posts. The next day someone on Ask MetaFilter asked why black people were afraid of his dog. Most answers bordered around it being a confirmation bias. (Although it got interesting when several people reported having noticed the same thing, suggesting that maybe, just maybe there is some sort of racial difference in how dogs are viewed.)

The other day there was a lunar eclipse. Around the same time, we had several short problems with Internet access, where traffic wasn’t leaving Bentley. (Incidentally, I had the same experience I’ve had with most of my tickets–I only open then when I run into an issue I can’t solve myself and am very confident that it’s a problem, so I usually include enough information that the front-level have no idea what’s going on an forward it to an expert… So I ended up speaking with our “Network Engineer,” a position I didn’t even know we had, and we had a good talk about exactly whta the problem was… It appears to lie with an upstream company performing some maintenance.)

So today my professor–who teaches nothing related to electronics nor astronomy–randomly interrupted her lecture saying, “Thursday was a lunar eclipse. Did anyone else experience technical problems because of the lunar eclipse?” People had several problems that day–several brought up the Internet disruption. Someone had their computer crash. She explained that the lunar eclipse tends to cause those things.

If ever there were evidence of a confirmation bias, that’s it. I don’t profess to be a total expert, but I’m pretty certain that the moon being obscured by our shadow isn’t why our Internet link went down for a couple minutes. And yet she’s found plenty of evidence to support what’s probably an urban legend.

Dork

Yesterday was, for all intents and purposes, a snow day. They closed the school down at 1. Of course, I had no classes anyway, just some work that could be done anywhere. But this was a snow day. You don’t do work. At least, not the work you’re supposed to.

Kyle, always being curious about the hardware side of things, sent me a link to the RoomWizard downloads page after fishing out the hardware specs elsewhere. There were two things that interested me–one was that you could download a firmware image. The other was that they had a PDF of how to use their API.

Wait… API? That means… it’d be trivial to write an interface to these things!

The problem is that the manual never mentions the actual address of the API, which is just accessed over HTTP and returns XML. They give a few examples–/rwconnector is used most often. But alas, /rwconnector on these throws a 404.

Somewhat discouraged, I started poking around the firmware image. It’s a .tar.gz, and extracts… a (fairly) normal Linux filesystem. Besides some juicy stuff that I hope admins are instructed to change (there are several privileged user accounts), I also found some neat stuff. For one, it’s based on SuSE, but a very trimmed-down version. And it’s basically a full-functioning Linux machine, including an SMTP server, Apache Tomcat, etc.

But then I hit gold. There’s a configuration file for Tomcat, which mentions one URL of /Connector. So I fired it up and tried it in on one of the systems. Bingo!

So then I read a bit more of the API manual. It’s actually very simple–you can retrieve, edit, and delete bookings. (The edit and booking doesn’t let you do anything you can’t do via the web interface, by the way, lest anyone think this is a security flaw.) You get an XML document back with results.

So then I had to figure out how to get PHP to parse XML. It turns out that PHP actually has several ways to do it, including SimpleXML and DOM objects. I spent a while learning it and by the end of the day, I had a prototype working that would get reservations for the next 24 hours and parse out the information. (Small tip–don’t try to “escape” colons when dealing with XML. They denote a namespace. When you get rb:name, for example, the tag name is just name, in the rb namespace. Knowing this a little sooner would have saved me about half an hour of, “This code is so simple! Why doesn’t it work?!”)

The next step is to insert all of this into an SQL database, and then write a nice viewer for it. And also to experiment with adding bookings, although that should just require changing a line of code.

I haven’t actually written code to do timing, but it feels like it’s 1-2 seconds for me to get the XML data back, which suggests that the bottleneck is in its little database. Short-term, I want to write myself a little interface that will parse all the data, cache it, and give me a faster interface. Long-term, I want to try to see if I can get the library to adopt this, and have it be the booking mechanism. You can store them to a local database, and then have a background process use the API to push reservations out to the respective RoomWizards, so that they continue to function normally. But when people view the page, it’ll just get it all from the local database, meaning that the whole “Get the listings via API” thing is no longer necessary. (Unless you want to rebuild the database in case of a disk failure!)

Criticizing Web Apps

As long as I’ve posted a lengthy diatribe about how awful the library room-booking web interface is, there are two more that drive me nuts.

We have a way of putting in work orders for maintenance. Last semester I tried to open one of our windows and it just fell out. This semester, we had three different light fixtures burn out in 2 days time. So you go online and put in a work order. This is a great thing to have web-based. Except they picked this insane system that opens multiple browser windows, resizes your browser (?!), uses copious JavaScript requiring you to double-click on links… And it only works in IE. Oh, and there are irritating things that could be fixed with one line of code… You log in with your student ID, which is eight-digits that inexplicably have an @ sign in front of them. So they have this big note on how you cannot use the at sign, you must only use your eight-digit number. One line of code could just strip it out if it was included.

Much like booking library rooms, submitting help tickets is a Programming 101 exercise. In fact, it’s easier than the library interface, because you don’t have to do time calculations. You have an employees table, a clients table, and a work table. Tasks get entered into work by the client, and the staff assigns an employee to it. And when it’s done, you set work.status to “Complete,” a simple ENUM field. This is like 45 minutes of coding, although I’d probably spend more time prettying up the interface.

Then there’s the computer help desk, another web app. For one thing, all the links to it point to an http:// URL. But if you actually use them, it barfs up an error that you must view it over a secure channel. Being a web dork, I just take “s” onto the end of “http” and life is golden. To someone who’s not so good with computers, and who’s already at wits’ end with their computer, they’re probably going to break down and cry, because even the help desk webpage doesn’t work for them.

This, too, only works in IE. In this case, they didn’t have copious bizarre crap (like requiring double-clicking on links), so I set Firefox to pretend it was IE. The page loads okay, but looks terrible, with nothing lining up right. IE and, well, the rest of the world, have differing views on how lots of things are done, but requiring IE really isn’t the best solution. Oh, and as an added bonus, they control your mouse cursor, preventing it from indicating links in any manner. This means that someone took time to write code that does nothing but decrease usability.

But worst of all, even if you use IE like they demand, if you actually try to click on any tickets to view them, you get taken to a random system with a long canonical hostname, which just throws you “HTTP 400 – Bad Request.”

So last night, I submitted a help desk ticket indicating that the help desk is broken. Because, frankly, it doesn’t work. All of its internal links take you to the wrong server (or, seemingly, the right server but with the wrong hostname), and that’s assuming you’re smart enough to get in, by understanding the error indicating that you need to use HTTPS, not HTTP.

Most of these things are sold as turnkey devices, it seems. Maybe I should start a company making them. Apparently, no technical expertise is required to do so.

RoomWizard

Even though I got to a business school and am a management major, my real passion is working on websites.

We just build a new library here, for millions and millions of dollars. We use a tool called RoomWizard for booking rooms. We get a web-based interface to book library rooms. This is a great idea. Unfortunately, it’s so fraught with bugs that it borders on unusable.

The main “bug” is that it’s basically so slow that it’s unusable. I tried viewing the source, and it’s got a HUGE block of JavaScript that’s a pain to read. Most of the page is being generated on the fly with JavaScript. There are times when this is the best way to do something. This is not one of them.

My current understanding–I may be wrong, since I’m still trying to make sense of this–is that each of the touch-screen units on the wall is a webserver. It’s responsible for storing all of its reservations. So when you view the main page, JavaScript has you going out to each of the 20+ rooms and requesting their status. The problem is that this takes forever, probably at least 15 seconds. By the time the page has finished drawing, it’s about time for the 60-second refresh to kick in.

I did a bit of viewing headers. The main page is running on ASP.net, but each individual room controller (probably like a 300 MHz embedded chip?) is running Apache Tomcat. Someone did a quick port scan and found that the devices have a lot of open ports–ftp, ssh, telnet (!), HTTP, and port 6000, which nmap guessed was X11. So I have a pretty good feeling these things are running embedded Linux.

Another problem is that there’s always one or two of the devices that, for whatever reason, are unreachable. So you get errors on those ones.

Booking conference rooms is like a Web Programming 101 interface. You get a basic introduction to SQL databases, and write a little interface. You could run this on an old 1 GHz PC with 128 MB of RAM and have pages load in fractions of a second, especially if you really knew how to configure a webserver. (Turn on APC and MySQL query caching, in this case, and you’re golden.) I cannot fathom why they thought it was a good idea to have a page make connections to 25 different little wall-mounted touchscreens. This places a big load on what have got to be underpowered little units, and is just a nightmare any way you look at it. I really see no benefit to what they’re doing.

Furthermore, this breaks off-campus connections, since you can’t connect to these units remotely.

You convert the wall-mounted RoomWizards from embedded webservers into a little web browser client, and they just pull down the data from the main server.

With a traditional, single database, it would also be easy to write a little search tool–“I need a room on Friday from 3:00 to 5:00.” This is a fairly simple SQL query. This is not a fairly simple question to ask 25 wall-mounted touchscreen things.

I’m tempted to write a little PHP script to go out, retrieve the data, and cache it. Essentially a hacked-together proxy…