My latest project: web lint

October 15th, 2009, 11:30 pm PST by Greg

I have alluded to this in a status update, but I think it’s time to look more widely for feedback…

A while ago, I started thinking about all of the annoying things my CMPT 165 students do in their HTML, and then started thinking about ways to get them to stop. I started working on an automated checker to give them as much personalized feedback as possible without me actually having to talk to them.

They already use an HTML validator which checks documents against the HTML/XHTML syntax, but it’s amazing what kind of things actually pass the validator. In the list: resizing images with width/height on <img />; saving their source as UTF-16 (no idea how they do it); putting spaces in their URLs; using class names like “red” instead of “important”; not specifying the natural language/character encoding of the document; etc.

As the list became longer, the thing became sort of a general HTML lint: the thing you go to after your code is valid to check for other common problems, annoyances, and omissions. The more I look at it, the more I think it’s a useful tool for CMPT 165 students as well as a good way to make others think a little more about the code they are producing.

I’m now at the point of wanting some feedback. There are still some missing strings and help text, but hopefully you get the idea. I don’t want to guarantee that this link will exist forever, but have a look at my web lint.

As with any “lint”, the goal here probably isn’t for authors to get zero warnings, but just to think about why they are ignoring the warnings that remain. (No, I don’t need you to tell me that some of my pages produce some warnings.)

At this point, I’m most interested in:

  • Links to input that causes an exception (500 Internal Server Error) or other truly broken behaviour.
  • Feedback on the warnings presented and their “level”. I have deliberately hidden levels 4 and 5 in the default display: I’m aware that the tool is pretty anal-retentive.
  • Are there things you can thing of (that could be automatically-checkable) that should get a warning but don’t? I have a few more on my list, but the core is in there.
  • I don’t think the URL validation (for <a>, <link>, <img>) is perfect: I still need to go back to the RFC and check the details. Any cases you notice that don’t pass but should would be appreciated.
  • Any spelling/grammar errors?
  • I’m trying not to duplicate functionality of the HTML validators: they already do their job well. But, notice the links to “other checkers” on the right. Didn’t know about all of them, did you? Any others I should include?

My intention is to GPL the code and CC license the text, but let’s take one step at a time.

Manhattan Summary

October 7th, 2009, 12:12 am PST by Greg

I’m going to update on the Manhattan part of our trip. I’ll leave it to Kat to talk about the wedding and Poughkeepsie.

Manhattan Part 1

[Manhattan Part 1 pictures] We got to New York City early on the red-eye. We managed to get early check-in to the hotel, which was awesome. After a bit of a nap, we hit the city, ready to go.

  • Our first stop was the American Museum of Natural History. This was chosen as the one big tourist stop. I spent my entire childhood being dragged around to museums and thinking “I thought they were supposed to have dinosaurs at museums.” Finally, I got to go to a museum with dinosaurs. Even though I’m not eight anymore, it was pretty aweseme.
  • We took the subway to the museum, which is right beside Central Park. Subway: check. Central Park: check.
  • We pretty much walked from Columbus Circle around Midtown for the rest of the afternoon: Radio City Music Hall, Rockefeller Center, the TV studios there, the MoMA store, the theatre district, Times Square.
  • After a little rest back at the hotel, we went out to see things at night. How bright is Times Square at night? I was shooting up to a full stop over my camera’s meter to get things to look right.
  • Somewhere in there, we found some pizza and hot dogs in the local style.

The next morning, we went out to grab a bagel, and had a leisurely walk to Penn Station to get the train to Poughkeepsie.

Manhattan Part 2

[Manhattan Part 2 pictures] On the way back, we had a nice long layover in Manhattan: our train got in at about 3:00 and our flight wasn’t until 10:30. We managed to check our bags at Penn Station and get a few more hours in the city:

  • We started at the Empire State Building. It was a clear day, so it was a nice view of the city.
  • The big reason for going back out: we went to the NY Public Library which had the original Pooh and Piglet stuffed animals. (It was closed for part 1.) Kat has always been a big Piglet fan (“He’s little, like me.”) so this was definitely a highlight.
  • On the walk back to Penn Station, we happened by a White Castle. Summary: I can’t imagine why anyone would drive overnight to get White Castle. Maybe being stoned helps.

I had my handheld GPS in my camera bag and on for most of the walking. So, I can offer our tracks in Google Earth for your viewing pleasure. Keep in mind the error inherent in the GPS, particularly when surrounded by tall buildings: we weren’t walking around as spastically as it looks.

Overall, I think we got as much as we could have done without ever entering “death march” territory. Excellent trip. Next time, we’d stay at the south end of the island: Chinatown and Little Italy.