Sometimes more, is more.

const a = b && c;
const a = b && c;

Have a look at this (deliberately untidy) JavaScript code example, and consider what the if condition is. Try and keep in mind how you’re working it out.

I’d bet good money you started reading through the inside of the if block. The first two or three lines don’t tell you much, but as you worked through that statement you realised that it’s a form being submitted, and a moment later became aware that the name and telephone values in the condition are required fields for the form. …

With pictures!

Sorry if any of the pictures are too small to read on mobile. They are only supplementary (and mostly for my own amusement). Inspired by XKCD.

Many programming concepts exist beyond the libraries that implement them. It can be confusing. Sometimes I feel like I don’t know about a subject because people are talking about a specific library, or using convoluted terminology, even though I know the concept well.

I’ve compiled this list so that — like me — you can see that you know a lot more than you realise. …

What do data tables and road signs have in common?

There is a road sign in the UK which gets mocked more than any other. I’m not sure if it’s used in other countries too. It looks like this:

Falling rocks road sign
Falling rocks road sign
Falling rocks road sign

It indicates that there may be falling rocks ahead. The running joke when you drive past one is to say “thanks, I’ll try not to drive under any”.

Once you’ve noticed it you start to see quite a few signs like this.

Why DRY needs to go DROWN

Image for post
Image for post
Photo by Photo Boards on Unsplash

DRY is a coding acronym, it’s short for Don’t Repeat Yourself, and I have a bone to pick with it. Some of the most painful work of my career has revolved around tidying up the mess left behind by hardcore DRY practitioners.

It’s a useful mental model. It’s kind of like driving a car. You get up and running fastest by learning that one pedal makes you go, another makes you stop, and the wheel makes you turn. You don’t have to understand how an engine works, how brakes work, or how the car grips to the road. That mental model will serve you well to start with. Until you drive on an icy day. …

How a spin-off Node-alternative could bring revolutionary micro-front-end architecture to our UIs

Image for post
Image for post
Photo by Daiga Ellaby on Unsplash

Micro-front-ends (MFEs) is a UI architecture philosophy. It’s been gaining traction recently, but it brings a lot of unanswered questions as well.

MFEs have emerged alongside micro-service back-end architecture, and as such have a lot of aligned ideas. Here are the key concepts:

  1. Each MFE should be a completely self-contained code-base.
  2. MFEs should not operate on the same resources (that includes the DOM, the State, the URL. More on that later.)
  3. Each MFE needs to be deployed individually, and served from a unique URL.

The self-contained code-base means separate Webpack builds (if Webpack is your bundler of choice). One of the biggest advantages of MFEs is the ability to update parts of your project incrementally. I once lead a project where we refactored ~500,000 lines of code from Backbone to React. That was only possible, because it was in ~50,000 line chunks that could be refactored individually— I should mention that 50,000 lines is too big for a MFE, we were using a kind of hybrid-approach. …

A beginners experience with TypeScript

Image for post
Image for post
Photo by Raphael Schaller on Unsplash

I’m pretty new to TypeScript. I’ve been coding with JavaScript for about 10 years, and I’ve been starting to see problems that I believe can be addressed with TypeScript. I’m still not 100% sure it’s useful in all projects, but the rising tide of library authors migrating is not a coincidence.

Unfortunately the idea that if you know JavaScript, you basically already know TypeScript turns out not to be true. Don’t get me wrong, if you’re writing JavaScript then you can definitely learn TypeScript. But it is a learning process. Alas, nothing comes for free.

Generics demonstrate why TypeScript can seem daunting. …

Why it’s not the end of your world

Image for post
Image for post
Photo by Matthew Henry on Unsplash

I first entered the ‘permanent’ work place — ie. not freelancing/bits-and-bobs kind of work—at the age of 23. I joined one of the largest magazine/radio publishing companies in Europe, and I thought I’d made it.

I started on 3 days a week on a central tech team, and was quickly picked up by one of the magazine departments to do the extra 2 to make it up to full-time work.

A couple of people in our office were leaving on quite short notice, but I didn’t think anything of it, I was flying. …

JAMstack Joy!

Image for post
Image for post
See what I did there? — Photo by Viktor Forgacs on Unsplash

How to host a CMS-driven website for ~£10 a year

In the wake of Covid I’ve been thinking about charity. Specifically how we as coders can use our skills to help our local communities. The idea being that enthusiastic coders could offer a small amount of time for free to local individuals/businesses to build modern, responsive websites.

A quick search around found no shortage of sports teams, shops, and individual businesses who have dated or non-responsive websites.

I was offering my services for free, but even so the discussion around hosting costs can be awkward. I’ve hosted with AWS, and Azure before. Both are fairly affordable as web hosting goes. …

Why the Test Pyramid doesn’t work for UI applications

When I first started developing software I was introduced to the Test Pyramid. For the uninitiated the Test Pyramid is a philosophy for how to balance the different types of testing. The idea is that unit tests are cheap—fast to write, and run—so there should be a lot of them, and end-to-end tests are expensive—slow to write, and run—so there should only be a few.

A diagram of the test pyramid.
A diagram of the test pyramid.
The test pyramid. For Service, read Integration

Why unit tests aren’t great for UI application development

One of the criticisms you can level at the Test Pyramid is that it doesn’t take in to account the value of the tests. …

Image for post
Image for post
Me at the beach with all my friends — Photo by Torsten Dederichs on Unsplash

Holistically tracked evidence of my 6 month break from exercise

I always find during times of change it can be hard to keep up exercise. I’m not sure why it is. I don’t feel less motivated. My best guess is that it comes down to micro-second decisions that err on the side of staying in over getting out followed by a downward spiral of lower fitness, and thus lower rewards—less PBs, and that kind of thing.

Around September last year my company moved office. That meant I had to give up my local gym membership that was less than a minute walk from our entrance. …


Nicholas Heal

UI Lead | Looking for philanthropic ideas involving web dev, mobile apps, or 3d printing. Please reach out! | @nickhealweb

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store