From 564ab84af7f69603e3658bce846168f2cfb91249 Mon Sep 17 00:00:00 2001 From: Kumar Damani Date: Wed, 29 Jul 2026 13:02:57 -0400 Subject: normalized, and converted all images to webp --- post/programming-as-art.typ | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'post/programming-as-art.typ') diff --git a/post/programming-as-art.typ b/post/programming-as-art.typ index ef80e33..e4e2fd6 100644 --- a/post/programming-as-art.typ +++ b/post/programming-as-art.typ @@ -15,7 +15,7 @@ for _ in range(1, 1001): At the time it felt like having the #extlink("https://harry-potter-compendium.fandom.com/wiki/Elder_Wand")[Elder Wand]. -#fig("programming-as-art/wand.png", alt: "Dumbledore with Elder Wand pic") +#fig("programming-as-art/wand.webp", alt: "Dumbledore with Elder Wand pic") But there was more to our lesson. The TA then asks us to put our newly found power to use by computing the sum of 1 to 100. Of course, it was a natural @@ -41,7 +41,7 @@ _linearly_ with the input size. Later we would formalize this to $cal(O)(n)$ The TA hinted that there is a better way, and that we already know of the better way in math. -#fig("programming-as-art/teaching.png", alt: "Teaching meme") +#fig("programming-as-art/teaching.webp", alt: "Teaching meme") $ S_n = sum_(i=1)^n i = 1 + 2 + ... + n = (n (n + 1)) / 2 $ @@ -60,7 +60,7 @@ instructions. Crucially, it does not depend on the size of the input like our previous solution, thus *no matter the input, it always takes 3 instructions to compute!* This is a HUGE win! -#fig("programming-as-art/math.png", alt: "Math meme") +#fig("programming-as-art/math.webp", alt: "Math meme") Later we would formalize this to $cal(O)(1)$, or _constant_ scaling. @@ -89,7 +89,7 @@ When I reflect on moments like this, it reminds me that there is emergent elegance and beauty even in the seemingly arbitrary sequence of symbols that is `code`. -#fig("programming-as-art/code.png", alt: "The Matrix code going by image") +#fig("programming-as-art/code.webp", alt: "The Matrix code going by image") Programming is not quite as _objective_ as people would have you believe. There are trade-offs to each solution, and which solution you prefer relect on the -- cgit v1.2.3