Skip to main content

We're not playing dices !


Software programming and design is an amazingly complex task. Specially when it concerns numerical applications, that generally require optimization to get results in a reasonable time. For that purpose the basic pattern is usually to write the code as simple as possible, debug it and when it works to begin the optimization process. This asks for some nerves, and patience, two things I usually don't have in real life, but for programming yes.

This design pattern makes sense because we are doing things really sequentially. You first wrote some c++ class and then add some feature progressively, and when you come up with essentially different concept (I mean a concept that should be well separated from the first one), you write an other class and so on...

Usually the class-writing process follows the solving process you have in mind. For instance you have to make some initialization on your model first, then you declare some variables for the computation, the computation then follows and everything ends by post processing some (possibly) meaningful results.

So, basically, inherently, their is a sequential pre-designed pattern that you follow naively. And you always keep in mind the sentence of D. Knuth: "Early optimization is the root of Evil."

Really ? Hum, not sure. At least it is true in our sequential way of working. But if you consider primitive life, or bacteria, may be the picture is different. May be each individual tries to optimize as much as possible, but only the one who have the good genome and initial condition succeed, while the other perish. In their case, optimization and selection is the root of something that works better that whatever we may think about, and possibly the index of God (or the intelligent design maker of our messy, not messiah -bible mistranslation-, universe).

So nonetheless God actually play dices a lot but moreover he left the code programmer with the inability to do the same thing.

Such a pity.

PS: The picture from the dices is taken at the CERN, see this site. Phycisist changed their minds ?

Comments

Popular posts from this blog

Shear waves, medecine and brain

Yesterday evening, too bored by what TV was proposing to me, I decided to watch a conference of Mathias Fink , a french researcher working on multidisciplinary application of waves. Specially shear waves.  Here is a brief summary of his talk. In solids, waves have two principal components:  compression waves (P-waves for primary) moving in the direction of propagation, and shear waves (S-waves, for secondary) that make ripples in the plane orthogonal to that direction. Since compression waves propagate in the direction of propagation, they move faster than shear waves. Usually ultrasound equipment in medicine only use compressional waves. But since human tissues have a high bulk modulus, the P-wave speed is relatively constant (around 1580 m/s). Human tissues are very stiff if you apply isotropic constraints on them (like pressure of water). However M. Fink and his colleagues proposed a new way to investigate human tissues by first sending a strong compressional wave in ...

Why Thinking is important

This week I went to the dentist for a routine check-up. By inspecting his waiting room I should have guessed that my dentist was a Jeovah witness. The book questioning the existence of pardise should have warned me. After a while the dentist came in and I sat in the scary chair with pipes and syringes all over. I looked at my wisdom teeth that I should remove because there is no place left for them in my mouth. I mean really no place, one is pushing against my jaw and it make a terrible infection. The dentist began to explain me that I should open my mind, that I should make some work upon myself and give a place to those teeth, that they were here for a REASON. It was not a matter of surgery, just a matter of faith and self opening to the world. Seeing that I was more and more sceptical, he mistakingly took the example of homepathy to explain me that OTHER WAYS exist. "Yeah, I replied, I know that. It's the placebo effect. But it work only if you believe it". At that p...