Informatics posts

Many people (I am one of them) spend a large proportion of their working days in front of a computer. Unfortunately I believe that only little training in using a computer is given to students outside of Computer Science departments, and I believe that a large amount of time is lost as a consequence (at least, this is what I feel for myself). In the last years I learnt a few tips (largely thanks to people at the IT departments of the Universities I have worked at and thanks to many nice webpages) that can help others as well and that I want to try to share. In addition, I also put here a few posts that are more about scientific vulgarisation of computer science ideas that I randomly came across in my daily work.

Customization of the .bashrc and .vimrc

In this post, I say a little bit about how to adapt your .bashrc and .vimrc files to your needs and I give you the example of the files I use myself.

Bash tips

A few tips that may help you a lot to to use your terminal more efficiently.

Automate the generation of your publication quality figures in Matlab

Generating good quality figures with Matlab can be a headache. In particular, one must be extra carefull to avoid issues with the images size, ratio, font size and margin sizes. I started using a standardised script to make things easier, for more informations see here.

Get to know the Atom text editor!

Atom is an Open Source, fully customizable text editor with a very convenient plugins management system. It can be set to behave exactly like your favorite programming text editor (may it be Emacs, Vim or what other else), and can be extended with a lot of great functionnalities (for example, dynamically executing inline Python code calling an IPython kernel, or using the Jedi tool to dynamically access help on Python functions). Much more here!

A few words about the Python path and how to import modules

I am ashamed to recognize it, but it took me a while to figure out how Python imports work and how to deal with imports on a package I am working on, before I get it installed on my system. Here you will find a very quick reminder about Python absolute imports, and how to correctly deal with adding path to packages when you are using Virtualenvs.

A few words about python assert and tests

I am not a programmer or computer scientist by training, and I had to learn by myself most of my programming skills. One skill that I now find particularly useful (understand, I would have wanted to hear / get started about it much earlier), is to use the assert statement and tests when developing in Python. Go here for a very short introduction about this topic.

Please, stop using Matlab, especially for teaching - move to Python! Python is far better.

Many science courses at university rely on a bit of programming and scripting. This is especially true in Physics and Fluid Mechanics (that I work with). Many students (including me back in time) are trained on Matlab during those courses. I started using Python together with Numpy / Scipy since about one year ago, and I am now 100 percent convinced that it is a far, far better solution than Matlab. I hope I can convince you in this post!

A weak form of security through isolation: installing several full disk encrypted OSs.

Security through isolation sounds like a great feature, that would let me test software from PPAs and other code sources I do not trust without compromising my system. However, I do not get Qubes to work on my machine and using virtual machines has some drawbacks I would like to avoid, such as reduced performance and bad access to harware such as Wifi cards. Therefore, I want to install multiple full disk encryption OSs on one machine, which needs a bit of setup by hand. More here!

A few words about code profiling and optimization

Writing code which executes fast is an important aspect of code development, however it is easy to get this step wrong. To avoid premature optimization and focus your energy on the code segments, you will have to decide when code optmisation is relevant to your workflow, and use tools such as profilers. More here, with a special focus on Python.

Diff tools

Diff tools will help you highlight changes between files, and make it easier to compare different versions of, for example, a piece of code or a paper. In this post, I give you a few examples of diff tools that I find useful.

Customizing Ubuntu

I used to think that customizing a computer appearance and theme sounds a bit childish. But now that I work long days mostly on a computer screen, I am convinced that using a few tricks, such as nice shortcuts and dark themes, do make me more productive and reduce ocular fatigue. More here!

A short introduction to git

There are many high quality tutorials and courses about git. However, many are maybe too extensive and a bit frightening to newcomers. In this post, I give a short overview of git and the most common git commands you will need to integrate it to your workflow, trying to stay as simple as possible and to focus only on the commands relevant to the casual user.

A few words about lossless compression and Huffman coding

Lossless compression is commonly used to reduce the size of files. In this vulgatisation post, I give a very simple explanation of the key idea underlying lossless compression, and I refer to a Python implementation of Huffman encoding that you can use to play around and experiment by yourself.

Quaternions, 3D rotations and integrating gyro data

Thanks to the availability of cheap MEMS sensors, it is now very easy to integrate sensors containing gyros in a variety of projects. This, in turns, makes it possible to track object orientation in 3D. While not specially complicated, expressing rotations in 3D can be tricky if not an adapted formalism is used. In this post, I talk a bit about how quaternions can be used to integrate gyro data and track the orientation of an object.

Downloading streaming content

Streaming is a very convenient way to access media content online. However, it can be frustrating at times not to be able to download streaming content (for example, for playing it during a long trip when you have no network access). In this post, I will explain you quickly the main lines of how streaming works, and how you can download whole media files.

A few words about steganography

I have been very curious for some time now about steganography, which is the art of hiding a message into an apparently inocuous support. However, performing steganography that resists to detection is more challenging than one may think. More about this here.

Getting started with the Raspberry Pi

I like to use a Raspberry Pi for applications where I need extended uptimes and more computing power than what a microcontroller can provide. Getting started with using Rasperry Pi computers is really quite simple, and in this post you will find a little bit of help that should let you reduce boot time and get internet access with the Raspbian Lite OS.

Some scripting to speed-up work with LaTex documents

LaTex is a great tool for generating professional-quality documents. In this post, I give a few tips on how to automate a bit the compilation of LaTex documents and the generation of images of reduced resolution.