Skip to main content

My Desk is an Optimal Container

When you do informatics codes, sooner or later you are concerned with data containers and their associated complexities for inserting, getting, sorting or whatsoever. Some of them are lists, vectors, map, set etc...

Sometimes you use a container for some stuff and you get unexpected low behavior. Then you go into your manager's office and ask for complexity of what you are doing. By the way, he convinces you that you are the last of the idiots of computer scientists (thing I take as an honor), and you just change your container.

But the people who are working on containers (have you ever looked to the STL (standard template library) to see how containers are implemented ? Not sure those people are human...) should try to investigate how my desk is working. It is very messy, there is a lot of stuff on it (even food sometimes) but I always find my items in a constant time.

Well, almost always. Notably when someone put it in order (presumably the housekeeper or some terribly insane industrial spy). Then we get the worst case complexity, and I seek over the same pile of thing all over again being sure that it has been here. But nope. My mess is an ordered one. Her (or his?) order is a chaos to me.

Note that (see the picture) some people who are apparently working on chaos theory (and practice ) apply the same methodology for their blackboard !!

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 ...

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 f...

Circles Packing and Kepler Theorem

By a bored Saturday afternoon I decided to make a little code for my amusment to test the sphere packing theorem. So what I did is to try to pack as many small circles into a big one, by an incremental method which doesn't converge but still gives convincing results. The animation showed here is a vizualisation of this incremental method which tries to minimize overlap one by one. I also tried with circles of various radius. What strikes me is the waves that propagates from circles that have trouble to insert themselves among other. We can see them propagating from one side to an other of the green circle (sorry for colorblind people, those are default gunplot colors).