Articles

Splendid Layouts in here!

Published on:

Happy Chinese New Year (if you’re celebrating it! 🍊).

I’ve been hard at work over the past week (even today!) to bring Splendid Layouts to you, as promised in my last email.

Splendid Layouts

Published on:

If everything has gone according to plan, I will be launching the complete version of CSS Layout Patterns today.

Unfortunately, things didn't go according to plan.

Though I must say it didn't go according to the plan in a good way.

My CSS of Late

Published on:

As I transition from a "Web Developer" into someone who just wants to build applications, I'm realizing that I don't like to dig as deep into the fundamentals of HTML, CSS, and JavaScript anymore.

Instead, I just want to combine them in ways that will make my next job — building stuff — easier.

3 Techniques to learn JavaScript effectively

Published on:

If you know how to study JavaScript effectively, you will be able to master it within months. If you don’t, you’ll take way longer than necessary.

Today, I’m going to reveal three techniques that I have used to help myself and many others master JavaScript quickly.

Enough of the homogenous and soulless content all around the internet

Published on:

I think we have reached an interesting predicament in the world today.

More and more people have begun to write for the sake of business, opportunities, and fame. Blogs and content have largely become soulless and money-oriented machines.

It has reached a point where the world has become a giant group-think. Everywhere you go on Google, you see the same content, repeated across the top 10 or even the top 20 pages — everyone echoes off others, rarely contributing original thought into the ecosystem.

The easiest way to get and set CSS Variables in JavaScript

Published on:

CSS Variables have become super popular for many reasons. One of them these reasons is — you can now manipulate CSS easily with JavaScript.

In this article, we'll go through how to get and set CSS variables using the methods Vanilla JavaScript provides us with, then we'll go through how to make the process easier with simple helper functions.

December 2023

Published on:

2023 year was a horrible year for me.

The easiest way to get __dirname in Node with ES Modules

Published on:

Getting the directory name (or short for dirname) is extremely simple in Node prior to ES Modules (ESM).

All we had to do was use the __dirname global variable.

console.log(__dirname) // This will show the directory

Unfortunately, __dirname is not supported in ES Modules. So if we want __dirname, we need to use a rather round-about way to retrieve it.

The easiest way to use SVGs in an Astro or Svelte app

Published on:

SVG is one of the most important elements in a website or web application because it provides us with scalable graphics.

They are usually used for two things:

  1. Icons from icon sets
  2. Custom graphics

Today I'm going to show you how the SVG utility from Splendid UI works, and why it's the easiest way to use SVG to load both icons and custom graphics.

Iterating over objects in JavaScript

Published on: , Updated on:

Once in a while, you may need to loop over objects in JavaScript. Before ES6, the best way to do this is with the for...in loop.

Unfortunately, the for...in loop iterates over properties in the Prototype chain as well, so when you use this loop, you need to check if the property belongs to the object with hasOwnProperty.

Easy way to parse JSON with JavaScript

Published on:

When you use JSON.parse to parse JSON, you almost always need to make sure you pass in a JSON value, so you will end up having to use a try/catch block most of the time.

Updates for Understanding Async JS and Rest APIs

Published on:

I spent two weeks reworking the contents of Understanding Asynchronous JavaScript and Rest APIs and I'm happy to announce the changes I have made.

This course is now much easier to understand (and also much more succinct) compared to before. From my experience, it should now be able to resolve most of the confusion you may face around the topic of Asynchronous JavaScript and Rest APIs.

zlFetch now supports FormData!

Published on:

"Now" is grossly inaccurate because zlFetch has supported Form Data since v5.0 (since April) and we’re already at v6.0 🙃.