Friday, August 17, 2018
Git and Command Line Productivity for Windows
Friday, December 11, 2015
The Benefits of Building on Multiple Platforms
Making the switch to Windows unearthed a few subtle coding errors, mainly related to resource management. It's no secret Windows is a lot stricter when it comes to file manipulation. For instance, consider the following:
File f = new File("test.tmp");
try (FileOutputStream fout = new FileOutputStream(f)) {
fout.write("foo".getBytes());
fout.flush();
Files.move(f.toPath(), new File("test.txt").toPath());
}
Using Java 8, this runs fine on Linux. However, on Windows you get an error:
java.nio.file.FileSystemException: test.tmp -> test.txt: The process cannot access the file because it is being used by another process.Looking at the code again you can see that the file is being moved inside the try-with-resources block. In other words, we're attempting to move the file before we've closed the output stream!
In general I would advise different developers in your development team to use different platforms. That will highlight these kind of subtle errors early and will generally improve the quality of your system. It of course comes as little surprise that Juergen Hoeller (of Spring fame) told me on several occasions that he's still developing on Windows for exactly this reason! :-)
Saturday, April 25, 2015
Ubuntu 15.04 on Lenovo X1 Carbon 3rd Generation
I'm happy to tell you installation is now a complete breeze:
- No more USB startup disk problems.
- The brightness function keys work out-of-the-box.
- The trackpoint buttons work out-of-the-box.
- No more graphics glitches (mainly text rendering) in Unity.
It even seems that the default font sizes are better suited for a WQHD display, although I can't actually confirm anything has changed here compared to 14.10. In the end, the only things I did was setting the "Scale for menu and title bars" to 1,25 in the display settings and changing the "Page zoom" to 125% in Google Chrome.
In summary: Ubuntu 15.10 just works on the 3rd generation Lenovo X1 Carbon. No tweaking required really. I highly recommend this combination for those looking for a new Linux based laptop!
Saturday, February 28, 2015
Ubuntu 14.10 on Lenovo X1 Carbon 3rd Generation
Although installing Linux on brand new hardware like the Lenovo X1 Carbon can be a hairy adventure, it turned out to be a pretty smooth ride. I thought I'd share what I had to do to get to an (almost) fully functional system.
- The first snag I hit was trying to boot the Ubuntu 14.10 startup USB disk. I was greeted with a somewhat unnerving "gfxboot.c32: not a COM32R image" message and a "boot:" prompt. A quick search brought me to Ask Ubuntu: simply type "live" at the prompt and hit enter. You'll boot into the Live CD where you can start the installation.
I haven't seen other people running Ubuntu 14.10 on their X1 Carbon complain about this, so I'm not sure why I ran into this problem. - The next issue I faced was the brightness function keys not working. Some more web searching revealed an Arch Linux thread compiling a number of issues people had encountered trying to run Linux on the 3rd generation X1 Carbon. Fixing the function key problem was again easy: just force the thinkpad_acpi module to load:
echo thinkpad_acpi > /etc/modules-load.d/thinkpad_acpi.conf echo "options thinkpad_acpi force_load=1" > /etc/modprobe.d/thinkpad_acpi.conf
- My laptop sports a fancy 2560 x 1440 WQHD display ("1440p"). That's great and all but with the default Ubuntu fonts text gets really tiny. Working around that involved installing the unity-tweak-tool and setting the Text scaling factor to "1,20" (explained here). I also set the default "Page zoom" to 125% in Google Chrome.
So far the system has been really sweet! The hardware seems up-to-par with my previous ThinkPad which I owned many years ago (a real IBM ThinkPad X40): really rugged feel and a superb keyboard. Combine this with good Linux support and you've got a winning combination!
Sunday, September 4, 2011
Surprise of the day
Saturday, October 30, 2010
Installing ING Home'Bank and Belgian eID on Ubuntu
In an attempt to help people who also need to install one of these apps on a recent Ubuntu version, here is how I did it:
Home'Bank
ING is phasing out it's Home'Bank security module so the download is ages old and references a bunch of old libraries.
Start by downloading the HomeBank333.deb and simply install it as you would any other .deb. Next thing to do is pin the Home'Bank version in Synaptec to avoid this bug: 380511. To do that, start Synaptec, find the homebank package and select Package>Lock Version.
If you try to run /opt/HomeBank/HBSecurity, it will complain about 3 missing libraries:
- libtiff.so.3 is missing -- simply sym-link it:
cd /usr/lib sudo ln -s libtiff.so.4 libtiff.so.3
- libexpat.so.0 is missing -- install and sym-link it:
sudo apt-get install libexpat1 cd /usr/lib sudo ln -s /lib/libexpat.so.1 libexpat.so.0
- libstdc++libc6.2-2.so.3 is missing -- this is an old Dapper Drake package that you can still download and install
Belgian eID
This is actually straightforward. A .deb package is provided for recent Ubuntu versions that installs and runs without any problems. The only problem on my machine was that my smart card reader was not being recognized (an Alcor Micro Corp. EMV Certified Smart Card Reader in my case -- do a lsusb in a terminal to find out what type of smart card reader you have). To rectify that, I had to install the libccid package:
sudo apt-get install libccidOnce that is done you can simply follow the install instructions provided in a PDF to configure your Firefox to use the new certificates and you should be up-and-running!
