Articles tagged #javascript

Migrating from Gatsby to Astro
This article discuss the reason why I wanted to migrate this blog from Gatsby to Astro and the process I followed to do it. Plus a bunch of interesting and quirky bugs that I had to troubleshoot and fix along the way.

JavaScript, low-level or AI?
The software industry sees an interesting tension between generative AI capturing the software lifecycle and low-level languages aiming for better performance. As developers we must understand these trends and find a strategy. Learn one or both?

Invite-only microsites with Next.js and AirTable
Learn how to create a private, invite-only website using Next.js, AirTable, custom React hooks, and Vercel deploy. The post covers backend APIs in Next.js, data storage with AirTable, validating access with invite codes, collecting user input, and deploying the final app.

Create resources conditionally with CDK
This post explains how to conditionally create resources in AWS CDK using CfnCondition. It provides a practical example of creating an S3 bucket based on an SSM parameter value. The post covers defining a condition, attaching it to a low-level CDK construct, and importing the conditionally created resource.

Provision an Ubuntu-based EC2 instance with CDK
This post explains how to use CDK to provision Ubuntu EC2 instances on AWS. It covers finding the right AMI, adding security groups, using init scripts, installing AWS utilities, and more.

Middy 1.0.0 is here
The middleware framework Middy reached version 1.0, bringing middleware capabilities to AWS Lambda. This allows cleaner handler code by extracting cross-cutting concerns into reusable middleware.

Lean NPM packages
Learn how to configure NPM packages to publish only the files needed by users, avoiding bloating node_modules folders.

Fastify and Preact for quick web app prototyping
This article shows how to quickly build web app prototypes using Fastify for the backend API and Preact for the frontend UI. It also covers how to dockerize the app for easy sharing. Key points are the plugin architecture of Fastify, the lightweight nature of Preact, and the use of htm for defining UI without transpilation.

JavaScript iterator patterns
This article explores different ways to create iterators and iterable values in Javascript for dynamic sequence generation, specifically using functions, iterators, iterables and generators. It provides code examples for implementing the Fibonacci sequence with each approach.

Emerging JavaScript pattern: multiple return values
This article explores how to simulate multiple return values in JavaScript using arrays and objects. It covers use cases like React Hooks and async/await error handling. The pattern enables elegant APIs but has performance implications.

My Serverless talk at Shift conference in Split
Luciano Mammino recounts his experience speaking at the Shift conference in Split, Croatia about Serverless architecture and its pros and cons. He provides links to his talk video, slides, and a Twitter moment.

My Universal JavaScript Web Applications talk at Codemotion Rome 2017
The author gave a talk on building universal JavaScript web apps at Codemotion Rome 2017. He updated his Judo Heroes demo to v2 with React 15.4, React Router 4, Webpack 2, and Express 5. The talk got positive feedback from the audience. Slides and video are linked.

Unshorten (expand) short URLs with Node.js
This article explains how short URLs work and provides code examples to expand them in Node.js using request module or tall library. It covers basics of URL redirection, shows how to disable auto-redirect in request module, and introduces tall - a promise-based Node.js library to unshorten URLs.

My Serverless & AWS Lambda talk at Node.js Dublin January 2017
This post summarizes a talk about building a serverless architecture on AWS Lambda using the Serverless framework. It covers topics like authentication, authorization, testing, CI/CD, and cost monitoring. The presenters share lessons learned from real-world experience building a production serverless application.

My Universal JavaScript Web Applications talk at Codemotion Milan 2016
This blog post summarizes a talk about building a Universal JavaScript application with React given at Codemotion Milan 2016. It includes commentary for each slide, photos from Twitter, and a video recording. The post explains what Universal JavaScript is, its benefits, challenges, and walks through demo code to add server-side rendering and routing to a React app.

How to crack a JWT token: two articles about distributed computing, ZeroMQ & Node.js
This blog post explains how to build a distributed application using Node.js and ZeroMQ that cracks JWT tokens. It provides a step-by-step guide on implementing the application and links to two in-depth articles on RisingStack that cover the theory and coding details.

Two Interviews about Node.js, JavaScript and being a book author
Luciano Mammino recently participated in two interviews discussing his work with Node.js and JavaScript as well as his experience as an author writing books about Node.js design patterns.

To promise or to callback? That is the question...
We explore two approaches to support both callbacks and promises in async JavaScript modules: 1) promisify callback functions, 2) make callback optional and return promise. The second allows flexible use of callbacks or promises.

Introducing Gulp cozy - Manage your gulp tasks in a cozier way
Gulp-cozy is an experimental NPM package that allows you to separate Gulp tasks into small modules inside a dedicated folder, making them easier to maintain. It brings Node.js modularity principles into your Gulp workflow.

Gulp and FTP: update a website "on the fly"
This tutorial explains how to use Gulp and vinyl-ftp to watch local files for changes and automatically upload updates to a website via FTP. Useful for quickly editing legacy sites only accessible through FTP.

Versioning and deploying a static website with Git, Flightplan and Nginx
This blog post provides a beginner's guide to managing versioning and deployment of static websites using Git for version control, Flightplan.js for automated deployment, and Nginx for serving. It outlines a simple yet complete workflow for implementing continuous delivery and rollbacks.

Introducing flickr-set-get a command line app to download photos
The flickr-set-get command line app makes it easy to download entire Flickr galleries. It uses the Flickr API and Node.js asynchronous programming to download photos in parallel. The post explains the motivation behind the project, the technologies used, and how the asynchronous code works.

Integrating Twig.js and BazingaJsTranslationBundle
The post explains how to integrate twig.js with BazingaJsTranslationBundle to handle translations consistently between PHP and JavaScript. It shows how to build a custom Twig extension to translate strings with the Bazinga Translator object and handle differences in parameter formatting.