Literate Programming

First impressions, Aug 8, 2018

Knuth wrote the seminal work on this subject as well (apart from a variety of other subjects). Literate programming is like embedding code in a free flowing essay describing what your program does and generating both code and documentation from that one document, literally from the source code. It is not well documented code.

Wrote my first literate program today -- a Newton Raphson Solver. What I found interesting is that literate programming slows you down (significantly), but forces you to think about your programming at a more meta level. "Is this making sense and not just for me but for another reader?" While this question might seem irrelevant unless you intend to share code, answering it helps clear up conceptual limitations in thinking about code.

I am using noweb installed using apt on ubuntu.

Algorithms by Jeff Erickson

The reason for writing an algorithm, Jul 3, 2019

I have just started reading Jeff Erikson's very engaging book on Algorithms and the following quote struck me, which I am reproducing verbatim

Your primary job as an algorithm designer is teaching other people how and why your algorithms work. If you can’t communicate your ideas to other human beings, they may as well not exist. Producing correct and efficient executable code is an important but secondary goal. Convincing yourself, your professors, your (prospective) employers, your colleagues, or your students that you are smart is at best a distant third.

Unsurmountable Soft Power

US Technology Preeminence, Dec 17, 2019

Today I was seeing a document on the race for quantum supremacy between US and China. It had the usual statements about China aspiring to be the next technology superpower. But the thought which struck me is that if the US does not fall off a cliff as far as research funding is concerned, there is no danger of the US being supplanted as the preeminent technology superpower. The reason for this is that unlike Chinese companies, the US companies like Google, Intel and Microsoft are actual global companies in that they can tap global talent. This is the real power of the US -- their formidable soft power which allows them to attract talent from all over the world -- US companies remain aspirational. No single country can compete with that type of access to talent. The USSR failed, and to an extent, so did Japan. Japan managed to circumvent the problem by opening offices in the US, but access being increasingly closed to Chinese firms, China might not be able to get that advantage.