April 2023 Web App Development Update

Time Block Tasks I added a couple features to the Time Block Tasks app this month. You can now reorder tasks, quickly add new tasks, and and update special repeatable tasks. Reordering Tasks Figuring out how to reorder tasks was tricky. I had no idea how I’d end up doing it. Giving database records a … Read more

Develop WordPress Locally with Docker Tutorial

First, clone the git repo that I created (https://github.com/davidrichied/docker-template-php80-mysql8-nginx-ssl-wordpress). It has all the stuff. git clone https://github.com/davidrichied/docker-template-php80-mysql8-nginx-ssl-wordpress.git mywp Build the docker container cd mywp docker compose up -d –build Next, you’ll have to install WordPress. I used brew to install wp-cli. Then, I just ran the following commands. cd ~/Code/mywp/wordpress/public wp core download –locale=en_US Next … Read more

JavaScript Code Reading

The parse function parses a query string from a URL. Here’s a quick preview of the concepts. Functions Objects Array destructuring function parse(query, options) { options = Object.assign({ decode: true, sort: true, arrayFormat: ‘none’, arrayFormatSeparator: ‘,’, parseNumbers: false, parseBooleans: false }, options); validateArrayFormatSeparator(options.arrayFormatSeparator); const formatter = parserForArrayFormat(options); // Create an object with no prototype const … Read more

Docker WordPress

version: “2.1” services: db: image: mysql:5.7 volumes: – db_data:/var/lib/mysql restart: always environment: MYSQL_ROOT_PASSWORD: somewordpress MYSQL_DATABASE: wordpress MYSQL_USER: wordpress MYSQL_PASSWORD: wordpress wordpress: depends_on: – db image: wordpress:latest volumes: – ./:/var/www/html/wp-content ports: – “8000:80” restart: always environment: WORDPRESS_DB_HOST: db:3306 WORDPRESS_DB_USER: wordpress WORDPRESS_DB_PASSWORD: wordpress WORDPRESS_DB_NAME: wordpress volumes: db_data: {}

Understanding JavaScript Packages and Bundles

Writing your own JavaScript is pretty straightforward, but things get a little hairy when you first try to install an NPM package and use it in your JavaScript file. You see that you’re supposed to install it and then import it at the top of your JavaScript file, but you get errors about “require” not … Read more

What I Wish I Would’ve Done As a Beginner

I wish I would’ve focused more on the basics of programming. For example, I never really learned the basics of PHP or JavaScript arrays and objects, even though I got a good job and started a good career. I would always just copy and paste. Once you get a full-time job, it’s more difficult to … Read more