Explore the First Route Around the World / / No Comments On September 20 1519 five ships set out with 239 men from Sanlúcar de Barrameda in Spain. Their goal was to find a new route to the Moluccan Islands, in Indonesia. On September 6 1522 just one of those ships, the Victoria, landed back in Spain. It was the first ship to have circumnavigated the globe. Only 18 men returned to Spain on the Victoria. Many of the others died on the journey, Maps Mania… more → Posted in: Interactive Maps Tagged with: around, Explore, first, route, World
How to Internationalize Numbers with JavaScript / / No Comments Presenting numbers in a readable format takes many forms, from visual charts to simply adding punctuation. Those punctuation, however, are different based on internationalization. Some countries use , for decimal, while others use .. Worried about having to code for all this madness? Don’t — JavaScript provides a method do the hard work for you! The Number primitive has a toLocaleString method to do the basic formatting for you: const price = 16601.91; // Basic decimal format, no providing locale // Uses locale provided by browser since none defined price.toLocaleString(); // "16,601.91" // Provide a specific locale price.toLocaleString('de-DE'); // "16.601,91" // Formatting... more → Posted in: JavaScript Tagged with: Internationalize, JavaScript, numbers
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