Monochrome Whitstable

We went on a little walk to Whitstable today. We’ve gone there numerous times and, typically, the tide is in and the light is nice.

However, the tide was out today, and light was crap, so the resulting photos looked better in black & white. Enjoy 🙂

2016 In Review

For the last couple of years, I’ve done a month by month review of the year. After seeing Remy Sharp’s post, I thought that was a better format, so I’m copying the idea. Given that a few months would just be summarised as ‘work’, it feels more appropriate.

Professional

My little company, Cross Stroke, turns 2 this year. I will do a more detailed post like this on the Cross Stroke blog (which I need to build) in May. But, some highlights of the year would be:

  • Started using OmniFocus to manage my tasks. After hearing ;a couple episode of Canvas by Federico Viticci and Fraser Speirs (part 1, and part 2), I was compelled to pay for what is – relatively speaking – an expensive todo app. I’m glad I did though, and I’d buy it again if I needed to.
  • Used a calendar to book in blocks of time and, for the most part, kept on schedule.
  • Started saving money for tax bills, so no late nights and rushed work when those bills come around.
  • Drastically improved my work ethic, and now treat it as a separate business, not an extension of me. It is a limited company, and I might run it, but it should be treated and thought of as a separate entity.

Personal

2016 was a bit of a blur for me. Most of my attention was on the business, but there were definitely some great highlights.

  • Hayley & I visited Disneyland Paris twice, making it a total of four times in two years. We’re saving the next Disney trip for our honeymoon in 2018.
  • Very recently, we passed a huge milestone in saving for a mortgage deposit. I’m not going to say what we have saved, but suffice to say we’re over the 5% required the sort of house we’re after.
  • I picked up the second Focus ST3 after Ford missed an option on the purchase sheet that I was paying for.
  • I drove around Wales for a couple days in May, and found out sleeping in the back of a Ford Focus isn’t the most comfortable, but doable. I also found out all of us having a CB radio is amazing. I wish I got more photos and some video of it, so there’ll have to be another trip for that!
  • I bought a top-spec 27″ 5K iMac, and it’s amazing. I’ve been a laptop guy since 2008, so it was a paradigm shift for me, but well worth it. Having one place I sit and work has helped me focus.
  • Hayley & I spent a couple days in Nottingham at a fancy hotel, to get away from our Mac’s for a while. It was lovely.
  • I drove over 1000 miles for 2 conferences in the North of England.
  • My sleeve tattoo had a little addition; a stag. I didn’t realise it was in vogue before we did it.
  • My neighbour (of 20 years) got married and we went to the wedding. it was set in a lovely little country house.

2017

I’ve written several times about planning big changes in how I live and approach things. Turns out, those homes and aspirations are just words. If I tackle one thing at a time and don’t give it much thought, I’m far more likely to succeed.
However, I do have a few things I’d like to do in 2017:

  • Try my hand at making a weekly video. I hope the pressure of trying to make it interesting will help me seek out a little more fun and variety in life. I suspect it’ll start out as a weekly vlog, with the occasional fun trip and adventure.
  • Keep making steady progress on my eating patterns.
  • Tying in with eating patterns, try to improve my working hours. When we do buy a house, working from 8pm to 2am isn’t something I want to force Hayley to live with.
  • Learn all I can about the process of buying a house, so when we do, I know all the options and processes, and am well prepared for the whole thing. That means the mortgage stuff, kitting the house out, and what running a limited company from home means.

Disneyland Paris – December 2016

There’s something immensely satisfying about the mechanical click of a proper camera, and the confidence it inspires.

Over the past decade, I’ve owned a couple DSLR’s (a Nikon D40, then Nikon D200), and at one point had 3 lenses. I absolutely loved those times, but I ultimately sold it all and bought a slew of capable, but less satisfying point and shoots. I owned a Canon G12, then a Fuji X100 for a week, and then a Fuji X100s, which I still have, but have essentially given it to my fiancé, Hayley.

I ultimately miss the process of photography, so in an effort to diversify my working life, I purchased a Nikon D500 and Sigma 17-50mm f/2.8. (I figured if I were to at some point earn money from photography in some way, I’d need quality gear).

Last week, we took a little holiday to Disneyland Paris; our fourth time in two years. It seems like an ideal opportunity to take the camera out for a couple of our five day trip and really learn how a DSLR works all over again.

So much has changed since I last owned a DSLR, with the D200 being released 11 years ago, and what they’re now capable of now is not something I was prepared for. I will write a post in the future about the process and thoughts I went through in deciding to get the body I did, but suffice to say the ISO performance of modern sensors has let me keep so many more photos than I’d have imagined possible.

I’m also still learning how Adobe Lightroom works, and I imagine it’ll take me some time to get the editing process nailed. These images are simply edited to better reflect what I saw with my eyes.

One last thing… Before we jump into the photos, remember to pop over to Hayley’s two posts for more photos, with a little story.

Now, onto the photos. Click to enlarge.

Here’s a bonus video from the Studio Tram Tour.

A video posted by Paul Davis (@pauladamdavis) on

Back To Kodery

Back in December 2015 I wrote about the future of Kodery, my little code snippet storage app I started in 2009, when I didn’t have lots of grey hair.

I sort of forgot about it, but in the last month or so, I’ve found myself using it more and adding more snippets. That promoted me to go and look at the results of the poll, and after reseting my password because I forgot it and didn’t put it in 1Password, I saw the numbers.

Charge a sensible amount 24 44.44%
Close it down 13 24.07%
Sell it 17 31.48%

That’s 54 people who replied, and of those who replied 75.92% want it to keep alive, whether I charge for it, or sell/give it to someone else. Even though those numbers are tiny, it’s given me a little hope. Somebody wants it.


The past few months of work have been very monotamous and haven given me much room to experiment with new things. I’m not complaining, it’s paying the bills nicely and I’m certainly not going to shun these projects – I’m comfortable doing them and enjoy large parts of it. But it has made me want to revisit some side-projects and kick some life back into them.

Given that I’m using Kodery more recently, it makes sense to put some effort into that, so I’ve come up with a little plan.

  • Clean up the UI a bit
  • Fix some bugs
  • Add the ability to take payments and add restrictions to free accounts1. Those restrictions won’t affect current users viewing snippets already there, but you won’t be able to add more.
  • Add a few other ideas I have, like the long-awaited code editor plugins2

I have no timeline for this, but it looks like I might be able to fit in a few days for this early September. Wish me luck!


  1. Such as up to 20 snippets for free, not entirely sure yet 
  2. Probably for Atom & Sublime from me, others can make their own 😊 

Next & Previous Post Links in the Same Taxonomy

If you use Custom Post Types with custom taxonomies in WP, you’ve no doubt wanted to add Next & Previous buttons on the single-cake.php template that keep the same taxonomy term as the page they sit on.

As a loose example, let’s use cake. cake is our CPT, and we have a custom taxonomy of flavor. We have a few terms there of chocolate, lemon, and strawberry.

We’re looking at a chocolate cake, and we want a button at the bottom of the single-cake.php template that says Next Chocolate Cake1. So we need a way to link to the next cake that’s also a chocolate cake.

$prev_post = get_previous_post(true, false, 'flavor');
$next_post = get_next_post(true, false, 'flavor');
  • true means we want the next/prev post to be of the same term (‘flavor’ in our case)
  • false means we don’t want to exclude any ID’s here
  • flavor is our taxonomy

In the past, I’d have some something with a WP_Query loop, but now I know this exusts, I don’t need to!

There’s more info on get_previous_post() and get_next_post(), so read the docs!


  1. You’ll need to do something with get_the_terms() to get the current taxonomy term. 

Event Date Sorting Columns for WordPress CPTs

On a recent client project, one of the requirements was adding a couple admin columns for a custom pst type type to sort things by start date and end date.

It was a slight faff to work out how this should be done, so I’m plonking it here for me to find in the future.

Columns

The complication here was wanting to show the date in a human-readable format whilst letting the sorting happen using the unix time stamp.

So, a few things to note:

  • event is the custom post type name. If it were cake, every action and filter name would need to be cake instead of event.
  • first_show_date and last_show_date are custom fields storing the Unix time stamp

Add a column to the admin

function event_cpt_add_columns($defaults) {
  $defaults = array(
    'cb'             => '<input type="checkbox" />',
    'title'          => 'Title',
    'firstshowdate'  => 'First Show Date',
    'lastshowdate'   => 'Last Show Date',
    'date'           => 'Date',
  );

  return $defaults;
}

Add something to that new column

function event_cpt_column_data($column_name, $post_ID) {
  if ($column_name == 'firstshowdate') {
    echo date('jS F Y', get_post_meta('first_show_date', $post_ID), true);
  }
  if ($column_name == 'lastshowdate') {
    echo date('jS F Y', get_post_meta('last_show_date', $post_ID), true);
  }
}
add_filter('manage_event_posts_columns', 'event_cpt_add_columns', 10);
add_action('manage_event_posts_custom_column', 'event_cpt_column_data', 10, 2);

function event_cpt_register_sortable($columns) {
  $columns['firstshowdate'] = 'firstshowdate';
  $columns['lastshowdate'] = 'lastshowdate';
  return $columns;
}
add_filter("manage_edit-event_sortable_columns", "event_cpt_register_sortable" );

Enable sorting…

… using the original value of the custom field, not it’s formatted counterpart.

function event_cpt_orderby( $query ) {
  if (!is_admin())
  return;

  $orderby = $query->get('orderby');

  if ('firstshowdate' == $orderby ) {
    $query->set('meta_key','first_show_date');
    $query->set('orderby','meta_value_num');
  }

  if ('lastshowdate' == $orderby ) {
    $query->set('meta_key','first_show_date');
    $query->set('orderby','meta_value_num');
  }
}
add_action('pre_get_posts', 'event_cpt_orderby');

If this can be improved, do let me know!

June Update

It’s almost exactly six months since I wrote anything here. That’s largely due to me not having anything interesting to say, or interesting enough to share anyway. But a lot has happened in six months, so an update post on lots of little things may be interesting, or at least interesting for me to look back on.

Me

The #60lbsswap thing seems to have fizzled out, I was shit at keeping up with it anyway. I’d never put weight on, just fluctuate a few pounds each week. Nothing ever stayed.

With that said, I have been making more of an effort to eat with more regularity – I had breakfast today! I’ve also been using some old weights to (very) slowly building some muscle. I accepted the fact I’ll never have a beach body1, I’ll always be skinny and most clothes won’t fit me in a flattering way. But I can do something to help, if only a little.

I’ve also been keeping up with applying Minoxidil to my jaw, in an effort to help fill a patch where very little hair has grown. It only bothers me because it is right on the jaw line, and looks like I slipped with the razor if I don’t keep it trimmed. I’d love a full beard for our wedding in 2018, and it looks like beard growing takes fucking ages!

Another thing I’ve been notoriously shit with is sleep. Granted, I write this at 1am on a Wednesday, but months ago that would mean not waking up till linch time. These days I can wake up around 9am/10am and feel okay. It’s not the best scenario, but it’s a lot better than it was, and it steady progress in the right direction.

Work

Cross Stroke is going well. I have enough work booked up until October to keep me warm and occupied. From May 2015 to May 2016, I earnt more than I would’ve if I stayed at Ghost on the same salary, and this year (May 2016/17), I have a wages strategy that is relatively easy to maintain and means money can start building up in the business for rainy days.

You can see here that money in the bank was very peaky last year, it’s now slowly starting to rise.

Money in the bank over the past year

In terms of growing the business, I’m going to maintain what I have at the moment until we’ve got a house, then I can be a little more aggressive with streamlining workflows, finding more clients like the awesome clients I have, and looking into the first hire.

Away from the financial side of things, I’ve slowly been getting better with keeping to deadlines, scheduling work properly, and keeping it all organised. Every project has a Git repo, a TaskPaper file, and time marked off in the calendar. I know it’s simple, but it’s a huge step from how I used to do things.

In the next few months, I’m going to have some branding done for Cross Stroke. No matter how many times I try to do it myself, I’m never happy with it. I’m really looking forward to having an official .eps file and brand guidelines!

House Hunting

Thanks to that mounting of cash I have in the business2, we’re one step closer to being able to buy a house. We’re a long way off yet, but with me being self-employed and the higher earner, I know whoever lends us a mortgage is gonna want to know lots about the business. Having enough cash stashed away to pay my wages for a few months is surely gonna help, if only with my stress levels.

The nest step is do all the necessary paperwork the lenders will need about my business, then re-ignite talks with a recommended mortgage advisor, see what we can borrow, then go hunting.

I’m confident we could either have moved in by the end of the year, or have done whatever needs to be done to buy a new house, because new houses come with certain financial benefit for first time buyers in the UK.3

Kodery

Remember this post from December asking what to do with it? I still have no idea. It costs nothing to keep it running, so I’ll let it sit until I have a better idea, or the inclination to do something.

Other side projects

I’d still like to re-write my WP starter theme. I know there are many, I want my own for the same reason there’s a fuck-ton of CSS libraries – the existing options don’t fit my very well.

When I find a spare week (July looks good for that), I’m going to prototype a joint venture i’m working on with a client. It’s very interesting, beautiful, and right up my street. More on that later.

Car

If you follow me on Twitter, and don’t skim past any car-related tweets4, you might remember Ford miss-ordered my black Focus ST, so, after some bitching and moaning, they let me order another, giving me a chance to change some specs.

I changed to the silver paint, larger 19” wheels (which also means better standard-fit tyres), and privacy glass. The car does look great in black, but black paint doesn’t sty black very long. I’d spend half a day perfecting the paint, then a day later, it looks like I haven’t bothered.

I event cleaned this silver car in a month (apart from removing bird shit), and it still looks alright. I didn’t choose silver an excuse to not wash it, but I’m a busy guy. I still give it the same attention, but I don’t feel embarrassed driving it ‘dirty’, like I did wth the black paint.


  1. Whatever the fuck that is… 
  2. I like to cash it out, make a throne of £50’s, rub it all over myself, then give it back to the bank. 
  3. Knowing my luck, that’s something #brexit would’ve fucked up. thannnks… 
  4. I don’t blame you, their either rants or dreams. 

2015 In Review

Like last year, this year has been good. And as ever, plenty of ups and downs.


January was a fairly quiet month.

February was also fairly quiet, except Hayley & I booked a trip to Disneyland Paris.

In March, I asked Hayley’s dad for his permission to propose, we went to Disney, and I proposed. it was lovely 🙂
I also left Ghost.

I spent all of April searching for my next venture, ultimately settling on going freelance again, with a forward-thinking view of starting an agency.

May was when I decided on a name for the company, and got everything legally sorted. Accountant, business bank, Companies House stuff, yada yada yada.

In June, I ordered my new car, my brother also got married – I was best man. It’s scary.

August was full of work for me, and burnout.

September saw me, Haley, and her parents fly to Nice for a week of cocktails and sun. I also picked up my new car hours after landing.

In October, Hayley & booked another trip to Disney.

In late November, we travelled to Disney again, but I drove this time. It’s cheaper, easier and more comfortable.

December, was just another normal month, aside form the couple weeks off at the end.

Other Improvements

It’s now been 17 months since I stopped smoking cigarettes, but I still vape daily. I did enjoy smoking, but I’ve lost the desire now. There’s no feeling of tabboo when someone offers me one on nights out. Through no effort, I’ve also seemingly convinced a few friends to try vaping too.

I bought some minoxidil a few months back, in an effort to help a bald patch on my chin. For a couple months, I saw no real changes, but that patch has a few dark hairs in it now, which is awesome! By the time I get through every bottle I have, I might have a non-patchy beard!

I got an Apple Watch in June, so that’s nice.

Learning to separate work and life more has been a huge benefit to me. Given I plan to work (i.e. code) 6 hours a day, it means my typically later starts to the day don’t eat into the evenings. That means my sleeping pattern can be what it wants to me, work gets done, and I have time for Hayley in the evenings – the way it should be. That doesn’t mean I’ve stopped trying to wake up earlier though – i’d still like to start the days work at 6am and be done my the early afternoon.

And lastly, I have a much stronger sense of my finances. I now control how much I pay myself, when, and where that money goes once it’s mine and not the businesses. That in itself doesn’t change much, but it enabled me to plan a bit better. If business is good for a few months in a row (and continues to look good months ahead), I can give myself a little pay rise and pipe more money into our house savings. We’d like to buy a house in 2016, and we’re getting closer each day.


Of course there’s goals for 2016.

  • Start working earlier
  • Find another design agency client who use me for all their web dev work
  • Continue with the house savings
  • Grow that beard
  • Put on some more weight
  • Pipe-dream time: Put on a little muscle

On Kodery

kodery

I’m at a cross-roads with Kodery – I have a few options, but I don’t know what to do with it.

The last commit as almost a year ago – 18th January 2015. That’s mostly due to me having to prioritise paid work over it.

When I started building Kodery in 2009, I had a full-time job, no work-like balance sensibilities and no friends to keep be occupied – I could pour any spare time I had into it. That has drastically changed. I have a beautiful fiancée I want to spend time with, I know when to stop working, I enjoy playing pool, and driving with my friends.

I would like to keep the service running, because I have several ideas for it such as an API, embeds, better search, much-improved UI, and better permissions so it can fit much larger teams.

Ultimately, it comes down to time and money. I can only commit more time to it if it can pay its way. It’s never earnt me a penny.

This leaves me with a few options.

Option #1 – Re-work and charge

This is my favourite option.

This would involve some drastic changes throughout the code base to build in those aforementioned features.

  • A full REST API
  • Embeds (but not shitty)
  • Improved search
  • Much-improved UI
  • More extensive user permissions

It also means spending quite a lot of time building in the ability to charge. I’ve learnt that payments are really not simple – there’s so many edge-cases to consider, and this itself is going to take a lot of time. There’s also EU VAT bullshit to take into account.

Aside from that, I wouldn’t want to charge for something I’m not massively happy with, so I’d want to re-build several parts of the app, such as the underlying code that stores snippets and feeds them back to you. It’s not bad, but I’ve learnt so much in the past couple years that I know of any ways to really improve this.

Option #2 – Close it

To close it, I’d have to first build an export function, so you can export everything you’ve chucked into it over the years. Some people have hundreds of snippets, and I don’t want them do disappear as I delete the database.

After that, make final backups of the DB and code, then nuke the server.

Option #3 – Sell it

I’ve never really considered selling before, but it’s an option. I have a rough idea what I’d like to sell it for, but I’m keeping that close to my chest.

The code isn’t bad – it’s not full of glaring security holes, but I’m sure whoever bought it would have monetization in mind, and would want to build that in. I’d hope they’d want to do the same as me if I were to set it up as a paid service myself.

Help me choose

I don’t want to make any decisions without hearing form you first. Fill out the poll below to chime in. You can also email me at [email protected] if you have any thoughts. I’d like to hear anything you have to say.


The poll is now closed.

HTML Developers: Please Consider

ARIA allows developers to re-invent and extend native HTML features in meaningful ways. But like all bolt-on technologies its features are brittle compared to its built-in counterparts.

I never bothered with ARIA roles. Like I’ve thought for years, using HTML the way it’s meant to be used is better.

It’s true that it can sometimes be a pain to make form elements look and behave how you’d like them to, but in recent years, CSS has made it a lot easier to remove standard styling from form elements, and re-style them how you want. They retain their default functionality, which is almost always better than whatever someone in a decision-making position can dream up, but look how you want.

By using ‘standard’ HTML, everyone wins.