An introduction to Redux

Redux is a small popular library used to keep track of the state of an interface without going crazy. It is mainly used together with React, a popular library used to create snappy user interfaces on the web.

Getting started with redux might take a while, because you need to get accustomed to the way it does things. In this post i want to cut straight to the meat of the issue, without unnecessary technical explanations. I will show you how to get started with Redux in a React project.

Continue reading “An introduction to Redux”

Modifying WP API response to add previous and next post ID

I am pretty sure most people have at least heard about the mighty WordPress APIs. These APIs make it possible to create, modify and retrieve posts from our WordPress installations, although what we really want to do the most should be to using WordPress as an awesome backend to power cool applications. Think the possibilities…

Continue reading “Modifying WP API response to add previous and next post ID”

Milano Frontend Meetup

A few days ago, I was browsing meetup.com looking for front-end web-development meetups in my area (Milan, Italy) and to my surprise, I found none. There were a few quite specialized ones like M&M Mean Milan, MeteorJS Milano or MongoDB Milan, but I couldn’t fine a more generic one where people could talk about front-end in general.

So I was like "What the hell, let’s do it!" and I opened a new meetup group, the Milano Front-end Web-development Meetup. Since creating the group, we’ve already got 40 subscribers, which I think is cool.
The goal of the group would be to talk about all things front-end, from CSS to SVG to JS to HTML. I’ve also created a Twitter account to go with it.

The first meeting will be on the 30th of October so if you live in the area, then by all means join us!

BEM naming convention

css

BEM stands for "Block, Element, Modifier" and it’s a way to write your CSS class names in an organized way.

I’ve recently been at the From the front 2015 conference in Bologna, where Harry Roberts (creator of Inuit) gave a sweet talk about structuring your CSS while keeping your sanity. Throughout the presentation he used the BEM naming convention, which I’ve also started using recently; it’s easy to understand and really helped me make sense of large stylesheets.

Continue reading “BEM naming convention”

The Sound of Type

Over the last year I’ve grown increasingly tired of the previous "dark" theme¬†of my site; not that it was THAT bad, it actually did the job, but I felt it didn’t convey enough of what makes myself… well, myself. Wishing for something more light-hearted but still¬†legible, and convinced these qualities were to come from a good choice of type, I started a quest for the perfect font, well before starting to code my new site.

Continue reading “The Sound of Type”

Thank you Canonical

Precise Pangolin (version 12.04) has been a great Ubuntu release. It was the successor to another great release, one that will probably go down in history as the best release ever, 10.04 Lucid Lynx. Until 14.04, that is.

14.04 Trusty Tahr is better than any previous Ubuntu release, no question about it. It’s modern, faster, better¬†looking, stable and reliable. An OS to be proud of, definitely improved under every aspect. ¬†It’s a don’t look back kind of release, and after a few hours spent using it you can tell that this will be one release we will remember for years to come, even more than 10.04 I assure you.

In the coming years, we’ll be going through so much novelty, so much change… even thinking about it makes us¬†dizzy! Let’s try and¬†limit our future-predicting super powers and let’s stick to what we know. We know that Ubuntu will go mobile with its own devices (well, made for Ubuntu anyway) either¬†during 2014 or (more likely) during¬†2015. Canonical has chosen (wisely) to achieve convergence between desktop and mobile environments and in order to do this, they will improve the Unity graphical environment by pushing forward with¬†Unity¬†8¬†and with the new¬†Mir display server.

This is a very ambitious journey, which¬†will undoubtedly present us users and early adopters with bugs, discrepancies, flaws and what not. In the years ahead of us, our patience and our love for Canonical¬†will probably be pushed to the limit. If you are an Ubuntero (or, an Ubunteer) you know it’s true. We’ll be called to test, report, translate, help new users, spread the word, work with buggy software, erase, reinstall, erase and reinstall again. All this, while¬†keeping the love alive.

[tweet]Ubuntu 14.04 is better than any previous Ubuntu release, no question about it.[/tweet]

Thankfully Canonical has decided to spare us pro users with the pain of being forced to adopt these new technologies right now, in April 2014, with this LTS release. They could have done it. They could have gained a few months’ (maybe even more? an year?) worth of beta testing by imposing an experimental Mir server, or an half baked Unity 8 interface. But they didn’t. They chose to create the best Ubuntu ever instead. That’s what makes Canonical, well,¬†Canonical.

So, we should all be very thankful for Trusty Tahr. It will be a release we’ll go back to more often than not, it will be a release that will hardly leave our production machine, and¬†when¬†it does, it will be only for a short period of time. It will be an island of sanity in a sea of unbelievable technological advancement and change.

Thank you Canonical, thank you community, I can feel the love bleeding though this screen I’m looking at!

All, Let’s go celebrate¬†by buying a Trusty t-shirt and merchandise.

A declaration of love for Linux

The beauty of using Linux in 2013 is that you end up forgetting that it’s a piece of software made by the community for the community, and that most people live in a closed world when it comes to computing.

Such is the aesthetic pleasure, the ease of use, the effectiveness of it.
And you forget that what most people pay for, you get for free. You get a great user interface, you get freedom of choice, you get lots of good software, you get a great community, you get great support, all for free.
Sure, there are some paid software too, and it’s perfectly ok, but generally speaking, you are free.

As [Richard Stallman][1] puts it:
"Free software is a matter of liberty, not price. To understand the concept, you should think of free as in free speech, not as in free beer."

Because Internet Explorer is free, Safari is free, iMovie is free. As in free beer. Not as in free speech. You can’t go into the iMovie source files, change its icon and send it to your friend. You can do it with free (or, libre) software.

So I say, as a user who gets lots of satisfaction (and earns a living too) thanks to a great, wonderful, amazing, smart collective work, why don’t you browse to your favorite distribution website and support it, either through donations or by purchasing official merchandise? Or maybe join local Linux User Groups, donate some, and/or help out. Or all of the above. Doesn’t it sound like a brilliant idea?

Give some love back, because Linux and Open Source is an act of love towards you ????

If you’re a Linux user, think of how sad it is to be, say, a user of Apple PCs. Where nothing is allowed, everything is boring, and most stuff are paid for. Or think of how horrible it is to be a Windows user, spending your time browsing malware website to get some weird free software, getting infected in the process, and running anti virus software in the vain hope that the situation could get better instead of worse, and finally resorting to "some guy" to get the pc fixed, or buying a new one altogether.
Think, weep, then rejoice, because you use Linux.

So, shell out some bucks and feel good about it!

Enable pretty permalinks on localhost

Just a quick and simple tip. If you are on ubuntu and working with WordPress on a local installation, and you are finding yourself in the situation of being unable to access your posts when you enable pretty permalinks (which is, a custom post structure in Settings > Permalinks), the reason could be that you simply need to enable mod rewrite on you local Apache server.

Continue reading “Enable pretty permalinks on localhost”