Today I want to share how to configure an MCP (Model Context Protocol) server to run Node.js applications using asdf as the version manager. This setup is particularly useful when you need to ensure consistent Node.js versions across different environments and want to leverage asdf’s powerful version management capabilities. The Challenge When setting up an MCP server to run Node.js applications,…
I woke up early morning today and took some minutes to read this blog post about engineering delivery metrics while grabbing my early morning coffee :coffee:. It provides good insights about how to measure the efficiency of your process from a Pull Request being opened until the code changes are shipped to the production environment. Without going into low-level details, these are the main things…
I am always struggling to figure out how to fix “read-only permissions” when plugging an external USB into your Mac. If you are on my team, this has worked for me: Get the list of mounted volumes: diskutil list You will get a list of volumes, both internal (your hard disk(s)) and external (your USB). Identify the external one with read-only permissions (e.g. /dev/disk4 ) and unmount it: sudo…
Last week I was working on the TID-X registration form; TID-X is a tech event I co-organize with my friends Gustavo and Alonso . Given that TID-X is a free event, registration is a very simple process: we need to know approximate number of attendees, so we make sure we that venu capacity is not overflowed. Registration flow Despite its simplicity, the registration needs to include the following: A…
I have been working in the tech domain over the last twenty years (OMG!). During that period of time, I’ve transitioned from the regular office environment to be fully remote. This is my personal experience so far, lessons learnt and things I’m still struggling with. Disclaimer I’m working at Jamm , a video-first collaboration experience for modern teams. Our goal is to enable not only fast,…
I’ve been playing lately with the technologies pointed out in the post title, and it took me a considerable amount of time to be able to debug it with ease. I went through several pages tackling these technologies together, but none of them was specific enough for me to get the setup working; hence I’ve decided to describe the steps I took, in case this is helpful to anyone fighting against…
When working in a containers based environment, it’s very frequent to build Docker images that are agnostic to the environment. That way, they can be deployed in any environment, from local development to production, which gives the great advantage of preventing any change in a Docker image taht was certified internally in a testing/staging environment for deploying it into production. However,…
When you start a new project one of the key points to tackle and nail down is how to automate the recurrent tasks you will be facing frequently, being those tasks mainly around continuous integration and deployment. Small investments in time around automation at the beginning (or at any time) will pay off very quickly. In a side project I’ve been working on over the last weeks, we chose Travis CI…
TL;DR : I’ve just deleted my Facebook account, and you should think about it as well. I removed my Facebook application from my mobile device about a year ago. My personal journey started some months or years before, after reading The Happiness Advantage , recommended by my friend Shay Cohen . Back then, I had a very bad habit in regards to how I managed my professional email. Lot of discussions…
In git, whenever you want to add a change to a repository, a new commit is created in the repository history. Besides the actual changes in the repository, every commit includes several metadata fields, some of them pointing to both the author and the committer: Author : the person who wrote the code. Committer : the person who added the code to the repository. Author: juandebravo…
I upgraded the python interpreter in one of the components I ran in production from 3.5 to 3.7. Main reason for that was testing dataclasses functionality. Sometime ago I wrote a post about how to build a simply automatic initializer, and eventually it’s implemented in the standard library, which I believe is a great new feature! The upgrade was quite smooth, even though I had an issue due to a…
When deploying an application in a containers based environment, one of the usual challenges to tackle is how/where to store application state if your application happens to require it, which is usually the case. Today I was tackling one of the recurrent issues while building a web application: an user should be able to upload a file (an image in this case) and retrieve it later. This obviously…
Summertime is always a great opportunity for me to read more frequently than usual. This August I’ve read two interesting books related to data analysis in python: Python Data Science Handbook Personal Finance with Python: using pandas, Requests and Recurrent In Personal Finance with Python: using pandas, Requests and Recurrent last chapter, the author talked about times series forecasting and how…
Some years ago I learned about smudging and cleaning data in a git repository , a very cool git functionality that I haven’t used for a while till last week, when it came back to my mind for solving a specific need. Smudge and clean are two functionalities that can be configured via git attributes . While git attributes are not a very popular git configuration, it provides several handy…
WebRTC architecture relies on ICE protocol for checking connectivity between peers and choosing the best interface for them to communicate. The basic idea behind ICE is that each peer in the communication has a variety of candidate transport addresses (combination of IP address and port for a particular transport protocol) it could use to communicate with the other peer. ICE helps on gathering the…
Real-time Transport Protocol ( RTP ) includes two separate components: the data transfer protocol itself ( RTP ). a control protocol associated to the data ( RTCP , where C stands for Control ). The RTP protocol specification states that the “ underlying protocol MUST provide multiplexing of the data and control packets, for example using separate port numbers with UDP ”. Due to the complexity…
I just realized 2016 passed by and this blog didn’t get any update. I hope you were not worried about me! I’ve been fine! Just a bit busy :construction_worker:. Last two weeks I’ve been playing a bit with Docker . In general before getting your feet wet with a new technology, it’s convenient (required?) to either go through the usually great documentation about the project or follow a tutorial…
As described in the WebRTC project main webpage , WebRTC is a free, open project that provides browsers and mobile applications with Real-Time Communications (RTC) capabilities via simple APIs. Or in case you prefer the Wikipedia definition , WebRTC (Web Real-Time Communication) is an API definition drafted by the World Wide Web Consortium (W3C) that supports browser-to-browser applications for…
Coroutines are special functions that differ from usual ones in four aspects: exposes several entry points to a function . An entry point is the line of code inside the function where it will take control over the execution. can receive a different input in every entry point while executing the coroutine. can return different outputs as response to the different entry points. can save control…
yyyy is the pattern string to identify the year in the SimpleDateFormat class. Java 7 introduced YYYY as a new date pattern to identify the date week year . An average year is exactly 52.1775 weeks long, which means that eventually a year might have either 52 or 53 weeks considering indivisible weeks. Using YYYY unintendedly while formatting a date can cause severe issues in your Java application.…
Upon deploying a new version of your product into production, it’s usually handy to enable the new functionalities only to a subset of users. This allows to measure the impact of your code changes in a controlled way: Does the new functionality have an unexpected impact in server performance that was not detected in stress testing lab? Is the new functionality increasing session duration , global…
Last week I was discussing with my pals @drslump and @ladybenko about a very simple idea I came up with while reading John Resig Secrets of the JavaScript Ninja book on Christmas holidays. The idea is very simple: ensure that a function is called with the expected number of parameters. A function defined like: var fullName = function fullName ( name , surname ) { return name + ' ' + surname ; };…
This blog is built using Jekyll as static code site generator and GitHub as the deployment target thanks to its support to Jekyll via GitHub pages. One of the great things about using GitHub together with Jekyll is the support that GitHub provides out of the box to generate your HTML pages using Jekyll in the server side whenever a new content is added to your repository. Some months ago I ran…
Some years ago while I was contributing to the awesome Open Source project Adhearsion , we decided to split the logic contained in 1.0 version into different modules that might be loaded by the developer when needed. Adhearsion 1.0 was tightly coupled with gems like activerecord and activesupport, which were not required for the framework basic functionality and did not provide any real value to…
Last week we had a nice conversation during a python code review about when class and static methods should be used, or either they should not be used at all. Find below my opinions around this topic, feel free to comment and bring some discussion :satisfied:. In general, you should think about moving a class or static method to the module that holds the class definition. As you may well know,…
One of the cool things of Scala is that, in general, you don’t need to write a lot of boilerplate while doing things in the “normal way”. As an example, while defining a class which constructor requires one or more arguments, there’s no need to assign the parameters to instance attributes, this is done out of the box by the compiler while creating the Java code: class Foo ( val x : String , val y…
Unicode and encodings is always a fun thing. This script encodes an input string using different encodings and shows the output length: # -*- coding: utf-8 -*- import sys if len ( sys . argv ) > 1 : code_points = [ unicode ( c , 'utf-8' ) for c in sys . argv [ 1 :]] else : # Testing values code_points = [ u ' \U0001F37A\U00000045\U0000039B ' , u ' \U0001F37A ' ] def handle_encoding ( encoding ,…
I’ve spent bits of my spare time over the last weeks improving my JavaScript skills. I’ve read Effective JavaScript: 68 Specific Ways to Harness the Power of JavaScript , by David Herman ; I highly recommend this book to any who wants to dig deeper into this language. Last Thursday my pal @rafeca raised an interesting question: how could we start two or more asynchronous operations in JavaScript…
I like Christmas because, beside resting from work and having fun with family and friends, usually there is time to learn something new. During this Xmas I’ve been playing with Scala: First, trying to finish the Coursera Functional Programming Principles course . Later, working a bit in a personal project. Better late than never :smile As for my personal project, it provides more than one…
Last week, the first Telefonica Digital Developers Conference was held in Madrid. A two day event that gathered the Spain based developer team. 48 hours of lectures and constant knowledge sharing. My talk, “git internals”, highlighted how git repository works when storing relevant information.
While writing my last post I seeked for information about how to include plugins in Jekyll. Jekyll repo wiki describes how easy is to write and hook specific logic to your Jekyll site. Nonetheless, if you are using Github as hosting to deploy your Jekyll site, you cannot use plugins :worried:. 1. Include the gemoji dependency in your Gemfile gem 'gemoji' , :require => 'emoji/railtie' 2. Add a…
Today I’ve been changing a bit the CSS that creates the layout of this site. Almost the whole style was defined by my pal @rafeca while creating his blog . I have borrowed it :smile:. Although I am not an expert on CSS, I like hacking a bit of this :squirrel:. I summarize the changes in the following sections. Bottom links showing a “-“ character I think this is a common issue in a lot of sites:…
I use Twitter favourites feature to mark as read it later tweets that contain a link that seems interesting. Eventually I tidy up my long list of unread interesting stuff and today I found out about the following item. There was this tweet from Santiago Pastorino about how to include highlighted code into a Keynote.app presentation: # Copy the text to the pasteboard from your editor # <language>…
Last week I started a Coursera online training course about Functional programming using Scala. The course is leaded by Martin Odersky , the creator of Scala language program, so it’s a great chance to improve my little knowledge of funcional programming in general and Scala in particular. When you start working with a new language, first thing you should do is find out the right tools that will…
In the project I am working right now, we are reusing a Django project to develop two different products, productA and productB :-). These products frequently require the same service layer and the code can be directly reused, but in some scenarios different code is required. Django project reusage gives us some advantages. Here I highlight some of them: authentication authorization logging URL…
Introduction This weekend CosmoCaixa building , in Barcelona, is hosting the BArcelona RUby COnference . So I’ll summarize the weekend talks, let you know about the awesome speakers, the wonderful venue and the great organization. Keynote by Scott Chacon. Back to First Principles Scott Chacon , github cofunder, was the first speaker on stage. He talked us through how he sees the future of working…
It happens often that you need an array as object type, and even if you have defined your API like that, you still want to double check that the parameter received in your method is an array: def foo ( param ) param = Array [ param ] if ! param . is_a? ( Array ) # Service logic here end Fortunalety in ruby you have the following feature that converts your parameter to an array, or does nothing in…
Introduction Here it goes my second and last post on the “things that I like about coding in python” series in which was missing a small section on how cool these features (below) are: Decorators Context managers Use blank spaces to define code blocks Decorators A decorator is a function that takes at least an argument, a function object, and returns a single value, a function object. It’s…
Introduction As you know these lasts months I’ve spent quite some time coding python, the language chosen for the project to which I’ve devoted heart, soul and most of my weekends too… During the first weeks I really struggled to get the code alive as during the previous two years it was all bout ruby, so python has taken me out of my comfort zone which really hit me. Although I cannot call myself…
Introduction I like git, I hope you like it too. I like using the git flow branching model while developing new features or fixing undesired bugs in a stable version. Sometimes while you’re starting a new feature, you forget changing your current branch and commit a change to the wrong branch (often develop). Sometimes while you’re starting a new feature, you forget changing your current branch…
Hello world During the last months I’ve felt an increasing need to share my thoughts with the tech world for the following reasons: I think it’s a good way to keep on learning English. Yes fellas, I’ve been working on Shakespeare’s language for a while but there is a whole road of new words and expressions to take in. Sad but true. So, never give up. Learn! One of my new year resolutions was to…