300 words: Anxiety

This post is part of my plan to write at least 300 words a day on tech, wellbeing, productivity, agile methods and a little about me.

For me anxiety comes in two flavours. Both are equally impactful in their own attention grabbing ways.

In the last twelve months, since I returned to working for myself, they’ve made themselves known at least ever couple of weeks. Reducing anxiety is a focus for me in 2019.

The first flavour of anxiety I experience is a spike. An chest-tightening worry which can last up to two hours. It makes doing anything very difficult.

The second is a mild background anxiety which continually pulls my attention back to it and has been known to ruin time with family, friends and even my sleep.


I’ve got a good idea of the different triggers for the two.

Spike anxiety is caused by a sudden realisation, or discovery of something I didn’t do, or didn’t get quite right.

If you’ve ever experienced the “heart-sinking” feeling of forgetting something important, then it’s just like that, but doesn’t stop after the usual second or two.

Mild background anxiety comes at me slowly. It builds up as I dwell on something that wouldn’t be a problem if I weren’t to build it up in my head.


Dealing with them is less of a science than I would like.

Spike anxiety comes from nowhere, and the best defence I’ve found against it is to take action on the thing causing it as quickly as I can.

That could mean contacting somebody, putting a reminder in my diary or writing some notes to help make sense of the worry.

Mild background anxiety is more of a battle. To halt it I have to stop my brain from dwelling on the thought for long enough to bring the focus of it back down to size. So a good positive distraction is required.

That might be a good tv program, singing along to music I know well, a phone call which requires focus.

Long term, I think it’s possibly to reduce my general anxiety by changing things in my life, and working to be calmer and more considered when things do come along.

For me, this might mean avoiding some situation, and even people. Beyond that possibly meditation or other mindfulness techniques.

300 words

I’m keen to continue improving my writing in 2019, both quality and quantity. I’d like it to become something I do daily, and something I lean on to fill gaps in days that I have, rather than defaulting to social media browsing. It’s right up at the top of my list of focuses for 2019.

I’ve decided on 300 words as it seems a fair target. A target I can hit on a commute, on a lunch break, between pieces of work, before heading off to bed in the evening.

I’m not setting any boundaries when it comes to subject matter. That being said, I’ll likely mostly stick to tech, wellbeing, productivity, agile methods and a little on me.

I’ve written fairly frequently over the last ten years. The destination for the content I was writing were pretty broad and the length very varied. I’ve written short tech blog posts detailing a process for completing something technical. I’ve written marketting pieces sharing the benefits or details of a product or service which I was involved with and wanted to sell. I’ve written for social good campaigns that I’ve supported. I’ve even written some pretty heavy lifting specification documents.

I want to get away from all of that. The writing I do in my 300 word pieces is likely to be opinion focused, and a way to voice my thoughts without spending a huge amount of time on the data and the detail.

If conversations are triggered, then that would be great. Occassionally the 300 word articles may lead to more detailed writing on the same or similar topics.

Just enough process. As few rules as possible. Learning as I go. A great outlet for my thoughts, and possibly placeholder for projects or longer form writing. A great way to just practice my writing, often.

A fresh start

In the first quarter of 2018 I stepped back from the comfort of my full time role at a medium sized software development agency to take on a new challenge.

The proverb ‘A change is as good as a rest‘ is one I’ve quoted regularly to colleagues, friends and family during my career in the tech industry, and once again it proves itself to be true.

As 2018 draws to a close and 2019 is almost upon us, I’m looking to continue building new relationships which allow focus on my strengths supporting development teams with productivity and well-being. Especially those struggling to sell or deliver agile projects, or suffering with capacity issues and challenged by the onboarding process of juniors or inexperienced new starters.

Although now more broadly experienced, my history started with freelance development shortly before the millennium, and software—web and mobile and cloud—have been regular focuses of my time ever since.

In recent years I’ve been a teacher of web best practice, Scrum Product Owner, line manager and mentor to those in development teams, and this ability to see projects and priorities from both the business and delivery angles, while supporting the actual nuts and bolts development work, puts me in a bit of a niche position when it comes to helping teams be great.

What I’m looking for in 2019:

I’m now looking to spend more time focusing on the following areas and would love to hear from you if you’re looking for support personally, with your business or to help your team be happier, better and more productive:

  • Improving agile teams – Working with development teams and their managers to implement or improve agile processes. This includes the client facing aspects, the estimation struggle, the software itself, building velocity and ultimately helping the team enjoy the challenge of creating more value in the same amount of time.
  • Getting immediate value from new starters – Mentoring juniors and inexperienced new starters using pair coding, code review and coaching to build their confidence, autonomy and consistency, as part of a larger team. This allows an immediate growth in development capacity from the early days of a new hire.
  • Consultancy – Advising on and implementing process and technology strategy. Making people the best they can be through management and developer coaching and mentoring. Creating better outcomes with product management, agile and business process support.
  • Speaking – Taking a spot on diverse tech panels. Speaking to groups about small business advice, the technology landscape, diversity & inclusion challenges, developer wellness and development topics.
  • Product and service design – Helping ensure that when you have an idea or a client requirement, your first steps aren’t in the wrong direction.
  • Non-exec / board chair roles – Offering regular support to your board have better meetings, make data based business decisions and accountability for actions.

If you’d like to get in touch, you can find me on LinkedIn or Twitter.


If you’d like to know the full story, check out my review of 2018

Yii upgrade service

Yii 1.1 is currently in maintenance mode following Yii 2 being released way back in May 2013.

Support and bug fixes for Yii 1 were only provided until December 31, 2016 and security fixes and PHP 7 compatibility ends December 31, 2020.

That means that right now the only reason updates to Yii 1 are being created and made available are for security issues found in the existing codebase, and from 2021 it’s mothballed completely.

If you’re maintaining a Yii 1 codebase it’s time to start thinking about how to migrate away from Yii completely, or upgrade your codebase to Yii 2.

There is an official guide aimed at supporting the upgrade process, but it is unlikely to get you from Yii 1 to Yii 2 without significant pain and head scratching.

Converting from Yii 1 to Yii 2 is completely unlike developing code for either framework, and you’d want to source a Yii upgrade professional rather than getting an inexperienced developer or team involved with a large or mission critical codebase.

Personally I’ve now upgraded four codebases from Yii 1 to Yii 2. All the upgrades have been different. All follow a similar path, and the repeatable process I’ve created, but each has its own edge cases, bespoke widgets and complexities.

The work takes many days per codebase before testing and perfection can happen, and where an existing development team are involved with ongoing development or support of the Yii 1 system, it’s best handled as a team effort. Acceptance that the process isn’t anywhere close to just flicking a switch or downloading a patch is required from day one.

At this point I’m considering two next steps.

Firstly, if your company has significant budget and is in need of support moving from Yii 1 to Yii 2, I’d be interested in hearing from you. You may want a supportive voice helping your existing developers to make the move. You may also be looking to hand over a Yii 1 codebase and get it back ready for some testing and iteration.

Secondly, I’m considering sharing some or all of the process I’ve created for manually moving a codebase over from Yii 1 to Yii 2, the gotchas, the process and how to update specific things within Yii 1, where it isn’t as simple as a like

Feel free to send me a direct message on Twitter @harrybailey or leave a comment below if you’d like to contact me.

Yii 1, PHP 7.1, yii-pdf and Mpdf

Mpdf 6.x only supports PHP versions up to 7.0. If you’re upgrading your local machine, or hosting environment to PHP 7.1 or beyond (you should be) then you’ll need to upgrade your Mpdf install to something more recent than 6. That requires a few changes.

Now just to make things complex here, the latest version of Mpdf happens to be version 7.1. From here on I’ll try and prefix any version numbers with either PHP or Mpdf.

Mpdf 7 and greater is composer install only. You could still download and copy the files into place, but I highly recommend using composer to manage your vendor packages in Yii (and Yii 2). It will save you hours and hours over time.

Mpdf 7 has updated it’s class name to be Mpdf with a capital M, and changed it’s construct method to accept a config array instead of separate parameters. Small but significant updates we’ll have to deal with.

If you’re already using composer, then you’ll have a composer.json file in the root of your codebase, and in there you should have a line which starts “mpdf/mpdf”.

That line will probably end something like “^6.0” or “^6.4”

Assuming it’s less than “7.x.x” we’re going to update with composer.

Back up your codebase. I shouldn’t have to mention it, but do it, honest.

Run composer require mpdf/mpdf “^7.0”

That line will install the latest version, Mpdf 7.1, allow anything newer to be installed if you update in the future, and change your composer.json file (and likely your composer.lock file too) to include the newer information.

So we have the latest code, but we need to update Yii to use it.

yii-pdf wraps mpdf and makes it available via Yii->app()->ePdf->mpdf()

The yii-pdf config to get it functioning with Mpdf 7+ will look something like this:

'ePdf' => [
	'class' => 'application.extensions.yii-pdf.EYiiPdf',
	'params' => [
		'mpdf' => [
			'librarySourcePath' => 'vendor.mpdf.mpdf.src.*',
			'constants' => [
				'_MPDF_TEMP_PATH' => Yii::getPathOfAlias('application.runtime'),
			],
			'class'=>'\Mpdf\Mpdf',
			'defaultParams' => [
				'mode' => '',		//  This parameter specifies the mode of the new document.
				'format' => 'A4',	// format A4, A5, ...
			],
		],
	],
],

Note the librarySourcePath and class values. You can add your existing defaultParams and anything else which was in your preferences previously.

The last part is to update all places where you call the mpdf library. Previously it would have looks something like:

$mpdf = Yii::app()->ePdf->mpdf('UTF-8', '', 0, '', 15, 15, 15, 15, 8, 8);

We now convert the config to be an array of values:

$mpdf = Yii::app()->ePdf->mpdf(['UTF-8', '', 0, '', 15, 15, 15, 15, 8, 8]);

And that should be it. Update using composer, update your config, update all locations you instantiate mpdf. Then check your pdf generating code is still functioning.