Poems #2 – San Martino

San Martino, by Giosuè Carducci (Italian Version)

La nebbia a gl’irti colli
piovigginando sale,
e sotto il maestrale
urla e biancheggia il mar;

ma per le vie del borgo
dal ribollir de’ tini
va l’aspro odor dei vini
l’anime a rallegrar.

Gira su’ ceppi accesi
lo spiedo scoppiettando
sta il cacciator fischiando
su l’uscio a rimirar

tra le rossastre nubi
stormi d’uccelli neri,
com’esuli pensieri,
nel vespero migrar.

Poems #1 – O Terra, Aspettami

During the last week I decided, with my girlfriend, to begin learning poems. To be more precise, one poem every two weeks. I will chose mine, she will chose another one for her. After the two weeks period we will repeat each other the chosen poem.

Why?

I need to train my memory. Being a programmer means being very good to use Google. However, this is not so healthy for my memory. I made some research about that and I discovered that a good way to deal with this “problem” can be to start learning some poems.

That’s all!

Ok, so?

Here’s the first poem I choose for this first two weeks period.

O Terra, Aspettami, by Pablo Neruda (Italian Version)

Riportami, o sole,
al mio destino agreste,
pioggia del vecchio bosco,
riportami il profumo e le spade
che cadevano dal cielo,
la solitaria pace d’erba e pietra,
l’umidità dei margini del fiume,
il profumo del larice,
il vento vivo come un cuore
che palpita tra la scontrosa massa
della grande araucaria.

Terra, rendimi i tuoi doni puri,
le torri del silenzio che salirono
dalla solennità delle radici:
voglio essere di nuovo ciò che non sono stato,
imparare a tornare così, dal profondo
che fra tutte le cose naturali
io possa vivere, o non vivere: non importa
essere un’altra pietra, la pietra oscura,
la pietra pura che il fiume porta via.

Laravel API Boilerplate – JWT Edition

I have just published on Github my new side-project, made in the last weekend: Laravel API Boilerplate – JWT Edition.

I often found myself in the need of build an API to test an idea. I don’t like to repeat boring operations and, in this last period, I am often using three awesome packages:

So… why don’t work on a simple integration, to solve the problem once for all?

I shared it because I am not the only one to have this needs. Quite sure about it 🙂

So… feel free to take it, PR new features if you want and give my some feedback!

Changin’ the OS

My development studies started 12 years ago, in 2003. Before 2003 I was just “playing” with code: nothing really serious worth mentioning.

I always used Windows. And I never had problems. Yeah, shame on me, guys!

However, during the last week I had to change my PC and I started making strange and pervert thoughts, like “hey, what if I try to switch everything on Linux?”

via PC World
via PC World (yeah, the linked article is not exactly the most inherent)

Everything started because, right now, I am using an Ubuntu Live USB Key. With a really old USB key, everything is going fine. Next week, I will install an SSD on my new pc, with 16GB ram and an Intel i7 processor. So, what better occasion to do this complete switch?

Today, August 18th, 2015, I switched to Linux. Ubuntu, to say it all.

Now, I don’t want to jump to quick conclusions, so I am not writing anything else here. On September 20th, a month (circa) from now, I am going to write another post in which I will judge this change, trying to understand if Ubuntu can be the right one for me.

Cheers!

Too Big… Fail!

On June, I wrote a post about changing my work stack to something different. My purpose was, as always, to learn something new.

I was really fascinated by the M.E.A.N. stack (and I still am!), but I did several mistakes while studying it. Something went wrong and I abandoned it. It was strange: starting big, finishing poorly.

So, as a result of this fail, I decided to write a post to put down in black and white what I learned. Maybe it will be useful to someone.


One Item at Time, Please!

We are talking about an entire stack here. In this context, a stack is, by definition, a set of software subsystems or components needed to create a complete platform*. Every single item, this time, was totally new for me. I tried to study them all together, learning something little about every single element and then making a first, brutal and rudimentary tentative to build an app with it.

Everything became sloppy and confused, immediately.

What I learned: if you are studying a stack, the best way to do things is to explore it in its entirety, but only on a very high level. Right after, choose the first item, learn a good amount of things about it and then go forward.

Let’s make a simple example. As many of you already know, I am absolutely in it with Laravel. So, the best thing for me would be try to study something I can easily integrate with it. Angular is a frontend framework, Laravel a backend one. A good choice would be to study Angular first, and after that learning how to integrate it with Laravel. Finally, I would go forward to other stack elements with a greater knowledge of it all, including integrations.


The “Learning Fury”

If you read the previously mentioned post, you will notice that I studied every single day something new on the book. Cool, but I was under the effect of what I call the “Learning Fury”. I leaved and ignored everything I was doing to focus all my  energies on a single thing. This time, the “single thing” was the M.E.A.N. stack.

I was terribly wrong, because after the first 72 hours the effect vanishes.

What I learned: don’t fall under the “Learning Fury” fire. You can’t master a new technology in days or months. If you want to study it properly, take your time and be patient. Every developer is often lazy and impatient. A good developer is someone who learned to become patient and active.


What Happens Now?

Well, I think I will try to study AngularJS first and integrate it with Laravel, creating a sample one page app. Then I will think about including a new technology in the stack (MongoDB for persistence) and finally I will switch from Laravel to ExpressJS.

Let’s see what happens 🙂 Obviously, I will post other updates here.


 

* Wikipedia definition for “Solution Stack”

Now Available : Learning Laravel’s Eloquent

This January, I filled a list with some good intentions for this new year. Not a big list, just five points.

One of these points was “to write a book“. I already had some plans for it: about Laravel, of course. Then, a couple of weeks later, I received an email from Rebecca Youe, from Packt Publishing.

A very clear message that was basically saying: “would you like to write a book about Laravel, for Packt?

I was stunned. Obviously, I accepted. I started in February, following a well defined process and schedule. An awesome experience, because it was my first time getting involved in book writing: I learned many things about planning a book and structuring its chapters. It’s very similar to the software development process: the starting analysis step is vital.

However today this book is finally available.

B03634_MockupCover_Normal

Learning Laravel’s Eloquent is a book totally focused on Eloquent, the Laravel ORM (Object Relational Mapper). In this book I tried to put everything I know, starting from the very basics (setting up a project, using some useful tools) to a couple of advanced topics. As I also wrote on the Packt Website, here’s what the book features:

  • Configure a new Laravel project and set up database connections in minutes
  • Build and work with models to handle your data with an expressive syntax
  • Define relations between your models to create complex functionalities
  • Query your database using relations simply
  • Use collections to gather results and perform many operations on them with a powerful data structure
  • Use the Eloquent ORM without Laravel
  • Control your models during the request lifecycle with event listeners and observers

Hope you will like it 🙂

You can buy it here on Packt Website.

Oh, and it’s not ending here…

It Wasn’t Just About Music : Vasto Siren Fest 2015

Usually, when we write something about an experience, we desperately try to find the perfect words to describe it in the right way, or at least something close enough. For this reason, this is the fifth time I try to write this introduction. And the result isn’t so awesome, but as you probably know if you are reading this, you also know that I actually write code, and sometimes about code. So, forgive me.

test1

Ok, let’s cut to it: this weekend, something awesome happened. This something is the 2nd edition of the Vasto Siren Fest. Four days of music and much more. I saw many posts on the web about it in the last days, especially about the music side of it. For this reason, I am not going to talk about music. Many people, with an experience about thousand times than mine, will do it.

Because the Vasto Siren Fest 2015 wasn’t just about music.

It was something more. It was…


Places.

Because what if I say that the opening event took place in the main church of the city?

row1

row2

Not bad, huh? This is Gareth Dickson, playing in the San Giuseppe Cathedral.

And this was just the opening. Other stages were also set up in the D’Avalos Palace Courtyard, D’Avalos Palace Gardens, Piazza del Popolo and Saint Peter’s Church Portal.

Take a look:

siren-festival-2015-secondo-giorno-60

siren-festival-2015-secondo-giorno-70

siren-festival-2015-terzo-giorno-26

siren-festival-2015-secondo-giorno-29

vasto-siren-festival-2015-giorno-1-12

IMG_20150725_203528-2


Music.

Because maybe it’s not exactly your favourite artist, but laying down on the grass in Palazzo D’Avalos Garden when Scott Matthews is singing (with a golden sunset as background) is fucking priceless. Especially if you are laying down on the grass with a glass of wine and some slices of ventricina, a special kind of salami we make here.

And here’s the complete lineup:

  • Jon Hopkins
  • Verdena
  • James Blake
  • Gareth Dickson
  • Sun Kil Moon
  • Clark
  • Gazelle Twin
  • Emma Tricca
  • IOSONOUNCANE
  • WOW
  • Mamavegas
  • Is Tropical
  • Scott Matthew
  • Indian Wells
  • Mamuthones
  • Colapesce
  • Pins
  • The Pastels

… and more. And yeah, everything in just a couple of days.


More.

Because it was definitely more. More than I ever imagined for my little town and for this I have to say “thanks” to many people. To everyone worked in the organization and, more than many others, to the volunteers that made this possible.

11755870_668324926600299_7082876521171147484_n

Because thanks to your work now I can say it: I am so proud to live here. Can’t wait for the next year’s Siren Fest.


Photo Credits: Lorenzo Pardi @farecose, the Vasto Siren Fest Facebook Page and my Nexus 5.

Changin’ the Stack

Sometimes you have to take a break.

No matter how much you love what you do, but studying something new is always exciting and funny. As a developer, I know that is the best part of my job: when you are quite confident with a certain technology…  well, maybe it’s time to learn something new.

Obviously, I am not leaving Laravel and its fantastic community. However, I decided to dedicate a slice of my time to learn a totally different stack: from LAMP, to MEAN.

Probably you already know it. If not, MEAN is an acronym that stands for

  • MongoDB;
  • Express;
  • AngularJS;
  • NodeJS;

I don’t feel like someone can stumble upon serious issues while installing another PHP framework, so I decided to change the entire thing.

3285OS_MEAN Web Development_cover

I just bought “MEAN Web Development” by Amos Q. Haviv  from Packt Publishing. I will report here, on my blog, all my thoughts about this new path, eventually along with something else if I will find something interesting.

My learning path will be the following:

  • learn the NodeJS basics;
  • learn the Express basics;
  • learn the MongoDB basics;
  • learn the AngularJS basics;
  • learn how to create and configure a basic MEAN VM on Vagrant;
  • extra: learn something about Docker;

My primary focus will be on backend technologies and honestly, I can’t wait to reach the MongoDB part. We are in 2015 and I have never experienced the NoSQL paradigm. That sucks.

Let’s see what happens.


Update #1 : June 13th, 2015

Right now, I have just finished the second chapter. The first one is dedicated to the very basics: installing NodeJS and some first tests with MongoDB.

The book is awesomely clear: I love that writing style in IT books.

The second chapter is about NodeJS in a more “deeper” way. It deals with JS event-driven programming in detail, and then explains how to create some really basic server (and a little, little app) with Connect.

Can’t wait to start the 3rd chapter, about Express!


Update #2 : June 14th, 2015

Everything great with the Express chapter and the MongoDB one. A perfect introduction to both concepts.

Now I am a little stuck with Vagrant. I tried this suggested box, but got many issues and problems when using Yeoman. Maybe it’s too early. I will try a different approach: I will use the VM without Yeoman and other solutions (meanjs.org and mean.io). After all, right now I am working only with NodeJS, MongoDB and Express.

No frontend. Let’s see what happens.


Update #3 : June 15th, 2015

I found many issues, related to permissions and users, with arvindr21/mean-box. So, I decided to make a new Vagrant VM starting from the very basic (a classic hashicorp/precise64).

I solved many of these issues, but when trying to install meanjs.org or mean.io projects it failed. Sometimes on a specific package, sometimes for the tar tar.unpack untar error. Sometimes I can successfully scaffold the application using Yeoman, but then, during the npm install, something goes wrong.

Many people explain this with “vagrant vm related problems”. I don’t know: however, many problems related to the virtual machine utility are a real thing. In the next days I will try to use my VM with some basic setup. If it will work, I will publish it on github and here. 🙂

Time to learn something more about Docker!


Update #4: June 17th, 2015

Ok, quick update today.

Here’s my first contribution about MEAN and Vagrant. This is a very basic first proposal of a Vagrantfile with two separate provision files.

I will talk about it soon in more detail

Until then, you can find it here on Github.

Cheers!


Useful Resources

In the following list you will find some interesting article I found about MEAN (or about its single components) around the internet. Hope they will help you. They are not only “MEAN is cool m8” articles, I will hear the opinions from both sides.

Perché sono d’accordo con Jovanotti sul lavoro “gratis”.

Pochi minuti fa mi sono ritrovato sul sito di Repubblica, a guardare un video in cui Jovanotti spiega perché, in alcuni frangenti, lavorare “gratis” è bello. Il titolo dell’articolo ha suscitato (giustamente) la mia curiosità. Una conseguenza logica, ovvia, dato che da sviluppatore ho sempre vissuto sulla mia pelle il problema.

Jovanotti

Chiunque sia del mestiere lo sa: negli ultimi anni il nostro lavoro è stato sempre svalutato. Solo di recente le cose sono cambiate. Leggermente, ma sono cambiate ed in meglio.

Comunque sia, un passaggio in particolare del suo discorso mi ha colpito:

… Così mi sono ricordato che quando ero ragazzo anche io lavoravo gratis alle sagre e mi divertivo come un pazzo. Imparavo ad essere gentile con le persone, se mi avessero detto non lo fare, vai in colonia, sarebbe stato peggio. Ma per me quel volontariato lì era una festa anche se lavoravo alla sagra della ranocchia… Mi dava qualcosa …

Non solo mi ha colpito, ma lo ha fatto anche positivamente. Tuttavia, in giro su internet molti opinionisti hanno voluto dire la loro ed anche con una certa ferocia tipica dell’ignorante 3.0.

Insomma: fiato alle trombe come al solito. Nella maggior parte dei casi ho letto pareri assolutamente contrari e questo di seguito è uno dei tanti esempi.

Sono sincero: la cosa non mi ha stupito più di tanto. Un tweet del genere è proprio la quintessenza, e la dimostrazione perfetta, l’esempio per antonomasia, dell’abilità tutta italiana di fare di tutta l’erba un fascio.

Che il lavoro gratis sia deplorevole ci arrivano tutti. Non ci vuole l’arte. Tuttavia, in alcuni frangenti della propria vita, fare qualcosa “gratis” può dare benefici a lungo termine che, in tutta onestà, il denaro non può dare.

In questo discorso sono convinto c’entri anche il sistema dell’istruzione. Ne parlerò, tempo permettendo, più in là.

Tornando a noi, per capirci meglio, ecco qualche esempio puramente personale:

  • Da piccolo io stesso ho fatto qualche lavoretto, di vario genere. Dall’aiuto macellaio all’aiuto pescivendolo, passando per un bancone del bar e per la reception di un albergo. A volte pagato, a volte no, a volte meno del dovuto. Il risultato? Mi ricordo di essermi divertito come un pazzo anche io, e di aver imparato un sacco di cose;
  • Tante, tantissime volte ho offerto la mia consulenza gratuitamente quando ho visto un progetto interessante sulla mia strada. Sempre per lo stesso motivo: per divertimento. Senza contare le meravigliose amicizie che mi sono fatto per la strada. Quindi, “Collaborazione > Soldi”. Non scordiamolo;

Di contro, mi è capitato di vedere tante persone ossessionate così tanto dai soldi che non hanno fatto neanche un centesimo.

Insomma, riassumendo:

  • ragazzi (e non), fidatevi: a volte lavorare “gratis” non vuol dire lavorare gratis;
  • critici della domenica, è vero che su internet potete dire quello che volete, ma a volte è facile perdere un’ottima occasione per star zitti;

Meditiamo.