Last code update of 2008!

Code Review Tuesday took a little extra long this week. ;) But it’s still 2008 here in California, so let’s get this party started!

And in the next couple days I plan to start rolling out some things that have been in testing, and rolling out new tests of things we didn’t quite get enabled on test yet:

Wikimedia sites updated to r44990

It’s weekly code review update time! :) Some changes of note…

User preferences:

  • (bug 505) Time zones can now be specified by location in user preferences, avoiding the need to manually update for DST. Patch by Brad Jorsch.

Web standards behavior:

  • (bug 2585) HTTP 404 return code is now given for a page view if the page does not exist, allowing spiders and link checkers to detect broken links.
  • (bug 16459) Use native getElementsByClassName where possible, for better performance in modern browsers

Localization/UI changes:

  • (bug 16612) Fixed “noprint” class for Modern skin print style
  • (bug 16712) Special:NewFiles updated to use “newer”/”older” paging messages for clarity over “previous/next”
  • (bug 16026) revision-info, revision-info-current, cannotdelete, redirectedfrom, historywarning and difference messages now use Wiki text rather than raw HTML markup — Some wikis will need to fix their customized messages!

Upload/file-handling issues:

  • (bug 13835) Fix rendering of {{filepath:Wiki.png|nowiki}}
  • (bug 16772) Special:Upload now correctly rejects files with spaces in the file extension (e.g. Foo. jpg).

API changes:

  • (bug 16726) siprop=namespacealiases should also list localized aliases
  • (bug 16730) Added apprfiltercascade parameter to list=allpages to filter cascade-protected pages

Fixing 404 for wiki pages

404

In r44919 I’ve gone ahead and reimplemented bug 2585, so a page view for a nonexistent page will return a “404 Not Found” HTTP status code instead of a “200 OK”.

This will allow bots and spiders to detect broken links from the outside web to bad or deleted wiki pages, but should be totally transparent to end-users.

When we first attempted this in 2005, the 404 was also applied to action=edit pages… We had a large number of reports from active editors that they were having trouble creating articles, with the edit page not loading properly.

Since this was disrupting basic site activity, we ended up reverting it before we had a chance to really track it down — none of the developers could reproduce it at the time.

The size of our base HTML from even the simplest skin should be enough to avoid tripping Internet Explorer’s “friendly error pages”, and we were unable to track down any specific browser, ISP proxy, or other hypothetical problem source.

If people do encounter problems once this goes live, it at least shouldn’t affect primary wiki functionality while we reproduce and fix it — hitting a raw page view for a nonexistent page is something that you usually have to jump through some hoops to do within the wiki.

After things have settled a bit, we’ll probably start using more 4xx and 5xx status codes for various error pages.

Office net providers in San Francisco?

We’re trying to provide more aggressive online backups for our office staff, as well as making it easier to do things like uploading big ol’ videos from the WMF office.

Anybody know a good business internet provider in San Francisco that can provide circa 10Mbps up for less than $1k/month?

That’s what we’re seeing looking around so far and it feels pretty steep… :(

Really wishing Verizon FiOS was available in town…

Blast from the past: Mac vs Linux desktop

Aiee!

Clearing out old backups, I stumbled on this half-written blog post from 2004 about my “switch”.

While they may not be the most earthshaking issues, I’m disappointed that things have not changed much in four years — I hit the same stumbling blocks when playing with my Linux netbook today…

Last October I got a PowerBook. I’d been mainly a Linux ‘n’ BSD guy for years, bouncing between Gnome, KDE, and alternative desktops every few months, though I’d been using Mac OS X at work for some months.

Instantly the little PB became my sole desktop environment — my poor x86 box sat unused for weeks at a time except as a file server or occasional test machine, despite sporting a faster processor and whatnot.

What was so darn great about the Mac, other than just that it was portable?

I still do much of my file management at a bash prompt rather than in Finder (and I’ve never much liked Nautilus or Konqueror).

Things that are darned good:

Application launching

The way the dock works in Mac OS X is just darn great. Sure there are corner cases where things go wonky, but most of the time it’s the way I like it. Things to note:

  • It’s very easy to keep a running application permanently in the dock.

You started something up once or twice, then you decide you’re going to want it all the time and have it available for easy launching. On the Mac, you just drag its icon to the place on the dock where you’d most like to have it.

That’s it.

Nothing more.

No five-level-deep right-click context menu[1]. No trying to figure out the correct command line and which of five ‘standard’ icon directories they stashed the application’s icon in. No hunting down the secret ‘remote’ launcher command so that multiple invocations work correctly.

[1] I’m not shitting you about five levels. That’s how many levels of popup menus I actually had on screen adding Konqueror to my Gnome launcher panel.

OH HOW I WISH this were as easy in Gnome and KDE. Just sort of hope that a .desktop file was installed for you and pray it’s somewhere you can find it.

Even once you’ve got something in your panel/kicker your pain is not over. Rearranging items in the panels is a horrible experience and often ends up with ugly, uneven spacing, stuck drag modes, or other annoyances. Drag and drop sometimes works.

Application switching

After months with the Mac I can’t imagine anymore how anyone lives with a taskbar model. Virtual desktops are necessary just to keep the taskbar manageable. Yuck!

I simply haven’t missed virtual desktops on the Mac. (If I wanted them, there are third party apps that do it.) Nor do I use Exposé very frequently. (But it looks neat!) Most of the time I find it quite sufficient to just switch between applications with command+tab.

The distinction I need to point out is between switching applications on the Mac and switching windows in Gnome/KDE/Windows. I’ll generally be for instance switching between a text editor and a browser (with documentation, say). Having fewer applications to deal with rather than ten billion windows makes this usually a little more manageable.

But, to each their own.

Application distribution

The typical application distribution model on Linux is “the operating system vendor will distribute the app.”

From there I presumably would have gone on to whinge about dependency hell, the virtual impossibility of manual uninstallation of apps from the Unix filesystem hierarchy, and other desktop integration difficulties when installing third-party software.

Carless one year in Northern California

IMG_0214.JPG

This week marked a full year since my fiancée and I sold our cars and moved to San Francisco, and we still haven’t felt the need to buy a new one.

That’s a full year without taking a car in for expensive, mysteriously-described maintenance… a year without worrying about the price of gas or parking… a year without ever-rising insurance premiums… a year without a designated driver. ;)

For the most part we just haven’t felt the need to go driving around much. Our daily commutes to work are pretty straightforward by the subway, and most of our day-to-day shopping is within comfortable walking distance (groceries, pharmacy, etc). There’s plenty of restaurants, theaters, and clubs accessible by walking or public transit… and those that aren’t, we mostly just don’t go to. :)

Google Maps has added public transit and walking directions, now both on the web and on the iPhone application, making it as easy to look up directions to unfamiliar locations as it was when we lived in the Florida suburbs.

We have made use of ZipCar hourly rentals, but really not that often; just for a bulk shopping trip here, an out-of-town event there. For a couple trips all the way down to Southern California to visit family we’ve done traditional daily/weekly rentals… After our grueling Thanksgiving drive, though, for Christmas/New Years we’re going to try flying and borrowing a car down there. ;)

Code Review Tuesdays!

We’ve had some pretty unpredictable code deployment schedules lately and I know that’s been a bit confusing and frustrating (especially when bug fixes are backed up!) To regularize this, I’m now instituting a regular weekly update schedule.

Every Tuesday I’ll be doing a code review and deployment prep to get updated MediaWiki code deployed on the Wikimedia sites.

This does mean that Tuesday is probably not a good time to commit large experimental changes — but a great time to be available for cleanup and bug fixes on the changes you’ve been making over the last week. :)

Of course there’s some relation to Bug Mondays… I’m dithering over whether to move the bug day to Wednesday or Thursday, since I know on my end Mondays are often taken up with catch-up and meetings, and people are often kinda busy; further it’s hard for me to prep a Bug Monday during work time when our European and Australian folks have already been through most or all of Monday before I wake up. ;)

Any preferences between Wed and Thurs?

MediaWiki 1.13.3, 1.12.2, 1.6.11 released

Tim has pushed out a new MediaWiki security release fixing up some XSS and CSRF bugs found by David Remahl of Apple. (Thanks David!)

As part of the update, our security checks for uploaded files have been improved — we now replicate Internet Explorer’s dangerous file type autodetection as closely as possible so we can tell when a file will be misdetected unsafely when downloaded by that popular browser.

Go ahead and download MediaWiki 1.13.3, 1.12.2, or 1.6.11. (Versions from 1.7 to 1.11 are old enough we’re no longer supporting them; we went ahead and pushed an update for 1.6 for the few PHP 4 stragglers out there. Upgrade to PHP 5, you guys! ;)

Update 2008-12-16: The 1.12.2 download and patch files are corrupt. :( You can pull 1.12.2 direct from SVN or update directly to 1.13; if you need a 1.12 download, please wait until a fixed release is built.

Note that release candidates for MediaWiki 1.14 should be coming soon, it’s time for our quarterly release!

Upgraded host…

I’ve moved my blog to a virtual host on Linode, which in theory should offer similar performance as my old dedicated host at 60% lower cost. Especially if I actually move Wikitech offsite, just my blog isn’t going to be super-stressful. ;)

I like that their host monitor will actually automatically reboot my host if it goes down, which I couldn’t get the folks at Sago to do even when I asked. Making me log in or email them to reboot it when both the monitor and the power-cycle are both computer-controlled is just crazy.

Also upgraded WordPress to 2.7. Whee!

MediaWiki update coming on Wikipedia…

Update: It’s live! We did encounter one more fun bug that affected some bot edits and the ‘undo’ function, but this is now fixed too.


I’ve updated test.wikipedia.org to MediaWiki r44462.. after a couple more hours testing, I’ll push it live to all wikis.

List of items changed since last update from our release notes:

New features

  • (bug 44) Image namespace and accompanying talk namespace renamed to File. For backward compatibility purposes, Image still works. External tools may need to be updated.
  • The constants NS_FILE and NS_FILE_TALK can now be used instead of NS_IMAGE and NS_IMAGE_TALK. The old constants are retained as aliases for compatibility, and should still be used in code meant to be compatible with v1.13 or older.
  • MediaWiki can be forced to use private IPs forwarded by a proxy server by using $wgUsePrivateIPs.
  • Dropped old Paser_OldPP class. Only new parser with preprocessor is used.
  • Moved password reset form from Special:Preferences to Special:ResetPass
  • Added Special:ChangePassword as a special page alias for Special:ResetPass
  • Added complimentary function for addHandler() called removeHandler() for removing events
  • Improved security of file uploads for IE clients, using a reverse-engineered algorithm very similar to IE’s content detection algorithm.

Bug fixes in 1.14

  • (bug 11728) Unify layout of enhanced watchlist/recent changes
  • (bug 8702) Properly update stats when running nukePage maintenance script
  • (bug 7726) Searches for words less than 4 characters now work without requiring customization of MySQL server settings
  • Honour unchecked “Leave a redirect behind” for moved subpages
  • (bug 16440) Broken 0-byte math renderings are now deleted and re-rendered when page is re-parsed.
  • (bug 6100) Unicode BiDi embedding/override characters (U+202A – U+202E) are now automatically removed from titles; these characters can accidentally end up in copy-and-pasted titles, and, by overriding normal bidirectional text handling, can lead to annoying behavior such as text rendering backwards
  • Fixed minor bug where the memcached value for how many accounts an IP had created that day would be increased even if $wgAccountCreationThrottle was hit. This meant if an IP hit the throttle and then the throttle was raised later that day, the IP still couldn’t create another account, because it had marked them as having created another account, when their last account creation had actually failed.
  • (bug 12647) Allow autogenerated edit summary messages to be blanked with ‘-‘
  • (bug 16026) ‘Revision-info’ and ‘revision-info-current’ both accept wiki markup now.
  • (bug 16529) Fix for search suggestions with some third-party JS libraries
  • (bug 13342) importScript() generates more consistent URI encoding
  • (bug 16577) When a blocked user tries to rollback a page, the block message is now only displayed once
  • (bug 14268) SVG image sizes now extracted with proper XML parser
  • (bug 14365) RepoGroup::findFiles() no longer crashes if passed an invalid title via the API
  • (bug 4253, bug 16586) Revision ID is now given instead of title in URLs for new pages in the recent changes IRC feed
  • Fix regression caused by r43047 — options arrays in show/hide links broken by being merged in the wrong order when moved from wfArrayMerge() to “+” operator.

API changes in 1.14

  • (bug 12760) meta=userinfo&uiprop=ratelimits doesn’t list group-specific rate limits
  • (bug 16398) meta=userinfo&uiprop=rights lists some rights twice in some cases
  • (bug 16408) Added rvgeneratexml to prop=revisions
  • (bug 16421) Made list=logevents’s leuser accept user names with underscores instead of spaces
  • (bug 16516) Made rvsection=T-2 work
  • (bug 16526) Added usprop=emailable to list=users
  • (bug 16548) list=search threw errors with an invalid error code
  • (bug 16515) Added pst and onlypst parameters to action=parse
  • (bug 16541) Added block expiry timestamp to list=logevents output

Note the ‘File:’ namespace is ready to deploy but won’t be live there yet since test currently still uses the older message files. It should go live after full deployment. Update: fixed that bug, now it uses the new namespace and all new/update messages are live on test. :D