Orangetronic

digital imprint of David Miller

One-liner for Perch workflow.

So you've spent some time putting together some beautiful static templates for your brand new Perch site, but that Yeoman generator you used to get things up and running had you building .html files, and Perch likes delicious .php files! Oh noes!

Never fear, this command line one liner is here to save the day:

for file in *.html; do mv "${file}" "${file%.html}.php"; done

This will change the file extension from .html to .php for all .html files in the current directory.

You could do a lot worse than to go chill with the Llamas of Sussex 

Today I've been thinking a lot about creativity. Here are some llamas:

(or maybe alpaccas. I think they're alpaccas actually) 

What's the difference between creative work and other types of work? I'm not sure it has much to do with the nature of the task at hand. Pushing pixels around or designing a piece of web functionality doesn't necessarily mean I'm being creative. Working on a piece of database functionality doesn't necessarily mean I'm not being creative.

Creative work is joyful, and I think taking a joyful approach to my work has a lot more to do with inspiration than what I happen to be working on. So if I want to be doing creative work, the important question really is, "what's the best way to stay inspired?"

I'm not sure I have one answer… But, if you have a spare afternoon on your hands, you could do a lot worse than to go chill with the Llamas* of Sussex (*alpacas).

Of course creativity isn't really about alpacas. Inspiration doesn't necessarily follow all perambulation. But, going for a walk with a camera does push me to do a few things with my brain that I wouldn't if I went and made a cup of tea, flopped in front of Netflix for a while, or indeed just kept working. It pushes me into a different headscape. I get to put down whatever challenges are at hand, and spend time thinking freely and exploring things around me. 

there's more to spending time with the Llamas of Sussex than finding inspiration through beauty

The camera does something quite special here. Without doing any disciplined meditation or anything, just by picking up a camera I have access to this third eye that sees things quite differently than the other two. It asks that I open myself up to different ways of seeing things. And it encourages me not to hurry. I'd never have captured this exposure if I hadn't paused to explore the surfaces of this 4000 year old yew tree.

It's a pretty cool tree — long before the cosy little chapel stood here, long even before the church that preceded that, locals would have come to the tree to worship and pray. I took a few minutes of wandering around it, exploring it with my eyeballs, exploring it with the singular glass eyeball of the Fujifilm. There were many images of the same piece of tree, but this one somehow has more colours than all the rest put together. This was awe-inspiring and beautiful place to spend some moments, but there's more to spending time with the Llamas of Sussex than finding inspiration through beauty. This way of thinking about things, ambling around them until we find an interesting approach, looking for extra colours, peering at them from all angles, is at the heart of creative work.  

And there's nothing better for that than getting lost in the woods. 

Congratulations Mrs & Mrs Alex & Amy

My dear friends Alex and Amy just got married, and they let me take some pictures! I'll have a full gallery up soon, with prints available. For now, here they are being showered with bubbles.
Alex & Amy got married!

Can you hear the Static?

I've been thinking a lot about static site generators lately. Full disclosure: I've never used one on a live project. But I'm falling in love with the idea. I thought I'd write some things down so I don't forget them.

I use Wordpress on a lot of client projects, and in many ways I love it. It's quick to set up, and strikes a good balance between complexity and flexibility out of the box. The dashboard has proven simple enough for clients to learn quickly, and as a platform, I think it's really gone from strength to strength over the last couple of years. But it's doing something wrong…

If websites were people, asking a Wordpress site for a page would be a bit like asking somebody to pass the salt while they're sitting on the bus.

For the sake of making a relatively infrequent process easy and accessible (content creation/updating), we add complexity to a massively frequent process (content requests). It's a sad website where updates & content changes outnumber content requests! We get the luxury of a rich ecosystem of content management tools and plugins, but at a price. For these comforts, we ask our servers to do a bunch of repeat computation every time somebody wants to look at what we've made. Each time a visitor requests a page we have a database operation, some php processing to put that data into a template, URL rewrites. It all adds up. And most strikingly to me, we're making the computers do the same thing over and over again. The result of a given Wordpress page query will always be the same, until somebody makes a content change.

Of course this isn't the whole story. Wordpress caching is in really good place. We can make our Wordpress sites run really quite quickly. But this seems like a backwards way of addressing the issue. Even a WP site with the perfect caching set up generates a warren of rewrites and internal server redirects, all of which unnecessary processor ticks that will *always* be the same for a given page request.

Static sites are just faster. This one survived a front page Reddit hug, and I'm sure they did it without buying in extra CPU time. Static sites simply demand less of their servers. Ask it for a file? it gives you that file. If websites were people, asking a Wordpress site for a page would be a bit like asking somebody to pass the salt while they're sitting on the bus. It'll going to take a minute for them to figure out what you mean. A static site is already sitting at the dining table. 

Using a static site does imply some changes to the way we do things though. On the positive side, we can use less powerful hardware to run higher traffic sites at much lower cost. However, we end up having to offload those small parts of our sites that aren't static (and they are usually small, embedded twitter feeds, comments, calendars, maps)  to other services or APIs that we load in asynchronously. This is not a big trade-off — we already do this for many of these elements, and have for years. 

The major change/question is how we do content management. content management is a *really* good thing. We like it enough to spend a lot of money on processor time to pull thousands of fragments of static content out of relational databases and arrange it into pages. We do this all this for the dashboard.  

There are great static site generators out there in the wild right now. Jeckyll is probably the best known, and there are others. But they aren't ready for my clients. They don't have the dashboard. 

The next generation of static site generators need to present Wordpress-style admin interfaces for content creation, updates, and management. And they need to play nicely with asynchronous modules for loading non-static content like comment feeds. 

We have all the necessary ingredients to make this work right now:

Content in databases, A huge ecosystem of HTML templating languages, scripting languages that execute fast enough to give users in-browser previews of what they're working on, accessible server-side scripting languages that can do the actual site-generation. And with products like prismic.io popping up, we have options for the dashboard.

Let's get together and get lazy. Let's generate our pages when we create or update them, not every time they get requested. 

A Dog's Life, or You Win Some, You Lose Some

Sometimes projects don't work out. Sometimes really cool projects don't work out. But even when they don't work out, I find it hard to see time spent creatively as time wasted. A couple of weeks back, my friend Ed, a rather brilliant theatrical director, reached out on twitter for artists or designers interested in producing artwork for a show. Naturally I reached back out, and we got talking over the next couple of days about the project, an upcoming Edinburgh Fringe Fest show titled Awkward Conversations with Animals I've Fucked, a beautiful marriage of social realism and high absurdism. We kicked around a couple of concepts over a brief phone conversation, and decided we wanted a dog. My week was packed, but I agreed to spend some time on the illustration the following week, although I was heading out for travels through Morocco.

When the day came to start work on the illustration, I started poking around the WWW for reference images of doggy features, and quickly scribbled some initial ideas.

I liked what I was coming up with, but it didn't feel quite right for the project. We needed something bolder, and I thought perhaps more realistic. So I grabbed my camera and went out to find some dogs! I was staying by the beach, just south of Casablanca. Conveniently there's a pack of relatively tame stray doggies that live right on the beach.

I came home with this shot, and sent it to Ed. We liked the ambiguity of his expression, and the way the dog was staring straight out of the page, so I started working up an illustration, based pretty directly on the photograph. I worked in a couple of other details from the play, including a remote barn that the action moves towards.

We liked the way the text was laid out, but we were looking for something bolder, and the way I'd rendered the dog ended up looking too aggressive, and too realistic. The play is not exactly a work of realism, and directly quoting colours from life didn't feel quite appropriate. We wanted something that felt more illustrative.

I was thinking a lot about the work of Michael Shwab, and Ed and I spent some time talking about images of his that we liked. Back to the drawing board! I grabbed my camera again and headed back to the beach. Armed with a larger library of reference images, and aiming to produce something really bold, I picked up an iPad stylus, and started working up a new dog. I ended up producing this second illustration entirely on the iPad, on the bus ride from Casablanca to Marrakech. This is the first time i've undertaken a real live graphics project using the iPad, and the experience was a total joy. 

There's something really nice about being able to poke your pixels directly when you're working an illustration. It's just better than the usual Pen Tablet + Photoshop workflow. You get the directness of pencil on paper, AND the flexibility (undo stack!) of a digital workflow. I arrived in Marrakech with something to share, and went looking for WiFi, but bad news! 

It turned out that the play's producer had another artist in mind — someone she'd worked with before — so we didn't get to take this illustration further. Bummer. But, if I hadn't taken this commission, I probably wouldn't have met the beach dogs, or pushed myself to start taking the iPad seriously as a design tool. It's unfortunate when things like this happen, I could waste energy thinking about all the time I could have spent on other things, but ultimately I really like what I ended up making. I guess the lesson there is make things you like. I suppose I could also remind myself to double-check details and get contracts in place before I rush into the fun part. Plus now I have a spare illustration…

Anybody need an illustration of a dog? I make you good price.