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…

Arresting Firefighters

This is wild. The fire truck pulls up to a car crash on the highway, and parks the truck to “shield” the emergency workers as they extract a victim from the car. The cop yells at the firefighter driving the fire truck to move so as to not obstruct traffic. The captain, who was actively working on the patient, yells for the fire truck to stay put, pointing out that they very deliberately parked that way for the safety of anyone involved. So the cop pulls the guy away from the patient and arrests him.

Of course, not all firefighters arrested are innocent.

Cold War

Anyone who’s learned about the Cold War will be familiar with the chilling fact (no pun intended…) that we came very close to a nuclear war.

But after reading things like this article, mixed with other anecdotes, I’m left wondering how on Earth we didn’t go to war… Accidentally. Both the U.S. and the Soviets, on multiple occasions, “detected” launches of nuclear weapons by the other, and came within seconds of retaliation before someone noticed something out of the ordinary.

Fortunately, the U.S. was very thorough the first time around, and quickly proved that the first “attack” they witnessed was caused by some guy inserting the wrong tape… In the case of the Soviets, the only reason they didn’t launch a counter-attack after their own false alert, it seems, was because the guy who was supposed to press the button disobeyed orders and went with his gut. (And boy are we glad!)

And there’s a further set of coincidences, really. After a flood of nonsensical data, officials discovered some problems. Apparently, one detection system was alternating between reporting some 2,000 incoming missiles and 0 incoming missiles. Because of the conflicting data, they turned to alternate systems, which also reported 0 incoming missiles, and it was traced to a hardware malfunction, with the 2,000 number just happening to match, by sheer luck (or lack thereof), internal checksums.

So they wrote some code to compare results from multiple systems. And not more than a few months later, the problem with the training tape occurred, when one of the systems began reporting more believable numbers of incoming missiles. (Apparently, a steadily increasing number.) The data “made sense,” but, because of the newly-implemented code to compare with other systems, they realized that it was just one system, and quickly isolated it to a case of someone sending “training data” as if it were live data. It’s almost a case of two wrongs making a right–had the first error not occurred, the safeguards wouldn’t have been implemented to catch the second error.

Oh, and there exists a slightly-creepy website dedicated to the Russian who decided to trust his gut over the myriad indications that we were attacking

Radio

I’m a long-term radio geek, and I’ve realized that the technology interests me more than actually using it. Having worked with lots and lots of radios (I realized that I have three sitting on my desk, all of which I have used in the past 30 minutes), I’ve concluded that I’d like to start a radio company. Our motto would be, “Our radios don’t suck.”

One of my radios is a ham radio, which is front-panel programmable (FPP), meaning that you can punch in frequencies on the keypad. This is pretty common with ham radios. By contrast, land-mobile radios (things that, say, a police officer would carry) very rarely have FPP capability; in fact, the FCC frowns on certifying radios with that capability, except for certain federal agencies that need to be able to reprogram their radios in the field. However, it’s often offered as a software add-on. But even using the ham radio, it’s really hard to use. Part of the problem is that the radio’s probably a decade old, and the print on the keypad has worn off. So I’m guessing at what buttons do.

There are very few radios with a graphic LCD. Dot-matrix LCDs almost seem cutting-edge in the radio world. By contrast, try to find a cell phone that doesn’t have a big color LCD on it. I have an old Garmin GPS III, and still admire that screen. I think it’s four shades of gray, and fairly high resolution. It’s a nice graphic LCD. It’s so much easier to use, and introduces stuff like the ability to “arrow” around a screen, as opposed to trying to use obscure key combinations. I’d actually love to see something like a 2″ by 2″ e-ink display (which, in addition to looking amazing, would reduce power usage), but it’d be a pain since it’s slow to redraw.

Motorola’s MDC1200 technology is practically ubiquitious in the public safety industry, transmitting a 1200 bps data burst containing a four-digit identifier. This could be so easily improved. Put a little $20 GPS chip in it, and have it transmit GPS coordinates on each transmission. (You could also include stuff like battery level, if on a portable, and information on received signal strength. The latter would be useful to run in the background and plot a map of the radio system’s reach.)

Programming is always a pain. Some of Motorola’s radios are programmed in ways that are so obscure that they border on comical. (I think the goal there is security.) I want to write an XML file for my radio. Put a USB port on the side of the radio. Let me hook it up to a computer, or just plug a thumb drive in and reprogram from that. But consider bigger problems, though. Boston PD switched to an “improved” channel lineup last year. Apparently they worked for weeks to pull radios in at the end of a shift, load up the new set of data, but leave the radios set to old configuration, until all the radios had the new programming in them. And then, at a quiet time one day, they broadcast a message telling officers how to switch to the new configuration. Over-the-air programming is possible, but it’s generally used in some specific situations. (OTACS, Motorola’s Over The Air Channel Steering, to direct a radio to switch to a particular channel, and OTAR, Over the Air Rekeying, to send new encryption keys to the radios.) Why not let the system send out bursts of programming data when the radio system is idle, loading up new programming data in the background, until they’re ready? Obviously, all of these programming things need some security constraints, but that’s trivial to implement.

I’m pretty confident that software-defined radio is going to become ubiquitous in the next decade, but no one’s really making use of it yet, except for uber-geeks in labs. APCO’s Project 25 digital voice (IMBE) has emerged as a standard in digital voice, but it’s meant to be made obsolete in the future by a “Phase II” implementation. Various other technologies have come and gone, such as Motorola’s VSELP. And there exist myriad trunking protocols for larger networks. I want to embrace SDR and use it in everything, “future-proofing” radios. (Of course companies have an incentive to not future-proof their hardware, forcing people to upgrade… But you can still make your money on selling software upgrades!)

Oh, and put an SD slot on the darn thing. Record the audio it receives, letting people play back transmissions they miss. Or host applications. (Or, permit programming!)

Intuitive

GRE, a (radio) scanner company that makes a lot of the scanners Radio Shack sells, also sells some under their own name.

This new one advertises an “Intuitive ‘Object Oriented’ User Interface Design,” which brings all the fun of OOP to a GUI. The picture of the radio reads “Press NEW to create objects,” and has three softkeys, labeled “NEW,” “EDIT,” and “GLOB.”

I’ll reserve final judgment until I play around with one, but, on the surface, this seems anything but intuitive.

Languages

I’m learning German. You could stick learning in air quotes, though: I have a million more important things on my plate, and my strategy of playing it in the background while I work, rather than “language through osmosis,” seems to result in nothing but me becoming distracted and irritated.

I signed up for Live Mocha tonight, a neat (free) online service with language lessons. And I decided that learning languages is neat. I learned Spanish in high school, but never enough to be fluent. What’s interesting is that podcasts and VoIP are playing a role, as people can chat in real time with other speakers, and language lessons can be put onto iPods easily.

I’d like to work on picking up a little more German. After that, I’ve come across a decent number of pages in Polish and Slovak (which, to an untrained completely oblivious eye, look similar), not to mention French. And my interest in the Netherlands continues, so Dutch continues. (Not to be confused with Deutsch, the German word for “German.”) Learning either Chinese or Japanese would be helpful, as would Arabic. (Unfortunately, none of these languages really have anything in common, unlike the Romance languages, and supposed similarities between German and Dutch.)

And after learning all those, I’ll move onto Luxembourgish.

Resizing Images and HTML

This post is meant for webmasters, and it addresses a startlingly common problem: images included on pages and “resized” only in HTML.

The basic tag to include an image, of course, is . That will include something.jpg on the page.

But say that the image is 1600×1200 pixels (2.1 megapixels: big enough to fill your screen and then some, at least for most people). This is way too big to put on your webpage. So what do people do? They do something like to resize it. This is a very, very bad way of doing it.

The problem is that this shows a fundamental misunderstanding of what the height and width attributes do. They’re essentially ‘hints’ for the browser. The web browser, when it sees an image in your HTML, will download the whole image. In this case, it’ll download your 1600×1200 image, which is probably about 500kB in size. (God help us if you have a whole series of these photographs on your page.) When it sees a mismatch between the specified height and width attributes, the browser will do a very rudimentary (read: very crappy) resize. So not only are you wasting a ton of bandwidth unnecessarily (which also makes your page load very slowly), but the end product is images that look horrible.

Instead, open the image up in your editor of choice. Photoshop CS3 is wonderful, but those of us who can’t justify spending more than $500 on image editing software may prefer a free tool like Paint.NET. Resize the image to the size you desire, and include that image, newly resized, on your page.

You’ll see multiple improvements: your site will use less bandwidth, your pages will load much faster, and your images will look much better. (Also: I’d encourage you to simply omit the height and width attributes if you’re not sure what you’re doing. Writing perfect HTML, you’d set them to the image’s native dimensions, but so many people screw it up that it’s probably safest to just omit them. Every browser I’ve ever used has handled this seamlessly.)

Televisions

LCD and plasma TVs are becoming increasingly popular, costing between $1,000 and $3,000.

If you have that budget in mind, something I’ve wanted to do for a long time suddenly becomes viable: buy a projector and mount it on your ceiling. Of course, only the very high-end projectors will do the 1920×1080 that 1080i and 1080p do, but 1024×768 is very doable for under $1,000, and the difference in resolution shouldn’t be all that noticeable. And then you’ve got something like a 100″ screen. Wow-a-wee-wow!

The caveat, of course, is that few (if any?) projectors include tuners, so you’d have to set up a PC for that, something like a Mythbox. But one can be put together for around $500, and that naively assumes that you don’t already have a spare computer with a tuner card or two.

Deal of the Day

I just saw this link on a site I frequent: a Compaq laptop, dual-core chip, 1 GB RAM, 80 GB disk, 15.4″ LCD, DVD burner, and integrated wireless… $300 after rebate ($440 before). (Of course, I had no idea that HP still makes Compaq-branded machines?)

For the same price, they’ve got a desktop system… It’s “just” an Athlon (with no apparent details?), but it comes with 2 GB RAM and a 250GB disk… Plus DVD burner. (Throw in a tuner and you might have a nice Mythbox?)

CompUSA has a 22″ LCD (Acer, 1600×1050) for $200, although it seems that the deal ends today. (I thought they went out of business?)

Internet Radio

I still remain a fan of SomaFM, a network of awesome streaming music.

Two interesting things I’ve come across, though:

The first is AACPlus. The webpage makes it look like a minor little project. But it’s being used by a number of streaming stations, and it’s supported by VLC and WinAmp, among others. What makes it notable is that I’m listening to a 48 kbps stream of one of Soma’s stations right now… And it sounds better than a 128 kbps stream. You can apparently drop it to 32 kbps and drop to just slightly less than CD quality, and at 24 kbps it’s still on par with MP3 streams. It works out great: it delivers high-quality audio to me, and instantly doubles (at least) the number of listeners they can handle, since bandwidth is almost always the “limiting reactant” with streaming audio.

In other news, the RIAA is apparently having luck getting Congress to raise webcasting rates enormously again… In some instances they’ll apparently go up by more than 1,000%. If you check out the Soma site, they’re coming up short on funding every month, pleading for donations to stay online. This is the case with a lot of streaming radio sites, too. They’re barely staying online as it is. Raising their rates by a factor of ten is going to kill Internet radio.