Today we rolled out a sweeping code release at Distributed Proofreaders that standardizes our CSS and moves us to HTML5. Along the way we worked to have a consistent look-and-feel across the entire site.
The DP codebase has grown very organically over the years, starting out in 2000 when Cascading Style Sheets (CSS) were young and browser support for CSS was very poor. Since that time developers have added new code and styling for code in a variety of ways. CSS, and browser support for it, has come a long ways in 17 years and it was past time to get a common look-and-feel using modern CSS.
Some of our design goals:
- Modern HTML & CSS
We did not design for specific browsers, but rather designed for modern standards, specifically HTML5 and CSS3. HTML5 is the future and is largely backwards compatible with HTML4.x. Most of our pages should now validate cleanly against HTML5.
- Pure-CSS for themes
Moving to a pure-CSS system for themes, without theme-specific graphics, makes them immensely easier to create and update. Doing so means we don’t have to create or modify image files when working with themes.
- Site-wide consistency
The site has grown very organically over the past 17 years with each developer adding their own layout, table styles, etc. We made some subtle, and some not-so-subtle, changes to make pages across the site more consistent.
- Consistent CSS
Using consistent CSS across the site code allows developers to re-use components easily and makes it easier for users to adjust CSS browser-side for accessibility if necessary.
- No (or little) per-page CSS
Instead of embedding CSS styles directly in a page, we want to have the CSS in common files. This allows for better style re-use and gets us on the path to supporting Content Security Policies.
As part of this effort we created a Style Design Philosophy document to discuss what we were working towards as well as a Style Demo page.
Despite the removal of magic quotes and the mysqli changes being far more invasive, broad-reaching, and risky, the CSS work is the code deployment I’m most worried about. Not because I think we did anything wrong or I’m worried about how it will render in browsers1, but because users hate change, and this roll-out is full of change they can see. Some subtle, some not so subtle.
I expect to be fielding a wide range of “why did X change!?” and “I don’t like the way Y looks!” over the next few weeks. I can only hope these are intermixed with some appreciative comments as well to balance out the criticism.
1 IE6 being the known exception that we will just live with.
If you shop at Amazon and are not using AmazonSmile, your favorite non-profit is missing out on money!
For the past 4 years, Amazon has donated millions of dollars to charities by having shoppers go through the AmazonSmile website. You, the buyer, shop just as you normally would and Amazon gives 0.5% of your purchase to the non-profit of your choice. It costs you, the buyer, absolutely nothing. The only catch is that you have to purchase through the AmazonSmile website.
Remembering to go to the AmazonSmile website is the hardest part of the whole endeavor. Luckily there are some browser plugins that will do that redirection for you:
If you shop at Amazon I encourage you to install a plugin to make sure you are buying through AmazonSmile and helping, even if it’s just a little, a non-profit you love.
My donations go to Distributed Proofreaders, you can select them for your charity on AmazonSmile using this link.
To be clear, I’m not encouraging anyone to shop at Amazon who isn’t already (shop at local merchants whenever possible!) but if you are shopping there, I encourage you to use AmazonSmile.
Today we set free the second DP code release this year: R201707. This comes just six months after the last major code release. Both were focused on getting us moved to modern coding practices and middleware.
Today’s release moved the code off the deprecated mysql PHP extension and over to the mysqli PHP extension for connecting to the MySQL database. This will enable the site to run on PHP 7.x in addition to PHP 5.3 and later. This change was essential in enabling the code to run on modern operating systems, such as Ubuntu 16.041.
This release also included the ability to run against phpBB 3.2 allowing pgdp.net and others to upgrade to the latest-and-greatest (and supported) version of phpBB.
Perhaps most importantly to some of our international users, this release includes a full French translation of the DP user interface.
Next up for the DP code is modernizing our HTML and CSS to bring it up-to-date as well as standardizing the look-and-feel across the site. Work is well under way by several volunteers on this front.
Many thanks to all of the volunteers who developed and tested the code in this release!
1 Technically you can run PHP 5.6 on Ubuntu 16.04 as well, but 7.x is clearly the future.
Today I’m proud to announce a new release of the software that runs pgdp.net: R201701. The last release was a year ago and I’m trying to hold us to a yearly release cadence (compared to the 9 years in the last one).
This version contains a slew of small bug fixes and enhancements. The most notable two changes that I want to highlight are support for PHP versions > 5.3 and the new Format Preview feature.
This is the first DP release to not depend on PHP’s Magic Quotes allowing the code to run on PHP versions > 5.3 up to, but not including, PHP 7.x. This means that the DP code can run on modern operating systems such as Ubuntu 14.041 and RHEL/CentOS 7. This is a behind-the-scenes change that end users should never notice.
The most exciting user-visible change in this release is the new Format Preview functionality that assists proofreaders in formatting rounds. The new tool renders formatting via a simple toggle allowing the user to see what the formatted page would look like and alerting if it detects markup problems.
What’s next for the DP code base? We have a smattering of smaller changes coming in over the next few months. The biggest change on the horizon is moving from the deprecated mysql extension to mysqli, which will allow the code to run on PHP 7.x, and moving to phpBB 3.2.
Many thanks to all of the DP volunteers who made this release possible, including developers, squirrels, and the multitude of people who assisted in testing!
1 Ubuntu 16.04 uses PHP 7.0, but can be configured to use PHP 5.6.
Magic quotes is a misguided feature of PHP that modifies user input to PHP pages so that the input can be used directly in SQL statements. This violates the programing principle of only escaping data when it is necessary and results in all kinds of weird edge cases.
This feature was deemed so misguided that it was deprecated in PHP 5.3 and removed entirely from PHP 5.4. The DP code base has relied on magic quotes to function from the beginning of the project in 2000.
I’m very happy to report that after much development and validation effort, we’ve removed the dependency on magic quotes from the DP code base! The work was done over the course of a year, primarily by myself with help from jmdyck, and validated by a team of squirrels (shout-out to wfarrell and srjfoo) and other volunteers. It was rolled out in production on November 5th and has been almost 100% bug-free – quite an accomplishment given how much of the code was impacted. A huge thank you to the team who helped make this possible!
The biggest win is our ability to run the DP code on much more recent versions of PHP all the way up to, and including 5.6.1
RIP magic quotes.
1 It won’t work on PHP 7.0 or later because the code still relies on the deprecated mysql extension, although I fixed that on a branch last night!
Today marks my 10 year “DP birthday”, as we like to say on the site. 10 years ago I joined Distributed Proofreaders and proofread a few pages. Turns out they needed developers more than proofreaders, the former being harder to find, and I was encouraged to dip my toes into the code. It wasn’t long before I was working with jmdyck, one of the lead developers, rewriting the spellcheck function into WordCheck.1 Thus began my foray into a development style best summed up by the phrase “development by community”.
My involvement with DP has waxed and waned over the years as my free time fluctuated, but I’ve always loved DP’s mission and the great community of people. Despite being a world-wide organization and very geographically dispersed I’ve had the pleasure of meeting several of them in person – all of whom have been delightful people.
Today I am one of the main developers working to improve our code. I periodically wear a system admin hat (a role we affectionately call ‘squirrels’) helping to keep our site running. Recently I was elected by the community to serve on the umbrella organization’s governing board where I am the board president.
If you love ebooks, believe public domain materials should be free and widely available, and need an outlet for a bit of OCD, I would encourage you to drop over to pgdp.net and join a wonderful community of people helping to preserve history one page at a time.
1 Not surprisingly, you’re really more interested in having the text of the page you’re transcribing match the image and be consistent throughout the book, not knowing how they spelled a word in 1892 differs from the contents of a modern dictionary.
Last month Distributed Proofreaders volunteers voted for new board members of the Distributed Proofreaders Foundation (DPF), the 501(c)3 non-profit organization that governs DP. I was honored to be one of four new board members, serving a 3-year term effective June 1st. I am further honored that my fellow DPF board members voted me as the board President for the upcoming year.
I look forward to working alongside the other board members and the General Manager as we serve the DP community by providing vision and direction while keeping our hands firmly outside of day-to-day operational issues, which are under the GM’s purview.
[Disclaimer: Thoughts presented in my blog are mine alone, and do not represent the thoughts of the DPF board unless explicitly stated otherwise.]