# Federico Cargnelutti

Posts from 2008 - 2018

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Intercepting class method invocations using metaclass programming in Python

DevFeed: [Intercepting class method invocations using metaclass programming in Python](<https://devfeed.tech/articles/intercepting-class-method-invocations-using-metaclass-programming-in-python-20740.md>)

Original publisher: [Read original article](<https://blog.fedecarg.com/2018/10/08/intercepting-class-method-invocations-using-metaclass-programming-in-python/>)

Author: Federico

Published: 2018-10-08T19:52:00Z

Content type: tutorial

Language: en

Sources: [Federico Cargnelutti](<https://devfeed.tech/sources/federico-cargnelutti.md>)

Topics: [Python](<https://devfeed.tech/topics/python.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [Ruby](<https://devfeed.tech/topics/ruby.md>)

Tags: [class](<https://devfeed.tech/tags/class.md>), [examples](<https://devfeed.tech/tags/examples.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [implement](<https://devfeed.tech/tags/implement.md>), [programming](<https://devfeed.tech/tags/programming.md>), [python](<https://devfeed.tech/tags/python.md>), [ruby](<https://devfeed.tech/tags/ruby.md>)

### AI overview

A Python tutorial explains how metaclass programming can intercept class method invocations, comparing the approach with Ruby's method_missing and Python's __getattr__. It also notes that Python treats methods as properties rather than distinguishing them as Ruby does.

### Source excerpt

In Ruby, objects have a handy method called method_missing which allows one to handle method calls for methods that have not been defined. Most examples out there explain how to implement this in Python using __getattr__, however, none of them (honestly, none) explain how to intercept class method (@classmethod) invocations using __metaclass__. And this is [...]

## API Development Tips

DevFeed: [API Development Tips](<https://devfeed.tech/articles/api-development-tips-20739.md>)

Original publisher: [Read original article](<https://blog.fedecarg.com/2018/06/18/api-development-tips/>)

Author: Federico

Published: 2018-06-18T12:45:00Z

Content type: tutorial

Language: en

Sources: [Federico Cargnelutti](<https://devfeed.tech/sources/federico-cargnelutti.md>)

Topics: [API](<https://devfeed.tech/topics/api.md>), [Development](<https://devfeed.tech/topics/development.md>), [backend-development](<https://devfeed.tech/topics/backend-development.md>), [Server](<https://devfeed.tech/topics/server.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [development](<https://devfeed.tech/tags/development.md>), [errors](<https://devfeed.tech/tags/errors.md>), [external](<https://devfeed.tech/tags/external.md>), [latency](<https://devfeed.tech/tags/latency.md>), [monitoring](<https://devfeed.tech/tags/monitoring.md>), [node-js](<https://devfeed.tech/tags/node-js.md>), [pitfalls](<https://devfeed.tech/tags/pitfalls.md>), [releases](<https://devfeed.tech/tags/releases.md>), [router](<https://devfeed.tech/tags/router.md>), [servers](<https://devfeed.tech/tags/servers.md>), [software-architecture](<https://devfeed.tech/tags/software-architecture.md>), [standards](<https://devfeed.tech/tags/standards.md>), [test](<https://devfeed.tech/tags/test.md>), [tips](<https://devfeed.tech/tags/tips.md>), [web-services](<https://devfeed.tech/tags/web-services.md>)

### AI overview

This article presents five practical tips for developing reliable open web APIs: test beyond unit tests, plan for future versions, embrace standards, monitor honestly, and design failures well.

### Source excerpt

Organisations who are paying attention already know they need to have an open web API, and many already have under development or in the wild. Make sure you haven't been caught by the pitfalls of many early API releases. Multiple points of failure: The 5 tips Test it all Plan for future versions Embrace standards [...]

## Review of 97 Things Every Software Architect Should Know

DevFeed: [Review of 97 Things Every Software Architect Should Know](<https://devfeed.tech/articles/collective-wisdom-from-the-experts-20738.md>)

Original publisher: [Read original article](<https://blog.fedecarg.com/2018/06/06/collective-wisdom-from-the-experts/>)

Author: Federico

Published: 2018-06-06T23:06:00Z

Content type: opinion

Language: en

Sources: [Federico Cargnelutti](<https://devfeed.tech/sources/federico-cargnelutti.md>)

Topics: [Architecture & Design](<https://devfeed.tech/topics/architecture-design.md>), [Software Engineering](<https://devfeed.tech/topics/software-engineering.md>), [Software](<https://devfeed.tech/topics/software.md>), [Development](<https://devfeed.tech/topics/development.md>)

Tags: [advice](<https://devfeed.tech/tags/advice.md>), [architecture-design](<https://devfeed.tech/tags/architecture-design.md>), [book](<https://devfeed.tech/tags/book.md>), [personal-experience](<https://devfeed.tech/tags/personal-experience.md>), [software-architecture](<https://devfeed.tech/tags/software-architecture.md>), [software-engineering](<https://devfeed.tech/tags/software-engineering.md>)

### AI overview

A personal review of 97 Things Every Software Architect Should Know, a compilation of advice from more than 40 software architects. The article highlights lessons about communication, complexity, developer empowerment, and balancing technical and organizational concerns, while noting that the book is not an in-depth theoretical work.

### Source excerpt

I've finally had a chance to read a book I bought a while ago called "97 Things Every Software Architect Should Know - Collective Wisdom from the Experts". Not the shortest title for a book, but very descriptive. I bought this book at the OSCON Conference in Portland last year. It's an interesting book and [...]

## How to create a Data Container Component in React

DevFeed: [How to create a Data Container Component in React](<https://devfeed.tech/articles/how-to-create-a-data-container-component-in-react-20737.md>)

Original publisher: [Read original article](<https://blog.fedecarg.com/2018/03/24/react-data-container-component-pattern/>)

Author: Federico

Published: 2018-03-24T14:31:38Z

Content type: tutorial

Language: en

Sources: [Federico Cargnelutti](<https://devfeed.tech/sources/federico-cargnelutti.md>)

Topics: [React](<https://devfeed.tech/topics/react.md>), [ui](<https://devfeed.tech/topics/ui.md>), [Redux](<https://devfeed.tech/topics/redux.md>)

Tags: [component](<https://devfeed.tech/tags/component.md>), [design-patterns](<https://devfeed.tech/tags/design-patterns.md>), [frameworks](<https://devfeed.tech/tags/frameworks.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [node-js](<https://devfeed.tech/tags/node-js.md>), [react](<https://devfeed.tech/tags/react.md>), [redux](<https://devfeed.tech/tags/redux.md>), [ui](<https://devfeed.tech/tags/ui.md>), [ui-components](<https://devfeed.tech/tags/ui-components.md>)

### AI overview

A tutorial on the Data Container pattern in React. It explains how to separate data access and behavior from presentational components, compares inheritance with composition, and mentions Redux and other data-store options.

### Source excerpt

One pattern I've used quite a lot while working with React at the BBC and Discovery Channel is the Data Container pattern. It became popular in the last couple of years thanks to libraries like Redux and Komposer. The idea is simple. When you build UI components in React you feed data into them via [...]

## How to pass variables to a Docker container when building a Node app

DevFeed: [How to pass variables to a Docker container when building a Node app](<https://devfeed.tech/articles/how-to-pass-variables-to-a-docker-container-when-building-a-node-app-20736.md>)

Original publisher: [Read original article](<https://blog.fedecarg.com/2016/11/05/how-to-pass-variables-to-a-docker-container-when-building-a-node-app/>)

Author: Federico

Published: 2016-11-05T21:42:00Z

Content type: tutorial

Language: en

Sources: [Federico Cargnelutti](<https://devfeed.tech/sources/federico-cargnelutti.md>)

Topics: [Dockerfile](<https://devfeed.tech/topics/dockerfile.md>), [Environment Variables](<https://devfeed.tech/topics/environment-variables.md>), [Docker Image](<https://devfeed.tech/topics/docker-image.md>), [Command-line interface](<https://devfeed.tech/topics/cli.md>)

Tags: [command-line](<https://devfeed.tech/tags/command-line.md>), [docker](<https://devfeed.tech/tags/docker.md>), [docker-image](<https://devfeed.tech/tags/docker-image.md>), [environment-variables](<https://devfeed.tech/tags/environment-variables.md>), [http-server](<https://devfeed.tech/tags/http-server.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [linux](<https://devfeed.tech/tags/linux.md>), [node-js](<https://devfeed.tech/tags/node-js.md>), [npm](<https://devfeed.tech/tags/npm.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [port](<https://devfeed.tech/tags/port.md>), [programming](<https://devfeed.tech/tags/programming.md>)

### AI overview

A tutorial on passing variables to a Dockerized Node application during image builds and container execution. It explains Dockerfile ENV and ARG instructions, command-line build arguments, shell-based use of NODE_ENV, and exposing a port to start an HTTP server.

### Source excerpt

Environment variables are declared with the ENV statement and are notated in the Dockerfile either with $VARIABLE_NAME or ${VARIABLE_NAME}. Passing variables at build-time The ENV instruction sets the environment variable to the value. The environment variables set using ENV will persist when a container is run from the resulting image. For example: The Dockerfile allows you to specify arguments [...]

## Website performance monitoring tool

DevFeed: [Website performance monitoring tool](<https://devfeed.tech/articles/website-performance-monitoring-tool-20735.md>)

Original publisher: [Read original article](<https://blog.fedecarg.com/2016/08/01/website-performance-monitoring-open-source-tool/>)

Author: Federico

Published: 2016-08-01T16:54:00Z

Content type: article

Language: en

Sources: [Federico Cargnelutti](<https://devfeed.tech/sources/federico-cargnelutti.md>)

Topics: [Monitoring](<https://devfeed.tech/topics/monitoring.md>), [Website](<https://devfeed.tech/topics/website.md>), [dashboards](<https://devfeed.tech/topics/dashboards.md>), [Open Source](<https://devfeed.tech/topics/open-source.md>), [Self-hosted](<https://devfeed.tech/topics/self-hosted.md>), [GitHub](<https://devfeed.tech/topics/github.md>)

Tags: [dashboards](<https://devfeed.tech/tags/dashboards.md>), [github](<https://devfeed.tech/tags/github.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [monitoring](<https://devfeed.tech/tags/monitoring.md>), [node-js](<https://devfeed.tech/tags/node-js.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [performance-metrics](<https://devfeed.tech/tags/performance-metrics.md>), [performance-monitoring](<https://devfeed.tech/tags/performance-monitoring.md>), [self-hosted](<https://devfeed.tech/tags/self-hosted.md>), [slack](<https://devfeed.tech/tags/slack.md>), [tool](<https://devfeed.tech/tags/tool.md>), [tools](<https://devfeed.tech/tags/tools.md>), [web](<https://devfeed.tech/tags/web.md>), [web-apps](<https://devfeed.tech/tags/web-apps.md>), [web-services](<https://devfeed.tech/tags/web-services.md>)

### AI overview

The article introduces SpeedTracker, an open-source, MIT-licensed, self-hosted tool that runs on WebPageTest to periodically test website performance. It visualizes performance metrics over time, supports performance budgets, and can send alerts by email or Slack.

### Source excerpt

Monitoring systems allow you to monitor changes to your front-end code base over time, catching any regression issues and monitoring the ongoing effects of any performance optimisation changes. Easy to use dashboards are a must when it comes to monitoring the state of your web apps. Companies like Calibre or SpeedCurve offer this as a [...]

## Node.js: How to mock the imports of an ES6 module

DevFeed: [Node.js: How to mock the imports of an ES6 module](<https://devfeed.tech/articles/node-js-how-to-mock-the-imports-of-an-es6-module-20734.md>)

Original publisher: [Read original article](<https://blog.fedecarg.com/2016/07/18/node-js-how-to-mock-the-imports-of-an-es6-module/>)

Author: Federico

Published: 2016-07-18T21:58:00Z

Content type: tutorial

Language: en

Sources: [Federico Cargnelutti](<https://devfeed.tech/sources/federico-cargnelutti.md>)

Topics: [Node.js](<https://devfeed.tech/topics/node-js.md>), [Library](<https://devfeed.tech/topics/library.md>)

Tags: [how-to](<https://devfeed.tech/tags/how-to.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [library](<https://devfeed.tech/tags/library.md>), [node](<https://devfeed.tech/tags/node.md>), [node-js](<https://devfeed.tech/tags/node-js.md>), [programming](<https://devfeed.tech/tags/programming.md>)

### AI overview

A tutorial on using the mock-require package to mock require statements and imports in Node.js, including exported functions and standard library modules.

### Source excerpt

The package mock-require is useful if you want to mock require statements in Node.js. It has a simple API that allows you to mock anything, from a single exported function to a standard library. Here's an example: app/config.js app/services/content.js test/services/content_spec.js

## Recommender Systems: Content-based, Social recommendations and Collaborative filtering

DevFeed: [Recommender Systems: Content-based, Social recommendations and Collaborative filtering](<https://devfeed.tech/articles/recommender-systems-content-based-social-recommendations-and-collaborative-filtering-20733.md>)

Original publisher: [Read original article](<https://blog.fedecarg.com/2016/06/26/recommender-systems-content-based-social-recommendations-and-collaborative-filtering/>)

Author: Federico

Published: 2016-06-26T13:50:00Z

Content type: article

Language: en

Sources: [Federico Cargnelutti](<https://devfeed.tech/sources/federico-cargnelutti.md>)

Topics: [recommendation systems](<https://devfeed.tech/topics/recommendation-systems.md>), [Streaming](<https://devfeed.tech/topics/streaming.md>), [Machine learning](<https://devfeed.tech/topics/machine-learning.md>)

Tags: [machine-learning](<https://devfeed.tech/tags/machine-learning.md>), [programming](<https://devfeed.tech/tags/programming.md>), [recommender-systems](<https://devfeed.tech/tags/recommender-systems.md>), [software-architecture](<https://devfeed.tech/tags/software-architecture.md>), [streaming](<https://devfeed.tech/tags/streaming.md>), [web-development](<https://devfeed.tech/tags/web-development.md>)

### AI overview

This article explains recommender systems for video-on-demand services. It introduces content-based analysis, social recommendations, and collaborative filtering, and notes that platforms often combine these approaches in hybrid systems.

### Source excerpt

With the proliferation of video on-demand streaming services, viewers face a big challenge: finding content across multiple screens and apps. There may be quality information available online but it may be difficult to find. Traditionally, viewers resort to "app switching" which can be frustrating when it comes to finding quality content. With the emergence of [...]

## Geo Proximity Search: The Haversine Equation

DevFeed: [Geo Proximity Search: The Haversine Equation](<https://devfeed.tech/articles/geo-proximity-search-the-haversine-equation-20732.md>)

Original publisher: [Read original article](<https://blog.fedecarg.com/2014/12/08/geo-proximity-search-the-haversine-equation/>)

Author: Federico

Published: 2014-12-08T11:48:00Z

Content type: tutorial

Language: en

Sources: [Federico Cargnelutti](<https://devfeed.tech/sources/federico-cargnelutti.md>)

Topics: [SQL](<https://devfeed.tech/topics/sql.md>), [PHP](<https://devfeed.tech/topics/php.md>), [Python](<https://devfeed.tech/topics/python.md>)

Tags: [databases](<https://devfeed.tech/tags/databases.md>), [implementation](<https://devfeed.tech/tags/implementation.md>), [map](<https://devfeed.tech/tags/map.md>), [navigation](<https://devfeed.tech/tags/navigation.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [php](<https://devfeed.tech/tags/php.md>), [plotting](<https://devfeed.tech/tags/plotting.md>), [points](<https://devfeed.tech/tags/points.md>), [programming](<https://devfeed.tech/tags/programming.md>), [python](<https://devfeed.tech/tags/python.md>), [sql](<https://devfeed.tech/tags/sql.md>), [web-development](<https://devfeed.tech/tags/web-development.md>)

### AI overview

This tutorial explains how to perform geo-proximity searches by plotting a radius around a map point using latitude and longitude. It introduces the Haversine equation for calculating great-circle distances and provides implementations in SQL, Python, and PHP.

### Source excerpt

I'm working on a project that requires Geo proximity search. Basically, what I'm doing is plotting a radius around a point on a map, which is defined by the distance between two points on the map given their latitudes and longitudes. To achieve this I'm using the Haversine formula (spherical trigonometry). This equation is important [...]

## Installing multiple versions of Ruby using RVM

DevFeed: [Installing multiple versions of Ruby using RVM](<https://devfeed.tech/articles/installing-multiple-versions-of-ruby-using-rvm-20731.md>)

Original publisher: [Read original article](<https://blog.fedecarg.com/2014/08/26/installing-multiple-versions-of-ruby-using-rvm/>)

Author: Federico

Published: 2014-08-26T23:26:22Z

Content type: tutorial

Language: en

Sources: [Federico Cargnelutti](<https://devfeed.tech/sources/federico-cargnelutti.md>)

Topics: [Ruby](<https://devfeed.tech/topics/ruby.md>), [Tool](<https://devfeed.tech/topics/tool.md>)

Tags: [install](<https://devfeed.tech/tags/install.md>), [programming](<https://devfeed.tech/tags/programming.md>), [rails](<https://devfeed.tech/tags/rails.md>), [ruby](<https://devfeed.tech/tags/ruby.md>), [tool](<https://devfeed.tech/tags/tool.md>)

### AI overview

A tutorial on using Ruby Version Manager (RVM) to install and switch between multiple Ruby versions, create gemsets, install an older Rails version, and remove a gemset.

### Source excerpt

Ruby Version Manager (RVM) is a tool that allows you to install multiple versions of Ruby and have multiple versions of the same interpreter. Very handy for those who have to maintain different applications using different versions of Ruby. To start, download RVM and install the latest stable version of Ruby: $ echo insecure >> [...]