Learn about learning: a nice list of articles about education

I love to read articles about education. I spend a good amount of time on Medium, every morning, to learn something new about it. I can’t explain why, but it’s something that I really like and I want to study in deep.

So, I decided to write this post to keep track of all the interesting contents I stumble upon during my reading sessions. Enjoy!


This list will be updated everytime I’ll find something cool.

Last Update: Aug 12, 2016

Weekend Learning!

Weekends are great if you want to learn something new. Weekends are great for bored programmers.

Yesterday I found myself in “that” situation: I am bored, nothing to do, a weekend waiting for me. There are many things that I can learn in a small time (well, sometimes just an overview or a “getting started” are a good start), but where to find them?

So, I started this repository on GitHub, named Weekend Learning (https://github.com/francescomalatesta/weekend-learning).

Hope you’ll like and if you want, contribute to it by making a PR!

Oh, and yes… have a nice weekend 🙂

Go Experiments – #1 – Rsz

I recently started to play with the Go language. I felt the need to change languages, paradigms and to study something new.

Meanwhile, my girlfriend needed a tool to quickly resize her images, for some university projects. What best occasion to study something new? I read many articles about Go, that suggest to use the language for some specific applications, like CLI tools or microservices. Exactly what I needed.

So… here’s Rsz!

I love command line interface tools. I started using them more seriously some months ago, when I began using Linux everyday. I love how much they can cut times for repetitive tasks.

I have not compiled it yet, so if you want to use it you will need to have Go installed on your machine. However, in the next days/weeks I will add some new features and the compiled executables for both Linux and Windows platforms.

Have a nice day, and happy holidays! 🙂

A Quickie – Dealing with Observers and Testing in Laravel 5.1

If you use Laravel 5.1, you probably heard about model observers. Basically, they just observe a certain model and when a certain action is done (or it is going to be done) it executes a separate logic. It is really a great way to deal with model events, instead of declaring things right in the EventServiceProvider.

Said that, this morning I had some issues while dealing with observers during testing with PHPUnit.

The Laravel documentation says that you can disable event triggering with something like:


class ExampleTest extends TestCase
    public function testUserRegistration()

        // Test user registration code...

(source: http://laravel.com/docs/5.1/testing#mocking-events)

Here’s the bad news: it does not work with observers. Even if you type the $this->withoutEvents(); the observer is loaded and called. Bye bye, isolated testing!

Now, it seems that no one on internet had a similar issue. That’s quite strange because I like observers and I think they are useful, and more elegant than the classic model events declaration.

This is how I solved my problem.

public function testCanSave()
    $this->app->bind(MediaUploaderObserver::class, function(){
        return $this->getMockBuilder(MediaUploaderObserver::class)->disableOriginalConstructor()->getMock();

    // test logic goes here...

By using the $this->app->bind method to create a new binding in the service container, I managed to solve the problem. The closure passed as the second argument returns a mock of the original MediaUploaderObserver class.

Screenshot from 2015-12-08 14:02:34

And that’s all, folks!

Poems #5 – A Zacinto

A Zacinto, by Ugo Foscolo

Né più mai toccherò le sacre sponde
ove il mio corpo fanciulletto giacque,
Zacinto mia, che te specchi nell’onde
del greco mar da cui vergine nacque

Venere, e fea quelle isole feconde
col suo primo sorriso, onde non tacque
le tue limpide nubi e le tue fronde
l’inclito verso di colui che l’acque

cantò fatali, ed il diverso esiglio
per cui bello di fama e di sventura
baciò la sua petrosa Itaca Ulisse.

Tu non altro che il canto avrai del figlio,
o materna mia terra; a noi prescrisse
il fato illacrimata sepoltura.

Poems #4 – Ho Sceso, Dandoti il Braccio

Ho Sceso, Dandoti il Braccio by Eugenio Montale

Ho sceso, dandoti il braccio, almeno un milione di scale
E ora che non ci sei è il vuoto ad ogni gradino.
Anche così è stato breve il nostro lungo viaggio.
Il mio dura tuttora, né più mi occorrono
Le coincidenze, le prenotazioni,
le trappole, gli scorni di chi crede
che la realtà sia quella che si vede.

Ho sceso milioni di scale dandoti il braccio
Non già perché con quattr’occhi forse si vede di più.
Con te le ho scese perché sapevo che di noi due
Le sole vere pupille, sebbene tanto offuscate,
erano le tue.

Poems #3 – X Agosto

X Agosto, by Giovanni Pascoli

San Lorenzo, io lo so perché tanto
di stelle per l’aria tranquilla
arde e cade, perché sì gran pianto
nel concavo cielo sfavilla.

Ritornava una rondine al tetto:
l’uccisero: cadde tra spini:
ella aveva nel becco un insetto:
la cena de’ suoi rondinini.

Ora è là, come in croce, che tende
quel verme a quel cielo lontano;
e il suo nido è nell’ombra, che attende,
che pigola sempre più piano.

Anche un uomo tornava al suo nido:
l’uccisero: disse: Perdono;
e restò negli aperti occhi un grido:
portava due bambole in dono…

Ora là, nella casa romita,
lo aspettano, aspettano in vano:
egli immobile, attonito, addita
le bambole al cielo lontano.

E tu, Cielo, dall’alto dei mondi
sereni, infinito, immortale,
oh! d’un pianto di stelle lo inondi
quest’atomo opaco del Male!

Hostr – A simple PHP CLI tool to manage your hosts file!

Hi everyone! A few hours ago I release on Github my latest version of Hostr, a PHP CLI tool that you can use to manage your hosts file with an expressive and easy syntax.

Before you say it: yes, I know that out, into the wild, there are many other similar tools. However, I wanted to do some practice with the Symfony Console component and, later, with the Box2 tool that I used to create the .phar file.

That’s all. It took me, in total, three/four days of work. And it was really funny.

Cool! How can I try it?

Great! All you have to do is open your terminal, switch to sudo and type the following instructions:

wget http://hellofrancesco.com/projects/hostr.phar 
chmod 755 hostr.phar && mv hostr.phar /usr/local/bin/hostr

The first line will download in the current folder the .phar file.

The next line will change the file permissions to 755 and move it in the /usr/local/bin folder

Done. How can I use it?

Well, now that you have installed it, type


to verify if it was installed successfully.

Now you can use every single command. There are, actually, 7 commands that you can use.

  • show
  • add
  • remove
  • backup
  • restore
  • tidy
  • check

For more details, Take a look to the project page on Github!

Changin’ the OS – A Month Later

One month ago, I decided to switch my OS, from Windows to Ubuntu. 14.04, to be precise. I promised that I would write a post one month later, to draw some conclusions about it.

So… What happened? Generally, everything was ok.

Cool Things:

  • Some people warned me about some issues with drivers installation… but nothing happened and everything worked (and works) as expected;
  • Every software I use is available on Ubuntu. I had some doubts about Gimp, but it has awesomely improved from the last time I used it (many years ago);
  • Less mouse, more keyboard: last month I was thinking about buying a new mouse. Today I look back to these days and think “lol wut”;

Bad Things:

  • Sometimes you can stumble upon some little bugs here and there. However, nothing really serious after all… and if you like to experiment, it will be absolutely satisfying;

Ubuntu/Linux, you have my sword.