How to Extend Prototypes with JavaScript / / No Comments One of the ideological sticking points of the first JavaScript framework was was extending prototypes vs. wrapping functions. Frameworks like MooTools and Prototype extended prototypes while jQuery and other smaller frameworks did not. Each had their benefits, but ultimately all these years later I still believe that the ability to extend native prototypes is a massive feature of JavaScript. Let’s check out how easy it is to empower every instance of a primitive by extending prototypes! Every JavaScript native, like Number, String, Array, Object, etc. has a prototype. Every method on a prototype is inherited by every instance of that object. For example, we can provide every `Array... more → Posted in: JavaScript Tagged with: Extend, JavaScript, Prototypes
Mapping Mariupol’s Destruction / / No Comments A Timeline of Mariupol’s Destruction is an animated map which visualizes the damage caused to buildings by the Russian attacks on the Ukrainian city of Mariupol. The map shows damage caused by Russian bombing between March 5th and July 29th of this year. The city of Mariupol was under siege from Russia from 25th February until 17th May 2022. In March the Red Cross declared the siege a Maps Mania… more → Posted in: Interactive Maps Tagged with: Destruction, Mapping, Mariupol's
Quick LiquidJS + Eleventy Example – All Posts / / No Comments So, on a whim today I decided to add a page to my blog to display every single post, separated by year. This was not meant to be used by anyone (hence me not linking to it in the nav), but something I’ve wanted around for a while. I’ve got a nice search form here, but sometimes I want to search for something I blogged a few weeks ago and having a simple list of posts would be useful. I didn’t want to build "proper" pagination, just one giant list in on an HTML page. That’s not the best UX but as I’m building this for me, I approve. I thought it would be a quick little script, but as I built it, I ran into a few interesting... more → Posted in: JavaScript Tagged with: Eleventy, example, LiquidJS, posts, Quick
Top 5 Moving Maps / / No Comments Day 23 of the #30DayMapChallenge calls for participants to create a map around the theme of movement. This year the vast majority of the maps I’ve seen posted on social media in response to the #30DayMapChallenge have been static maps. I’m hoping that the theme of ‘movement’ might inspire a few more participants to venture into creating interactive maps on the 23rd. Static maps can certainly Maps Mania… more → Posted in: Interactive Maps Tagged with: maps, Moving
Locate Empty Directories from Command Line / / No Comments As a software engineer that lives too much of his life on a computer, I like keeping my machine as clean as possible. I don’t keep rogue downloaded files and removes apps when I don’t need them. Part of keeping a clean, performant system is removing empty directories. To identify empty directories, I use the following command: find . -type d --empty To remove empty directories, we can add a --delete flag: find . -type d --empty --delete Keeping a clean machine is easy when you know the tools that can help you. find makes identifying and eliminating easy, so don’t be afraid to use it! The post Locate Empty Directories from Command Line appeared first on David Walsh Blog. David... more → Posted in: JavaScript Tagged with: Command, Directories, Empty, from, line, locate
See A Satellite Tonight / / No Comments James Darpinian’s See a Satellite Tonight can tell you at what time tonight satellites will fly over your house. It can also show you exactly where to look in the night sky if you want to see a satellite passing overhead. Share your location with See a Satellite Tonight and you can view an interactive 3D Cesium Earth map, showing your current location highlighted on the globe. The globe also Maps Mania… more → Posted in: Interactive Maps Tagged with: Satellite, tonight
Adding Responsive Images with Cloudinary / / No Comments In case you can’t tell, I’ve been enjoying playing around with Cloudinary these last few weeks. As part of my research, I recently looked around in the docs for things I wanted to dig deeper into. One of the features I thought was fascinating was Cloudinary’s remote image support. What does that mean? Raymond Camden… more → Posted in: JavaScript Tagged with: Adding, Cloudinary, images, Responsive
Mapping A Rainy Day in Paris / / No Comments For day 2 of the #30DayMapChallenge I’ve created an animated Map of A Rainy Day in Paris. Obviously this one isn’t a map but it does use the Leaflet mapping library, GeoJSON and uses animated polylines. What you can see in my ‘map’ is a partial recreation of the painting Paris Street; Rainy Day by Gustave Caillebotte. You can see the painting itself on this instance of my Leaflet-IIIF-GeoJSON Maps Mania… more → Posted in: Interactive Maps Tagged with: Mapping, Paris, Rainy