Habits work
Concealed posts are now shown
These aren't likely to be offensive to anyone. They just reveal more about me than I'd typically share - the world really doesn't need more opinions
-
A new plan for protecting my guitars from humidity
I have four guitars, two electric and two acoustic. All are special to me, but my Martin 000-18 is what I’d choose as my one luxury if I was to be cast away on a desert island. I was therefore pretty upset when I thought it had been permanently damaged by high humidity. Why humidity is a concern Wood has …
-
Learning about Docker and containers
I’ve been trying to get familiar Docker and containers recently, mostly from Brian Holt’s Complete Intro to Containers, v2 course on Frontend Masters and referencing the Docker documentation. I’ve always been quite intimidated by Docker but, as Brian says, containers are more simple than you think they are They’re just the combination of three Linux features combined: chroot - allows …
-
Tracking key behaviours in 2025
I’m planning some significant life changes at the start of 2025 and want to establish a lifestyle that will support good health and wellbeing as I enter this phase of my life. There are specific outcomes I’d like to achieve, but I’ll focus on tracking what I’m doing. I’ve therefore identified five key behaviours that I’ll track every day. These …
-
Structuring practice
I’ve been researching how to make practice sessions as effective as possible and believe I’ve come up with a process that will work. It consists of viewing each session as composed of four discrete stages: warm-up, technique, repertoire and review. These stages can be described as: Start each session with a warm-up (using my warm-up tab). In addition to literally …
-
A process for effective learning of complex parts
Reflecting on progress in recent weeks, I think I’ve learned something really useful: how to learn fast or complex parts effectively and efficiently. Here’s my current working process: Break it down into small pieces (phrases usually, but it might be just a single transition) and be clear about which small piece(s) you’re currently working on. Learn before attempting to increase …
-
Cumulative dysfluency and progress
This post explores and records a few ideas my guitar teacher shared with me that I’ve been thinking about Cumulative dysfluency I’ve been aware of gaps in my knowledge but never really appreciated how these gaps limit my ability to progress. This is a known concept in education - “cumulative dysfluency”. There are serious consequences for pupils when a curriculum …
-
Guitar goals
I’ve recently felt a little lost with my guitar progress and have decided I need a teacher. I have written this post to gather my thoughts and describe my current experience, goals, and what I can commit to. Experience Playing the guitar is important to me. I love the instrument and appreciate a reasonably broad range of guitar music. I’ve …
-
The problem with strategic misrepresentation
I came across the term “strategic misrepresentation” while reading The Art of Thinking Clearly by Rolf Dobelli. It describes something I’ve witnessed many times in my life. Suppose you apply for your dream job. You buff your resumé to a shine. In the job interview, you highlight your achievements and abilities and gloss over weak points and setbacks. When they …
-
TypeScript Fundamentals
I’ve recently completed the TypeScript Fundamentals (v3) course on Frontend Masters. These are my notes which make use of the course website and the official TypeScript website What is TypeScript? TypeScript is a syntactic superset of JavaScript to add types to JavaScript. There are three parts to TypeScript: the Language the Language Server (which supports the autocomplete and documentation through …
-
Establish rituals
I’ve been reading Ten Survival Skills for a World in Flux by Tom Fletcher this morning, which describes how you can establish rituals to help you live a good life. It gives the example of the Dalai Lama who reflects every morning that Today I am fortunate to have woken up. I am alive. I have a precious human life. …
-
Cantril ladder
I’ve been reading Ten Survival Skills for a World in Flux and encountered the idea of the Cantril Ladder. To assess global happiness levels, the polling organisation Gallup uses the Cantril Ladder. This asks respondents to think of a ladder with the best possible life for them being a ten and the worst possible life being a zero. They are …
-
A lifestyle prescription (v1)
A number of books I’ve read in recent years have described the relationship between behaviour and wellbeing. The most recent of these being The Health Fix by Dr Ayan Panja which describes how behaviours impact physical systems and problems with physical systems can give rise to symptoms. If our systems are out of whack then we may start to experience …
-
Introduction to Node.js
I’ve just completed the Introduction to Node.js course on Frontend Masters and am posting my notes from the course and additional study here for future reference. The absolute basics Node is a JavaScript runtime based on Chrome’s V8. It is most easily installed and managed via the the Node Version Manager (NVM) because this allows you to easily install and …
-
Everyone is winging it all the time
I’ve just finished my second read through of Four Thousand Weeks by Oliver Burkeman. It’s a good book, although I find it uncomfortable to read in many ways. I do love this quote though. In which areas of life are you still holding back until you feel like you know what you’re doing? It’s easy to spend years treating your …
-
To make everything worse
I really enjoyed The Stranger Times by C.K. McDonnell and the last statement in this passage really resonated to me. Stella had only tried alcohol once in her entire life. It had been in the old place, in what she now thought of as her old life. She’d been far too young but, as always, she’d been attempting to fit …
-
The science and practice of mental health and wellbeing
I was fortunate enough to recently attend a session titled “The science and practice of daily mental health and wellbeing” in which the presenters outlined the relationship between our daily actions and how we feel. This post contains my notes from the session. A basic principle Our brains react automatically and beyond our immediate conscious control to things that go …
-
A machine for misusing your life
I’m currently reading Four Thousand Weeks by Oliver Burkeman as part of a series of books I’ve been using to explore my relationship with technology. One particular section from the book nicely describes a key idea about the role we all play in what Jaron Lanier calls the “Behaviours of Users Modified, and Made into an Empire for Rent”, or …
-
Increase understanding over memorising rules
I’ve been doing a bit of study this morning and came across this quote from 2018: However, that was back in 2014. Things have changed a lot since then, and memorizing rules is all but useless in the ever-changing browser landscape. Always remember to do your own tests, especially when performance is concerned. - Front end performance by Bruno Skvorc, …
-
A year without news
Today marks a year since I stopped reading the news. After many years of being overly concerned with news I decided on 21 January 2021 that I: would only look at the news if there was an event I needed to know about would only use the BBC website as a news source (no apps, no notifications) would never engage …
-
The negative art of technical decisions
I’m currently re-reading The Art of the Good Life: Clear Thinking for Business and a Better Life by Rolf Dobelli. It’s a great book. I’ve been struck by how relevant many of the arguments from Chapter 6 “The Negative Art of the Good Life” are to technical leadership and decision making. The context of writing this post is relevant as …
-
A primer on public sector accessibility
Those of us working on the front end of public sector websites and applications have a duty to ensure that our work meets the Web Content Accessibility Guidelines 2.1 (WCAG) at Level AA. But when interviewing developers who’ve not worked in the public sector before and seeing work produced by some agencies I have often been amazed at the lack …
-
Python refresher
One of my objectives for this year is to improve my skills in the new technology stack being adopted at my workplace. This stack is based in Python. I’ve therefore spent some time doing a bit of a refresher into working with Python as a language (since the last time I worked with it on a project was way back …
-
Choosing the right field
Atomic Habits by James Clear is one of the best self improvement books I have ever read. When I first read it most of the ideas were new to me but one chapter in particular resonated because it clearly articulates a lesson I’d already learned the hard way. If I’d learned this lesson much earlier in life - ideally while …
-
The opposite action
As I write this it’s been more than ten months since COVID-19 was declared a pandemic. I’d say I’ve generally kept on top of my psychological wellbeing - and have coped with everything much better than I would have anticipated. But some days are definitely more difficult than others. This is especially true at the moment as we experience a …
-
Components of good practice
I’ve been a student on Bryan Sutton’s ArtistWorks school since 2019. Here are the key messages he’s conveyed during our video exchanges: Every practice session should progress through three distinct phases: Remind. This can be considered a reminder of what quality is and a warm up; Repeat. Where we might be learning something we know. We could also be reviewing …
-
Introduction to ARIA
For static web pages you can normally achieve good accessibility by thinking carefully about the structure and semantics of your content and making effective use of HTML. For dynamic features you’ll likely need to use the Web Accessibility Initiative Accessible Rich Internet Applications (WAI-ARIA, or simply ARIA) suite. So much of the web is dynamic that you’d expect ARIA is …
-
Spread operator - a few things to remember
For some reason, I seem unable to remember the different things you can do with the spread operator. It’s just one of those things that won’t sink in. I get this occasionally with the strangest of things (one of them being my partner’s telephone number!) I’ve therefore spent some time today compiling the list below. This is for my reference …
-
Progressive Web Apps - Web App Manifest
Today I ran the last of three sessions to introduce developers to Progressive Web Apps. This was a shorter session looking specifically at the Web App Manifest The slides that I used for this can be downloaded in PDF format here. …
-
Progressive Web Apps - the Service Worker
Today I ran a session to introduce developers to the capabilities of Service Workers. I prepared this session to be reasonably involved with several hands-on examples provided through a companion GitHub repositoriy I’d prepared. The slides that I used for this can be downloaded in PDF and PowerPoint format. …
-
To return better than we left
I’ve been trying to make the most of the Covid-19 pandemic lockdown by using my time productively in order that I can emerge from this better than when lockdown started. You cannot just wait. Like those below you have things to do. Eventually, Earth will need people to return to spin back up the wheels of the human world. Your …
-
Progressive Web Apps - introduction
On 14 May I ran a session introducing Progressive Web Apps (PWAs) to a group of developers. This was a reasonably high-level session and I’ve scheduled in a follow-up session during which I’ll present more detail on the technical implementation. The slides that I used for this can be downloaded in PDF and PowerPoint format. …
-
What management taught me about myself
I’m currently reading Why Running Matters: Lessons in life, pain and exhilaration by Ian Mortimer. Just a quarter through the book and already there are several points he makes that are excellent. One in particular has prompted me to finally write a post which I’ve been meaning to get to for years: …a stronger incentive is my firm belief that …
-
An eternal add function
Earlier today I was told about a coding challenge a colleague had tried this weekend. The challenge was to write an add() function which could take any number of arguments and add them. It can also take a single argument, with the ability to chain a further call. console.assert(add(1) == 1); console.assert(add(1)(2)(3) == 6); console.assert(add(1)(2)(3)(4)(5) == 15); console.assert(add(1, 2, 3) …
-
Count repetition in multi-dimensional array
A couple of days ago a few of us were talking over lunch about a recent coding challenge a colleague had been posed. The task was to: Write a function that takes two arguments, an array - that could be multi-dimensional - and a needle. The function should return the number of times the needle appears at any level in …
-
Intersection Observer API examples
I’ve been experimenting with the Intersection Observer API. This is a handy little API which, as MDN concisely explains: …provides a way to asynchronously observe changes in the intersection of a target element with an ancestor element or with a top-level document’s viewport. A simple example Hopefully, the snippet below is self-explanatory. We’re creating an ‘observer’ and attaching a ‘handler’. …
-
Introduction to regular expressions
I ran a workshop yesterday to give people an introduction to regular expressions. This was geared towards a pretty broad audience with no prior experience necessary. The workshop is interactive with participants being able to get ‘hands-on’ using examples I’d prepared in Regexr.com. In short, this is a ready-made interactive workshop to introduce just about anyone to the basics of …
-
A simple 'call' and 'apply' example
I sometimes see developers having difficulty grasping how the .call() and .apply() functions of Function.prototype work and where they might be used. Like many language features they can be very helpful but are seldom used and I sometimes struggle to find a good, concise example to give. What they do Both these functions do the same thing: call a function …
-
Simple recursion example
I was helping a developer recently with a problem. They needed to extract all properties from an object as key:value pairs where: the value was a string, and the object shape (how deeply nested it was) was determined dynamically in response to events. It may be one level deep; it might be several. We looked at it for a few …
-
Generating hashes on Mac
Every time I have to use a checksum on Mac I end up searching on line for the command to use to and every time I have this niggling feeling that I should be saving this somewhere. Since I’m not doing this that often I tend to forget. Anyways, here’s how you do it. Here’s an example of checking the iTerm2 …
-
Git and GitHub
Earlier today I gave a presentation to a group to help explain Git and GitHub (and the differences between them). Here are the slides in PDF and PowerPoint format. …
-
Good commit messages
I was recently asked to prepare some slides for a group of developers on the importance and benefits of good commit messages. Here are the slides in PDF and Powerpoint formats. …
-
Continually invest in your development
Keep investing in your personal and professional development and in your power to produce solutions to problems, and you will always have a source of economic security. Your security does not come from your job or from the patronage of other people; it comes from your ability to meet needs and solve problems. Keep investing in those abilities, and you …
-
Four assumptions to live by
I read this yesterday and thought it was an excellent and easy to remember way of guiding our actions. Everything I’ve learned during my life suggests these are excellent assumptions to live by. Of course, everyone falls short of these to no matter how well intentioned. As of today I’ll be doing my very best to live by them. I …
-
Do not reserve a plot for weeds
I read this recently and felt there was an important life lesson here: You cannot play with the animal in you without becoming wholly animal, play with falsehood without forfeiting your right to truth, play with cruelty without losing your sensitivity of mind. He who wants to keep his garden tidy doesn’t reserve a plot for weeds. - Stephen R. …
-
Feed the right one
I came across this story while listening to the new Vassos Alexander book on a morning run today. I was told the following tale by my grandfather as I sat on his knee one sweltering summer afternoon in the house he built by the sea… It’s actually a famous Cherokee parable from Tennessee. An old man is teaching his grandson …
-
Piping and xargs (updated)
Today I faced an odd problem. I needed to remove everything but a specific file from a directory via the command line. Having thought about it for a while, and done a bit of research, I came across someone posing the same question on Stack exchange. There are several answers provided, but I really liked this one. Example ls | …
-
Gravity as a metaphor for making change stick
Those of us who watched the lunar voyage of Apollo 11 were transfixed as we saw the first men walk on the moon and return to earth… to get there, those astronauts literally had to break out of the tremendous gravity pull of the earth. More energy was spent in the first few minutes of lift-off, in the first few …
-
A brief introduction to GraphQL
I’ve been researching GraphQL this week and thought it might be useful if I posted a brief overview of what I’ve learned and my mindmap ‘notes’ (in both PDF and PNG format below). What is GraphQL It’s an API specification developed by Facebook to address claimed shortcomings of REST to including flexibility and efficiency to and was Open Sourced in …
-
Testing Angular: a brief overview
I’ve just finished a short exploration of the tools and techniques for testing Angular (I’m referring to the more modern Angular framework here, not the older AngularJS). Below you’ll find an overview diagram and a few key highlights. TL;DR Testing Angular is much, much more logical than testing AngularJS. There are many assertion frameworks to choose from when using Angular. …
-
Changing your mind all the time
I’ve always felt that I am (and am perceived as) someone who changes his mind quite a lot, so I find this quote from Malcolm Gladwell a comfort. I feel I change my mind all the time. And I sort of feel that’s your responsibility as a person, as a human being – to constantly be updating your positions on …
-
Using promises to time limit asynchronous tasks
I’ve been reading Nicholas Bevacqua’s brilliant Practical Modern JavaScript recently and came across this technique for using Promise.race() to intervene when an asynchronous task is taking longer than is acceptable. function timeout(delay) { return new Promise(function (resolve, reject) { setTimeout(() => reject('timeout'), delay) }) } Promise .race([fetch('/large-resource-download'), timeout(5000)]) .then(res => console.log(res)) .catch(err => console.log(err)); How it works JavaScript promises provide …
-
Progressive enhancement in 2017
The Peanut M&M has become the accepted metaphor for progressive enhancement. I’ve seen it used many times - perhaps first on A List Apart way back in 2008. The thing is, we’ve seen a great deal of change in recent years and the M&M doesn’t really feel like the best metaphor anymore - I just couldn’t ever think of something …
-
Debounce vs throttle
Debounce and throttle are techniques used to prevent JavaScript code that runs in response to user actions from blocking the user interface (or otherwise running more than is desirable). They are similar but subtly different and can be confusing because they combine some of the more tricky aspects of working with JavaScript: manipulating context; passing functions around as first-class values …
-
A few (somewhat) lesser known Git tips
This post describes a few lesser known features of Git. It’s starting out small but to like my OSX Command Line Essentials to will be added to as I encounter new things. For the purposes of the description there are four main areas that I will refer to: The working area (i.e. the files on your system) The index (i.e. …
-
Linux command line - some slightly more advanced tips
In my Mac OSX Command Line Essentials post I describe some basics of command line use. About 90% of what’s there is equally applicable in Linux. If the command line is entirely new to you I’d suggest starting there because I’ll be introducing a few more advanced topics here. Contents man chmod tail locate and find shutdown Assorted cool stuff …
-
Goodbye Apple. Hello Linux
Having watched the MacBook Pro announcement earlier this week I’ve decided it’s the end of the road for me and Apple. I watched planning to pre-order the new MacBook immediately. Then I saw the prices. Now I’m going back to Linux for all my development and have bought a new Dell XPS 13 with Ubuntu 16.04 pre-installed. Why? Because the …
-
Mac OS X Command Line essentials
As our team move to Mac OS X development environments and Git version control I wanted to prepare a post covering some Command Line essentials. As a developer working with these technologies you don’t have to use the command line but you’ll probably want to - at least some of the time. This post is intended to be something of …
-
Extracting Base64 image data
Earlier today I faced an unusual problem in that the app I’m currently working on involves generating a PDF from HTML (for which we’re using the WebKit HTML to PDF library) and I needed to include the designers’ PNGs without making a network request for them. The immediate answer to this is to use the Data URI scheme. This left …
-
Resources for accessible development
Accessibility is I thought it might be useful to create (and maintain) a list of resources related to accessible web development. Introducing accessibility Google’s Web Fundamentals course on accessibility provides a good overview of basic accessibility considerations and techniques. It also explains that access impairments may be situational, temporary or permanent to something which is often overlooked by developers. An …
-
Simple template literals
These are simply string literals that allow for embedded expressions. They can to but need not necessarily include placeholders. Some uses for template literals are: Multi-line strings Expression interpolation to anything within a placeholder will be parsed and evaluated inline immediately Important things to note In You Don’t Know JS: ES6 & Beyond Kyle Simpson describes an important misconception about …
-
Getting to grips with Vim
This post is a companion to my experience in trying to migrate to Vim as my main text editor. I’m doing this because I really like many of its features but, as you’ll see, making the switch isn’t exactly easy. 21 February 2015 to to Vim: I’ve decided to give Vim a proper try. As of now I’m not going …
-
Learning review and signpost Dec 15 to Feb 16
Plans for this period At the end of my last sprint I described my plans for this period as: ‘learning the Rails development stack’, and getting to grips with my new job role. Well, I’m pleased to say that I really like my new role and what I’ve seen of Ruby/Rails development. Activity Some specific activities I’ve completed (in addition …
-
The Template Method pattern
I’ve been reading Sandi Metz’s Practical Object-Oriented Design in Ruby: An Agile Primer to a very good book covering object-oriented patterns from the perspective of the Ruby paradigm. I’d definitely recommend it to not least because the book provides an excellent description of the importance of ‘messages’ in object-oriented design. The Template Method Pattern The chapter titled ‘Acquiring behaviour through …
-
Regular expression revision
This post has a few regular expression challenges which are intended to help me revise. They start very easy and tend to get a bit harder as you go on. Match both ‘stationary’ and ‘stationery’ Match any single lowercase letter Match any single letter or number Match the word ‘Go’ but only if it is at the beginning of a …
-
Learning review and signpost November 2015
Plans for this period My plans for November were to focus on ECMAScript 2015 to aka ES6, aka ES.next, aka Harmony (which is nice). I suspect that this was my shortest sprint ever to cut short in part because I learned yesterday that I’m working on a Rails application in my new role. Since this is an entirely new platform …
-
Retrieving file content with cat, head, tail and less
This short post provides a brief description of a few simple commands that deal with retrieving file contents. cat (meaning concatenate) Shows the full file contents of one or more files. For example: cat one.txt will output the single file contents to the terminal cat one.txt two.txt will output the concatenated contents of both files to the terminal head and …
-
Learning review and signpost September to October 2015
Plans for this period Having spent the last few sprints looking at quite a broad range of development topics I resumed focus on front-end specific technologies and tooling. Activity D3 D3 is one of those libraries I’d been holding at arms length for some time so I was really pleased to get to grips with it during this sprint. I …
-
Handy little regex for password validation
Here’s a handy little regular expression that makes use of positive lookahead assertions to match a password that contains at least: one uppercase character to (?=.*[A-Z]) one lowercase character to (?=.*[a-z]) one number to (?=.*\d) Where these assertions are met it then restricts the match to strings which are between 8 and 15 characters in length to .{8,15} Here it …
-
Learning review and signpost June to August 2015
This has been a busy period both professionally and personally. On the professional front, we’ve been: Embedding entirely new development and deployment processes within our team. This was a pretty major undertaking introducing significant change but it’s had a fantastic impact across the board. I’d say that this project was probably the highpoint of my career to date. Working with …
-
Handy text editing shortcuts for Mac
While they’re not exactly well documented to I came across them in the Mac OS X Productivity Tips for Developers course from O’Reilly to these keyboard shortcuts are very handy (and not just for developers). They’ll work across all kinds of applications: Pages, PhpStorm, Sublime Text, browsers, the Terminal. I should point out that they’ll sometimes (not often) be overridden …
-
Learning review and signpost (April to May 2015)
Plans for this period This sprint was focussed on getting to grips with new developments in PHP. I’ve heard a lot of good things about emerging standards and to having been focussing my study on other topics to I felt now would be a good time to get a handle on what’s been happening. Activity My activity around building my …
-
Build faster mobile websites (meetup write-up)
Last night I went along to the London Web meetup where Dean Hume gave a really good presentation covering a broad range of techniques to build faster mobile websites. His slides are available but I wanted to summarise a few of the concepts which are probably most broadly applicable. Many of these will be known to front-end developers who’ve looked …
-
Learning review and signpost (January to March 2015)
This post reviews my personal development activity from 26 January to 27 March (60 calendar days) Plan for this period The plan for this period was a deep-dive into using Git and GitHub (or other code hosting services such as Bitbucket) effectively. I’ve been using both Git and GitHub for a couple of years, but I’ve always felt that I …
-
Learning review and signpost (Sept and Oct 2014)
As part of my personal development activities I separate the year into six ‘sprints’ during which I focus my development activity on a small number of identified goals. This post reviews my development activity during September and October 2014. Plans for the period Learn AngularJS and create a single-page app Try blogging and screen casting Start attending meetups Activity During …
-
My favourite features of WebStorm
I recently moved from using Sublime Text as my primary code editor to WebStorm. When a colleague noticed my enthusiasm for this new editor, he asked what it was that I liked so much about it. I didn’t provide the answer I would have liked to, so here’s a breakdown of the features which I like so much about it …
-
Finished AngularJS Fundamentals
I’ve just finished AngularJS Fundamentals from Pluralsight. This is the second source I’ve completed in my goal to become competent in AngularJS development (the first was Martin Freeman’s book Pro AngularJS, which I described in an earlier post. How long it took The course is delivered in 6.5 hours of video, and it took me 18.5 hours study over 3 …
-
Finished Pro AngularJS
Today I finished Pro AngularJS by Adam Freeman. It’s 650 pages long (if you exclude the index etc.) and I read most of it thoroughly. That includes doing the coding exercises. The only bits I skimmed were the more esoteric features that I’d never remember and almost certainly never use. In total, I’d estimate that I carefully studied about 80% …