RSSAmplifier

Blog

Inextenso

The feed of updates to Inextenso

inextenso.devRSS feed ↗25 posts

Latest posts

Integrate DeepEval with SAP AI Core

DeepEval is an open-source framework designed to evaluate Large Language Models (LLMs) across various dimensions. By integrating DeepEval with SAP AI Core , you can seamlessly assess the performance of your deployed LLM models within the SAP ecosystem. In this post I will show you how to set up DeepEval if you access your LLMs via SAP AI Core. Prerequisites An SAP AI Core instance with access to…

Notes on Concurrency and Parallelism in Python

I recently developed a Python service that relied heavily on concurrency and parallelism to handle multiple tasks simultaneously. This experience highlighted the importance of understanding the differences between these two concepts and how they can be effectively implemented in Python. Below you find some of my research notes and thoughts on the topic. The architecture Before jumping into the…

Deploy SAP Application Router on Kyma

In this post we’ll take a look at how to deploy the SAP Application Router on Kyma. We’ll see two different flavors of doing so and the differences between them. SAP Application Router The SAP Application Router is a lightweight HTTP server that acts as a reverse proxy and forwards requests to the appropriate backend services. It acts as a single entry point to your business application. It’s…

What defines a good Pull Request?

As we work in bigger and bigger teams/projects is essential that we put more time and effort into crafting any PR . PRs serve as a way for team members to review, discuss, and eventually merge changes into a codebase. The below list is what I’d consider a “ reviewable PR ” . The List The below list might differ if the proposed changes are meant to address documentation or non-code related topic.…

How to generate generic DTOs with NestJs and Swagger

A DTO (Data Transfer Object) is a design pattern used to encapsulate and transfer data between different layers or components of an application. The primary purpose of a DTO is to provide a standardised and efficient way of transmitting data without exposing the underlying implementation details. A DTO is essentially a simple container for data that is meant to be passed around between different…

Distributed Locks with Postgres (Advisory Locks) and Knex.js

📝 Context: Node.js For many productive use cases, on top of scaling, you might want to have multiple running instances of your service at the same time. Suddenly you find yourself in a distributed environment and this require different handling in some situations. For example: What if we want to prevent users from making more than one simultaneous request to a shared resource? Essentially all our…

VSCode Live Debugging in CloudFoundry Environment - Node.js version

Sometime being able to debug and step through your code as your application is running in production, is essential to figure out what’s wrong with your code. There are plenty of articles how to do so with Node.js and VSCode but there’s a small gotcha when working in CloudFondry. Tech Stack I’ve personally applied the following techniques to a Node.js Microservice written in NestJS . Node Version:…

Multi-tenancy (Schema separated) with NestJS, Knex and PostgreSQL in SAP BTP

In many Software-as-a-Service offerings, choosing between single-tenant and multi-tenant model is an important decision that has repercussion on many aspects such as costs, performance, scalability and development complexity. If you are going with a multi-tenant model one essential decision you’ll have to make is how to partition data for each tenant of your system. Tenant isolation, performance,…

Speed up NestJS test executions with Jest

No one likes (slow) tests… Right? In this blog post I will show you how you can improve your tests speed execution and give you some pointers where to look if you want to dive deeper and squeeze every ounce of performance. The following advices are being applied to Unit Tests . They could also be applied to E2E or integration of course, but sometimes your project setup might require too specific…

7 Great Books for Software Engineers

As a Software Engineer you are likely to spend a lot of time (aside from meetings) reading. From documentation, blog articles, newsletter, Twitter and tutorials the internet is - undoubtedly - a source of knowledge where you can find anything. All the information that you acquire by consuming those resources are vary valuable in your day-to-day job but I think they lack a certain “ depth” that…

Send emails and attachments with Amazon SES and NextJS

In this blog post I will show you how can you leverage Amazon SES and its Typescript SDK ( @aws-sdk/client-ses ) to send emails and attachments in your NextJS Serverless functions. Use case In one of my recent projects I had to send a daily CSV report of the sales orders via email. I’m using a simple CRON Job for this (via GitHub Actions) that hits my endpoint on a daily basis. The endpoint is a…

The case for Micro Frontends: Angular version

This article is divided in 2 parts: Part 1: Micro Frontend from a high-level view Part 2: Implement Micro Frontend in Angular As your tackling bigger and bigger problems you will face the reality that you application needs to adapt to the ever-growing complexity and size. It’s not only the application that grows, but also the team alongside it. Both requires ways of dealing with complexity and…

Load testing for a Node.js app with K6

No matter how well you build your application, at some point it will fail. You don’t know when, how or why but it will. How does your application fare in a real world scenario when your users start hitting your server with requests? Our app should be prepared for it. We need to be able to simulate and test system’s behaviors under both normal and at peak conditions. Enter load testing . In this…

Run PostgreSQL in Docker for local development in under 5 minutes

I recently had to spin up a PostgreSQL database for a project I’m currently working on. In this post I’ll show you how to quickly do the same. Install Docker Download docker here . Enter Docker Compose We’re going to use Docker compose to set up everything. It’s totally fine to run Postgres with a single Docker command but in this case I’d like to add PgAdmin as an admin tool and God only knows…

Bank OCR

Coding katas are fun to do. It’s also a good way to train your problem-solving skills and prepare for technical interviews. You work for a bank, which has recently purchased an ingenious machine to assist in reading letters and faxes sent in by branch offices. The machine scans the paper documents, and produces a file with a number of entries which each look like this: _ _ _ _ _ _ _ | _| _||_||_…

Deploy Create-React-App with Cloudfoundry

In this short article I’ll explain how to publish a Single Page Application built with CRA to Cloudfoundry . The following set-up assumes that your Backend is separated from your Frontend and deployed in another container. Prerequisites CF CLI - v7 What do we need? First of all, we need to understand what CRA ouputs when we run the build command ( npm run build ): my-react-app/ build/ ...…

Transitioning from React to Vue.js: my 5 struggles

I’ve recently started working on a Vue.js codebase. It’s a fairly complex financial kind of SPA . Coming from React , with little experience with Vue.js , I had actually a really good first few weeks. I was very productive and the framework at the time, felt very intuitive and developer friendly. Everything was 👌 . But… When I started to refactor some part of the codebase and getting into more…

Demystifying Symbols in Javascript

The other day I was reading the source code of a LRU Cache implementation in Javascript and I noticed that the author was defining some variables using ES6 Symbols : const LENGTH_CALCULATOR = Symbol ( 'lengthCalculator' ) const ALLOW_STALE = Symbol ( 'allowStale' ) const MAX_AGE = Symbol ( 'maxAge' ) const DISPOSE = Symbol ( 'dispose' ) const NO_DISPOSE_ON_SET = Symbol ( 'noDisposeOnSet' ) I’ve…

How to create a rating system for your blog using TypeScript and Lambdas

In this article I’ll try to show you how to deploy a Lambda function using @Zeit platform. We’re going to create a simple rating system for this very blog. Here’s how it will work: Users submit their feedback by selecting the desired rating at the bottom of the page. A POST request will be sent to our endpoint with the required payload. The Lambda function will be triggered and save the data to…

How to use Puppeteer with Docker to test uploading a file to a web form

Puppeteer is a Node.js library built by the Chrome DevTools team that allows you to control headless Chrome . You can use Puppeteer for many things like web scraping, pre-rendering SPA , taking screenshots, perform end-to-end tests etc. In this article I will show you how to test a web form that requires a file to be uploaded. I had to write something similar recently at work so I thought to…

Few words about Object Oriented Programming

When you start learning how to program you often hear or read that duplicating code is very, very bad. You should always strive to reuse logic and functionality. The DRY principle. Code should be clean, maintainable, easy to read and easily extendable. Easier said than done right? What’s the real problem? Complexity. We deal with it every day. We need a set of tools and mental models that will…

My 5 Hot-Picks projects of the month

1. Nexe https://github.com/nexe/nexe [ Tool , JS ] Nexe is a command-line utility that compiles your Node.js application into a single executable file. 2. Perflink https://github.com/lukejacksonn/perflink [ Tool , JS ] JavaScript performance benchmarks that you can share via URL . It is a frontend only static web app with no build step and is hosted on Github pages. 3. P-lazy…

Deploy static assets to AWS S3 with NextJS

Requirements Node >= 8 AWS Account S3 Bucket If you need to speed up your content delivery and improve your site performance the term CDN (Content Delivery Network) will most likely show up in your Google searches. What is it a CDN ? A content delivery network or content distribution network ( CDN ) is a geographically distributed network of proxy servers and their data centers. The goal is to…

Progressively Typing a Function in TypeScript

When I started with TypeScript I’ve found very easy and intuitive the whole type system for the majority of the things that I wanted to accomplished. It was a good feeling. Finally I was able to have some confidence that my code would not break at runtime and the clever Intellisense in the IDE was helping my productivity. What does it feel like then? Take a look at this little snippet of code.…

Story of a connection

You type mysite.com and… Ah, one of the classic interview questions. I really like this one. Can’t really say the same thing about “ What’s the output of the following statement in JS ” 0.1 + 0.2 === 0.3 Oh well, back to our question. Shall we? Here we go… Our user has pressed the enter button and first the computer needs to look up the IP (Internet Protocol) of the address (mysite.com). The…