-
My "Hello World" Scala script
My first Scala project, a simple Scala script to download podcasts and sync with an Mp3 player : Jonction…
-
Delete all tracks from MTP device
My MTP MP3 player does not allow to delete all albums with one command (yes I really wanted to delete all tracks ! ) Bash to the rescue : mtp-tracks | grep 'Track ID' | awk '{print $3}' | xargs mtp-delfile -n Of course you must install the mtp-tools, on Ubuntu : sudo apt-get install…
-
Cloned Git repository in DropBox folder
Nice and easy way to setup a Git server : a cloned git repository in a DropBox folder. This is brilliant and It works very well (see the Collaboration part of the article).…
-
File parsing in Scala with Pattern Matching and Tail-Call optimization
In the process of learning Scala, I had to find a subject for my very first "Non Hello World" program in Scala. It was a good opportunity to code a script I wanted to write a long time ago in order to automatize the sync of the podcasts I download…
-
Backup with rsync and cygwin on Windows
I recently had to setup an automatic backup scheme for a desktop Windows PC used for office tasks. I usually try to avoid complicated backup software that tend to store the backups in a proprietary format. I want to be able to browse the files in the backup, and copy…
-
Test Driven Wall Tiling
Last week I was tiling a kitchen backsplash and countertop and as I was using the usual tile alignment tricks, I was struck by the parallel with the Test-driven development techniques for application development. This picture shows the wooden cleat (the dark brown area on the picture) that was temporarily…
-
OPML import for Rhythmbox, kind of
*Update* : it seems that Rhythmbox now has support for OPML import, you may type the path to the OPML import in the new feed dialog box. I didn’t try it, though I’ve just installed the brand new Ubuntu 9.04 to replace my good old 6.…
-
OOP vs Procedural : a definition
In my opinion one of the best definition : Procedural code gets information then makes decisions. Object-oriented code tells objects to do things. Alec Sharp That’s an explanation for the Tell, don’t ask advice for OOP.…
-
Checked exception : why the debat is not over for everyone
I’ve just read Clean Code by Bob Martin. In this book uncle Bob says : "The debate is over […] At the time, we thought that checked exceptions were a great idea; and yes, they can yield some benefit. However, it is clear now that they aren’t…
-
How to negate a regexp with a negative lookahead
When I need it, I tend to forget how to create a regular expression that matches a large set of strings but does not match some specific strings. It’s tricky because it involves the negative lookahead syntax. For exemple the regexp .+\.java matches any java filename. But the…