TL;DR:
One practical take home message is this:When using
See the examples in that post.
Some thoughts on the emergence of patterns, physics, math,...science in general and the teaching of it all.
TL;DR:
One practical take home message is this:We all "know" what Science is...at least at we have a pedestrian working definition of sorts: based on experimentation, models and theories need to explain known facts but also predict new ones that then must be confirmed...by experiments. Some say this as they must be refutable -as in the opposite of not even wrong.
Here I want to suggest another, hopefully equivalent, idea. Something that has bothered me for some time now is that naive realism that I feel lurks under expressions like the following attributed to Max Planck
An experiment is a question which science poses to Nature and a measurement is the recording of Nature's answer.
The following ideas are closer to a different quote attributed to Carl Sagan
Science is a way of thinking much more than a body of knowledge
Looking through the window you might say "the trees are tall, the grass is green, the hill is smooth, the dairies are white and yellow,...".
That is poetry, literature. It's another approach to reality, to learn about ourselves in relation to others and to Nature. And it is a necessary one.
But it is not Science. Nor those are the only type of sentences we can come up with.
Here some different statements:
When we do/it does this, it happens that
In order to understand the it, we (let) apply "transformations" on it -the object of the transformation-, and "collect" the output -which itself is an it!
Science is about applying & combining transformations
We experiment and talk about it in order to be able to anticipate (predict).
If I would have to pick what I think could be three basic ingredients for becoming a successful and valued DevOps, it would be the following.
First and foremost one has to have a passion for automating things. It's the "hate to do things twice" attitude. But this is not software development per se. The goal here is to abstract away a process in a manner that gives us
It is automation as a way to gain a better overview of the infrastructure, its uses, and the needs for the business
Second ingredient, the "how you achieve automation of a process". Make a real story of your Jira story! Don't shy away nor be lazy to add comments full of details. This is the place where you don't need to worry much about formatting, yet you have all the tools to insert screenshots, links to other boards or documents, link it to further stories, tasks or even epics, explicitly raise the attention to other people that may or not be in your team, add snippets or even full scripts code, etc. Most importantly, it's a single stop shop where you can
Again, you get to do all that without worrying about the eye-candy of formatting not even constantly writing full sentences.
Clearly, the story is a living object that may evolve in content as you advance in its solution. And the good news is that it is always there. In the short term this helps gain accountability as well as keep in check our logic. In the mid and long term this attitude serves the traceability of the decisions and solutions taken. Others will certainly benefit greatly from it!
The third and last basic ingredient I would highlight: Show due reverence for the logs. Any scientific field, be it Physics, Math, Engineering or even Language or Humanities can be understood as a composition of processes. A network of maps each with its inputs and outputs: the output of each process is the input of the next.
The logs of your automation include any of its required outputs (say updating a bucket, building a stack, triggering a pipeline, etc.). But it's vital that its output be seen as a story in itself: Reading the logs of your scripts should immediately provide us with a clear view of a
And that should be done with a formatting that is
I can hear some of you already shouting "how does this apply to Terraforming or CD/CI?".
Well, you better structure your Terraform code into modules -yes, beyond the basic main.tf, variables.tf and terraform.tfvars. You see, It isn't then any different! And the whole CD/CI...There is a reason why the mathematicl concept of a map (for CS minded readers, think of lambda calculus, or a language like Lisp or Ocaml) is so powerful: It conveys the most basic idea of a path/process, among a plethora of other technical details. And that's what our pipelines are.
Of course is easy to keep adding ingredients: Eagerness to constantly learn and use new technology, embracing the KISS rule, be quick in documenting things, ... But if I'd have to pick a fourth one I would first go with a
Trust the adage "good is better than perfect".
Although I first heard it as "Perfect is the enemy of good". You get the idea though.
I asked about an update on how a former student finished their course last June.
"X's math course did not go well: he ended with a 70. Way below his ability. Not sure what happened but we are hoping that the return to in person learning will help him regain his footing academically. "
It's not satisfying.
I had other topics pending that I expected to talk about before this, and also earlier. But these months my new job got my attention away from the blog. I may comment on this in a future post -or not.
So, what brought me back? Well a problem that I've pondering over since about 4 years ago when teaching Computer Science at a High School level (Grades 9 to 12). The problem shows up in CS very early: What does repeatedly right-shifting a binary number represent? In essence, the (integer) logarithm in base 2, yes. But, division is a concept well controlled by any grade 9 student. Why not then introduce the logarithm already then?
We would need to 1) show how the laws of (integer) logarithms can be justified from repeated division, 2) show how can we calculate the general logarithm by only using integer logarithms, and, finally, 3) show the geometric description of the logarithm. These days I realized how 2) looks like. Hence this post.
Initially, I thought it could be more or less straightforward to derive the usual properties of the logarithm from those of the integer logarithm. Also, the idea of visualizing the logarithm and exponentiation as paths towards/away from 1 was appealing. After trying building the logarithm from its integer version, that seems now misguided. It is straightforward to introduce and justify (almost) all of the properties using the integer logarithm for powers of the same base. But in general that won't work: $ilog_25=2,\;ilog_35=1,\;ilog_23=1$ and clearly $ilog_25\neq ilog_35\, ilog_23$. However, the visualization as paths is straightforward.
I already wrote some time ago a few posts on the topic elsewhere. As I said back then, I like the number 1. It seems a dull choice and many may go for other more mysterious numbers like 4, 8 or 24. But there are some key elementary concepts that hinge on 1.
One of these concepts is the basic operations of multiplication and of division. Another (related) pair of concepts are the Logarithm and Exponentiation. The basic idea may be stated as what are the “paths” that lead to 1.
Let's first view this last statement graphically.
![]() | |
| Fig.1 Geometric construction of Multiplication and Division |
Point $U$ defines the unit of measure on axis $Px$, while $U'$ is its counterpart on axis $Py$. Then multiplying $A$ times $C$ yields point $AxC$, while the quotient $B/C$ is given by the point $BoC$. It is implicitly understood that all measures are in units of $OU$.
Hence, for $0<a<1,\;b>c>1$, both, repeated multiplication of $a$ times $c$, as well as repeated division of $b$ by $c$ can each be seen as a path towards $1$.
The same construction rules show, that $\lim_{n\to\infty}a^n=0,\;\lim_{n\to\infty}c^n=\infty$. Thus exponentiation corresponds to paths that go away from $1$. What operation do the paths of repeated divisions/multiplications without crossing $1$ correspond to ?
Note: This geometric construction of multiplication and division is valid in a projective space. Indeed, while the previous figure seems to show the constructions paths parallel (in an Euclidean sense) to either $UU'$ or $CU'$, the whole construction has been made as a projective construction with the line of infinity far enough.
The paths following repeated multiplication or divisions without crossing the unit lead to what we call the logarithm. Already from a geometric point of view, the logarithm seems "opposed/inverse" to exponentiation.
How many times can we divide $b$ by $c$ without crossing the unit $U$? or How many times does the "division-path" bounces off the $Py$ axis? Ans: $ilog_cb$
How many times can we multiply $a$ times $c$ without crossing the unit $U$? or How many times does the "multiplication-path" bounces off the $Py$ axis? Ans: $ilog_ca$
We will convene that when talking about multiplication paths, we will give the answer a negative sign. Hence, for the values of Fig.1, $ilog_ca=-1$ while $ilog_cb=2$: dividing the $BoCC$ further by $c$ would lead to a values smaller than the unit.
From the definition the following properties follow:
0.- $ilog_ca<0$ when $c>1,\;a<1$
1.- $ilog_c1=0$ If we divide/multiply the unit by $c$, we immediately move away from it. So, no paths available.
2.- $ilog_1a$ is undefined as we can both, multiply or divide $a$ by $1$ infinitely many times giving thus both $-\infty$ and $\infty$. In $\mathbf{P}\mathbf{R}$ we could evtl say it's the point at infinity.
3.- If $c <0$ or $a<0$ then $ilog_ba$ is undefined. It's either impossible to lead a path towards $1$ (when $a<0<b$) or totally meaningless ($b<0$).
The following are not clear-cut derivable from the definition, but seem quite plausible:
4.- $ilog_b m\,n = ilog_b m\,+\, ilog_bn$. Let's see why: Be $k=n\,m,\, i= iLog_bn,\; j = ilog_b m$, all integers. For simplicity sake, we’ll assume that the logarithms are exact. $ilog_b k$ corresponds to dividing the rectangle area by $b$. The side $n$ can be cut by $b$ $i$ times. That still leaves a rectangle of area $m$. This can be divided by $b$ $j$ times before the resulting area gets below $1$. Hence the original area can be divided $i+j$ times by $b$. qed.
5.- $ilog_ba\,=\,1/ilog_ab$
bla, bla, bla (I'll come back to this later. Right now, just wanted to get all this off my head)
Let's first state the result:
Be $a, b \in \cal{ R}^+, \; 1<b<a$, then
$$\log_b a = l_0\, +\, \frac{1} {l_2\, +\, \frac{1} { l_4\, +\, \frac{1} { l_6\, +\, \frac{1} {\cdots}}}}$$
Where $l_0\, \equiv\, i\log_b a$ is the integer logarithm of $a$ in base $b$ and $l_{2i}$ are all integer logarithms as well.
We will now clarify and justify this expression as a continuous fraction.
Be $b_0\equiv b$ and $b_{-1}\equiv a$. Then
$$
\frac{b_{i-1}}{b_{i}^{l_{2i}\,+\,l_{2i+1}}}=1 \\ \quad
b_{i+1}=\frac{b_{i-1}}{b_{i}^{l_{2i}}}$$
with $l_{2i} \in\mathbf{N}^*$, $0<l_{2i+1}<1$ and $1<b_i<b_{i-1}$.
From the definitions of logarithm and integer logarithm there are $l_1$ and $b_1$ such that
$$\frac{a}{b^{l_0+l_1} }=1\,, \;0<l_1<1 \\
\quad b_1\, \equiv\, \frac{a} {b^{l_0} }<b\\
\frac{b_1} {b_0^{l_1} } =1$$
To calculate $l_1\equiv\log_{b_0}b_1\,=\,\frac{1}{\log_{b_1}b_0}$ and we proceed the same way as before. Hence $\log_{b_1}b_0 \,=\,l_2\,+\,l_3$, where $0<l_3<1$ and $l_2=i\log_{b_1}b_0$.
In this last figure, point $A$ lies right off the limits of the picture. The red dot-dashed line shows repeated division by $B$, without crossing the unit $U$. This leads to $b_1$. Now do the swapping $A\gets b$ and $b\gets b_1$ and repeat. This leads to $b_2$. Each time count the number of bounces off the $Py$ axis (the one containing $U'$): That's gonna be $l_{2i}$. In this case, therefore, $l_0=3,\;l_2=2$.
Either some $b_i$ hits the unit and the process ends, or it never stops. In this first case, the result of $\log_ba$ is a rational number; in the second, an irrational (and transcendental) number.
In short, using just the operations of (repeated) multiplication and (repeated) division, given two numbers, $b,\, x$, the logarithm Log_b(x) is defined by paths leading towards $1$, while the exponentiation $b^x$, by paths leading away from $1$.
What can I say. I like "seeing" things and this geometric view is something fun.
I think there is way more intuition to uncover from a geometric view of the logarithm. I hope to describe some of it another time soon. For now, let me collect here some plots I had done and posted elsewhere before.
Of course, I had to find only now, that this is Daniel Shanks' algorithm for the logarithm published back in ... 1954 (https://www.jstor.org/stable/2001992 or https://www.ams.org/journals/mcom/1954-08-046/S0025-5718-1954-0061464-9/S0025-5718-1954-0061464-9.pdf) !
I still think that explicitly referring to the integer logarithm, as repeated division, adds a clear pedagogical value to it. Further so, if the geometric construction is shown.
Furthermore, for all pairs $0<a,b$ the logarithm $\log_ba$ can be thought as the continuous, projective "path" (as repeated rescaling) from $a$ to $1$ parameterized by $b$.
This is more of a wish list, or reminder of a vague idea, that would require to be made more precise.
On Google you can find a video from Mathematica showcasing the continuous fraction expression for a logarithm. See also this tweet or this site.
I found about Shanks on https://exstrom.com/blog/abrazolica/posts/logarithm.html
Only on an Euclidean setting we get the usual values of $log$ as obatin by any calculator. What does the same continuous fraction corresponds to in a Projective space? E.g. $\mathbb{RP}^2$ or $\;\mathbb{S}^2$
Likely more interesting would be the case of $\mathbb{HP}$ or $\mathbb{HP}^2$, where we loose the commutativity but still retain associativity, and thus, Desargues theorem, which is the only one needed for this construction to work.
Continuing with the topic of web servers and my work, as of the last days, of writing up some hands-on examples, I'm writing this post about a bug I found in Firefox. It's not new.
Before I do so, I do not want to pass the opportunity to touch on a topic that has been bugging me for quite some time now.
Let me start with a few examples.
I downloaded the source-code of Firefox -read below why. Nothing on the Mozilla project page alerts you of the size of the download required. It turns out that code is about 4GiB of download. But then you have to run some configuration scripts which also download some more stuff.
Don't ask me how much though: it's not mentioned nor notified anywhere!
That download forced me to update my Homebrew installation on my laptop. Yeah, I hadn't done so in quite a while. Hence, there where plenty of packages that were updated. Well, not always do you get warned about how much data it's gonna cost you nor will it ask you for confirmation to proceed.
While writing my previous post I decided to test the download of River, the Apache project originally developed by Sun under the name of Jini: Nowhere does it say how large is it gonna be such download...although this time a gzed-tarball ended up being somewhat less than 6MiB.
While browsing Bugzilla about the aforementioned bug, I came up way to often with a reply by what seemed Mozilla developers asking the posters commenting on buggy behaviour for a minimal example that would showcase the problem. It so is the case that what brought me to find out that same bug was precisely writing a minimal-case scenario for use with Firefox, namely, a basic server delivering some very simple HTML code back to the client.
So, developers of a huge project like Firefox, answering a question related to networking...and they cannot write themselves a minimal server in C that serves some 10 lines of HTML?
When I was doing Sys Admin work and would receive some request about an incident or something not working as they expected, I would always
I find both types of examples unhelpful and selfish -for the lack of a better word right now. That's all I'm gonna say about that and open-source right now.
And now about what I promised. Here is the bug:
Any web page whose HTML code starts like the following will trigger the bug in Firefox
<!doctype html><html><head><title>A 20yr-old bug</title><meta charset='utf-8'></head><body>...</body></html>
Mind you, a typical newspaper front page, e.g., the one from The Guardian below amounts to somewhat over 1MiB of data -there is not just text, but also pictures & ads.
So, If you went to visit your family in Malaysia and check out a newspaper with such an "stutter"-triggering HTML code, you'd be paying $\$$2 per page view if you use Firefox! Double as much as if you were using Safari, $\$1$. I think Chrome also works well -haven't checked yet-, hence only $\$$1 as well.
Because, not knowing better, those at Mozilla decided once that it was easier for the developers to force the browser requesting again the page every time the charset meta tag is not the first tag within the head tag!
So, this HTML code doesn't trigger the bug:
<!doctype html><html><head></head><meta charset='utf-8'><title>A 20yr-old bug</title><body>...</body></html>
Here the main bugzilla entries related to this tag. Notice how along these over 20 years the bug has been repeatedly rediscovered, fixed or simple disregarded!
This is quick write-up of some of the things that are keeping me busy lately.
In writing some hands-on notes on networking, using as an example a server providing HTML content, I realized there might a potential market for something I called in my head Aweb.
Why that name? I was looking for a wordplay on webapp: a Aweb is an app that provides a webpage! ;-)
This would be but a micro/nano-webserver serving static HTML content that eventually could be even hard-coded.
Such Aweb would be extremely-narrowly dedicated. By that I mean, think of a normal webserver, say Apache, or Nginx, that would be serving only one file, or only from one folder.
It would also have a minimal storage and memory footprint...That's it! I realized then where such a thing could be useful...
Of course, embedded systems of the Internet of Things (IoT)!
Before I dig myself further into writing such a minimal webserver, I figured I look around what's already out there.
It turns out, there is a niche business for it!
But these micro/nano-webservers have a bunch of non-trivial, unique challenges. The only Wikipedia page I found is this one in french, but it gives a nice overview.
This wikipedia page is a trove on low-level IoT technology. It ends with a table of examples of different embedded webservers. Notice that in french, a byte is called an octet. Thus they say kilo-octet (Ko) instead of kilobyte (KiB).