Arras

I have this legacy WordPress theme (Arras). Over the years I’ve made several attempts at refactoring it. My first attempts were back in 2013. Those early attempts fixed a few of the pressing issues, but were, I confess, less than satisfactory. The code-base was still pretty messy, and my changes broke as many things as it fixed. It happened that the things that broke weren’t parts of the theme I myself was using, so the new mess was, at the time, more acceptable than the old mess.

Eventually, the mess became too much and I consigned the project to “no longer actively maintained” status. (I’m pretty sure the difficulties were what led the original developer to abandon it as well.)

This week I spent a bit of time with it again, coming back to it after a long hiatus with fresh eyes and a couple more years of experience. I started in on the project from where I’d left off before and made a bit of headway. The experiments this week have given me some hope that the mess can be cleaned up.

That said, I’m going to start back again on the project from where I first inherited it. With any luck, the refactoring from the beginning can become a kind of learning tool and the theme can be restored, bit by bit, to a useful state. Starting again from before my previous refactoring will also make it easier, this time around, to retain the functionality it had at one time that was lost in my previous attempts.

I got the itch to start fooling around with my old Arras theme project again the other day.

After looking at what I’d started on earlier this year, I decided that rather than messing around with all that legacy code, it would be easier to start from scratch.

With a clean slate I figured I could build the whole thing, not just to be mobile-compatible, but mobile first, using CSS grid. And I can write it to maximize performance with PHP 7.

I’m beginning with the original (“legacy”) Arras look. From there, if time and inclination allow, I’ll build out the default look of the 1.4 version, and then the 2.x version. (The 3.x versions I did a couple years ago went back to the version 1 look.)

After a short stint of coding I have a not-even-bare-bones skeleton. Some basic back-end groundwork is laid. Enough to get a blog page up on the screen, but without header, footer or menu.

One evening in late September I dusted off the old Arras WordPress theme project and started re-thinking it.

This afternoon I finally got to the point where I could load the beginnings of it on a real website. If you’re looking at this in late 2016, you’re looking at the results.

I’m calling it Arras Nova, even though at the moment it’s look is retro. On the front it replicates the default style of the last version of the theme from it’s original developer, Melvin Lee — except the font sizes are slightly larger. Under the hood, though, it’s a whole different Arras:

An Object Oriented PSR-4 compliant theme architecture

SASS compiled stylesheets

Minimized and compressed assets

The old Arras had several pages worth of options. The new is stripped down all the way. If I keep at it I’ll be building more of them back in as I go along, but for now, it’s just a single option: Enter your own message on the left in the footer.

For old Arras enthusiasts, installing this version is bound to disappoint. There simply isn’t much there yet. Installing this over an older version is likely to wipe out a lot of customization. For that reason I haven’t even announced this on my Arras Theme site. That, and I’m not ready to make any promises about when a full-fledged version might be available.

For now, the project is very much a distraction, a project to putter with on evenings and weekends after long days of intense coding with AwesomeMotive.

Still, getting to the point where something you’ve rebuilt from square 1 is stable enough to actually upload to something other than a development server brings a certain measure of satisfaction.

or, “The Essay Your Teacher Never Assigned for the Last Day of School.

There’s a t-shirt I’d like to get for Christmas. It says, “I’m a web developer. I solve problems you didn’t know you had in ways you can’t understand.”

I spent a lot of time over the last month working on a little project I inherited last year called Arras.

Arras is a WordPress theme.

Already, I should back up. WordPress is software that runs websites. As of 2015, something like 28% of websites are built using WordPress.

All those sites, even though they’re built using the same basic software, look different. That’s because when you build a website with WordPress, you get to pick your own theme. Like when you go to the ice cream stand, it’s all ice cream. Once you have your basic ice cream, then you add the unique combination of ingredients that make rum raisin different from fudge praelene crunch. Those extra ingredients that give the website its “flavor” make up the theme.

So Arras, a WordPress theme, is a package of code ingredients.

It’s a very old (in internet years) package of ingredients. It was originally designed by a guy named Melvin Lee, but in 2012 he gave up working on it. Which was fine. It had probably run it’s course.

Except that one of my clients was using Arras as the theme for her website. The theme started doing funny things and the site didn’t look right. So I started fixing it bit by bit.

In hindsight, I should have recommended she just swap out the Arras theme for something more up-to-date. That would have been the smart thing to do. But instead, I did something rash. I picked up the theme as a project and started making the fixes available to everyone and anyone.

It turned out to be a much bigger project than I had bargained for. The more I fixed, the more fixes needed fixing. The rabbit hole went pretty deep. And then people started asking for new features.

That’s the story. Last Friday I published a revised and updated version. It’s the culmination of 18 months of fixing — and it’s still not really done. Software is the sort of thing that never really gets done. There’s always something to update, something to fix or something to add.

So 18 months, and it’s still not perfect. But, hey, it works. And I get to say, “I shipped that.” Which feels good.

Of course, immediately after I’d done it I found a bunch of things that need to be fixed.

That’s the way it goes. There’s always something else.

At least they’re not the kind of bugs that I know will be generating php notices in the background for everyone running the theme the way 1.5.5 did.

Arras 1.6 does what I set out for it to do. It’s up to date with WordPress 3.9, even if it doesn’t fully implement everything WP 3.9 is capable of. It should be stable when WordPress 4.0 comes out at the end of the summer.

I’m starting a list for the next version but I’m not setting a date yet. Probably won’t for a while.

That’s the date I’ve given myself to release the next version of the Arras WordPress theme.

I’ve published on the theme website that the next version will be out “in July.” I haven’t set a release date yet. But by saying “in July” I’ve locked myself in to July 31 as the last possible release date. August 1 will be too late.

Why?

Because if I set a date, the project goes from being something I’ll do “someday,” to something I’m going to actually complete and ship.

Sarah Silverman says that when someone tells her “Someday I’m going to write a book,” she always tells them, “It’ll never happen.” Because like tomorrow, someday never comes.

Like any rabbit hole, the farther I fall into it, the more there seems to be.

I patched together the current release in a week last month. It was just to get the code operational. A quick patch version. Something I could use to get my client’s site back into operation.

Since then it’s been downloaded a few times. It turns out there were other people needing an update besides me. I even got a couple e-thank-you notes.

After the initial patch I’ve done a lot more fixing. Stuff most users won’t notice, but important stuff for further stabilizing the theme. Cleaning up code to bring it closer to the current WordPress theme standards. Rewriting code to bring it into line with best practices before launching into any development of new features and functions.

In terms of issues, I’ve got 90% of it done. The one big item I have left is the way the theme handles options. The previous developer invented his own system. WordPress has a built-in system. In order to get the theme up to WP standards, I’ve got to rewrite the whole theme options system to spec.

The options issue alone is probably twenty or thirty times the work it took for all the other issues combined, since nearly everything else in the theme hangs on which options get picked.

There’s a second smaller conundrum, too.

The previous developer has left traces in the code repository of a version that’s not referenced anywhere. As far as I can tell, that version was never released.

Ordinarily this wouldn’t be a problem, except that the version number (1.6) is the number I would have used for my next release and apparently that number is already taken.

The only way this would ever matter is if someone in some obscure corner of the internet has the mystery version available for download. So I’m going ahead with plans to use 1.6 anyway. Even if someone else does have a version 1.6 somewhere, it probably doesn’t work any more.

Bringing it up to date after it’s having been almost two years discontinued is a bigger job than I expected.

I can see light at the end of the tunnel for the next release, though. I’m thinking of setting a date for a release in June.

My temptation is to allow myself to indulge in “mission creep.” As I find and fix things ideas for adding new features keep coming to mind. I want to do them all. Eventually I might. But I can’t do it all right away, and there are too many major fixes that need to “go public” sooner rather than later.

This calls for a level of self-discipline, or maybe patience, I’m not used to. Both for saving things for later, and for going to bed at a more reasonable time.

Besides being the name of this WordPress theme, it turns out that Arras is a region in northern France.

It’s given me the chance to page through a lot of pictures of that part of the world. Looks like it could be nice.