# Welcome to my space on the Internet!

Hi! My name is Tom Desair (but you probably figured that out already) and this site is about me, my personal thoughts, experiences I want to share and technical stuff that I find interesting. If you want to know more about me or if you want to contact me, make sure to check out the About Me and Contact pages.

I like to blog about many different things but most posts are related to computer science/programming or photography. In this post I explain my main motivation for creating this website. I suggest you read it if you want to better understand the purpose of this site.

Furthermore there will be pages about projects I did or participated in, but these are still under construction. An example is the page about my bachelor’s thesis. I also have a separate blog feed about my master’s thesis (in Dutch).

Happy surfing and don’t hesitate to contact me!

Tom.

# BlackFox UV Pro Filter Review

Today I received the BlackFox UV Pro Filter I ordered from Amazon for my new Sony Alpha A57. I’ll write a quick review based on my first impression. The BlackFox UV Pro Filter is a multi-coated (16x) UV protection filter. The multi-coating (MC) is important to prevent reflections and flares in your images and to keep the overall image quality. The filter is not very expensive and great value for money.

# Packaging

The filter comes in a sturdy box that offers good protection for the filter. Unfortunately the website mentioned on the side (http://www.blackfox-info.de/) is not available (at the time of writing).

Front

Side

Back

# Installing

The UV filter of BlackFox has a normal thickness. The filter feels solid and fits nicely in the lens of the camera.

Thickness (filter sits between lens cap and lens)

# Reflection

Because this filter is a multi-coated, it should prevent reflections and keep the image quality. I compared this filter with another uncoated filter to see if there is any difference. I tested the both reflections of the sun as well as direct reflections.

Reflection of the sun (left: MC BlackFox filter, right: Uncoated filter)

Direct Reflection Test (left: MC BlackFox filter, right: Uncoated filter)

I think it’s safe to say this filter leaves an excellent first impression. The multi-coating works very good and the filter feels very solid. I would have been better if the filter was a bit slimmer. But for this price (€ 14) it has excellent quality.

# LaTeX Paragraph Spacing and Indentation

In this short post, I’ll show you how you can modify the paragraph spacing and indentation in LaTeX. Why would anyone want to change the spacing and indention? Well, if you write a text in Dutch it is customary to leave a blank line after each paragraph and to not indent a new paragraph. This is different from English texts and the default in LaTeX where you do indent new paragraphs and don’t leave a blank line at the end.

To obtain a Dutch paragraph style, you have two options:

### 1. The package parskip

Include the package `parskip` in the preamble using following command:

`\usepackage{parskip}`

This will automatically cancel paragraph indentation and append a blank line at the end.

### 2. Set the parindent en parskip length

If the previous approach doesn’t work or if you want more fine-grained control, you can manually set the length of the indentation and the height of the blank line. You can do this by putting these commands in the preamble of your document:

```\setlength{\parindent}{0pt} \setlength{\parskip}{1.3ex plus 0.5ex minus 0.3ex}```

The first command sets the indentation to 0 and thus cancels paragraph indentation. The second command sets the height of the trailing blank line. This is done using the LaTeX measure ex. One ex corresponds to the height of a lowercase ‘x’ in the current font style. I use 1.3 because I want the height of a capital letter. The “plus 0.5ex minus 0.3ex” part tells LaTeX that it can increase the height with at most 0.5ex and decrease it with maximum 0.3ex to make a decent layout. This means that the minimal height of the blank line is 1ex and the maximum 1.8ex.

And that’s it! Using one of these two options you can change the paragraph spacing and indentation in LaTeX.

The source (in Dutch) I used which has much more LaTeX tips: http://www.ntg.nl/doc/oostrum/latexhnd.pdf (846.7 kB)

# How To: Create your CV in LaTeX

Currently I’m in my graduating year so I had to get my CV ready. And of course, I wanted to write it in $\LaTeX$. Today I’m summarizing my findings in this small how to on creating your CV in $\LaTeX$. There are really tons of packages and templates to create a CV. So there is no point in developing a package of my own (it’s a bit stupid to reinvent the wheel). I’ve searched and looked at a lot of PDFs and templates and I think I finally found my favorite: Moderncv.

Moderncv is a $\LaTeX$ document class for typesetting curriculum vitaes in various styles. It’s created by Xavier Danaux who is also the main maintainer. In my opinion it is one of the best tools out there to create your CV and has received far too little attention. The template that is included in the download is self-explanatory but I’ll list some quick pointers and tips:

• Use the $\LaTeX$ commands `\section{}` and `\subsection{}` to give structure to your CV.
• The document class has following color options: blue, orange, green, red, purple, grey and black. You can also define your own colors for the sections and symbols with the commands:
```\definecolor{sectionrectanglecolor}{rgb}{0.2,0.0,0.4} \definecolor{sectiontitlecolor}{rgb}{0.2,0.0,0.4} \definecolor{subsectioncolor}{rgb}{0.2,0.0,0.4} \definecolor{footersymbolcolor}{rgb}{0.2,0.0,0.4}```
Remark: it’s best to use web-safe colors.
• It also allows you to type-set your motivation letter, very useful!
• I use the `\cvdoubleitem{}` command to list specific skills in a compact way. For example:
```\cvdoubleitem{\textbf{Programming Languages}}{C, C++, Java, Prolog, Scala, Go} {\textbf{Web}}{HTML, CSS, PHP, JavaScript, JSP}```
• Be sure not to use more than two pages and put the most important things at the top.
You can download a censored version of my CV as an example. Do you have other suggestions for nice $\LaTeX$ CV packages? Or any other remark? Don’t hesitate to leave a comment bellow!

# The Internet A Decade Later

I just wanted to share an infographic by BestEdSites.com with you:

# Prolong the Life of your Lithium Batteries

This post is an update of a post I published on my previous blog. I summarize some tips to prolong the life of your gadget’s batteries based on various articles.

The baseline is that the speed by which lithium-ion ages is governed by temperature and state-of-charge. Based on this observation, there are following Do’s and Don’ts:

• Don’t discharge the battery every time to (nearly) 0%: The discharge should go ideally to around 50%. This gives you the longest total battery life. Following table of Battery University illustrates this:
Depth of discharge Discharge cycles Total battery life (1 full cycle = 2,5h)
100% 300 – 500 750h – 1250h
50% 1200 – 1500 1500h – 1875h
25% 2000 – 2500 1250h – 1562,5h
10% 3750 – 4700 937,5h – 1175h
• Don’t leave it fully charged and plugged in: Every battery constantly leaks some of its power. When you leave your battery plugged in, it will recharge a little amount of leaked power over and over again, each time triggering a new cycle. These consecutive very short cycles are very bad for your battery’s health.
• Most gadget batteries should be calibrated by applying a deliberate full discharge once every 30 charges (every month): You can do this by running the battery down in the equipment. If you neglect to do this, the battery metering will become increasingly less accurate and in some cases cut off the device prematurely.
• Keep the lithium-ion battery cool: Avoid a hot car or leaving your gadget in the sun. For prolonged storage, keep the battery at a 40% charge level in a cool place.
• Consider removing the battery from a laptop when running on fixed power: The worst condition is keeping a fully charged battery at higher temperatures, which is the case with running laptop batteries.
• Avoid purchasing spare lithium-ion batteries for later use: But if you buy one, pay attention to the manufacturing date. Do not buy old stock, even if sold at clearance prices.
• If you have a spare lithium-ion battery: Use one to the fullest and keep the other cool by placing it in the refrigerator. But do not freeze the battery! For best results, store the battery at 40% state-of-charge.

This post is based on:

# Testing Wuala cloud storage (with Wuala promo codes!)

I’ve only recently installed Wuala and I’ll write a review later this month when I’ve used and tested it more. But I can already tell you that they have a nice application interface, very good mobile apps (excellent for photo viewing!), good OS integration with seamless folder synchronization (you don’t have to move your files to a special folder) and excellent platform support (I’ve tested Windows, Linux and Android).

If you also want to give Wuala a try, you can use following codes to get extra storage (13 GB!):

1. Register using my referral link. You get 1 extra GB for 1 year and I 256 MB ;-).
2. Enter the following Wuala promo codes (one-by-one) in the application under “Options” > “Options…” > “Storage” > “Wuala Codes”  and click “Redeem” to get extra storage:
• 1000-ANSWERS (1 extra GB for 1 year)
• CONNECT-WITH-SUPPORT (1 extra GB for 1 year)
• I-KNOW-MARKUS (1 extra GB for 3 months)
• I-KNOW-DOMINIK (1 extra GB for 3 months)
• I-KNOW-CAROLA (1 extra GB for 3 months)
• I-KNOW-FABIUS (1 extra GB for 3 months)
• I-KNOW-LUZIUS (1 extra GB for 3 months)
• I-KNOW-MARCEL (1 extra GB for 3 months)
• I-KNOW-MARIUS (1 extra GB for 3 months)
• I-KNOW-DARIO (1 extra GB for 3 months)
• I-LIKE-POLAND (1 extra GB for 3 months)
• SKYFISH-IS-COOL (1 extra GB for 3 months)
• I-KNOW-THOMAS (*NEW*, 1 extra GB for 6 months)
• I-KNOW-ERIC (*NEW*, 1 extra GB for 6 months)

Unfortunately all this extra storage is for a limited period only and not for a lifetime (as with other services). So take this into account when uploading a lot of data! If you know other Wuala promotion codes or noticed that one of the listed codes isn’t active anymore, please let me know in the comments below.

Have fun with it!

PS: If you’re installing Wuala on Ubuntu 12.04 with Unity:

*Last edit on 13/11/2012*

# How To Encrypt Your Home Folder in Linux

In this post I give a short explanation of how to encrypt your home folder in Linux. Why should you encrypt your home folder? When you use a laptop and you take it with you all the time it’s important to protect it. Unfortunately a good log-in password isn’t enough to stop someone from accessing your data when your laptop gets stolen. Your log-in password can be circumvented with any Linux Live CD. Therefore it’s important to encrypt your data and I will explain how you can do that on your (installed) Linux laptop. This how-to is written for Linux Mint (Debian) but it should also work for other distributions (like Ubuntu). You can use it to encrypt your home folder after installing Linux.

Step 0: Backup your (unencrypted) home folder

Before you start, you should backup the important files in your home folder. You can do this by copying your home folder to an external drive or by using cloud storage. But this shouldn’t be a problem because you should always have backups (if you don’t, read this).

Step 1: Install the ecryptfs-utils package

You can do this using the command:
`sudo apt-get install ecryptfs-utils`

Step 2: Configure the ecryptfs module to load at startup.

You do this by adding `ecryptfs` to the /etc/modules file.

BEFORE you log in with your regular user name in the (graphical) log-in window, go to a non-graphical log-in terminal by pressing CTRL+ALT+F1. There you log in as root.

Step 5: Start the encryption of your home folder

In the terminal where you logged in as root, enter the following command where you replace USERNAME with your own username:
`ecryptfs-migrate-home -u USERNAME`

The script will ask you to fill in the password of your normal Linux account (of which you want to encrypt the home folder). After that the encryption starts. This can take a while depending on the number of files you have in your home folder. Wait for the encryption to complete.

DO THIS BEFORE REBOOTING YOUR SYSTEM! Go back to the graphical log-in window by pressing CTRL+ALT+F7. Log in and verify that your files are still present and that you can read them. If this is not the case, you should restore the backup you made in step 0 or the backup generated by the script that looks like USERNAME.d5JafeTE (in the home directory).

Step 7: Backup your randomly generated mount passphrase

The ecryptfs utility generated a mount passphrase that is necessary to mount your encrypted data. The mounting happens automatically when you log-in but not when approaching the data from another Linux installation (like a live CD). Then you need to give the mount passphrase and that’s why you should save it on some external medium. You can display your current mount passphrase using the command:
`sudo ecryptfs-unwrap-passphrase`

Just to be sure, restart your computer again and verify that you can read your data after logging in.

Step 9: Remove the backup folder generated by the script

After you made sure that your data is alright, you can remove the backup of your home folder that was generated by the script. This folder is located in /home and looks like USERNAME.d5JafeTE

Step 10: Enjoy your newly encrypted home folder.

I would like to end this post with some remarks:

• The encryption of your home folder has a noticeable impact on the performance of your system. The impact is minimal and your system stays absolutely usable. Just take it into account when doing this.
• Make sure you have unencrypted backups of all your data for when your Linux system breaks and you lost your mount passphrase (or the encryption went corrupt). When your data is encrypted, there is no way of retrieving it with a live CD.
• Dropbox and SpiderOak have no problem with the encryption and your data is readable when you access it from another SpiderOak or Dropbox client (on a different computer). It is possible that they start uploading after the first reboot, but they only upload information about the ‘last-modified’ meta data of the files (and that changed since the files where encrypted). I haven’t tested with other could storage solutions, but I expect that they’ll behave in a similar way.

Happy encrypting!

# Improving the Security of Your Online and Mobile Life

The past few days I’ve been busy working on the security of my online and mobile life and in this post I want to share the things I learned while doing so. I will also discuss some great apps I discovered that can help you improve your security A LOT! These are the apps that I personally use or think that are worth mentioning. If you have suggestions of your own, please feel free to leave them in the comments bellow. Some of the links mentioned in this post are referral links. When using that link to register to the corresponding service, we both get some benefit ;-).

Do you also have a ton of accounts on different websites and forums? And do you also use only one to seven passwords you know by heart? If you do, than you’re in the same situation I was almost two years ago.  The problem with having only seven passwords you (can) remember is that on a lot of sites you use a duplicate password. And if one of those sites isn’t that securely protected or if your password wasn’t that strong, then you have a problem.

Another issue with passwords is that they are hard to remember. If you want to properly protect your personal email, PayPal or even Facebook and Twitter account, you better create a long password containing more than 15 characters. Plus your password should contain small letters, capitalized letters, numbers and symbols and should not be easy to reconstruct. A rule of thumb is that the more ‘random’ your password is, the more secure it is.

But remembering a random password of more than 15 characters isn’t easy. It’s even more difficult to remember one for each different website (or social network) you register. And here is where a good password manager comes in. Before I always felt like that a password manager limited me because when I use a friend’s computer, I don’t have my passwords with me (because he doesn’t have the same, or no password manager). But then I realized that in 98% of all the sites I log in to, I’m doing it on my own computer. So I only have to remember passwords for those other 2% which I do access from other computers and this is what convinced me to use LastPass!

## Backups, Backups and Synchronization

The next thing I would like to this discuss is backup software. Everyone should make backups of their files but I know too many people who still don’t. And this while, with the emergency of cloud storage, making backups has never been so easy!

Another problem I have is that I use many different devices and platforms. I use my laptop which runs Windows and Linux. I also own an old desktop computer which I use  now and then and I have my smart phone. If you also use multiple devices, you know that having all your files in one place is difficult and that they’re always in the wrong place.

I’m currently using both SpiderOak and Dropbox. I use Dropbox for easy synchronization and sharing with friends who exclusively use Dropbox. And I’m using SpiderOak to back up and synchronize more personal data (like pictures, videos, contact details, thesis, research stuff…) because of it’s added security and privacy.

## It’s small, smart and when you lose it, you have a problem

To finish this post (before it gets too long) I want to tell you about something I realized only a few days ago. I have an Android smart phone with a lot of different apps. I use it as my phone but also to check my email, manage my calendar, update my blog… But then I suddenly realized that my phone knows a lot about me. And with all those apps, it has access to a lot of my online accounts. It startled me even more that the only protection that my phone offered is an unlock key or pattern.

I started my quest to find an app that fixes this issue and there are actually a lot (strange that I didn’t saw them earlier). These are the ones I selected: Kaspersky Mobile Security, Lookout Security & Antivirus and Norton Antivirus & Security (these are links to the Android apps, but most of them have iOS versions too). All these apps offer antivirus scanning but also, and more relevant to my problem, remote locking and wiping of your phone. So if you lose your phone, you can send a message to it (either by SMS or the Internet) and then the application will lock your phone and/or wipe all personal data from it. When you locked your phone and you find it again, you can unlock it with some secret code.

## Conclusion

LastPass is really a must-have because having different, secure passwords for every account is very important and LastPass helps you with this for free and in a very secure way. Having (off-site) backups of your data is also very important but privacy is a major concern here. I think SpiderOak and Wuala are the only cloud storage providers that offer you complete privacy and security, so I recommend that you give them a try. Your smart phone probably has access to a lot of your personal data so protecting it is very important. Therefore you better install a remote locking and wiping application so losing your smart phone doesn’t end in a personal catastrophe.

That’s it for today! I hope you discovered some new, interesting applications and that you use them to improve the security of your online and mobile life.

# Stop the blinking wireless LED in Linux

I’ve recently had some problems with the wireless LED of my laptop in Linux. I have a Intel WiFi Link 5100 but this also applies to other Intel WiFi cards.  The LED that indicates that my WiFi is enabled or not, was blinking every time the WiFi card transmitted or received data. This seems like some special feature Intel introduced but it is really very annoying! Luckily you can stop the blinking, but this depends on your kernel version so make sure to look into the right section. I’m posting solutions for Linux Mint (Debian), Ubuntu and Arch Linux but I think this will also work for other distros.

## Kernel version lower than 3.2.0

Put this text

`options iwlagn led_mode=1`

in the following file (possibly you have to create the file):

• Linux Mint (Debian) or Ubuntu: `/etc/modprobe.d/iwlagn.conf`
• Arch Linux: `/etc/modprobe.d/modprobe.conf`

`sudo -i`
`modprobe -r iwlagn && modprobe iwlagn`

If that doesn’t work, you can try putting the following in the same file:

`options iwl_legacy led_mode=1`

## Kernel version greater or equal to 3.2.0

Put this text

`options iwlwifi led_mode=1`

in the following file (possibly you have to create the file):

• Linux Mint (Debian) or Ubuntu: `/etc/modprobe.d/wlan.conf`
• Arch Linux: `/etc/modprobe.d/modprobe.conf`

`sudo -i`
`modprobe -r iwlwifi && modprobe iwlwifi`
`options iwlegacy led_mode=1`