Sunday, May 24, 2020

Dangers of 'low head' dams

Low-head dams are dams that are usually of small height (a few meters) without shutters, made to raise the water level upstream of the dam. I think common in parts of rural India for irrigation purposes. I see them depicted quite a lot in Indian films.

However, there is a hidden danger in the water-flow below these dams; people could easily drown in the turbulent region immediately downstream when the current could catch hold of a person and keep them submerged for a long time.

I came to know of it through this video from "Practical Engineering", who speaks in detail about water flow around low-head dams using physical models they have built. To me, it seems it such video/safety instruction should be shown to all who live near these dams.

Wednesday, May 13, 2020

Small Things Matter

Thumbing through Samuel Johnson's Selected Essays is a very enlightening experience. Today I came across this:
"Those who exalt themselves into the chair of instruction, without inquiring whether any will submit to their authority, have not sufficiently considered how much of human life passes in little incidents, cursory conversation, slight business, and casual amusements; and therefore they have endeavoured only to inculcate the more awful virtues, without condescending to regard those petty qualities, which grow important only by their frequency, and which, though they produce no single acts of heroism, nor astonish us by great events, yet are every moment exerting their influence upon us, and make the draught of life sweet or bitter by imperceptible instillations. They operate unseen and unregarded, as change of air makes us sick or healthy, though we breathe it without attention, and only know the particles that impregnate it by their salutary or malignant effects."

Small things and gestures matter, because these are done or happen very many times in the course of life. and their cumulative effects add up over time. That is something that I have struggled to understand and practice throughout my life. But see how deeply perceptive Johnson is, every facet of human nature which he examines, he brings forth with the utmost clarity.

Saturday, May 2, 2020

The Drawabox.com drawing course


Learning to draw as an adult is often an activity beset with much confusion. There is a myriad of books and Youtube and other video content available, but most of it is very fragmentary, many of them just collections of nifty tricks suitable for very specific situations and mediums. Good real-life teachers are hard to come by. May be a reflection of the lack of importance given to art instruction in the modern curriculum.

Reading Johns Ruskin's book was very helpful. He understood the act of seeing, visualizing and representing in a fundamental manner, and his words are rich with meaning. He wrote:

 "For I am nearly convinced, that when once we see keenly enough, there is very little difficulty in drawing what we see; but, even supposing that this difficulty be still great, I believe that the sight is a more important thing than the drawing; and I would rather teach drawing that my pupils may learn to love Nature, than teach the looking at Nature that they may learn to draw. It is surely also a more important thing, for young people and unprofessional students, to know how to appreciate the art of others, than to gain much power in art themselves. Now the modes of sketching ordinarily taught are inconsistent with this power of judgment. No person trained to the superficial execution of modern water-colour painting can understand the work of Titian or Leonardo; they must forever remain blind to the refinement of such men's pencilling, and the precision of their thinking."

And beyond the instructive value, his book is a delicate pleasure to read:


"In drawing villages, take great pains with the gardens; a rustic garden is in every way beautiful. If you have time, draw all the rows of cabbages, and hollyhocks, and broken fences, and wandering eglantines, and bossy roses; you cannot have better practice, nor be kept by anything in purer thoughts.Make intimate friends with all the brooks in your neighbourhood, and study them ripple by ripple."

But only recently have I come to know of Drawabox.com, an online set of lessons that offered a fundamental treatment of the techniques and methods of drawing, which focuses on the core problems of drawing: of how to represent scenes and objects in three dimensions on to a two-dimensional workspace. I especially like the design of the exercises, which attempts to make one's own mistakes self-evident and thereby guiding the learner to correct them. This is a very important thing, since in passive self-study with a book or a video course, it is difficult to become aware of mistakes one is making and to learn to overcome them, without those mistakes becoming ingrained in one's mind. Of course, only the physical presence of a human teacher can fully guide a learner in this regard, but I think Drawabox, achieves as much as it possible for an online self-directed course to do so.


Wednesday, April 29, 2020

''Alternative tokens" in C

For years it was possible to use the more easy on the eye keywords and, or, not in place of operators &&,  ||, ! in C++. However, when working with C codebases these keywords aren't available. Though they are just syntactic sugar, in my view they greatly simplify readability, especially while expressing complex logical conditions.

TIL, that there is a thing in C called the 'C alternative tokens', which allows us to use these and a few more symbols instead of the operators. One has to only include the header "iso646.h", and these are part of the C standard from a long time, so I suppose It should be available in most compiler environments.


Tuesday, April 28, 2020

The Theory of Steinitz

A few months ago I was playing a match in the chess competition at work. It is not a very serious affair, we play by a simple time limit scheme, and the tournament is played in a knockout format. That is if you lost one match, you out of the tournament. My memory is that it was my third match in the tournament, and my opponent was someone I hadn't met before.

In that cohort of amateurs that form the tournament, my assessment was that I was of a middling grade. I am not a frequent player at all. Hardly play one or two matches every few months against computers, or even more rarely against human opponents in online short-time limit matches. But across the board play, is a vastly different experience, especially when something is at stake like getting kicked out of the tournament.

What I noticed about across the board play with opponents of similar ability to one, is that it is more about being careful of not making mistakes. Play cautiously, and wait, bid time, till opponent makes a small mistake. Then try to consolidate by exchanging material like queens, knights, if possible, since the material advantage increases as the total material on board reduce.

Recently I come across this aspect formally expressed, known as the "The Theory of Steinitz", which comprises the following points as quoted by the Exeter Chess Club:

  1. At the beginning of the game the forces stand in equilibrium.
  2. Correct play on both sides maintains this equilibrium and leads to a drawn game.
  3. Therefore a player can win only as a consequence of an error made by the opponent. (There is no such thing as a winning move.)
  4. As long as the equilibrium is maintained, an attack, however skilful, cannot succeed against correct defence. Such a defence will eventually necessitate the withdrawal and regrouping of the attacking pieces and te attacker will then inevitably suffer disadvantage.
  5. Therefore a player should not attack until he already has an advantage, caused by the opponent's error, that justifies the decision to attack.
  6. At the beginning of the game a player should not at once seek to attack. Instead, a player should seek to disturb the equilibrium in his favour by inducing the opponent to make an error - a preliminary before attacking.
  7. When a sufficient advantage has been obtained, a player must attack or the advantage will be dissipated."

However, on that occasion, it happened that it was I who made an error, a rampant mind fog blunder, which caused me to confuse the board position, and ended up giving up my queen in exchange for nothing. I really felt bad that time, it was an elementary mistake, not having checked positions carefully before moving. But it was a real feeling, may be something you can get only on playing across the board.