David Walsh

7 Useful JavaScript Tricks

Just like every other programming language, JavaScript has dozens of tricks to accomplish both easy and difficult tasks. Some tricks are widely known while others are enough to blow your mind. Let’s have a look at seven JavaScript tricks you can start using today! Get Unique Values of an Array Getting an array of unique […]

The post 7 Useful JavaScript Tricks appeared first on David Walsh Blog.

AI-Based Video Preview from Cloudinary (Sponsored)

The early days of video on the web weren’t great. We started with custom browser plugins and codecs, then moved to Flash, and eventually we found our way HTML <video>. Once we solved the technology problem, we started using more video for content and advertising. The next problem to solve became conversion; i.e. getting people […]

The post AI-Based Video Preview from Cloudinary (Sponsored) appeared first on David Walsh Blog.

[video src="https://res.cloudinary.com/david-wash-blog/video/upload/e_preview:duration_5/e_deshake:32/v1553976846/arshavin-4-goals.mp4" poster="https://res.cloudinary.com/david-wash-blog/video/upload/e_preview:duration_5/e_deshake:32/v1553976846/arshavin-4-goals.mp4"]

Set Branch Alias with Git

Version control systems can be difficult to use, especially when you don’t use a UI app. Just think about main branch or revision names: svn uses “trunk”, git uses “master”, and mercurial (hg) uses “tip”. I need to switch between mercurial and git frequently, so I end up reversing command and branch names constantly. To […]

The post Set Branch Alias with Git appeared first on David Walsh Blog.

Free Programming Courses from Harvard, MIT, Microsoft and more (Sponsored)

Did you know that you can learn programming online from institutions like Harvard, MIT and Microsoft on edX.org? The nonprofit site offers 2000 online courses from 140 institutions worldwide. Courses are free to try. EdX has over 200 courses from Microsoft alone, including an 11 course program for Front End Web Development, described as follows: […]

The post Free Programming Courses from Harvard, MIT, Microsoft and more (Sponsored) appeared first on David Walsh Blog.

Adding Search to Your Site with JavaScript

Static website generators like Gatsby and Jekyll are popular because they allow the creation of complex, templated pages that can be hosted anywhere. But the awesome simplicity of website generators is also limiting. Search is particularly hard. How do you allow users to search when you have no server functions and no database? With JavaScript! […]

The post Adding Search to Your Site with JavaScript appeared first on David Walsh Blog.

I Don’t Hate Arrow Functions

TL;DR Arrow functions are fine for certain usages, but they have so many variations that they need to be carefully controlled to not break down the readability of the code. While arrow functions clearly have a ubiquitous community consensus (though not unanimous support!), it turns out there’s a wide variety of opinions on what makes […]

The post I Don’t Hate Arrow Functions appeared first on David Walsh Blog.