Jump to content

User:MarkAHershberger/Weekly reports/2010-W15

From Wikipedia, the free encyclopedia

Meta

[edit]

I finally got in touch with Daniel Phelps and we managed to execute my contract extension. I'm very excited to continue working with Wikimedia.

Asynchronous Uploading

[edit]

As expected, I spent the week re-factoring the uploading from url code in UploadFromUrl.php and ApiUpload.php so that downloads would be performed asynchronously rather than at the time of the request. This allows better control of server resources by administrators.

I should note that (as is my practice) I was focused on the API code rather than the WebUI code. So, my initial commit broke the upload-from-url functionality on Special:Upload. Seven hours after Raymond initially reported the problem, though, I had committed a fix. (On a Saturday afternoon!)

This points out one of the main problems with an organically developing code-base like MediaWiki: as much as the ideal is to separate presentation and logic using MVC, it can be difficult to keep code in such a nicely separated form over time. As code grows, work needs to be done via code review and re-factoring on a regular basis.

There is still some work to do on providing feedback to users as well as respecting the watchlist and ignore warnings checkboxes that I'll complete this week.

Other

[edit]

While chasing down a bug, I came across the Title::getUserPermissionsErrors() and Title::getUserPermissionsErrorsInternal(). These two functions cover, by themselves, 335 lines of code. I found it difficult to track down problems or even understand what was going on. Being from the "old" school that once used 80x25 screens to write code, I can't stand to see code like this. It really bugs me. So much that I started working on breaking it into digestable chunks. I should be able to commit that work this week.