Homepage
Open in app
Sign inGet started

@xrb’s Blog

Random Thoughts of a Software-Engineer

Using Passbook for Boarding a Flight

Go to the profile of Patrick Jayet
Patrick Jayet
Jun 15, 2014

Scala Question Regarding readLine

Go to the profile of Patrick Jayet
Patrick Jayet
Jul 10, 2010

Java Quiz of the Day

Go to the profile of Patrick Jayet
Patrick Jayet
May 22, 2010
Go to the profile of Patrick Jayet
Patrick Jayet
May 19, 2010

Java Quiz of the Day II

What gives:

Integer a = 100, b = 100;
Integer c = 200, d = 200;
System.out.println( (a == b) == (c == d) ); // A

Response: counter intuitively, the program prints ‘false’ out. Integer in Java is a non-native class, where ‘==’ means…

Read more…
Go to the profile of Patrick Jayet
Patrick Jayet
May 19, 2010

Java Quiz of the Day

What gives

Double a = null;
Double b = a == null ? a : 1.0;

Response: as strange as it can seem at first look, b is not equal to null after the second statement, but the code produces a NullPointerException.

Read more…
Go to the profile of Patrick Jayet
Patrick Jayet
Mar 31, 2010

Sparse Files — Commands Overview

I was just checking which commands are supporting sparse files. I post hereafter a short overview of what I found out (working on Linux).

  • Create a sparse file of 20 GiB: 
     dd if=/dev/zero of=foo bs=1 count=1 seek=20G
Read more…
Go to the profile of Patrick Jayet
Patrick Jayet
Mar 30, 2010

How to Know if a File on Linux is Sparse?

A sparse file is a file which does not take more space on disk than needed. Such a file is usually used to store a partition image on disk, for instance with a virtualization solution like Xen.

Read more…
Go to the profile of Patrick Jayet
Patrick Jayet
Mar 28, 2010

GPGMail Compatible with Snow Leopard

I had posted that some times ago on Twitter. There is a new version of the excellent GPGMail plug-in for Mail (OS X). Grab it, if you haven’t already.

GPGMail for OS X 10.6.2

Read more…
Go to the profile of Patrick Jayet
Patrick Jayet
Mar 27, 2010

Extrabright Mix 03

Check out my new mix 03.

  • Extrabright Mix 03: electro to house with a squeeze of detroit and a drop of chill-out. Among others Gui Borrato, SMD remixed by DJ Pierre, Jori Hulkkonen, Miss Kittin & The Hacker, Mosca, Josh Wink, Black Dog, Clark plus a bunch of other great stuffs.
    [audio:Extrabright_Mix_03.mp3]
Go to the profile of Patrick Jayet
Patrick Jayet
Nov 15, 2009

NFS Automount with Snow Leopard

Before upgrading to Snow Leopard, I was using the NFS automount capability of Mac OS X. It was a handy way for my laptop to connect to my home NAS server (a linux box running Ubuntu).

Read more…
Go to the profile of Patrick Jayet
Patrick Jayet
Jun 30, 2009

Time Machine: Handy but Bitchy!

I have been spending the last couple of days of my spare time performing a simple operation with my mac, yet slightly more complicated than expected: merge the two partitions of my hard drive into one. This was necessary since I did a mapping, quite usual on Linux, where my…

Read more…
Go to the profile of Patrick Jayet
Patrick Jayet
Jun 11, 2009

The Geekiest Hello World

Folks, I think that I have found (one of) the geekiest hello world out there. Implemented in Groovy using the dynamic interception of method calls. Here it goes:

class Hello {
Object invokeMethod(String name, Object arguments) {
System.out.println "hello…
Read more…
Go to the profile of Patrick Jayet
Patrick Jayet
Jun 7, 2009

Self-Reproducing Program in Groovy

I had this in mind since yesterday: how to write a self-reproducing program in Groovy, or a Quine, a program which prints out its source code. It’s actually a fun exercise.

Here is my version:

a = 'c = (char)39…
Read more…
About XRB’s BlogLatest StoriesArchiveAbout MediumTermsPrivacyTeams