The Way I Code (and have been coding for 30 years)
Start with good decomposition. Then use encapsulation to create good abstractions. That's how I code. That's how I was taught to code 30 years ago. And it's still how I code today.
Creativity, curiosity, and code
Start with good decomposition. Then use encapsulation to create good abstractions. That's how I code. That's how I was taught to code 30 years ago. And it's still how I code today.
I started trying to explain what I was doing and why, and as I did so I realised all the many, many things you have to understand for this process to make sense.
Come on a journey with me as I - a an experienced developer - dive into old WordPress theme code, find myself in an enormous tangle, and question my life choices.
If you're using a script that uses cookie authentication with the WordPress REST API then you may also need a nonce. Here's how to make this work!
Previous Tip: Don’t inline everything! This is a little naming convention that I find really helpful. If a variable is Boolean type, or if a function returns a Boolean type, then consider if you can name it with an “is” or “has” prefix (or somewhere in the name). Because in many cases, not doing this […]
I want to talk (again) about friction. Things that slow us down. How some friction is good, and some is bad.
I made a server-less Scrabble clone that saves data in URLs. This post explains why and how, including a primer on binary data representations, and a little JavaScript library to help do this using BigInts!
There is a balance to be found between "inlining" multiple expressions, and using temporary variables. You may also learn about short-circuit evaluation here!
Refactoring complex conditions to make them more readable and easier to work with.
You kinda have a relationship with code from your projects. You probably have feelings about it. As I've been thinking about code style, I've also been thinking about how it's important to build up trust in a code base.