Go lessons learnt by refactoring

If you didn’t, take a look at: https://github.com/golang/go/wiki/CodeReviewComments A little context: I recently moved to a new company and they are starting using the Go language for some of the projects currently developing. I found myself reading a bunch of code written by people who only recently started writing Go, and came from years of experience in other languages - i.e. Java and C++. After asking for a refactor of the code before it gets too tangled, I’ve seen some non-idiomatic patterns emerge and I’m documenting them here for future references. … »

AcePC T11 battery "problem"

An intro (feel free to jump to the next section) I always wanted to have a little domestic server for simple stuff that can be useful. In particular I wanted something similar and a bit more powerful than a Raspberry PI, that’s why my research brought me to this Chinese manufacturer called AcePC (https://www.iacepc.com/) - I know their website it’s not promising but their computers are actually good and low cost. … »

Tackling overwhelming problems

I’m going to write a post about something that I’m sure you already heard before, but it helped me to approach new problems and projects. Like some kind of mantra, when it feels like too much work to do, I repeat to myself: “one small thing at a time”. Do not overthink about the big picture from the beginning. Start working on one thing, and allocate time to refactor things during development, not before nor after. … »

Mojave Wallpapers

Presenting: https://github.com/Pitasi/dyn-wallpaper It’s not a revolution, live wallpapers existed before. But Apple did them right: a bunch of photos of the same spot in different time of the day, blended together to create the illusion of time passing - inside your desktop. I think it’s pretty cool and I wanted it, but of course I don’t have a MacBook, so…write it by yourself, right? I was too busy and excited to realize that a couple of similar scripts already existed - but they aren’t complete, they are missing the “blend” the images together, just changing wallpaper every X minutes or so. … »

Archlinux Post Installation

Be sure to stop and disable NetworkManager or others before! sudo systemctl enable connman sudo systemctl start connman … »

How to use a cheap USB token (or Yubikey) instead of password in Arch Linux

HOTKEY="KEY_LEFTSHIFT" Write message to system log /usr/bin/logger "Screen locked because Yubikey has been disconnected." Check, if hotkey is not beeing pressed during lockscreen attempt kbd_devices=`cat /proc/bus/input/devices | egrep ‘^H:.* kbd ' | sed ‘s/.*event\([0$ for event_dev in ${kbd_devices}; do evtest –query /dev/input/${event_dev} EV_KEY ${HOTKEY} if [[ "$?" != "0" ]]; then exit 0 fi done Lock the screen /usr/bin/loginctl lock-sessions … »

An eShop price comparison app

TL;DR: https://esho.pw, I made this! Intro Recently I bought a Nintendo Switch. That’s by far the best game console I had in a long time, but you can read all about it online, I’m not here to talk about that! Here’s the fact: with Nintendo Switch it’s possible to buy games in foreign online shops with only one limitation: you can only buy from a shop in the same big region as you are. … »

Ready Player One

TL;DR Player One è un romanzo molto interessante e ricco di riferimenti retrò e a videogame, ma anche ad alto contenuto di virtual reality. Non fatevelo scappare! Articolo originariamente pubblicato il 4 settembre 2015 su breakingtech.it/player-one-libro-retrogamer/ Non capita certo spesso di parlare di libri che abbiano come tema principale i videogiochi, ma per fortuna esiste Player One (titolo originale: Ready Player One), scritto dal brillante statunitense Ernest Cline come romanzo d’esordio. … »

Rick and Morty va visto!

TL;DR Rick e Morty non è il nuovo Family Guy o Futurama. È figo, guardatelo. Ormai ci ho preso gusto e continuo a fare questi articoli dove sputo il mio parere su roba che mi passa per la mente. Oggi voglio scrivere di Rick e Morty, un cartone animato prodotto da Adult Swim che non è altro se non la parte notturna e per adulti di Cartoon Network. Quindi, cos'è sto cartone? … »

Hollow Knight

Allora, di solito non faccio recensioni. Mi limito a dare i miei personali pareri della roba che leggo/guardo/gioco agli amici interessati. Per questo gioco invece volevo spendere qualche parola in più visto quanto mi ha colpito positivamente. Al momento della scrittura, ho 14 ore di gioco su Steam e ho iniziato a giocarci circa 3 giorni fa.[1]Cos'è Hollow Knight Hollow Knight viene definito da tutti come un Metroidvania, un misto di Metroid e di Castelvania appunto. … »