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 <img src="something.jpg">. 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 <img src="something.jpg" height="480" width="640"> 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.

Things are Changing

It’s no secret that Obama’s been winning even more elections lately than the polls had predicted. I won’t get into theories for why, and instead point out another development in Obama’s string of successes.

Hillary had considerable backing by superdelegates, the almost 800 “free” DNC delegates and high-ranking elected Democratic politicians. But one of Hillary’s superdelegates has just announced that he’s backing Obama.

I’m starting to feel good about this race.

It’s a Game, Sam

Tonight we toured Waltham’s 911 center. They told us to take the elevator up, so all 14-ish of us climbed in. The doors shut behind us, and then… Nothing happened. At all. We started joking about how funny it would be if we had to call 911 to tell them we were stuck in an elevator… in their office. But as the time passed, the joking gave way to a fearful realization that nothing was happening.

A minute later the doors randomly opened and we decided it would be best to take the stairs.

They showed us their dispatch interface… It looks like it’s Java-based, although it didn’t have the stereotypical ugly Swing GUI. The interface was modeled a lot like a mail application: a “tree” on the left, and two panes on the right. The left tree had three categories: Unassigned calls, Active calls, and Closed calls. It’s kind of neat, though: they have a dedicated calltaker, and a couple dispatchers (who answer calls if the primary calltaker is busy). So as he talked to us about how the system worked, we’d watch stuff pop up in the Unassigned category, and a timer would start. With any luck, it’d get moved into the active category in a matter of seconds, denoting that units had been dispatched. They had about half a dozen actives at any given time. Some lasted a few minutes: a traffic stop would pop up and close a few minutes later. Others were much longer-lasting. A call to check the well-being came in as he was talking, so he clicked on it to show us how things worked.

It opened the details up in the main two panes. It showed the address, written directions, and other various stuff. Below that was a scroll list with all sorts of entries, essentially notes each person entered. A few lines from the call-taker: “[Name] hasn’t been seen since Friday” and stuff of that nature. Some of the notes are automatically added. One looks up gun permits at the address. This one was an apartment complex, and we saw the classic message, “Too many gun permits to list.” (But clicking on the address pops up a web browser page listing every single one.) Another note adds, “3 prior calls at this address” or something of the sort.

Below that was a list of every officer dispatched, color-coded to show their current status. We visited an ‘older’ call to show more, and it showed an ambulance and fire engine which had cleared, and a couple officers still on scene. We didn’t go into it, but the buttons suggest that the system will permit the dispatcher to automatically determine which units to dispatch. (There’s also a “Roster” menu item he showed, which lists every single officer, the sector they’re patrolling, and their current status.)

I’m also impressed at how advanced some of their other stuff is. It’s nothing new for every call to be logged, along with all radio traffic. But what is new, at least to me, is for it all to be stored on a computer with a little GUI. The other day I was at Campus Police researching police log entries, and the dispatcher took a (very low-priority) call. An officer was asking about some specific detail, so he just clicked a few things on the computer and played back the call. On the radio side of things, in addition to displaying unit IDs, everything gets logged to disk, too.

He also talked about the psychological aspect of the job, which was actually quite interesting. He had some training material which consisted of past calls (not sure whether they’re from the department or not?). In one, he plays back a female caller who’s screaming and wailing. You hear a passing allusion to a gun, and then get an insanely detailed description of a car, and then more screaming. Thirty seconds into the call, he paused it. “So what’s this call about?” We collectively shrugged our shoulders. He kept playing, and the dispatcher finally asks if someone is hurt. We get a no, and more information about the car. Two minutes go by, and we’re still not clear what’s going on. He stops the clip at that point, and talks about how one of the most important things they do is taking charge of the call.

Then he switches to another one. It starts off the same way–screaming. But the dispatcher here is much better. “Calm down, I need you to tell me what happened.” We get that someone was stabbed, and more screaming. “Just send the police! Send the police!” “Ma’am, they’re already on the way. Who is stabbed? Who else is there?” The victim is named (not that the name is what they needed right then, but I digress). The dispatcher prods a little more about the woman’s condition, and then adds, “Can you go check? Is anyone else there?” “Yes, her husband. He’s screaming.” “Are you going to be in danger if you go check on her?” “Yes. He has a knife!” It’s a neat example, because it really changes things. It starts off sounding like a simple medical call, and the caller utterly fails to mention the guy running around with a knife until the dispatcher prods him for enough details. The first officers arrived about 90 seconds after the call came in, and they show up already knowing exactly what they’re facing.

I’m left thinking that some of these skills are things that could probably be applied elsewhere. All too often we rely on what other people say and do, when it’d really be better to take control over the situation. As a mundane example, this type of thing happened all the time at work, when people would come up to me with rambling stories and questions. So rather than directly answering their questions, you take control of the call. “Do you have a waiting list?” lead me to ask about the size of the group. And from there, I’d either tell them we had no list and make a mental note that we had a group coming in, or I’d tell them we did have a list, but the fact that I’d already asked about the size of their group somehow made them seem more receptive to me taking putting them on our waiting list, as opposed to them not coming in.

The whole dispatching thing is vaguely reminiscent of games, though. Rather than deciding where to place a teleporter and sentry gun in TF2, they’re deciding what police cars and fire trucks to send to a given location. (He described it as something vaguely like chess.) Rather than being a “shoot ’em up” game, it’s a strategy game.

Problems

Here are the types of things my mind picked up on today that no one else on the face of the planet would notice, much less care about:

  • mot.com (MOT is Motorola’s stock ticker) resolves to 192.168.0.110, a non-routable internal IP.
  • Doing a traceroute from here to mot.com, it goes through six routers (four at school, two upstream) before they start dropping packets. Every single router, in my mind, should be checking for impossible conditions like that and dropping packets. But, if nothing else, our edge router should do this filtering, as should the first upstream router.
  • One of Waltham’s firefighters transmits a sidetone when he keys up, in addition to his MDC data. This is a weird problem. (What’s supposed to happen is that the radio transmits a little data burst at the start of each transmission, identifying his radio. The exchange takes about 200ms, so, while the radio transmits this, it beeps at the user to indicate that they shouldn’t start talking yet. When it stops, it starts transmitting his audio.) In this case, the sidetone and data burst are both getting transmitted.

School

For reasons that even I don’t understand, I find myself thinking a lot about improving schools. And yesterday was one of those joyous experiences where several different thoughts suddenly overlapped, forming something new.

One of my professors is an adjunct professor who teaches at several different schools. And she was talking about how it seemed to her that a decent number of prestigious schools focus too much on theoretical and abstract concepts, but no so much on real-life applications. This nicely sums up one of the areas in which I’d like to see grade schools improved.

  • Gym class was universally an utter waste of time. I suppose it got me moving a little bit. But watching football or basketball on TV, I realize that I still don’t understand the finer points of the game. How come this never came up in gym class? And, perhaps more significantly, I’ve been exercising a bit. I lift weights a few times a week, and am looking forward to nicer weather so I can take up jogging again. (Yes, I should just go to the gym and use a treadmill. But it’s not the same.) Why didn’t I do this in gym class? Why did we spend so much time on badminton? Why is there an “n” in the middle of badminton?
  • I can’t speak for others, but trigonometry was among my least favorite classes ever. Furthermore, I’ve never applied it anywhere. The only time it came up in subsequent classes was when we integrated trigonometric functions, and at that point, no one had any clue what we were doing anyway. But why not replace a math class with zero practical applications with a finance course? Not until I took a finance course here in my sophomore year did I truly learn about things like compound interest and the time value of money. Every person in America needs to know this. You have $1,000 sitting in your bank account. How much will you make if you put it in a one-year CD at 4.25%? And you graduate and go to buy a $250,000 condo, taking out a 30-year mortgage. What will be your monthly payments at 6% interest? What if you get 4.5%? What if you get stuck at 8%? And, when you’re done with that, how much do you pay over the lifetime of the mortgage? (Hint: at 6% annual interest, you pay almost exactly $1,500/month, for $539,000+. That means that your interest is more than 100% of the principal.) You can bring up usury laws, and the fact that national banks, et alia, got themselves exempted from them, and segue into credit cards. Why did no one teach me to balance a checkbook? (Okay, it’s easy. But still…)
  • I want to learn either the guitar or the piano. And I suspect that, if you went to middle or high school, you’d find lots of people who shared my interest. What the heck happened in music class? How did I pass music class without understanding how to read music, and without being able to play anything other than the recorder in 5th grade?
  • What are geography classes teaching people? Why, when I graduated high school, did I still have no clue where Iraq was on the map? Similarly, what the heck happens inĀ  civics and such? Why wasn’t I made to read the Declaration of Independence? Why don’t I know the Amendments cold? I think I should be able to yell “14th Amendment!” to any high school graduate and have them talk about its exact meaning, including due process and equal protection. 22nd Amendment? What President was it enacted in response to? When (ballpark) was it ratified? What states refused to ratify it? (Hint: Massachusetts was one of two.) What’s required to add a Constitutional Amendment?
  • Why are we so reliant on calculators? Last semester we were looking to bring a Presidential speaker, and contemplated opening it to the public to make sure we filled the crowd. A friend pulled out a calculator. “If we charge $5 a ticket, and get 100 people…” He plugged the numbers in. “That’s $500 to defray the costs.” Not until I called him on what he’d done did he even realize the absurdity of using a calculator for 5 x 100. But it’s not that he’s stupid. It’s that we’re all so dependent on them. All the time I’ll start to plug some numbers into a calculator and solve it in my head before I finish typing it in. I think higher math classes need to give Math Minutes again. The kids might think you’re nuts for doing it in calculus class, but it’s necessary!