Matteo Agosti

Software engineer

Writing JavaScript Modules for Both Browser and Node.js

I recently started the complete refactor of feathe.rs and immediately faced with the issue of code reuse between client and server. The app is completely written in JavaScript using Node.js on the server side and requires several validation routines that should also run on the client Browser. With this short article I’ll explain how to write modules whose code can be easily reused in both Browser and Node.js.

Rate Limiting Function Calls in JavaScript

I have recently struggled against the annoying problem of rate limitations. I was trying to connect to a service that prevents you to do more than 5 calls every 5 seconds. I didn’t want to limit calls at the origin, but instead have some sort of mechanism that could handle limitations automatically by queuing calls and allowing bursts. With this article I’d like to share the code that helped me achieve this result.

Drupal Website Development Using a GIT Workflow

I’ve been using Drupal for almost 2 years now and I really consider it to be on of the best solutions available when you need a powerful CMS. The source code of Drupal and all its modules are managed using GIT and this dramatically simplifies all code management. The goal of this article is to share a workflow entirely based on GIT that supports the creation, deployment and update of a Drupal website. I won’t cover aspects of Drupal setup and management, just the file handling part and I’ll assume a bit of familiarity with GIT.

The Rationale Behind andthewinner.is, a Platform for Viral Contests on Twitter

On November 10-11th 2012 I attended the Node.js conference in Brescia (Italy) and participated in the hackathon to experiment and have fun with JavaScript on the server side. Together with @nickbalestra we decided to experiment the realtime aspect of Node.js and as we already had background on dealing with social media we decided to build a platform for viral contests on Twitter. We came up with andthewinner.is and with this post I’d like to share the details on how we built it.

Automatic Screen Shot Sharing With Dropbox and Automator

After long time using various utilities to automatically share my screen shots when I updated to Montain Lion I had to find another solution as many of them stopped working. It came to my mind that OS X is bundled with Automator, an extremely powerful utility that I always relegated to thumbnails generation. So I decided to give it a try and I eventually made it. That’s how I did.

How to Properly Deal With Javascript Asynchronous Code

If you are a Javascript developer, you have to deal with asynchronous code. If you are a Javascript developer working with Node.js, asynchronous code is your all in a day’s work. Let’s see how to properly deal with asynchronous code, avoiding one of the most common mistake.

Hints for Improving the Learning Process

As a software engineer I’m always challenged with new languages and frameworks, potentially of great use in my daily work. During the last 5 years, in fact, I spent several time (almost everyday) in learning new things. With this post I’d like to share my considerations on how the learning process could be improved. I am far from being an expert on learning methodologies and related-stuff, so consider this post more like a list of tips that works… at least for me :)

MySQL 5.5 on Mac OS X Issues Fixed

If you have recently installed MySQL 5.5 on Mac OS X you have probably faced some issues with anything that relies on libmysqlclient as, for example, the handy node.js db-mysql or gem mysql2 modules.