Skip to main content

Running containers with Docker

· 8 min read
Saverio Ferrara
Software Engineer

Docker is an open platform for developers and sysadmins to build, ship, and run distributed applications. Consisting of Docker Engine, a portable, lightweight runtime and packaging tool, and Docker Hub, a cloud service for sharing applications and automating workflows, Docker enables apps to be quickly assembled from components and eliminates the friction between development, QA, and production environments. As a result, IT can ship faster and run the same app, unchanged, on laptops, data center VMs, and any cloud.

This post describes how to run Docker machines with the help of Boot2Docker.

Planning a Cluster for Hadoop BigData

· 5 min read
Saverio Ferrara
Software Engineer

This post is about how to plan, for the first time, a cluster for Apache Hadoop and HBase. Hadoop, together with its friends, enable us to elaborate a large amount of data in a cheaply way: by large I mean data large about 100 gigabytes and above.

Hadoop implements the MapReduce framework, that is a way to take a query (or Job) over a dataset, divide it in several queries (or Tasks), and the run these queries in parallel over multiple node of a cluster. Nothing new until now, this looks like the divide-et-impera paradigm: the innovation lies in the fact that the cluster node that is in charge of executing a task has already the data on which process the query. So we are not moving data in order to elaborate them, but we're assigning task on the right cluster node that already has the data!

Building web applications with Scala

· 10 min read
Saverio Ferrara
Software Engineer

Scala is general purpose programming language very popular for building web application. But why? At the moment I really don't know why :) , I'm just reading about it and sharing my thoughts with you.

Let's start from Scala. It's a programming language both object-oriented and functional: we can refer to this kind of programming language as "object-functional". We say that is a programming language because there is a compiler for it, but also an interpreter is available.

It is intended to be compiled to Java bytecode, so the resulting executable runs on the JVM, and Java libraries can be used directly in Scala code and vice-versa. Maybe this is the real strength of this language... it allows to write brand-new web application while reusing legacy java libraries. That's awesome for a company with a bunch of old java code.

A GIT branching model for medium-size companies

· 8 min read
Saverio Ferrara
Software Engineer

This article explains how a medium size company, which has several teams, can adopt GIT for the source code management. As a software configuration management, GIT serves two different functions. The first one is the management support for controlling changes to software products, and the second one is merely development support for coordinating file changes among product developers. In particular here I want to talk about the branching model.

GIT explained for Subversion users

· 13 min read
Saverio Ferrara
Software Engineer

`This guide shows the most common procedures usually performed by SVN users, but using GIT.

Why this guide should be better than the others already on-line? There isn't a particular reason ;) . I'm now a SVN user and I'm just migrating to GIT, so I'm going to find a way to perform with GIT all the operations that I usually do with Subversion: this will be useful for Subversion users who want to start using GIT quickly.`

Luppolo the Drinking Game

· One min read
Saverio Ferrara
Software Engineer

The Drinking Games are games in which participants are often invited to drink alcoholic beverages. These games have been played since ancient times, and now are more popular among young people, especially students.

Luppolo (the Italian word for hops) is a drinking game designed by me.

Early development of Artificial Intelligence

· 19 min read
Saverio Ferrara
Software Engineer

Primi sviluppi dell'Intelligenza Artificiale.

E' difficile dare una definizione di Intelligenza Artificiale (IA) in quando essa è vista sia dal punto di vista ingegneristico (che punta a costruire macchine intelligenti per assistere l'uomo), sia dal punto di vista psicologico (che punta a riprodurre nelle macchine le caratteristiche dell'attività cognitiva umana).

Seppur con idee diverse, i pionieri dell'IA (McCarthy, Minsky, Rochesterm, e Shannon) videro nel calcolatore digitale uno strumento con capacità di elaborazione ineguagliate, quindi uno strumento adatto al confronto con alcuni aspetti della mente umana.

Si cominciarono a sviluppare i primi programmi relativi ad ambiti ben delimitati in cui c'erano  solo regole esplicite per l'elaborazione simbolica e poca conoscenza specializzata. Motivo di questo inizio era la scarsa capacità di memoria e di calcolo dei calcolatori di quei tempi.

Successivamente si parte con lo sviluppo di sistemi esperti, dove la conoscenza specializzata nel campo ci porta ad avere buone prestazioni.

La diffusione di queste tecniche di IA ci conferma il successo dal punto di vista ingegneristico, ma cosa possiamo dire dal punto di vista psicologico?

Cosa implica la costruzione di macchine che riproducono caratteristiche essenziali dell'attività umana? Dove si colloca l'IA nell'ambito delle ricerche sul sistema cervello-mente che coinvolgono le neuroscienze e la psicologia?

The Birth of Computer Science

· 14 min read
Saverio Ferrara
Software Engineer

La nascita dell'informatica.

Il primo kernel Linux è stato pubblicato nel 1991, l'annuncio del primo sistema operativo della famiglia Windows risale al 1983, la nascita dell'informatica come disciplina scientifica risale al 1953, il primo calcolatore programmabile digitale al 1941 (Z3 di Zuse); in realtà tutto scaturisce da una storia molto più lunga che parte dagli studi di Leibniz quando non esistevano i calcolatori digitali, e coinvolge grandi studiosi come Frege, Gödel, e Turing.

Recursive implementation of Heap sort algorithm

· 3 min read
Saverio Ferrara
Software Engineer

L' heapsort è un algoritmo di ordinamento iterativo ed in-place proposto da Williams nel 1964, che si basa su strutture dati ausiliarie.

L' heapsort per eseguire l'ordinamento, utilizza una struttura chiamata heap (mucchio); un heap è rappresentabile con un albero binario in cui tutti i nodi seguono una data proprietà, detta priorità. Esso è completo almeno fino al penultimo livello dell'albero e ad ogni nodo corrisponde uno ed un solo elemento.

In uno heap decrescente (utilizzato per ordinare ad esempio un array in senso crescente) ogni nodo padre contiene un valore maggiore o uguale a quello dei suoi due figli diretti, di conseguenza risulterà maggiore anche di tutti i nodi che si trovano nel sottoalbero di cui esso è la radice; questo non implica affatto che nodi a profondità maggiore contengano valori minori di quelli a profondità minore.

Quindi in ogni istante, in un heap decrescente, la radice contiene il valore maggiore.

Questa struttura è molto usata, in particolare, per l'ordinamento di array.

In questo caso si considera come radice l'elemento iniziale di indice 1; inoltre i figli di un nodo con indice j, avranno indice rispettivamente 2j, quello sinistro, 2j+1 quello destro.

C implementation of Heap sort algorithm

· 3 min read
Saverio Ferrara
Software Engineer

L' heapsort è un algoritmo di ordinamento iterativo ed in-place proposto da Williams nel 1964, che si basa su strutture dati ausiliarie.

L' heapsort per eseguire l'ordinamento, utilizza una struttura chiamata heap (mucchio); un heap è rappresentabile con un albero binario in cui tutti i nodi seguono una data proprietà, detta priorità. Esso è completo almeno fino al penultimo livello dell'albero e ad ogni nodo corrisponde uno ed un solo elemento.

In uno heap decrescente (utilizzato per ordinare ad esempio un array in senso crescente) ogni nodo padre contiene un valore maggiore o uguale a quello dei suoi due figli diretti, di conseguenza risulterà maggiore anche di tutti i nodi che si trovano nel sottoalbero di cui esso è la radice; questo non implica affatto che nodi a profondità maggiore contengano valori minori di quelli a profondità minore.

Quindi in ogni istante, in un heap decrescente, la radice contiene il valore maggiore.

Questa struttura è molto usata, in particolare, per l'ordinamento di array.

In questo caso si considera come radice l'elemento iniziale di indice 1; inoltre i figli di un nodo con indice j, avranno indice rispettivamente 2j, quello sinistro, 2j+1 quello destro.