David Walsh Blog - RSS Feed

JavaScript, HTML5, AJAX, PHP, CSS, and ∞.

Latest articles

Amazing Text Editing Experiences with UltraEdit (Sponsored)

There’s a common saying that adults spend more time with coworkers than family; for us software engineers, we spend more time with our text editor than our families. And why shouldn’t we? They’re our main tool to do a variety of things, and as these editors evolve, they’re capable of doing even more. UltraEdit, a paid text editor, has been around for...

More Awesome Git Aliases

In the last article in this series, Awesome Git Aliases, we took a look at some awesome aliases for Git. However, the true power of Git aliases comes from writing custom scripts. These allow you to build Git commands that can do anything you can imagine. In this article, I’ll show you how you can create script aliases with Git. We’re going to...

Immediately Executing setInterval with JavaScript

Employing setInterval for condition polling has really been useful over the years. Whether polling on the client or server sides, being reactive to specific conditions helps to improve user experience. One task I recently needed to complete required that my setInterval immediately execute and then continue executing. The conventional and best...

How to Flatten git Commits

One of my least favorite tasks as a software engineer is resolving merge conflicts. A simple rebase is a frequent occurrence but the rare massive conflict is inevitable when many engineers work in a single codebase. One thing that helps me deal with large rebases with many merge conflicts is flattening a branch’s commits before fixing merge conflicts....

JavaScript String replaceAll

Replacing a substring of text within a larger string has always been misleading in JavaScript. I wrote Replace All Occurrences of a String in JavaScript years ago and it’s still one of my most read articles. The confusion lies in that replace only replaces the first occurrence of a substring, not all occurrences. For example: 'yayayayayaya'.replace('ya',...

Froala: The Next Generation WYSIWYG Editor (Sponsored)

There are a number of utilities required to really power a content management system and its users. One of the most important utilities is a performant, feature-rich WYSIWYG editor. We’ve always had to choose between the two exiting editors, CKEditor and TinyMCE, but now we have Froala, a next generation WYSIWYG editor from Sencha. Quick...

Log a User Out from Command Line

Automation is a system administrator, support agent, and tech savvy person’s dream. Automating tasks via scripts remotely helps to get clients out of trouble or even the organization itself. Oftentimes big updates can require users log out. Logging a user out from command line is super easy on Macs! To log a user out of macOS with a confirmation...

navigator.clipboard API

Reading from and writing to the user’s clipboard can be both a very useful and dangerous capability. Used correctly and it’s a huge convenience to the user; used dubiously and the user could suffer catastrophic consequences. Imagine a wrong account number or wallet address being copied — yikes! This is why programmatic copy and pasting needs to be...

GraphQL Editor – The Journey from Initial Release to Version 5.0

From the very beginning of our adventure with GraphQL, we were impressed by how great its community is. The amount of content, libraries and great tools generated by GraphQL users amazed us from the very start. The more time we spent working with GraphQL the more things we saw that could be improved to make working with it easier and better. We also...

Array.prototype.at

Working with arrays is an essential skill in any programming language, especially JavaScript, as we continue to rely on external data APIs. JavaScript has added methods like find and `findIndex recently, but one syntax I love from languages like Python is retrieving values by negative indexes. When you want to get the value of the last item in...

Discover, share and read the best on the web

Follow RSS Feeds, Blogs, Podcasts, Twitter searches, Facebook pages, even Email Newsletters! Get unfiltered news feeds or filter them to your liking.

Get Inoreader
Inoreader - Follow RSS Feeds, Blogs, Podcasts, Twitter searches, Facebook pages, even Email Newsletters!