How to show the Git branch in the Linux prompt

In pictures

How to go from this…

… to this?

Short answer

We will be changing your .bashrc file. It is located in your home.

  1. Make a save of your .bashrc file (one is never too careful; cp -p .bashrc .bashrc.sav).
  2. Optional step: make your prompt colored by uncommenting the highlighted line:

  1. Now locate the last line of the following excerpt and edit the previous lines accordingly to the following line:

  1. Restart your prompt, you’re done.

Something more detailed

Continue reading How to show the Git branch in the Linux prompt

Which keyboard layout is best for you?

For programming or writing, we use a keyboard. Most of times, we use the layout common in our area (QWERTY in English-speaking countries, AZERTY in France, QWERTZ in Germany, …). Some more advanced users sometimes look in alternative layouts (e.g. Dvorak), but finding the best fit in this jungle without being wronged by what’s fashionable can be difficult.

I just tumbled on a Keyboard Layout Analyzer which, from some sample text you input, analyzes which keyboard layout would be best for you.

For instance, I tried with the source for My latest entry and the analyzer tells me that, to write my English Markdown text, Colemak is the best fit (Colemak is an alternative layout for English, 3rd just behind QWERTY and Dvorak). And AZERTY, my usual layout, is the worst…

The fun facts are interesting: in the “Miscellaneous” tab, you can see I had to use the Alt Gr key 72 times. On any layout other than AZERTY, I would not even have touched it once. Heat maps gives a pretty good idea of the finger moves you’ll have to make, too.

There are limitations nonetheless: only six layouts are available, namely QWERTY, AZERTY, Simplified Dvorak, Programmer Dvorak, Colemak and Personalized (I don’t know this one, maybe a specific built for the author’s own needs?). I dare not test one of my French texts as input, though I would have loved to see BÉPO and French Dvorak ranked against AZERTY.

So, what’s your best fit?


Image courtesy by Alcibiade, CC-BY 4.0

The Cost of Time

This morning, I arrived at work, booted my machine and launched the core applications I need before even thinking of starting to work: Outlook, so that I can read the e-mail I might have received, Chrome, to see what is new in JIRA, and of course Eclipse which will be used for all development.

Can you guess how long it took to boot and launch only those three? 10 or 15 minutes. Not so much. Just a quarter of an hour lost before even beginning working.

And even once all this was finally up (Eclipse easily took three full minutes), just reading and answering e-mail was a pain. Opening a new tab in Chrome made me wait twenty seconds before I could begin typing in the omnibar, my input for a new message in Outlook had a delay of several seconds, …

It is my (maybe not-so-humble, sorry) opinion that when a developer is faster than his/her machine, there is a problem.

At home, booting1 takes two minutes (half of it being after Windows started). That is already undoubtedly faster than what I have at work, but applications launch in a few seconds too, and they never lag once they are up. Admittedly, I have a killer machine (there was a reason for buying it, even if it is gone now).

But that gives some thinking: lost time is lost money for a company. Which is the most advantageous between losing developer time or buying a efficient machine?

Continue reading The Cost of Time