Signing Nvidia proprietary driver on Fedora

Two weeks ago I have upgraded my machine to Fedora 23. I fought a bit with the installation of Nvidia proprietary driver. The main reason was that new kernel modules to load need to be signed with a key accepted by Secure Boot. Below are steps I have followed to achieve this configuration.


String concatenation with Java 8

String concatenation is one of the most well known caveat in Java. Almost all experienced Java developpers have already heard or read explanations about when to use String vs StringBuilder/StringBuffer for concatenating Strings.

These last months I gave some interviews for a Java position in the company where I work. One of the exercices that candidate sometimes have to work on requires to concatenate Strings in a for loop. Obviously, as a pervert programmer, I like to ask people what they think about the performance of the code they write and how it could be improved. The answers were really surprising, especially about String concatenation. Although some explanations were not really convincing, they let me doubt whether using StringBuilder/StringBuffer is still required with a recent Java virtual machine. For this reason, I decided to do some investigations.


Brace expansion with Unix Shells

Recently, I discovered a great feature that most of recent Shells support. It is named brace expansion. I used it occasionally but without knowing how it behaves and what was its power.

Below is an example:

$ echo I{like,love,hate}chocolate
Ilikechocolate Ilovechocolate Ihatechocolate


"Unfortunately, Launcher has stopped" on Android

I am discovering Android emulators. My purpose is to automate screenshots capture for one of my apps (which will probably be the subject of another post). What was my astonishment when I started my first Android virtual device (running Lollipop) is that every time I was clicking on the app launcher icon I was getting "Unfortunately, Launcher has stopped."



Videostream on Fedora 20

Videostream is the ultimate Chromecast app. Unfortunately, Chromecast and Videostream do not work out of the box on recent Fedora versions due to firewalld: some minor configuration is required. The configuration consists in opening port ranges 32768-61000 (UDP) for Chromecast and 5550-5559 (TCP) for Videostream.

Below are the commands to enter in your terminal to complete the configuration in a few seconds:

firewall-cmd --permanent --add-port=32768-61000/udp
firewall-cmd --permanent --add-port=5550-5559/tcp
firewall-cmd --reload

Eclipse sysargs code templates

Eclipse provides many useful shortcuts including code templates such as sysout, syserr, systrace that you can use with autocompletion (CTRL + Space). However, sometimes you may want to debug a method call without using the eclipse debugging machinery. In that case, you may have to print the value of received parameters. The following will explain how to configure a new Eclipse code template named sysargs that, once used with auto completion, inserts the piece of code required to print the method parameters where the shortcut was used.


Subscribe via RSS