Code Buckets

Buckets of code

Reliable console.log output for JavaScript ES6 Map and Set

Problem Here’s something that has tripped me up a few times now – when you console.log out the contents of a Set or Map in ES6 the it looks empty which isn’t true. Example Output The console tells me it…

Npm link set up advice and troubleshooting

I’ve been fighting against npm link recently and I’ve a funny feeling I’m not the only one. I don’t find the documentation particularly useful, the way it works seems opaque bordering on mystical and the cli output is in cryptic…

Npm Package for Realistic Random Letter Generation

Moving on from my recent post about a realistic way to generate random letters – I’ve now published the work as an npm package. It’s largely an exercise in publishing npm packages but it I still like the utility and…

Helpful Starter Projects for React and Node

Here are some simple starter projects for Node and React I’m using. I’ve got a bit sick of using create-react-app and seeing a mountain of security vulnerabilities before I even start. The number of errors seems to range from 5…

Changing configuration when deploying to different environments: comparing Node and React

I’m getting into Node a bit more and I wanted to look at how you would swap config settings when deploying into different test and production environments. In this post I’m going to compare Node to React – not so…

Free Book: JavaScript Best Practice

A quick one. Most web developers can write JavaScript and I suspect it’s on most developer’s CVs somewhere. But it’s easy to write bad JavaScript and not so easy to write the good stuff. I guess it’s because JavaScript itself…