Javascript Blog Posts

Programming tutorials, thoughts on software development, and the occasional off-topic post.

  1. Premature Optimization: Code First, Optimize Later

    Premature optimization may be hurting the quality of your work. Focus on writing legible code first; optimize it later if you need to.

  2. React, Iframes, and a Back-Navigation Bug

    If an iframe re-renders in React, it can interfere with back navigation in your browser. You can fix this by unmounting the iframe.

  3. Be Careful with Async Functions that Return Booleans

    Suppose an async function returns a boolean. What happens if you check the return value without awaiting it?

  4. JavaScript Promises: Practical Use Cases and Examples

    Promises are a powerful tool for writing asynchronous code in JavaScript. Here are a few interesting use cases.

  5. Optimizing Images for the Web with WebP and Lazy Loading

    Images make the web a more beautiful place, but this sometimes comes at a price. Learn how to optimize images for the web using the WebP image format and lazy loading with JavaScript.

  6. Add Comments to Your Jekyll Blog with the GitHub Issues API

    Learn how to add comments to your Jekyll blog. We'll use the GitHub issues API as our comment system and lazy load it for a better user experience.

  7. A Simple Webpack Config

    Webpack is one of the most popular code bundlers available. Here's a simple webpack config to bundle your JavaScript.

  8. Creating a Responsive Navbar Without Bootstrap

    Want to create a navbar that works on mobile and desktop? Ditch the frameworks—in this tutorial, we'll create a responsive navbar using HTML, CSS, and JS.

  9. Is JavaScript Pass by Reference?

    Developers are often taught that JavaScript passes objects by reference. But this isn't true. Here's why JavaScript is actually a pass by value language.

  10. How to Add a Copy-to-Clipboard Button to Jekyll

    Add a copy-to-clipboard button to your Jekyll blog with a simple include and a few lines of JavaScript.