All posts by bruno

Learn the day of the week of any date

If you are not familiar with memory techniques, you might not fully understand what’s going on here, in case, you might like to have a look on the wiki of

The technique is well known by memory guys. It consists in summing up 3 values and take the remainder of the euclidian division by 7.

For example, for 12 february 1945

  1. 19 =  7*2+5   => 5 (euclidian remainder)
  2. February   => 4 (learned association, explained after)
  3. 1945   => 6 (learned association, explained after)
  4. 5+4+6 = 15 = 2*7+1 => 1 (sum of the previous numbers, and euclidian remainder)
  5. 1=>monday (index in the week)

12 february 1945 is a monday

Explanation :

  • First step : a simple euclidian division, you take the remainder. ( e.g 21=7*3+0 => 0 ; 3=7*0 + 3 )
  • Second step : based on a learned association (January=1 ,February=4, march=4, avril=0, may=2, june=5, july=0,august=3,septembre=6,octobre=1,novembre=4,decembre=6).  Not so hard to learn if you use your memory system.
  • Third step : based on a learned repartition of all your numbers (0→99) in 7 rooms of your date palace. (check the following map at the end to know the repartition, I am too lazy to rewrite it for the moment. This is the hardest part.
  • Fourth step : add all the stuff up and as step 1, take the remainderof the euclidian division by 7.
  • Fifth step : add your day code.  As I am a french I prefer by convention that weeks start on monday so 1 is monday, 2 is tuesday, etc…. If you want to start your week with sunday, adapt your date palace by subtracting 1 to each of the location related digit (unless 0 which becomes 6).

Aaaaand the map is in french, sorry about that.


I used VUE (visual understanding environment) software  to build this. It helps me to review. Of course this map is dull and only display basic informations to mentally review my palace. In my mind it corresponds to real places and real interactions between my numbers (the numbers are associated with people I know).

Notes :

  • If you got  leap years (when the year can be divided by 4, like 88), you have to substract 1 from your final result if and only if the month is january of february.
  • If it’s another century than the XXth century, you have to add at the end a century code : 2 for 1800→1899 and 6 for 2000→2999.
  • To find the century code of another century, add 5 to the previous one. Unless it’s century leap year like 2000, 2400, 2800 …. in which case you add 6 instead. For example, century code for 2200→2299 is 6+5+5=16 which can be replaced by 2 (because 7*2 + 2 = 16). Of course there is a formula to compute the century code of any century. Have a look at the end of the post if you dare.

Let’s take a final example of a leap year in the XXI century :
15 january 2004

  1. 15 = 7*2+1 => 1
  2. january : 1
  3. 04 : 4
  4. sum = 6
  5. [leap year step] = 6-1 = 5
  6. [another century step] = 5 + 6 =11
  7. final result 11=7*1+4 => 4
  8. day : 4=>Thursday

Notice for centuries far from XIX. Let’s take 1900-1999 century for an example :

  1. 19 = 4 * 4 + 3 (dividend of the euclidian division by 4)
  2. 19*5=95 (multiply the century by 5)
  3. 95+4=99 (add all the stuff)
  4. 99+6=105 (add 6)
  5. 105=7*15 + 0  (euclidian remainder, the century code is 0)

To avoid big numbers, note that you can simplify early your expressions. You can do instead :

  1. 19 = 4 * 4 + 3 (dividend of the euclidian division by 4)
  2. 19*5=95 can be replaced by 5*5=25 (because 19=7*2+5) and 25 can be replaced by 4 (because 7*3+4=25
  3. 4+4+6=14 (add all the stuff, add 6)
  4. 7=7*2+ 0  (euclidian remainder)

artificial memory palace based on video games

This post may only interest people with knowledge on loci method (or memory palaces), if you don’t know about these techniques, please have a tour on especially on the wiki 

As suggested there artificial memory palaces can be built from video games. As far as I know, there are two lazy options to get fresh locis :

- Maps of video games ( this website has a lot : ). If, like me, you are fond of zelda ocarina of times, you might find  these maps very interesting. It might provide huge resources, I learned Pi to its 1000th decimals (not sure I remember perfectly though) using less than 10% of the maps.

- Video of video games : It might be a good option if you don’t find the map you need and even more handy if you want to use journeys on the fly.

I tried with mario N64 (because I did not find maps on and I picked this amazing speed run. Side note : Speed Runners are such crazy beasts… They should try memory palaces, they have the mental and the material to outperform us.

Here is my workflow : I used evernote+skitch to annotate (in a very rudimentar way) my set of locis. Then to reproduce it…you need evernote+skitch.  Screenshots are at the bottom of the post.

First I divide my screen in two, my attention is divided. I try to find good mnemonics images for my learning material when the video is not interesting (even if it’s rare), and when the video is about to reveal interesting place, I pause,  I push F10 (my shortcut to take a partial screenshot), I push some arrows pointing to the position of my mental images, I save. Life is too short to add extra informations, but skitch is ideal if you want to add extra stuff (like the aimed content for example). After the session, you might find useful to export all the stuff in a unique html file ( select your notes from evernote, file>export>export as a single web page). At the end you have something like this .  If, like me, you only use arrows, don’t forget to review as soon as you finish your session.

locisDivide your screen in two parts




When an interesting place is showing up, pause, screenshot and annotate with skitch.

Xmind Memory Error

If you just got this from Xmind :

Stay calm : your file is not dead

It’s a common bug of Xmind 2013 occurring if your .xmind file is too big. The easiest way to save your file is to delete some revisions which are made automatically, and cause the inflating weight of your files.

Step 1 : Back up your file
Step 2 : Open it with an archive software (like winrar), right-click>open with >Choose program… In windows.
Why ? Because an xmind file is in fact a rar archive file containing stull like xml files, images, attachments etc…
Step 3 : Open Revisions folder winrar
Step 4 : Delete all subfolders but the first one (which should be the  last revision) winrar2

Step 5 : close, and try to open your file – It should work.

I hope it helps.
To avoid further occurring of this problem, delete revisions in a regular fashion from time to time in file>revisions in Xmind.

Note : I love Xmind, but I have to admit that it’s not the most stable of mindmapping software. Obviously, I’ll update this post as soon as Xmind will get a reliable crash recovery. Even if the problem described here is not a big one, some users frequently reports that Xmind crashes while saving process and create a 0 bytes file. Back up your Xmind files regularly.

limitations of python text wrapper – a modest workaround

Writting text on image using TextWrap and PIL seems easy at first sight…but some users are suffering to know exactly what will be the dimensions of the wrap. There are  2 problems : 


This takes carlim in parameters and not the desired dimension of the box.


This may give a bad estimation when you use a custom font.
I describe in this post my solution to tackle these two problems. Continue reading

Use a Mindmap as a dashboard

This is my first post in this blog, it’s important for me to begin with this dashboard.

If you don’t know what is a mindmap, have a look on google image, or on this wiki if you want know more about this universe. I would also advice you to stop reading here, because dashboards are far from being the main interest of mindmapping.

Some purists might argue that this is not a real mindmap as it does not  respect some axioms. Well, this debate might have some interest in the case of regular mindmaps, but I think dashboards are a very special case.

It’s been 4 years that I use this mindmap as a dashboard, it has seen many changes with time, as it seems to be stable through these last months, I guess it’s the time to share it. This dashboard has been created with Xmind which is my favorite mindmapping application for the moment.

A dashboard is obviously personal as it has to fit (or to strengthen) your working habits, but I hope this one would give some inspiration for your very personal one.

captureThis map has 4 corners : Todo, Plan, Notes, and Motivation.

In the todo part, I enter the stuff I have to do in my day. Previously I had some different categories, now it’s split in just two parts : Main and others.

The Plan part concerns my planning 20 minutes by 20 minutes or my personal report when I am too lazy to plan. When I am in a good working flow each task contains these 4 informations : todo (the aim of the task), type (shorted or calibrated), done (what was really done), and do next (what remains). Just a word on the type attribute : if “shorted” it means that no matter what, I will stop doing this task when my stopwatch beeps for 20min, it forces me to be as efficient as possible. Then I switch to another task, and continue later. If calibrated, I truly think that I can do it in 20 min, then I bet that I will do it.

The note part is reserved to write some new ideas I have, or some new stuff I have to keep in mind. This place is just a kind of temporary. I place notes there in order to not break the workflow, and I move them latter on another mindmap or in evernote or somewhere else.

The motivation part aims for stuff which helps me to keep focused. This part is very changing for me. Years ago I had some kind of motivators, like “you are awesome” type and some personal commitment like “I have to succeed in this or that”. Now, that I found how effective was gamification for me, I used rather blocks aiming for counting points. When I work well (use a distraction site blocker like cold turkey, using my 20 min timer, practicing relaxation techniques, or calibrating precisely my tasks) I grant myself some points, which allows me to up a productivity block in habit RPG, and then level up etc…geek you say ?

Here is a biggest picture and the xmind file, if you want to fork it for your own needs.

English is not my first language, then don’t hesitate to correct me.