David Walsh Blog

  • By

    How to Specify User Agent with cURL

    Over the years I've shared how to perform a number of actions with cURL: how to send POST data, how to retrieve headers, follow redirects, check GZIP encoding, and more. Another useful cURL directive is sending the user agent, as some...

  • By
    View Mac Calendar from Command Line

    As someone that loves using UI tools, I do pride myself in learning how to accomplish the same feats from command line. Don't believe me? Check out my Command Line tutorials section -- I guarantee you'll learn quite a bit. Recently I learned that you...

  • By
    Lazy Object Initialization

    The Firefox DevTools underlying code, which is written with JavaScript and HTML, is a complex application. Due to the complexity and amount of work going on, the DevTools team has done everything they can to load as little as possible. Furthermore the team has...

  • By
    Land Your Dream Job with Vettery

    Whether you're an experienced pro or someone new to the industry, finding a great job can be a scary, stressful process. Engineers and designers get inundated with Hacker Rank tests, portfolio requests, and a variety of other queries. Vettery improves the experience for free...

  • By
    Override window.alert

    For years the only bit of feedback web developers could get was via alert("{str}") calls. These days we have the web console but, in rare cases, we don't have a console and alert calls are our only window into a value at a given time.One problem...

  • By
    Awesome Forward & Reverse Geocoding API: positionstack

    One awesome web functionality we take for granted is geolocation. Based on geolocation data, we can get someone to their destination, provide them suggestions based on their location, and so on. One downside of native geolocation, especially in the browser, is that it's limited in both...

  • By
    Git Branch Autocompletion

    Naming git branches is something most of us have down to a science. My branch naming pattern is usually {issue number}-short-feature-description, though many developers prefer to lead with the description and end with the issue.Regardless of the pattern you use, having a feature like autocomplete...

  • By
    IP Geolocation and Threat Intelligence API: ipdata

    An IP address is a simple, numeric piece of information that gets passed to a server, but that IP address can provide a wealth of information with ipdata. With ipdata you can learn user location, language, currency, and much more!Quick Hitsipdata is an...

  • By
    Fantastic Flight API with aviationstack

    I didn't fly until I was 25 years of age -- I was hopeless in knowing I had to be there early, the process of security, and the whole gate structure. Now that I've flown dozens of times for Mozilla, I feel much more comfortable...

  • By
    Duplicated Argument Names

    Oftentimes we override or monkey patch functions and, in many cases, there are arguments we don't care too much about. A common practice for those arguments is using _ for argument names -- it's a generally accepted and known practice for "this isn't important".

Popular Features

  • By
    Interview with a Pornhub Web Developer

    Regardless of your stance on pornography, it would be impossible to deny the massive impact the adult website industry has had on pushing the web forward. From pushing the browser's video limits to pushing ads through WebSocket so ad blockers don't detect them, you have...

  • By
    Welcome to My New Office

    My first professional web development was at a small print shop where I sat in a windowless cubical all day. I suffered that boxed in environment for almost five years before I was able to find a remote job where I worked from home. The first...

  • By
    How to Create a RetroPie on Raspberry Pi – Graphical Guide

    Today we get to play amazing games on our super powered game consoles, PCs, VR headsets, and even mobile devices.  While I enjoy playing new games these days, I do long for the retro gaming systems I had when I was a kid: the original Nintendo...

  • By
    Conquering Impostor Syndrome

    Two years ago I documented my struggles with Imposter Syndrome and the response was immense.  I received messages of support and commiseration from new web developers, veteran engineers, and even persons of all experience levels in other professions.  I've even caught myself reading the post...

  • By
    Being a Dev Dad

    I get asked loads of questions every day but I'm always surprised that they're rarely questions about code or even tech -- many of the questions I get are more about non-dev stuff like what my office is like, what software I use, and oftentimes...

  • By
    JavaScript Promise API

    While synchronous code is easier to follow and debug, async is generally better for performance and flexibility. Why "hold up the show" when you can trigger numerous requests at once and then handle them when each is ready?  Promises are becoming a big part of the JavaScript world...

  • By
    7 Essential JavaScript Functions

    I remember the early days of JavaScript where you needed a simple function for just about everything because the browser vendors implemented features differently, and not just edge features, basic features, like addEventListener and attachEvent.  Times have changed but there are still a few functions each developer should...