denise: Image: Me, facing away from camera, on top of the Castel Sant'Angelo in Rome (Default)
Denise ([staff profile] denise) wrote in [site community profile] dw_dev2011-10-31 03:13 am
Entry tags:

Code tour: 21 October - 31 October

It's been aaaaages since I've done a code tour, but since we are having a code push in an hour or two to get the new update page into beta, I wanted to grab the chance to tour the last 10 days' worth of changes. And being selfish, I kept it ALL FOR MYSELF instead of letting someone else have it, mwah ha ha ha ha!

Behind the cut: 20 bugs, all of which will be live on the site very shortly.



Bug 3976: convert multisearch.bml to TT
Category: Routing/TT
Patch by: [personal profile] kareila
Description: This is another bug in our ongoing attempt to change the site over to using a more modern templating language -- this time, the bits of display code that govern the search box visible on most site skins. (I am looking forward to having the whole site converted over to the new templating methods. Judging by how much work involved in the process, you should expect it sometime around 2021.) Doing this allows us to move away from the proprietary templating system [livejournal.com profile] bradfitz invented in 1996 or so, which isn't used anywhere but on LJ and LJ-based sites, and allows us to use a system (Template Toolkit) that is under active development, used and well-documented elsewhere, and more likely to be something an independent developer is familiar with.

Bug 3984: Binary data not displaying properly in propedit, will be wiped out if you try to save any other props
Category: Misc Backend
Patch by: [personal profile] fu
Description: Many details about an individual account are stored in something called "userprops" -- the metaphor I used the other day while explaining it to someone is, if your account is a file folder, userprops are the Post-It notes stuck to the folder describing what's inside. They keep things like the values of certain fields on your profile, some of your account settings, etc. In order to allow for admin troubleshooting, quick fixes, detail lookups, etc, there's an admin tool that allows us to see (and manipulate) all the userprops on an account. This works just fine for properties that are plain text, but if there's a userprop with binary data (such as an image), the admin propedit page would cause the binary data to go all kerblooey. (That's a technical term.) This fix prevents the problem, avoiding all kerblooeyness.

Bug 1361: English-strip cgi-bin/LJ/CleanHTML.pm
Category: English-Stripping
Patch by: [personal profile] ninetydegrees
Description: English-stripping is not as naughty as it sounds, I promise: it's the process of removing all text displayed on the site (page contents, error messages, etc) from the program files and placing it into a separate database, which a) allows the site to be translated into multiple languages, which we aren't currently doing because we don't have the resources to maintain translations yet and the system to manage them is less than optimal, and b) allows us to update the site's text on-the-fly, for instance to change some text when we realize it isn't descriptive enough or correct that typo nobody noticed until it's live on the site, without needing to patch the code directly. Most of the site is already English-stripped; this takes care of one of the Perl modules used by the system that checks for invalid, insecure, or page-breaking HTML, as well as does things like converts <user name=denise> to [staff profile] denise.

Bug 3990: fix warnings in poll creation code
Category: Misc Backend
Patch by: [personal profile] kareila
Description: KARZILLA SMASH. [personal profile] kareila is the ever-vigilant watchdog of our site logfile warnings; sometimes code isn't broken enough to not work, but is broken enough to complain "Hey, someone should fix me when you get a chance." (The most common cause for this is getting data you weren't expecting, or forgetting to think "hey, this variable might be blank by the time it gets to this section of the code" -- things like that.) This patch fixes one of those problems in the poll creation code.

Bug 3983: Need easier way to refer to the ajax-loader image, and turn it on and off
Category: Modernization
Patch by: [personal profile] fu
Description: (I really don't want to know why the function that controls this contains the word 'throbber', do I?) This introduces a new Javascript function that will display the little inline "thinking now!" image whenever an inline page-changing function is working.

Bug 3974: proposed new subdirectory: cgi-bin/LJ/Global
Category: Misc Backend
Patch by: [personal profile] kareila
Description: KARZILLA CLEAN UP. In our ongoing quest to make the "cgi-bin" directory, our directory-of-useful-stuff-and-functions-that-get-used-in-lots-of-places, make sense to a casual developer (seriously, somewhere there's a bug with a title something like "make directory structure match reality"), this moves around some files so they're in the place one would expect them to be, based on common consensus. This will prevent developers from staring blankly at the backend DW code and muttering "I know it was here somewhere just a minute ago, dammit."

Bug 3991: fix warnings from reading page with multiple feed entries
Category: Misc Backend
Patch by: [personal profile] kareila
Description: More fixing-of-warnings, this time ones that happen when someone loads a reading page with multiple entries from a feed account.

Bug 4002: Consolidate *all* the places that generate a "this person is deleted" page
Category: Misc Backend
Patch by: [personal profile] exor674
Description: This bug is what is known as "refactoring": taking code that's repeated (via cut and paste or just by reinventing the wheel a few times) in lots of places and consolidating it into a single function that can be called from everywhere. Doing that minimizes the number of places you have to check if you're making changes, and prevents situations where one page will behave in one way and a similar page will behave in a completely different way. With this bug, all the functions that say "Hey! This account is deleted!" will be in the same place, making it easier to display the deletion messages more consistently.

Bug 3981: Remove spurious line from DW::Request::Apache2
Category: Misc Backend
Patch by: [personal profile] fu
Description: This patch does some heavy voodoo in the engine that makes it possible for the webserver to talk to your browser and vice versa, removing a single line that defines some unnecessary variables.

Bug 4000: relabel check/money order as check/money order/points
Category: Payments
Patch by: [personal profile] fu
Description: For reasons that don't need exploring at this juncture in time (...I remained, attached as liaison to the Canadian consulate ... wait, wrong story </Benton Fraser>), if you made an order in the Dreamwidth Shop and paid for the order entirely in Dreamwidth Points, the resulting receipt you got would indicate that the payment had been made via check/money order. This being a small-but-persistent source of confusion, we've done what we could to improve the logic that shows the method of payment.

Bug 3998: Width/height attributes absent from non-DW userheads in email
Category: Inbox/Notifications
Patch by: [personal profile] fu
Description: Recently, we committed a change that will distinguish between offsite journals and offsite communities in <user name> tags (for instance, [livejournal.com profile] exampleusername vs [livejournal.com profile] examplecomm). When we did this, we forgot to specify the height and width attributes in the image tag, which prevents the images from showing properly under some circumstances. This patch fixes that.

Bug 3929: Need to lowercase incoming hostname
Category: Misc Backend
Patch by: [personal profile] exor674
Description: This patch does some magic on incoming requests to make sure they're always lowercase. Most browsers will interpret dreamwidth.org, DREAMWIDTH.ORG, and dReAmWiDtH.oRg as the same thing, but the code will sometimes do some wonky things if someone uses ALLCAPS or mixed case. This patch makes a tiny change to make sure that all requests transform the URLs to lowercase everywhere.

Bug 3386: self-expiring promo codes
Category: Invite codes
Patch by: [personal profile] rb
Description: Sometimes, people need time-limited promo invite codes -- for instance, whenever there's a special function going on. This patch fixes things so that I can specify an expiration date and don't have to remember to go back and expire the code when that time is up; as history has taught us, relying on me to remember what date it is, or indeed what month it is, is often futile.

Bug 4010: /betafeatures is difficult to figure out
Category: Misc UI/Frontend
Patch by: [personal profile] fu
Description: We are about to debut the beta test of our new Create Entries page (omg omg omg omg), and [personal profile] fu noticed that the Beta Features page was a bit wonky. (That, too, is a technical term.) This patch improves the styling of that page and makes it easier to figure out what's going on.

Bug 4011: Private Message setting FAQ
Category: User documentation
Patch by: [personal profile] zarhooie
Description: This adds FAQ 224, "How do I control who can Private Message (PM) me?"

Bug 3635: FAQ information on queue length
Category: User documentation
Patch by: [personal profile] zarhooie
Description: Adds information into FAQ 4, "What are the extra services available?", to describe the limits on number of total entries and number of entries per poster permitted in a community's moderation queue.

Bug 3919: FAQs refer to "Reading List" instead of "Reading Page"
Category: User documentation
Patch by: [personal profile] zarhooie
Description: Fixes several FAQs to change "reading list" (pre-beta terminology) to "reading page" (current preferred terminology).

Bug 4016: Install Hash::MultiValue onto the server
Category: Configuration
Patch by: [personal profile] fu
Description: In preparation for the new Create Entries beta (omg omg omg omg), this bug installs a module on our production webservers that wasn't used before, but is necessary for the new page.

Bug 3999: Using a certain username in a user tag breaks Dreamwidth
Category: Frontend Display
Patch by: [personal profile] fu
Description: We found an edge case in the rename function where in some situations, a renamed account would not display properly in a <user name> tag (breaking the whole page where the <user name> tag was displayed with an error instead of failing gracefully). This patch fixes that situation.

Bug 3904: Diigo user tag/external site listing
Category: Interoperability
Patch by: [personal profile] rb
Description: This adds Diigo (a social bookmarking site) to the list of sites that you can add to your profile, as well as making it work in <user name> tags. (More forthcoming for other social bookmarking services rising in popularity after the recent Delicious changes as well!)
musyc: Silver flute resting diagonally across sheet music (Default)

[personal profile] musyc 2011-10-31 08:59 am (UTC)(link)
I frickin' love a code tour that quotes due South.

NEW UPDATE PAGE OMG OMG OMG
dreamatdrew: (Ragabash)

[personal profile] dreamatdrew 2011-10-31 08:06 pm (UTC)(link)
(I really don't want to know why the function that controls this contains the word 'throbber', do I?)

Becuz DW Devs are gutter-minded peoples, which is why you love us?

IIRC, 'throbber' is actually the standard term for the "I'm Thinking Here" indicator. I think we can blame Netscape.
sophie: A cartoon-like representation of a girl standing on a hill, with brown hair, blue eyes, a flowery top, and blue skirt. ☀ (Default)

[personal profile] sophie 2011-12-02 12:12 am (UTC)(link)
The biggest thing about the throbber is that by now it's *so* ingrained into people that it means "loading" or "please wait" that you could really screw with people's heads if you used it inappropriately. Not that I would do such a thing.

[edit: At this point in the original comment I had put a reasonably authentic-looking "Loading rest of comment, please wait..." notice complete with a throbber. Although I took care to make sure it was somewhat easy to recognise that it was fake, given what I'd said above, I decided to remove it in the end because it just played on my conscience too much. :/]

Please don't kill me.
Edited (For non mindscrewing-ness.) 2011-12-02 00:32 (UTC)
dreamatdrew: (Skullbutt The Tormenter)

[personal profile] dreamatdrew 2011-12-02 12:38 am (UTC)(link)
BAD Sophie. No cookie.