Skip to content

Tagged as “development”

Use Less Javascript - Accordion

Semantic HTML provides many elements we can use instead of rolling our own. Introducing <details>

Read more

#development #frontend #use less javascript #semantic html

Centering things is hard

Everyone knows the hardest thing in frontend development is centering something within an element…

Read more

#development #frontend #css #vs code #extensions

Deciding against a Content-Management System

I have decided to not use a CMS for this site. If you're wondering why, read on...

Read more

#development #cms

Heading tags - From H1 to H6

I've seen a lot of headings related horrors in my time building websites. Let's learn how to do it properly.

Read more

#html #development #basics #semantic html

Using html-parser for when an API returns HTML

It's nice when your API returns JSON because JSON. But what do you do when you get HTML back instead…?

Read more

#rss #npm #development

Scrolling tables

Using table is very good and right for displaying data. But what if you have too much data?

Read more

#css #html #development

Naming your boolean variables better

Read more

#development #react #javascript

Using Zustand to manage application state in React

One of the downsides to Controller/Reducer-based state management is that a single piece of state needs to be passed from Component to Component up and down the cascade - regardless of whether that component needs the state or not. Zustand promises to alleviate that.

Read more

#react #development #state management

Quick and dirty server 2

Sometimes you just want to serve a static site without installing all kinds of stuff (2022 Edition)

Read more

#development #python #productivity

Trim trailing slash

Sometimes a URL has a trailing slash, sometimes it doesn't. If we can't be certain, we need to handle either eventuality.

Read more

#development #javascript #utility

Dotenv for bash

Sometimes you need to access process.env in a bash script…

Read more

#development

Catch your errors

If there's one thing I've learned, it's that your code will go wrong. You need to accept that and catch your damn errors!

Semantic HTML

Semantic HTML is the process of using HTML5 tags to reinforce the meaning of the information contained within a webpage or application.

Read more

#development #html #semantic html

WordPress forgotten password localhost hack

Forgotten the password to your local CMS? Can't email a password reset? Here's my tried-and-tested solution.

Read more

#development #wordpress #password #security #database #cms

Your codez is overkill

We all love writing code - that's why we're doing this - but sometimes we can seriously over-engineer things.

Read more

#development #productivity

I am a lazy developer or How to write 438 lines of nginx redirects

I don't mean to imply that I cut corners and churn out shoddy code. I just hate doing repetitive tasks that bore the bejesus out of me.

Read more

#development #nginx #javascript #productivity

You have a better laptop than your users

I have a decent laptop and I'm lucky enough to have a strong, reliable internet connection. Not everyone does.

Read more

#design #development #testing

Formatting JSON.stringify()

I occasionally find myself dumping stringified JSON into a <pre/> tag in my markup. It inevitably looks horrible. Here's how to prettify your JSON.stringify() output.

Read more

#development #json

Generate a random alphanumeric string using JavaScript

Today I had to send an "ID" in the body of my POST request. It turns out that the API doesn't care what the value is - it just needs to be alphanumeric, exactly 18 characters long, and not already in the system.

Read more

#development #javascript

Wait!

Why the rush? Whether you're faking an API response, introducing deliberate cognitive drain, or simply want to slow things down this function has got you, baby!

Read more

#development #javascript #utility

Quick and dirty carousel

AKA Move the first item in an array to the end repeatedly

Read more

#development #javascript

Increase WordPress maximum upload limit in Docker

"filename exceeds the maximum upload size for this site" 🙄

Read more

#development #devops #wordpress #cms

Quick and dirty server

Sometimes you just want to serve a static site without installing all kinds of stuff

Read more

#development #python #productivity

Numberize a value

If you get a CSS value but you want to do maths with it, what do you do? Let's find out!

Read more

#development #javascript

Using slots in React

Having multiple almost identical components is just very bad and wrong - let's fix it properly!

Read more

#development #react

Human-readable Numbers

Convert a JavaScript number to a human-readable number the easy way.

Read more

#development #javascript

Pre- and Post- NPM Scripts

I'm not a fan of chaining together lots of commands and, it turns out, neither are NPM!

Read more

#development #npm #productivity

The semantics of interaction vs navigation

It is commonplace for designers to style both links and buttons to look like “buttons”. But just because something looks like a button, doesn’t mean it is a <button>.

Read more

#development #design

Each child in a list should have a unique "key" prop

Fix this common React error without dependencies

Read more

#development #react #error message

For modern development, Desktop and Mobile are not enough

Different devices have different capabilities, using mobile to describe both narrow screens and touch screens is confusing and leads to assumptions that come back to bite us.

Read more

#design #development

Gutenberg Components - "I only need one"

Gutenberg comes with an awful lot of default components most of which will never be used in our websites. Here's how to disable the ones you won't use.

Read more

#development #wordpress #gutenberg

Micro-interactions to delight and annoy

Can your UI harm your UX? Let’s find out…

Read more

#development #design #ux

The Build Triangle: Understanding Limitations

In an ideal world, everything we build would be perfect – gorgeous code, on time, and under budget but most of us don’t live in a Disney utopia. Unfortunately, the real world chips away at our resolve and something has to give. Part of good stakeholder management is managing expectations and part of managing expectations

Read more

#development #design #communication #soft skills

MNMLSM: Simplify, simplify some more, then start simplifying

Minimalism is an interesting thing – far from meaning as stark as possible, minimalism is the idea of removing anything unnecessary for base level functionality. Imagine a human face. Now remove all of the details you can until it still resembles a human face. If, for example, you took the eyes out and it looks

Read more

#development #productivity #design

Mobile-first is the future of web design

One of the main issues I have come across in the last three years of building marketing emails is that mobile responsive versions of emails are treated as an after-thought. Often a highly talented designer draws up a beautiful desktop version and then it is left to the interactive developer to whittle away at the