Stupid Ideas

The trip I’m going to be taking to Africa is part of a class. So I have some assigned readings, and we’re supposed to be commenting in an online forum.

I’m having problems right now, because the ‘online forum’ is randomly comprised of Java applets. Not only is it the worst layout I’ve ever seen, but there is no reason for Java to be used.

The reason I’m complaining so loudly about it, though, is that it seems to be crashing Firefox on Linux right now. They need a <textarea> and a submit button. No Java. Why would they even think it was a good solution?

An Image Idea

Some of my favorite posts are the ones with images. I like to sometimes post photos I take, and they can really make a post much better. (As an example, Kyle’s recent headphones post.)

There are some ‘risks’ with allowing images, though:

  • Offsite images can change. You might post a little picture you found somewhere, and have the image on that server be replaced by a 1600×1200 porn image. Or an advertisement. Etc. Not a big deal with the way people are using them now, really.
  • Offsite images can slow the page down. Lately I’ve been working on benchmarking the site a lot, trying to get pages to load quickly. I can’t optimize the load times of images that aren’t on my server, though.
  • Offsite images can be used for tracking. The remote site gets the IP, and lots of other information, of the visiting site. This is probably a non-issue here, but images can be, and are, used for tracking purposes all the time.
  • I can’t really ‘regulate’ images: You could post a dozen 1600×1200 images as uncompressed TIFFs, and there’s nothing I can do about it. (Well, I could, and would, edit your post…)

It just occurred to me, though, that I could theoretically write some code to work around these issues, such as by doing the following:

  • Get the text from the database to display. (This is, of course, what happens so far.)
  • Scan the text for image tags.
  • If an image tag is found, see if we have the image cached already:
    • If so, we just change the image tag to point to our local cache instead.
    • If not, the server can go and download the image into its cache.
      • It can then ‘process’ it as needed, such as scaling it down and making sure it’s not an animated GIF.

An even better extension of this idea would be to enclose the image tag in links to the full original. (Although this falls apart if the image is already linked.)

I guess there are a few issues (besides taking the time to implement it):

  • There may be legal issues, as I’m essentially saving and redisplaying someone else’s images. I don’t think this would really be a big deal.
  • The post-processing can’t look like crap. I have no idea what to expect.
  • It would raise the server’s bandwidth usage. If someone links to a bunch of images, the bandwidth comes from that server. When they’re hosted here, it’s my bandwidth. But since I’ve been coming about 999 GB short of hitting my 1,000 GB limit, this isn’t a big issue right now. (Also, half the goal is to reduce the size of the images, so the impact wouldn’t be as big.) In extreme cases, it would also increase resource usage: normally serving up a couple small images is peanuts, but if the site were to be hammered with traffic, it’d slow things down somewhat.
  • We need to somehow limit the size of the cache. This can be done simply, by just setting a limit on how large the cache can grow and deleting the oldest images when it exceeds that size. This isn’t a perfect solution, though; for example, it has the implicit assumption that newer images are more important to cache. This is probably accurate more often than not, but it’s not always the case. (Example: an old post with images is linked to from other sites, or comes up a lot in searches.)

A Cure for AIDS

I just killed a mosquito, which got me thinking about how I need to book an appointment at a travel clinic on Monday to get my malaria vaccine in Africa.

Malaria, like AIDS, is very common in Africa.

But wait! If malaria is spread by mosquitoes, how about AIDS?

This page explains why mosquitoes don’t (can’t) spread HIV. The short answer is the third bold sentence, which kind of amuses me: “Mosquitoes are not flying hypodermic needles.” (I get a crazy mental image.)

But I’m intrigued by the first one: mosquitoes digest the virus that causes AIDS.

Why not, then, isolate what causes that digestion, and deliver it in pill/injection form to people at risk for AIDS? (Besides the apparent side-effect of the vaccine also ‘digesting’ all of a person’s ‘blood meal,’ which I suppose is not desirable.)

A Day in the Life of a Geek

I got my hair cut today. And I found myself thinking the same thing I usually think: why on Earth do they have ten appointment books, one for each stylist? And why is there a separate one to track sales?

I think you could write a pretty simple software solution. They just need a few database tables, really: one for the clients, one for the stylists, and one for appointments, which can just be a time, client ID and stylist ID. Then it’s all just stuff like code to find an open appointment within certain constraints (“Hi, I wondered if I could book an appointment with Joyce, ideally on a Monday, Friday, or Saturday, and ideally after 1 p.m.”), and to make sure that scheduling conflicts didn’t come up.

Surprisingly, I’m having a hard time finding a simple package to do this. Most of what I’ve seen is either ridiculously crappy, or it only supports scheduling, but doesn’t integrate with a client database. There are some medical practice software suites out there, some of them even free, but they’re way too complex. I don’t think my hairdresser keeps my ‘haircut history’ (although that would be a novel idea!). I’m really not concerned with HIPAA: if someone finds out that I was calling the hairstylist and the reason for my visit was that my hair was kind of long, I don’t think anyone will think of me differently.

By computerizing it, you can also pull out information easily. For example, they could pull up a ‘report’ of everyone they need to call on a given day to confirm appointments, and keep track of whether they reached someone, etc. The code could also work on trying to see to it that people get a roughly equal number of clients for those who don’t request anyone in particular.

It’d also be easy to track sales of hair products. I bought a new thing of hair gel today, for example. One of the other stylists was selling it. It seems like they have one money bag. (Why not a cash drawer?!) They could just record that it was sold, and the system would take care of crediting the income to the appropriate stylist. At the end of the night, they could just pull up a report on how much money went to each stylist.

If you had an Internet connection, it’d be a great idea to put this all on the Web. Clients could then book appointments themselves, and get reminder e-mails, rather than having to call. You could even have a client-side application at the hairdresser’s office (do they call it an office?) that would sync up every few minutes (basic replication) every few minutes, so if they lost their connection, they wouldn’t be dead in the water. And then you can play with AJAX for some auto-complete magic. (For example, when I call to book and they ask my name, they might start to type my name in and have it come up as the only match before they’re even done typing.)

The problem is that I have a very strong urge to roll up my sleeves and start working on a nice package to do this. Except that it seems pretty ridiculous, given that I don’t work for a hairdresser? I suppose I could sell the code? But it sounds like an Access 101 project, really. I’d probably end up giving it away.

This, my friends, is what it’s like to be a geek.

Wine

So as most of you know, WINE is a utility to allow Windows applications to be run in Unix. There are several commercial forks, such as CrossOver Office and Cedega, which supposedly work better. It seems like most anything works.

Here is a list of Windows programs that are good enough that I still have Windows installed:

  • Photoshop CS2. (The only thing slicker is CS3.) It’s an industry standard and, as nice as GIMP might be, I know Photoshop well.
  • iTunes. I buy music through the iTMS periodically, probably about 60 songs total. It looks like there are Windows apps to convert them all to MP3, but really, iTunes is just a phenomenal music player, so I’d like to keep it.
  • Office 2007. Prior versions were decent, but OpenOffice gave them a run for their money. (With emphasis, really, on the money portion?) 2007, though, is just so slick that I’ll keep Windows around for it.
  • Quicken, maybe. I don’t use it a lot, but I should.
  • Battlefield 2. The one video game I’m not awful at. It’s also a game my friends/roommates play frequently, so I’m in good company when playing it.

Here is a list of the very few programs that don’t work in Crossover Office / Cedega / WINE:

  •  Photoshop CS(2). Photoshop 7 and previous versions apparently work fine. I don’t have older versions, I don’t think, and even if I did, CS2 added some features I really like.
  • iTunes 7. I guess something like iTunes 4 ran fine. (And companies market that their product runs iTunes, which is technically accurate but very, very misleading: it’s like saying you support Windows when all you support is Windows 3.1.) I find this one a little odd, as OS X, its native platform, is UNIX-based.
  • Office 2007. Everything up to Office 2003 apparently works flawlessly. Office 2007 doesn’t work at all.
  • BF2. It apparently kind of works, but the anti-cheat technology needs some work, because it detects that it’s not a ‘normal’ Windows environment. This is sort of a big deal, since triggering the anti-cheat technology results in getting banned. But it’s a moot point, because it looks like it only works with nvidia cards anyway.

Really, everything else I use in Windows has something that works just as good in Linux. (In fact, most of it runs natively? Firefox and gaim Pidgin are, by far, my two most-used programs, and they both are standard Ubuntu programs. Picasa might come in third, but they now have a Linux version of that, too.)

Conclusion: I’m keeping a Windows partition on the new drive. I still have work to do, but I’ve been very impressed with Ubuntu + XGL + Compiz on the desktop thus far, so I really wish I could run all my favorite apps in it natively. But, sadly, they don’t work on Linux, and they don’t work under Wine.

Paint

I picked up some touch-up paint for my car today. Here is what’s in the bottle:

These are only the ones mentioned in the warning label. (Mentioning both that it’s extremely flammable and that it contains chemicals known by California to cause cancer and birth defects.)

I’m going to go out and apply the touch-up paint right after I update my will.

Matches

We keep a box of matches at work, not so much for smokers (although they ask for them sometimes), but more for birthday parties who forget them and can’t otherwise light the candles on their cake.  (This is surprisingly common.)  The other night we ran out, so I got a new box from the closet.

And that got me thinking… Matches are basically ignited by friction, no?

If you took a box of matches and threw it at the ground, really really hard,  would it ignite? And would a box full of matchbooks burn as much as I’m thinking? (I think it all depends on one thing: will two matchheads, rubbed together with sufficient force, ignite each other?)

As much as I’d like to find out, I’d also rather not burn down any buildings, so I’ll leave this one for the experts. But experts, will it burn?

It’s Fiesty

Posted from a native install of Ubuntu’s Fiesty Fawn on my new 160 GB drive. I’ve left room to copy over the contents of the old drive (e.g., Windows), but I think Ubuntu’s going to become my primary OS.

I still have lots of work to do, but here are some starting thoughts:

  • The install is ludicrously easy. I ‘had’ to do the partitions by hand, but maybe that’s because it was a virgin unformatted hard drive…
  • It named the computer n1zyy-laptop, which I accepted without thinking much of it at the time. As it was beginning to install, it occurred to me that I’d never indicated that it was a laptop. It’s not surprising that it’s able to detect it’s running on a laptop, but it is surprising that it’s so well-integrated that it can use that information in places like setting a hostname. It’s the little things that count, IMHO, and I give them a lot of credit for this one.
  • Less than an hour ago, I had just installed the hard drive and inserted the Ubuntu CD. I’m now posting from a complete install, over wireless, having installed some third-party updates by hand and letting Ubuntu download 99 software updates. (They’re all installed, BTW.)
  • It took me a while to get wireless working, but it was mostly my fault.
    • It automatically detected my network card, and warned me that the only drivers available were proprietary ones, and that they couldn’t make any guarantees about their quality.
    • I clicked on “Network” and it was set for “Roaming mode,” which I unchecked. It looked like I had to manually input all my information, but it turns out that it showed a drop-down box and I was just oblivious to it. I gave it my WEP key and… Nothing.
    • DHCP doesn’t work. I don’t get it. It works fine on other computers, but it’s not like we have some unusual DHCP setup going on. I just used a manual configuration and all was well. It somehow got the DNS servers from our DHCP server anyway, but not an IP.
    • The default mouse speed is really, really fast. At least coming from Windows.

NTP Pool?

I’ve always had a strange obsession with the exact time. It really, really annoys me when clocks are off. Especially when you’re surrounded by clocks, some fast, some slow, so you end up with like a 20-minute window: the time is somewhere between 2:50 and 3:10.

Unsurprisingly, then, I love NTP. And I’ve always thought that the pool.ntp.org round-robin cluster was a neat idea.

And then I read something about how they’re always looking for people to add their servers to the pool. I have lots of spare bandwidth.

I think I might just have to get an NTP server up and running and see about joining. The resource load isn’t that much, apparently, and it’d be great to share the gift of correct time with the world.

(As an aside, there are no NTP Pool servers in Africa right now. It’s tempting to try to start one in a few weeks when I go…)