David Walsh Tutorials
![Preventing Side Effects in JavaScript]()
Preventing Side Effects in JavaScript
JavaScript is very dynamic these days but I still see a lot of legacy code, whether it be for optimal backward compatibility or simply that the code hasn't been maintained. One of the practices that makes me cringe is coding that creates unwanted side effects. What's a side...
![Access Mac Camera by Command Line]()
Access Mac Camera by Command Line
With all of my recent command line tutorials, I've really gotten excited about the shell's simplicity and realized the true power of using the underlying technology of pretty UIs. Since I work from home, I spend a lot of time on video calls, so when...
![Open Files from Command Line on OS X]()
Open Files from Command Line on OS X
I'm as much of a fan of application UIs as anyone else but I'm finding myself working more and more from the command line lately. Much of that is becoming obsessed with media manipulation but I'm forcing myself to use less UIs so that I...
![Get Stock Quotes From Command Line]()
Get Stock Quotes From Command Line
When I conned my way into my first professional programming gig, I didn't really think much about money -- just that I was getting my foot in the door. But as my career has gone on, I've been more aware of money, investing, and retirement. I've recently...
![Geolocation API]()
Geolocation API
One interesting aspect of web development is geolocation; where is your user viewing your website from? You can base your language locale on that data or show certain products in your store based on the user's location. Let's examine how you can...
![Create an Image Preview from a Video]()
Create an Image Preview from a Video
Visuals are everything when it comes to media. When I'm trying to decide whether to watch a video on Netflix, it would be awesome to see a trailer of some kind, but alas that isn't available. When I'm looking to download a video on my computer...
![New: Webdesigner News!]()
New: Webdesigner News!
A new and exciting website has recently been launched for web designers and developers. You likely spend hours every morning browsing through hundreds of posts on your RSS feeds, hoping to stumble across relevant stories. Webdesigner News was built to provide web designers and developers with...
![Merge GIFs with gifsicle]()
Merge GIFs with gifsicle
Creating a GIF from a video is fairly simple at this point, as I pointed out in Convert Video to GIF or GIF to Video, but working with multiple GIFs is something many people would like to do. The top GIF manipulation library for years has been
![Optimize GIFs]()
Optimize GIFs
I've written a lot about converting different media types lately, especially GIFs, including Convert Video to GIF or GIF to Video, Detect if a GIF is Animated, and Get the First Frame of an Animated GIF with ImageMagick, but whether it's ImageMagick or ffmpeg doing the work, GIFs do not always...
![fetch API]()
fetch API
One of the worst kept secrets about AJAX on the web is that the underlying API for it,
XMLHttpRequest, wasn't really made for what we've been using it for. We've done well to create elegant APIs around XHR but we know we can do better. Our effort to...








