Blog 🎤

Akamai / Uniqlo tee

In case you too were wondering what the code does on this Uniqlo tee…

I had a mildly mangled OCR output; however, it gave me enough to Google someone else who got all the t-shirt text:

#!/bin/bash
eval "$(base64 -d <<< 'IyEvYmluL2Jhc2gKCiMgQ29uZ3Jhd
HVsYXRpb25zISBZb3UgZm91bmQgdGhlIGVhc3RlciBlZ2chIOKdpO+4jwojIOOBiuO
CgeOBp+OBqOOBhuOBlOOBluOBhOOBvuOBme+8gemaoOOBleOCjOOBn+OCteODl+OD
qeOCpOOCuuOCkuimi+OBpOOBkeOBvuOBl+OBn++8geKdpO+4jwoKIyBEZWZpbmUgd
GhlIHRleHQgdG8gYW5pbWF0ZQp0ZXh0PSLimaVQRUFDReKZpUZPUuKZpUFMTOKZpV
BFQUNF4pmlRk9S4pmlQUxM4pmlUEVBQ0XimaVGT1LimaVBTEzimaVQRUFDReKZpUZ
PUuKZpUFMTOKZpVBFQUNF4pmlRk9S4pmlQUxM4pmlIgoKIyBHZXQgdGVybWluYWwg
ZGltZW5zaW9ucwpjb2xzPSQodHB1dCBjb2xzKQpsaW5lcz0kKHRwdXQgbGluZXMpC
gojIENhbGN1bGF0ZSB0aGUgbGVuZ3RoIG9mIHRoZSB0ZXh0CnRleHRfbGVuZ3RoPS
R7I3RleHR9CgojIEhpZGUgdGhlIGN1cnNvcgp0cHV0IGNpdmlzCgojIFRyYXAgQ1RS
TCtDIHRvIHNob3cgdGhlIGN1cnNvciBiZWZvcmUgZXhpdGluZwp0cmFwICJ0cHV0I
GNub3JtOyBleGl0IiBTSUdJTlQKCiMgU2V0IGZyZXF1ZW5jeSBzY2FsaW5nIGZhY3R
vcgpmcmVxPTAuMgoKIyBJbmZpbml0ZSBsb29wIGZvciBjb250aW51b3VzIGFuaW1hd
Glvbgpmb3IgKCggdD0wOyA7IHQrPTEgKSk7IGRvCiAgICAjIEV4dHJhY3Qgb25lIGN
oYXJhY3RlciBhdCBhIHRpbWUKICAgIGNoYXI9IiR7dGV4dDp0ICUgd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b
yBtb3ZlIGRvd253YXJkCiAgICBlY2hvICIiCgpkb25lCgo=')"

Next, put the base64 bit through a decoder to check it doesn’t do anything dodgy:

#!/bin/bash

# Congratulations! You found the easter egg! ❤️
# おめでとうございます!隠されたサプライズを見つけました!❤️

# Define the text to animate
text="♥PEACE♥FOR♥ALL♥PEACE♥FOR♥ALL♥PEACE♥FOR♥ALL♥PEACE♥FOR♥ALL♥PEACE♥FOR♥ALL♥"

# Get terminal dimensions
cols=$(tput cols)
lines=$(tput lines)

# Calculate the length of the text
text_length=${#text}

# Hide the cursor
tput civis

# Trap CTRL+C to show the cursor before exiting
trap "tput cnorm; exit" SIGINT

# Set frequency scaling factor
freq=0.2

# Infinite loop for continuous animation
for (( t=0; ; t+=1 )); do
    # Extract one character at a time
    char="${text:t % text_length:1}"
    
    # Calculate the angle in radians
    angle=$(echo "($t) * $freq" | bc -l)

    # Calculate the sine of the angle
    sine_value=$(echo "s($angle)" | bc -l)

    # Calculate x position using the sine value
    x=$(echo "($cols / 2) + ($cols / 4) * $sine_value" | bc -l)
    x=$(printf "%.0f" "$x")

    # Ensure x is within terminal bounds
    if (( x < 0 )); then x=0; fi
    if (( x >= cols )); then x=$((cols - 1)); fi

    # Calculate color gradient between 12 (cyan) and 208 (orange)
    color_start=12
    color_end=208
    color_range=$((color_end - color_start))
    color=$((color_start + (color_range * t / lines) % color_range))

    # Print the character with 256-color support
    echo -ne "\033[38;5;${color}m"$(tput cup $t $x)"$char\033[0m"

    # Line feed to move downward
    echo ""

done

Now over to my tilde.club Linux account, here’s what it does:

Extremes along an evaluation spectrum

Evaluation is often divided into two kinds: formative evaluation, which is conducted to support the improvement of a programme, and summative evaluation, which is conducted to make (often high-stakes) decisions about a programme, such as whether to expand its delivery so it reaches more people or discontinue it.

Huey Chen (1996) challenged this dichotomy. The issue is that formative evaluation can lead to summative conclusions, e.g., the decision not to continue with a fully-powered impact evaluation. Conversely, summative evaluation can lead to formative improvements that can be tested in the next summative trial.

A related distinction, better understood as a spectrum, concerns the stance evaluators adopt before setting off on an evaluation. The following two David Shrigley pieces may offer a way to distil the extremes at either end of this spectrum:

Split-panel illustration with labels A and B. Panel A shows three hands with comically long thumbs pointing upwards, above them the text ‘EVERYTHING IS GOOD’. Panel B features a seagull mid-flight, with the caption ‘I’M FLYING TO LONDON TO SHIT ON THE GOVERNMENT’.

A illustrates puff-piece evaluation: it is compromised by conflict of interest and often conducted by those who devised or deliver the programme under evaluation. If an organisation exists to deliver a programme, then evaluators within that organisation are going to find it challenging to evaluate themselves out of a job. I have seen this kind in the wild, for example evaluations of apps conducted by the company providing them. Don’t mention AI.

B illustrates adversarial evaluation: it’s assumed from the outset that the programme has no impact or causes harm. These are usually independent evaluations. The examples that come to mind are evaluations of interventions that persist despite a long history of evidence that they cannot work and the aim of the evaluation is to finally make a compelling case that funding for them should cease.

Reality is usually more nuanced and evaluations land somewhere in between. Programmes sometimes work, but maybe not as well as we hoped or not for everyone we thought would benefit. Still, I think identifying your location on this spectrum before you begin an evaluation can help clarify what safeguards are needed to support its objectivity. What do you believe the findings will be and why?

The various replication crises expose how we mere mortals are individually biased. We achieve objectivity collectively, through social systems such as peer review and pre-registered protocols. If users of an evaluation, whether potential programme beneficiaries or policy teams, suspect unmanaged bias, then it will be difficult to persuade them to trust what you find.

References

Chen, H. (1996). Typology for Program Evaluation. Evaluation Practice, 17(2), 121–130.

Propensity of treatment in sharp RDDs

In a sharp regression discontinuity design (RDD), everyone with a running score at or above the threshold gets the treatment and nobody below does. It looks like the propensity of treatment at or above threshold is 1 and below is 0. However, with measurement error, someone’s running score could have been different and near the threshold this could have affected their treatment assignment. This is the genre of justification often seen for why RDDs act like randomised experiments near the threshold.

Under classical test theory,

observed score = true score + error

and a measure’s reliability is

var(true score) / var(observed score).

(We usually don’t see the true score, hence the need for estimators like Cronbach’s α and McDonald’s ω.)

The picture below is from a simulation where we keep people’s true running score fixed (normal distro, mean = 50, SD = 20) but let the observed running score randomly vary due to the unreliability. The probability of treatment is then the proportion of times across simulations that someone ends up in treatment.

So, close to the threshold, the probability of treatment is nearest 50-50.

(I tried and failed to find this pic in the lit; the closest I could spot is in Scott Cunningham’s Mix Tape.)

Ed Catmull’s “starting points”

  1. Get the team right.
  2. Hire people for their potential to grow.
  3. Hire people smarter than you.
  4. Solicit ideas from everyone in your organisation.
  5. Solicit ideas proactively.
  6. Identify barriers to candour and address them.
  7. Understand disagreements, people disagree for a reason.
  8. Root out fear.
  9. Don’t assume you’re right, cultivate doubt.
  10. Create structures and processes that uncover what’s real.
  11. Truth should be in meetings, not hallways.
  12. Forget line-of-command, just communicate.
  13. Share problems, don’t tone them down.
  14. Measuring success and failure without evaluating process is deceiving.
  15. The cost of preventing errors is often far greater than the cost of fixing them.
  16. Change and uncertainty are part of life, build capability to recover.
  17. It’s not the manager’s job to prevent risks; it’s their job to make it safe to take them.
  18. Failure isn’t evil, it’s a necessary consequence of doing something new.
  19. Trust doesn’t mean you trust people to not screw up; it means you trust them even when they do.
  20. Finding and fixing problems is everybody’s job; anyone can stop the production line.
  21. Measure people by their ability to solve problems, not by the mistakes they make.
  22. Share early and share often; don’t wait until things are perfect.
  23. Organisational structure is not communication structure; everybody can talk to anybody.
  24. Don’t make too many rules; most don’t need them; address those who do directly.
  25. Imposing limits often encourages creativity.
  26. Exceptionally hard problems force us to think differently; welcome them.
  27. Organisations are conservative; it takes substantial energy to move them.
  28. If one agenda wins, we all lose.
  29. Protect new ideas, even not-so-great ones.
  30. Crises are not always lamentable; they test values and bond people.
  31. Excellence, quality, and good should be earned words, attributed by others to us.
  32. Balance is more important than stability; do not make stability a goal.
  33. Making our product great is the goal; don’t confuse the process with the goal (Catmull, 2014, pp. 315–319).

Spotted in Flyvbjerg, B. (2024). Heuristics for Better Project Leadership: Teasing Out Tacit Knowledge. Project Management Journal, 55(6), 615–625.

Responsible modelling – Erica Thompson

“Responsible modelling and the ethics of mathematics for decision support Mathematical models are used to inform decisions across many sectors including climate change, finance, and epidemics. But models are not perfect representations of the real world – they are partial, uncertain and often biased. What, then, does responsible modelling look like? And how can we apply this ethical framework to new AI modelling methods? Erica Thompson is Associate Professor of Modelling for Decision Making at UCL’s Department of Science, Technology, Engineering and Public Policy (STEaPP), and the author of ‘Escape From Model Land’ (2022).”