aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--public/categories/index.html23
-rw-r--r--public/css/colours.css17
-rw-r--r--public/css/footer.css2
-rw-r--r--public/css/layout.css6
-rw-r--r--public/css/logo.css5
-rw-r--r--public/css/palettes/base16-dark.css22
-rw-r--r--public/css/palettes/base16-light.css22
-rw-r--r--public/css/palettes/gruvbox-dark.css23
-rw-r--r--public/css/palettes/gruvbox-light.css23
-rw-r--r--public/css/risotto.css3
-rw-r--r--public/css/typography.css22
-rw-r--r--public/index.html25
-rw-r--r--public/index.xml2
-rw-r--r--public/post/index.html27
-rw-r--r--public/post/index.xml2
-rw-r--r--public/post/programming-as-art/code.pngbin0 -> 530926 bytes
-rw-r--r--public/post/programming-as-art/index.html106
-rw-r--r--public/post/programming-as-art/math.pngbin0 -> 398307 bytes
-rw-r--r--public/post/programming-as-art/teaching.pngbin0 -> 410632 bytes
-rw-r--r--public/post/programming-as-art/wand.pngbin0 -> 356173 bytes
-rw-r--r--public/post/programs/index.html23
-rw-r--r--public/post/self-host/index.html23
-rw-r--r--public/series/index.html23
-rw-r--r--public/sitemap.xml2
-rw-r--r--public/tags/index.html23
-rw-r--r--public/tags/index.xml2
-rw-r--r--public/tags/index/index.html23
-rw-r--r--public/tags/personal/index.html23
-rw-r--r--public/tags/personal/index.xml2
-rw-r--r--public/tags/tech/index.html26
-rw-r--r--public/tags/tech/index.xml11
31 files changed, 405 insertions, 106 deletions
diff --git a/public/categories/index.html b/public/categories/index.html
index b07f4d4..0ce0b12 100644
--- a/public/categories/index.html
+++ b/public/categories/index.html
@@ -5,7 +5,8 @@
<meta name="description" content="Git, email, resume etc.">
<meta name="viewport" content="width=device-width, initial-scale=1">
-<meta charset="utf-8"/>
+<meta charset="UTF-8"/>
+
@@ -15,8 +16,7 @@
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/academicons/1.9.1/css/academicons.min.css" integrity="sha512-b1ASx0WHgVFL5ZQhTgiPWX+68KjS38Jk87jg7pe+qC7q9YkEtFq0z7xCglv7qGIs/68d3mAp+StfC8WKC5SSAg==" crossorigin="anonymous" />
-<link rel="stylesheet" href="https://kumardamani.net/css/colour/gruvbox-dark.css">
-<link rel="stylesheet" href="https://kumardamani.net/css/colour/dark-mode.css">
+<link rel="stylesheet" href="https://kumardamani.net/css/palettes/gruvbox-dark.css">
<link rel="stylesheet" href="https://kumardamani.net/css/risotto.css">
<link rel="stylesheet" href="https://kumardamani.net/css/custom.css">
</head>
@@ -29,7 +29,7 @@
<ul>
- <li class="main-nav__item"><a class="nav-main-item" href="/post/" title="Posts">Posts</a></li>
+ <li class="main-nav__item"><a class="nav-main-item" href="https://kumardamani.net/post/" title="Posts">Posts</a></li>
</ul>
</nav>
@@ -78,7 +78,20 @@
</div>
</section>
- <footer class="page__footer"><p class="copyright"></p>
+ <footer class="page__footer"><p>
+
+
+
+
+
+
+
+
+
+
+</p>
+<br /><br />
+<p class="copyright"></p>
<p class="advertisement">Powered by <a href="https://gohugo.io/">hugo</a> and <a href="https://github.com/joeroe/risotto">risotto</a>.</p>
</footer>
diff --git a/public/css/colours.css b/public/css/colours.css
new file mode 100644
index 0000000..4326985
--- /dev/null
+++ b/public/css/colours.css
@@ -0,0 +1,17 @@
+:root {
+ /* Background */
+ --bg: var(--base00);
+ --off-bg: var(--base01);
+ --inner-bg: var(--base02);
+
+ /* Text */
+ --fg: var(--base05);
+ --off-fg: var(--base04);
+ --muted: var(--base03);
+ --link: var(--base0D);
+ --hover: var(--base0C);
+ --highlight: var(--base0A);
+
+ /* Logo */
+ --logo: var(--base0B);
+}
diff --git a/public/css/footer.css b/public/css/footer.css
index 3c5d6e9..3e84188 100644
--- a/public/css/footer.css
+++ b/public/css/footer.css
@@ -1,5 +1,5 @@
.page__footer {
- color: var(--bright-bg);
+ color: var(--off-fg);
}
.page__footer p {
diff --git a/public/css/layout.css b/public/css/layout.css
index da8027e..d249166 100644
--- a/public/css/layout.css
+++ b/public/css/layout.css
@@ -41,14 +41,14 @@
/* Body + aside */
.page__body {
grid-area: body;
- background-color: var(--bg);
- box-shadow: 0 0 0 1rem var(--bg);
+ background-color: var(--off-bg);
+ box-shadow: 0 0 0 1rem var(--off-bg);
overflow-wrap: break-word;
}
.page__aside {
grid-area: aside;
- color: var(--bright-bg);
+ color: var(--off-fg);
}
/* Footer */
diff --git a/public/css/logo.css b/public/css/logo.css
index be24b86..368fff4 100644
--- a/public/css/logo.css
+++ b/public/css/logo.css
@@ -11,7 +11,8 @@
.page__logo-inner {
display: block;
- background: var(--green);
+ background: var(--logo);
+ opacity: 0.90;
padding: 0.25rem;
}
@@ -22,7 +23,7 @@ a.page__logo-inner:link, a.page__logo-inner:visited {
a.page__logo-inner:hover,
a.page__logo-inner:active {
- background: var(--bright-green);
+ opacity: 1;
}
.page__logo-inner:before {
diff --git a/public/css/palettes/base16-dark.css b/public/css/palettes/base16-dark.css
new file mode 100644
index 0000000..cb1ec1d
--- /dev/null
+++ b/public/css/palettes/base16-dark.css
@@ -0,0 +1,22 @@
+/* base16 default dark
+ * https://github.com/chriskempson/base16-default-schemes
+ */
+
+:root {
+ --base00: #181818;
+ --base01: #282828;
+ --base02: #383838;
+ --base03: #585858;
+ --base04: #b8b8b8;
+ --base05: #d8d8d8;
+ --base06: #e8e8e8;
+ --base07: #f8f8f8;
+ --base08: #ab4642;
+ --base09: #dc9656;
+ --base0A: #f7ca88;
+ --base0B: #a1b56c;
+ --base0C: #86c1b9;
+ --base0D: #7cafc2;
+ --base0E: #ba8baf;
+ --base0F: #a16946;
+}
diff --git a/public/css/palettes/base16-light.css b/public/css/palettes/base16-light.css
new file mode 100644
index 0000000..bcbbb5a
--- /dev/null
+++ b/public/css/palettes/base16-light.css
@@ -0,0 +1,22 @@
+/* base16 default light
+ * https://github.com/chriskempson/base16-default-schemes
+ */
+
+:root {
+ --base00: #f8f8f8;
+ --base01: #e8e8e8;
+ --base02: #d8d8d8;
+ --base03: #b8b8b8;
+ --base04: #585858;
+ --base05: #383838;
+ --base06: #282828;
+ --base07: #181818;
+ --base08: #ab4642;
+ --base09: #dc9656;
+ --base0A: #f7ca88;
+ --base0B: #a1b56c;
+ --base0C: #86c1b9;
+ --base0D: #7cafc2;
+ --base0E: #ba8baf;
+ --base0F: #a16946;
+}
diff --git a/public/css/palettes/gruvbox-dark.css b/public/css/palettes/gruvbox-dark.css
new file mode 100644
index 0000000..1d60bd9
--- /dev/null
+++ b/public/css/palettes/gruvbox-dark.css
@@ -0,0 +1,23 @@
+/* gruvbox dark
+ * https://github.com/morhetz/gruvbox
+ * base16: https://github.com/dawikur/base16-gruvbox-scheme
+ */
+
+:root {
+ --base00: #282828;
+ --base01: #3c3836;
+ --base02: #504945;
+ --base03: #665c54;
+ --base04: #bdae93;
+ --base05: #d5c4a1;
+ --base06: #ebdbb2;
+ --base07: #fbf1c7;
+ --base08: #fb4934;
+ --base09: #fe8019;
+ --base0A: #fabd2f;
+ --base0B: #b8bb26;
+ --base0C: #8ec07c;
+ --base0D: #83a598;
+ --base0E: #d3869b;
+ --base0F: #d65d0e;
+}
diff --git a/public/css/palettes/gruvbox-light.css b/public/css/palettes/gruvbox-light.css
new file mode 100644
index 0000000..f786cf0
--- /dev/null
+++ b/public/css/palettes/gruvbox-light.css
@@ -0,0 +1,23 @@
+/* gruvbox light
+ * https://github.com/morhetz/gruvbox
+ * base16: https://github.com/dawikur/base16-gruvbox-scheme
+ */
+
+:root {
+ --base00: #fbf1c7;
+ --base01: #ebdbb2;
+ --base02: #d5c4a1;
+ --base03: #bdae93;
+ --base04: #665c54;
+ --base05: #504945;
+ --base06: #3c3836;
+ --base07: #282828;
+ --base08: #9d0006;
+ --base09: #af3a03;
+ --base0A: #b57614;
+ --base0B: #79740e;
+ --base0C: #427b58;
+ --base0D: #076678;
+ --base0E: #8f3f71;
+ --base0F: #d65d0e;
+}
diff --git a/public/css/risotto.css b/public/css/risotto.css
index 3c2969d..dcb5a96 100644
--- a/public/css/risotto.css
+++ b/public/css/risotto.css
@@ -1,3 +1,4 @@
+@import 'colours.css';
@import 'typography.css';
@import 'layout.css';
@import 'header.css';
@@ -6,6 +7,6 @@
@import 'footer.css';
body {
- background-color: var(--dark-bg);
+ background-color: var(--bg);
color: var(--fg);
}
diff --git a/public/css/typography.css b/public/css/typography.css
index 5a2c044..a5e8d80 100644
--- a/public/css/typography.css
+++ b/public/css/typography.css
@@ -52,7 +52,7 @@ h3:before,
h4:before,
h5:before,
h6:before {
- color: var(--bright-bg);
+ color: var(--muted);
}
h1:first-child {
@@ -67,11 +67,11 @@ p {
/* Links */
a:link, a:visited {
- color: var(--fg);
+ color: var(--link);
}
-a:hover, a:active {
- color: var(--bright-fg);
+a:hover, a:active, a.active {
+ color: var(--hover);
}
/* Lists */
@@ -94,11 +94,11 @@ ol ol {
ul li::marker {
content: '∗\00A0';
- color: var(--bright-bg);
+ color: var(--muted);
}
ol li::marker {
- color: var(--bright-bg);
+ color: var(--muted);
}
dt {
@@ -129,7 +129,7 @@ blockquote::before {
position: absolute;
left: -1.5rem;
content: ">";
- color: var(--bright-bg);
+ color: var(--muted);
}
.twitter-tweet::before {
@@ -143,9 +143,9 @@ pre,
code,
kbd,
samp {
- background: var(--dark-bg) !important;
+ background: var(--inner-bg) !important;
font-family: var(--font-monospace);
- color: var(--bright-bg);
+ color: var(--off-fg);
}
pre {
@@ -163,7 +163,7 @@ strong {
/* Highlighting */
::selection,
mark {
- background-color: var(--yellow);
+ background-color: var(--highlight);
color: var(--bg);
}
@@ -175,7 +175,7 @@ hr {
hr:after {
content: '---';
- color: var(--bright-bg);
+ color: var(--muted);
}
diff --git a/public/index.html b/public/index.html
index 47501c0..5d8d0dd 100644
--- a/public/index.html
+++ b/public/index.html
@@ -2,11 +2,12 @@
<html lang="en">
<head>
- <meta name="generator" content="Hugo 0.105.0"><title>Kumar Damani - Home</title>
+ <meta name="generator" content="Hugo 0.108.0"><title>Kumar Damani - Home</title>
<meta name="description" content="Git, email, resume etc.">
<meta name="viewport" content="width=device-width, initial-scale=1">
-<meta charset="utf-8"/>
+<meta charset="UTF-8"/>
+
@@ -16,8 +17,7 @@
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/academicons/1.9.1/css/academicons.min.css" integrity="sha512-b1ASx0WHgVFL5ZQhTgiPWX+68KjS38Jk87jg7pe+qC7q9YkEtFq0z7xCglv7qGIs/68d3mAp+StfC8WKC5SSAg==" crossorigin="anonymous" />
-<link rel="stylesheet" href="https://kumardamani.net/css/colour/gruvbox-dark.css">
-<link rel="stylesheet" href="https://kumardamani.net/css/colour/dark-mode.css">
+<link rel="stylesheet" href="https://kumardamani.net/css/palettes/gruvbox-dark.css">
<link rel="stylesheet" href="https://kumardamani.net/css/risotto.css">
<link rel="stylesheet" href="https://kumardamani.net/css/custom.css">
</head>
@@ -30,7 +30,7 @@
<ul>
- <li class="main-nav__item"><a class="nav-main-item" href="/post/" title="Posts">Posts</a></li>
+ <li class="main-nav__item"><a class="nav-main-item" href="https://kumardamani.net/post/" title="Posts">Posts</a></li>
</ul>
</nav>
@@ -243,7 +243,20 @@ years in between semesters.
</div>
</section>
- <footer class="page__footer"><p class="copyright"></p>
+ <footer class="page__footer"><p>
+
+
+
+
+
+
+
+
+
+
+</p>
+<br /><br />
+<p class="copyright"></p>
<p class="advertisement">Powered by <a href="https://gohugo.io/">hugo</a> and <a href="https://github.com/joeroe/risotto">risotto</a>.</p>
</footer>
diff --git a/public/index.xml b/public/index.xml
index c474b88..da35b8c 100644
--- a/public/index.xml
+++ b/public/index.xml
@@ -13,7 +13,7 @@
<pubDate>Tue, 29 Nov 2022 00:00:00 +0000</pubDate>
<guid>https://kumardamani.net/post/programming-as-art/</guid>
- <description>&lt;p&gt;Why programming I see programming as an art form.&lt;/p&gt;</description>
+ <description>&lt;p&gt;Why there is art in programming.&lt;/p&gt;</description>
</item>
<item>
diff --git a/public/post/index.html b/public/post/index.html
index 12a4c71..f703434 100644
--- a/public/post/index.html
+++ b/public/post/index.html
@@ -5,7 +5,8 @@
<meta name="description" content="Git, email, resume etc.">
<meta name="viewport" content="width=device-width, initial-scale=1">
-<meta charset="utf-8"/>
+<meta charset="UTF-8"/>
+
@@ -15,8 +16,7 @@
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/academicons/1.9.1/css/academicons.min.css" integrity="sha512-b1ASx0WHgVFL5ZQhTgiPWX+68KjS38Jk87jg7pe+qC7q9YkEtFq0z7xCglv7qGIs/68d3mAp+StfC8WKC5SSAg==" crossorigin="anonymous" />
-<link rel="stylesheet" href="https://kumardamani.net/css/colour/gruvbox-dark.css">
-<link rel="stylesheet" href="https://kumardamani.net/css/colour/dark-mode.css">
+<link rel="stylesheet" href="https://kumardamani.net/css/palettes/gruvbox-dark.css">
<link rel="stylesheet" href="https://kumardamani.net/css/risotto.css">
<link rel="stylesheet" href="https://kumardamani.net/css/custom.css">
</head>
@@ -29,7 +29,7 @@
<ul>
- <li class="main-nav__item"><a class="nav-main-item active" href="/post/" title="Posts">Posts</a></li>
+ <li class="main-nav__item"><a class="nav-main-item active" href="https://kumardamani.net/post/" title="Posts">Posts</a></li>
</ul>
</nav>
@@ -53,7 +53,7 @@
</header>
<section class="post__summary">
- <p>Why programming I see programming as an art form.</p>
+ <p>Why there is art in programming.</p>
</section>
</article>
@@ -118,7 +118,22 @@
</div>
</section>
- <footer class="page__footer"><p class="copyright"></p>
+ <footer class="page__footer"><p>
+
+
+
+
+
+
+
+
+
+
+
+
+</p>
+<br /><br />
+<p class="copyright"></p>
<p class="advertisement">Powered by <a href="https://gohugo.io/">hugo</a> and <a href="https://github.com/joeroe/risotto">risotto</a>.</p>
</footer>
diff --git a/public/post/index.xml b/public/post/index.xml
index 117b024..e40facd 100644
--- a/public/post/index.xml
+++ b/public/post/index.xml
@@ -13,7 +13,7 @@
<pubDate>Tue, 29 Nov 2022 00:00:00 +0000</pubDate>
<guid>https://kumardamani.net/post/programming-as-art/</guid>
- <description>&lt;p&gt;Why programming I see programming as an art form.&lt;/p&gt;</description>
+ <description>&lt;p&gt;Why there is art in programming.&lt;/p&gt;</description>
</item>
<item>
diff --git a/public/post/programming-as-art/code.png b/public/post/programming-as-art/code.png
new file mode 100644
index 0000000..30c3522
--- /dev/null
+++ b/public/post/programming-as-art/code.png
Binary files differ
diff --git a/public/post/programming-as-art/index.html b/public/post/programming-as-art/index.html
index 691abf4..5505e50 100644
--- a/public/post/programming-as-art/index.html
+++ b/public/post/programming-as-art/index.html
@@ -5,7 +5,22 @@
<meta name="description" content="Git, email, resume etc.">
<meta name="viewport" content="width=device-width, initial-scale=1">
-<meta charset="utf-8"/>
+<meta charset="UTF-8"/>
+
+<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.4/dist/katex.min.css" integrity="sha384-vKruj+a13U8yHIkAyGgK1J3ArTLzrFGBbBc0tDp4ad/EyewESeXE/Iv67Aj8gKZ0" crossorigin="anonymous">
+<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.4/dist/katex.min.js" integrity="sha384-PwRUT/YqbnEjkZO0zZxNqcxACrXe+j766U2amXcgMg5457rve2Y7I6ZJSm2A0mS4" crossorigin="anonymous"></script>
+<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.4/dist/contrib/auto-render.min.js" integrity="sha384-+VBxd3r6XgURycqtZ117nYw44OOcIax56Z4dCRWbxyPt0Koah1uHoK0o4+/RRE05" crossorigin="anonymous"
+ onload="renderMathInElement(document.body);"></script>
+<script>
+ document.addEventListener("DOMContentLoaded", function() {
+ renderMathInElement(document.body, {
+ delimiters: [
+ {left: "$$", right: "$$", display: true},
+ {left: "$", right: "$", display: false}
+ ]
+ });
+ });
+</script>
@@ -15,8 +30,7 @@
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/academicons/1.9.1/css/academicons.min.css" integrity="sha512-b1ASx0WHgVFL5ZQhTgiPWX+68KjS38Jk87jg7pe+qC7q9YkEtFq0z7xCglv7qGIs/68d3mAp+StfC8WKC5SSAg==" crossorigin="anonymous" />
-<link rel="stylesheet" href="https://kumardamani.net/css/colour/gruvbox-dark.css">
-<link rel="stylesheet" href="https://kumardamani.net/css/colour/dark-mode.css">
+<link rel="stylesheet" href="https://kumardamani.net/css/palettes/gruvbox-dark.css">
<link rel="stylesheet" href="https://kumardamani.net/css/risotto.css">
<link rel="stylesheet" href="https://kumardamani.net/css/custom.css">
</head>
@@ -29,7 +43,7 @@
<ul>
- <li class="main-nav__item"><a class="nav-main-item active" href="/post/" title="Posts">Posts</a></li>
+ <li class="main-nav__item"><a class="nav-main-item active" href="https://kumardamani.net/post/" title="Posts">Posts</a></li>
</ul>
</nav>
@@ -41,18 +55,61 @@
<h1>Romanticism in Programming</h1>
</header>
<div class="content__body">
- <p>Why programming I see programming as an art form.</p>
-<p>It started off in my first year as a CS student during a lecture about loops.
-It was mind-bending to see &ldquo;Hello World!&rdquo; getting printed out to the console N-thousands of times
-in just 3 functional lines of code.</p>
-<p>But there was more. The TA then asks us to put our newly found power to use by producing the
-sum of 1 to 100. Ofcourse, it was a natural application of our topic. We simply set the limit,
-and do an increment a sum in the loop&rsquo;s body.</p>
-<p>Sure enough we saw the answer 5050 in the console.
-But then the TA reminds us that we are making that computer work too hard.
-It needs to do 100 basic ADD instructions in order to make this happen.
-What if it was a million?
-Is there a better way?</p>
+ <p>Why there is art in programming.</p>
+<p>During my early days as a CS student, one of the first mind-blowing moments was
+watching <code>Hello World!</code> getting printed out to the console thousands of times
+in just two functional lines of code.</p>
+<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-python" data-lang="python"><span style="display:flex;"><span><span style="color:#66d9ef">for</span> _ <span style="color:#f92672">in</span> range(<span style="color:#ae81ff">1</span>, <span style="color:#ae81ff">1001</span>):
+</span></span><span style="display:flex;"><span> print(<span style="color:#e6db74">&#34;Hello World!&#34;</span>)
+</span></span></code></pre></div><p>At the time it felt like having the <a href="https://harry-potter-compendium.fandom.com/wiki/Elder_Wand">Elder Wand</a>.
+<img src="wand.png" alt="Dumbledore with Elder Wand pic"></p>
+<p>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 application of what we had just done earlier:</p>
+<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-python" data-lang="python"><span style="display:flex;"><span>sum <span style="color:#f92672">=</span> <span style="color:#ae81ff">0</span>
+</span></span><span style="display:flex;"><span><span style="color:#66d9ef">for</span> i <span style="color:#f92672">in</span> range(<span style="color:#ae81ff">1</span>, <span style="color:#ae81ff">100</span><span style="color:#f92672">+</span><span style="color:#ae81ff">1</span>):
+</span></span><span style="display:flex;"><span> sum <span style="color:#f92672">=</span> sum <span style="color:#f92672">+</span> i
+</span></span></code></pre></div><p>Sure enough we saw the answer <code>5050</code> in the console.
+But then the TA reminds us that we are making our computers <strong>work too hard</strong>.
+In other words, the computer needs to do one-hundred ADD instructions in order to make this computation happen.</p>
+<p>What if it the number was a million? How well would our method scale?</p>
+<p>Well then it would take a million ADD instructions.
+We call this scaling <em>linearly</em> with the input size.
+Later we would formalize this to $\mathcal{O}(n)$ (pronounced: <em>Big Oh of N</em>).</p>
+<p>The TA hinted that there is a better way, and that we already know of the better way in math.</p>
+<p><img src="teaching.png" alt="Teaching meme"></p>
+<p>$\displaystyle S_n = \sum\limits_{i=1}^n i = 1 + 2 + &hellip; + n = \frac{n (n + 1)}{2}$</p>
+<p>With this we are no longer using loops, but a known mathematical fact about sequences.
+If you don&rsquo;t belive me, see the <a href="https://letstalkscience.ca/educational-resources/backgrounders/gauss-summation">proof</a>.</p>
+<p>Written as code:</p>
+<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-python" data-lang="python"><span style="display:flex;"><span>sum <span style="color:#f92672">=</span> n (n <span style="color:#f92672">+</span> <span style="color:#ae81ff">1</span>) <span style="color:#f92672">/</span> <span style="color:#ae81ff">2</span>
+</span></span></code></pre></div><p>This one-liner solves our problem with just 3 (ADD, MULTIPLY, DIVIDE) instructions.
+Crucially, it does not depend on the size of the input like our previous solution, thus
+<strong>no matter the input, it always takes 3 instructions to compute!</strong>
+This is a HUGE win!</p>
+<p><img src="math.png" alt="Math meme"></p>
+<p>Later we would formalize this to $\mathcal{O}(1)$, or <em>constant</em> scaling.</p>
+<blockquote>
+<p>Yes, yes I know IRL the complier would optimize the loop solution
+such that it does not take N instructions but for the purposes of
+learning we were not allowed to depend on that.</p>
+</blockquote>
+<p>Looking back at it now,
+both solutions are equally correct, and modern compilers would optimize the first solution
+in the final instructions sent to the cpu, such that any performance differences would be negligible.
+In other words, the computer wouldn&rsquo;t acutally be <em>working so hard</em>.</p>
+<p>Objectively, the first solution is more readable, and friendly to a new observer than the second.</p>
+<p><em>Why then am I still so drawn to the second solution?</em></p>
+<p>The first solution reminds me of the saying &ldquo;to a hammer, eveything looks like a nail&rdquo;.
+Its a brute force approach.
+In comparison, the second solution is using the exact tool for our particular problem.
+It somehow feels personalized and dare I say <em>romantic</em>.</p>
+<p>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>code</code>.
+<img src="code.png" alt="The Matrix code going by image"></p>
+<p>Programming is not quite as <em>objective</em> as people would have you believe.
+There are trade-offs to each solution, and which solution you prefer relect on the trade-offs
+you are willing to accept, which varies by the observer: much like <em>art</em>.</p>
</div>
<footer class="content__footer"></footer>
@@ -85,7 +142,7 @@ Is there a better way?</p>
</div>
<hr>
<div class="aside__content">
- <p>Why I see programming as an art form.</p>
+ <p>How programming is romantic.</p>
<p>
By Kumar Damani,
@@ -96,7 +153,20 @@ Is there a better way?</p>
</div>
</section>
- <footer class="page__footer"><p class="copyright"></p>
+ <footer class="page__footer"><p>
+
+
+
+
+
+
+
+
+
+
+</p>
+<br /><br />
+<p class="copyright"></p>
<p class="advertisement">Powered by <a href="https://gohugo.io/">hugo</a> and <a href="https://github.com/joeroe/risotto">risotto</a>.</p>
</footer>
diff --git a/public/post/programming-as-art/math.png b/public/post/programming-as-art/math.png
new file mode 100644
index 0000000..bbdc372
--- /dev/null
+++ b/public/post/programming-as-art/math.png
Binary files differ
diff --git a/public/post/programming-as-art/teaching.png b/public/post/programming-as-art/teaching.png
new file mode 100644
index 0000000..9bf5dce
--- /dev/null
+++ b/public/post/programming-as-art/teaching.png
Binary files differ
diff --git a/public/post/programming-as-art/wand.png b/public/post/programming-as-art/wand.png
new file mode 100644
index 0000000..5eefc9c
--- /dev/null
+++ b/public/post/programming-as-art/wand.png
Binary files differ
diff --git a/public/post/programs/index.html b/public/post/programs/index.html
index 8d27d54..85cd5c2 100644
--- a/public/post/programs/index.html
+++ b/public/post/programs/index.html
@@ -5,7 +5,8 @@
<meta name="description" content="Git, email, resume etc.">
<meta name="viewport" content="width=device-width, initial-scale=1">
-<meta charset="utf-8"/>
+<meta charset="UTF-8"/>
+
@@ -15,8 +16,7 @@
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/academicons/1.9.1/css/academicons.min.css" integrity="sha512-b1ASx0WHgVFL5ZQhTgiPWX+68KjS38Jk87jg7pe+qC7q9YkEtFq0z7xCglv7qGIs/68d3mAp+StfC8WKC5SSAg==" crossorigin="anonymous" />
-<link rel="stylesheet" href="https://kumardamani.net/css/colour/gruvbox-dark.css">
-<link rel="stylesheet" href="https://kumardamani.net/css/colour/dark-mode.css">
+<link rel="stylesheet" href="https://kumardamani.net/css/palettes/gruvbox-dark.css">
<link rel="stylesheet" href="https://kumardamani.net/css/risotto.css">
<link rel="stylesheet" href="https://kumardamani.net/css/custom.css">
</head>
@@ -29,7 +29,7 @@
<ul>
- <li class="main-nav__item"><a class="nav-main-item active" href="/post/" title="Posts">Posts</a></li>
+ <li class="main-nav__item"><a class="nav-main-item active" href="https://kumardamani.net/post/" title="Posts">Posts</a></li>
</ul>
</nav>
@@ -141,7 +141,20 @@ suffice it to say I will not endorse the usage of proprietary software.</p>
</div>
</section>
- <footer class="page__footer"><p class="copyright"></p>
+ <footer class="page__footer"><p>
+
+
+
+
+
+
+
+
+
+
+</p>
+<br /><br />
+<p class="copyright"></p>
<p class="advertisement">Powered by <a href="https://gohugo.io/">hugo</a> and <a href="https://github.com/joeroe/risotto">risotto</a>.</p>
</footer>
diff --git a/public/post/self-host/index.html b/public/post/self-host/index.html
index cdc2049..15b3144 100644
--- a/public/post/self-host/index.html
+++ b/public/post/self-host/index.html
@@ -5,7 +5,8 @@
<meta name="description" content="Git, email, resume etc.">
<meta name="viewport" content="width=device-width, initial-scale=1">
-<meta charset="utf-8"/>
+<meta charset="UTF-8"/>
+
@@ -15,8 +16,7 @@
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/academicons/1.9.1/css/academicons.min.css" integrity="sha512-b1ASx0WHgVFL5ZQhTgiPWX+68KjS38Jk87jg7pe+qC7q9YkEtFq0z7xCglv7qGIs/68d3mAp+StfC8WKC5SSAg==" crossorigin="anonymous" />
-<link rel="stylesheet" href="https://kumardamani.net/css/colour/gruvbox-dark.css">
-<link rel="stylesheet" href="https://kumardamani.net/css/colour/dark-mode.css">
+<link rel="stylesheet" href="https://kumardamani.net/css/palettes/gruvbox-dark.css">
<link rel="stylesheet" href="https://kumardamani.net/css/risotto.css">
<link rel="stylesheet" href="https://kumardamani.net/css/custom.css">
</head>
@@ -29,7 +29,7 @@
<ul>
- <li class="main-nav__item"><a class="nav-main-item active" href="/post/" title="Posts">Posts</a></li>
+ <li class="main-nav__item"><a class="nav-main-item active" href="https://kumardamani.net/post/" title="Posts">Posts</a></li>
</ul>
</nav>
@@ -214,7 +214,20 @@ Short of this, you can only limit your usage.</li>
</div>
</section>
- <footer class="page__footer"><p class="copyright"></p>
+ <footer class="page__footer"><p>
+
+
+
+
+
+
+
+
+
+
+</p>
+<br /><br />
+<p class="copyright"></p>
<p class="advertisement">Powered by <a href="https://gohugo.io/">hugo</a> and <a href="https://github.com/joeroe/risotto">risotto</a>.</p>
</footer>
diff --git a/public/series/index.html b/public/series/index.html
index 1dd6c3d..bc4fc9f 100644
--- a/public/series/index.html
+++ b/public/series/index.html
@@ -5,7 +5,8 @@
<meta name="description" content="Git, email, resume etc.">
<meta name="viewport" content="width=device-width, initial-scale=1">
-<meta charset="utf-8"/>
+<meta charset="UTF-8"/>
+
@@ -15,8 +16,7 @@
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/academicons/1.9.1/css/academicons.min.css" integrity="sha512-b1ASx0WHgVFL5ZQhTgiPWX+68KjS38Jk87jg7pe+qC7q9YkEtFq0z7xCglv7qGIs/68d3mAp+StfC8WKC5SSAg==" crossorigin="anonymous" />
-<link rel="stylesheet" href="https://kumardamani.net/css/colour/gruvbox-dark.css">
-<link rel="stylesheet" href="https://kumardamani.net/css/colour/dark-mode.css">
+<link rel="stylesheet" href="https://kumardamani.net/css/palettes/gruvbox-dark.css">
<link rel="stylesheet" href="https://kumardamani.net/css/risotto.css">
<link rel="stylesheet" href="https://kumardamani.net/css/custom.css">
</head>
@@ -29,7 +29,7 @@
<ul>
- <li class="main-nav__item"><a class="nav-main-item" href="/post/" title="Posts">Posts</a></li>
+ <li class="main-nav__item"><a class="nav-main-item" href="https://kumardamani.net/post/" title="Posts">Posts</a></li>
</ul>
</nav>
@@ -78,7 +78,20 @@
</div>
</section>
- <footer class="page__footer"><p class="copyright"></p>
+ <footer class="page__footer"><p>
+
+
+
+
+
+
+
+
+
+
+</p>
+<br /><br />
+<p class="copyright"></p>
<p class="advertisement">Powered by <a href="https://gohugo.io/">hugo</a> and <a href="https://github.com/joeroe/risotto">risotto</a>.</p>
</footer>
diff --git a/public/sitemap.xml b/public/sitemap.xml
index a034c96..e685ce3 100644
--- a/public/sitemap.xml
+++ b/public/sitemap.xml
@@ -19,7 +19,7 @@
<lastmod>2022-11-29T00:00:00+00:00</lastmod>
</url><url>
<loc>https://kumardamani.net/tags/tech/</loc>
- <lastmod>2022-11-29T00:00:00+00:00</lastmod>
+ <lastmod>2022-09-12T00:00:00+00:00</lastmod>
</url><url>
<loc>https://kumardamani.net/post/self-host/</loc>
<lastmod>2022-09-12T00:00:00+00:00</lastmod>
diff --git a/public/tags/index.html b/public/tags/index.html
index ed7f494..8e20815 100644
--- a/public/tags/index.html
+++ b/public/tags/index.html
@@ -5,7 +5,8 @@
<meta name="description" content="Git, email, resume etc.">
<meta name="viewport" content="width=device-width, initial-scale=1">
-<meta charset="utf-8"/>
+<meta charset="UTF-8"/>
+
@@ -15,8 +16,7 @@
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/academicons/1.9.1/css/academicons.min.css" integrity="sha512-b1ASx0WHgVFL5ZQhTgiPWX+68KjS38Jk87jg7pe+qC7q9YkEtFq0z7xCglv7qGIs/68d3mAp+StfC8WKC5SSAg==" crossorigin="anonymous" />
-<link rel="stylesheet" href="https://kumardamani.net/css/colour/gruvbox-dark.css">
-<link rel="stylesheet" href="https://kumardamani.net/css/colour/dark-mode.css">
+<link rel="stylesheet" href="https://kumardamani.net/css/palettes/gruvbox-dark.css">
<link rel="stylesheet" href="https://kumardamani.net/css/risotto.css">
<link rel="stylesheet" href="https://kumardamani.net/css/custom.css">
</head>
@@ -29,7 +29,7 @@
<ul>
- <li class="main-nav__item"><a class="nav-main-item" href="/post/" title="Posts">Posts</a></li>
+ <li class="main-nav__item"><a class="nav-main-item" href="https://kumardamani.net/post/" title="Posts">Posts</a></li>
</ul>
</nav>
@@ -87,7 +87,20 @@
</div>
</section>
- <footer class="page__footer"><p class="copyright"></p>
+ <footer class="page__footer"><p>
+
+
+
+
+
+
+
+
+
+
+</p>
+<br /><br />
+<p class="copyright"></p>
<p class="advertisement">Powered by <a href="https://gohugo.io/">hugo</a> and <a href="https://github.com/joeroe/risotto">risotto</a>.</p>
</footer>
diff --git a/public/tags/index.xml b/public/tags/index.xml
index e50ba59..04ea7c6 100644
--- a/public/tags/index.xml
+++ b/public/tags/index.xml
@@ -19,7 +19,7 @@
<item>
<title>tech</title>
<link>https://kumardamani.net/tags/tech/</link>
- <pubDate>Tue, 29 Nov 2022 00:00:00 +0000</pubDate>
+ <pubDate>Mon, 12 Sep 2022 00:00:00 +0000</pubDate>
<guid>https://kumardamani.net/tags/tech/</guid>
<description></description>
diff --git a/public/tags/index/index.html b/public/tags/index/index.html
index 5557e2f..6a6a663 100644
--- a/public/tags/index/index.html
+++ b/public/tags/index/index.html
@@ -5,7 +5,8 @@
<meta name="description" content="Git, email, resume etc.">
<meta name="viewport" content="width=device-width, initial-scale=1">
-<meta charset="utf-8"/>
+<meta charset="UTF-8"/>
+
@@ -15,8 +16,7 @@
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/academicons/1.9.1/css/academicons.min.css" integrity="sha512-b1ASx0WHgVFL5ZQhTgiPWX+68KjS38Jk87jg7pe+qC7q9YkEtFq0z7xCglv7qGIs/68d3mAp+StfC8WKC5SSAg==" crossorigin="anonymous" />
-<link rel="stylesheet" href="https://kumardamani.net/css/colour/gruvbox-dark.css">
-<link rel="stylesheet" href="https://kumardamani.net/css/colour/dark-mode.css">
+<link rel="stylesheet" href="https://kumardamani.net/css/palettes/gruvbox-dark.css">
<link rel="stylesheet" href="https://kumardamani.net/css/risotto.css">
<link rel="stylesheet" href="https://kumardamani.net/css/custom.css">
</head>
@@ -29,7 +29,7 @@
<ul>
- <li class="main-nav__item"><a class="nav-main-item" href="/post/" title="Posts">Posts</a></li>
+ <li class="main-nav__item"><a class="nav-main-item" href="https://kumardamani.net/post/" title="Posts">Posts</a></li>
</ul>
</nav>
@@ -81,7 +81,20 @@
</div>
</section>
- <footer class="page__footer"><p class="copyright"></p>
+ <footer class="page__footer"><p>
+
+
+
+
+
+
+
+
+
+
+</p>
+<br /><br />
+<p class="copyright"></p>
<p class="advertisement">Powered by <a href="https://gohugo.io/">hugo</a> and <a href="https://github.com/joeroe/risotto">risotto</a>.</p>
</footer>
diff --git a/public/tags/personal/index.html b/public/tags/personal/index.html
index 54f34b3..500c438 100644
--- a/public/tags/personal/index.html
+++ b/public/tags/personal/index.html
@@ -5,7 +5,8 @@
<meta name="description" content="Git, email, resume etc.">
<meta name="viewport" content="width=device-width, initial-scale=1">
-<meta charset="utf-8"/>
+<meta charset="UTF-8"/>
+
@@ -15,8 +16,7 @@
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/academicons/1.9.1/css/academicons.min.css" integrity="sha512-b1ASx0WHgVFL5ZQhTgiPWX+68KjS38Jk87jg7pe+qC7q9YkEtFq0z7xCglv7qGIs/68d3mAp+StfC8WKC5SSAg==" crossorigin="anonymous" />
-<link rel="stylesheet" href="https://kumardamani.net/css/colour/gruvbox-dark.css">
-<link rel="stylesheet" href="https://kumardamani.net/css/colour/dark-mode.css">
+<link rel="stylesheet" href="https://kumardamani.net/css/palettes/gruvbox-dark.css">
<link rel="stylesheet" href="https://kumardamani.net/css/risotto.css">
<link rel="stylesheet" href="https://kumardamani.net/css/custom.css">
</head>
@@ -29,7 +29,7 @@
<ul>
- <li class="main-nav__item"><a class="nav-main-item" href="/post/" title="Posts">Posts</a></li>
+ <li class="main-nav__item"><a class="nav-main-item" href="https://kumardamani.net/post/" title="Posts">Posts</a></li>
</ul>
</nav>
@@ -87,7 +87,20 @@
</div>
</section>
- <footer class="page__footer"><p class="copyright"></p>
+ <footer class="page__footer"><p>
+
+
+
+
+
+
+
+
+
+
+</p>
+<br /><br />
+<p class="copyright"></p>
<p class="advertisement">Powered by <a href="https://gohugo.io/">hugo</a> and <a href="https://github.com/joeroe/risotto">risotto</a>.</p>
</footer>
diff --git a/public/tags/personal/index.xml b/public/tags/personal/index.xml
index 1de66fc..9b28685 100644
--- a/public/tags/personal/index.xml
+++ b/public/tags/personal/index.xml
@@ -13,7 +13,7 @@
<pubDate>Tue, 29 Nov 2022 00:00:00 +0000</pubDate>
<guid>https://kumardamani.net/post/programming-as-art/</guid>
- <description>&lt;p&gt;Why programming I see programming as an art form.&lt;/p&gt;</description>
+ <description>&lt;p&gt;Why there is art in programming.&lt;/p&gt;</description>
</item>
<item>
diff --git a/public/tags/tech/index.html b/public/tags/tech/index.html
index a83daac..517a1eb 100644
--- a/public/tags/tech/index.html
+++ b/public/tags/tech/index.html
@@ -5,7 +5,8 @@
<meta name="description" content="Git, email, resume etc.">
<meta name="viewport" content="width=device-width, initial-scale=1">
-<meta charset="utf-8"/>
+<meta charset="UTF-8"/>
+
@@ -15,8 +16,7 @@
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/academicons/1.9.1/css/academicons.min.css" integrity="sha512-b1ASx0WHgVFL5ZQhTgiPWX+68KjS38Jk87jg7pe+qC7q9YkEtFq0z7xCglv7qGIs/68d3mAp+StfC8WKC5SSAg==" crossorigin="anonymous" />
-<link rel="stylesheet" href="https://kumardamani.net/css/colour/gruvbox-dark.css">
-<link rel="stylesheet" href="https://kumardamani.net/css/colour/dark-mode.css">
+<link rel="stylesheet" href="https://kumardamani.net/css/palettes/gruvbox-dark.css">
<link rel="stylesheet" href="https://kumardamani.net/css/risotto.css">
<link rel="stylesheet" href="https://kumardamani.net/css/custom.css">
</head>
@@ -29,7 +29,7 @@
<ul>
- <li class="main-nav__item"><a class="nav-main-item" href="/post/" title="Posts">Posts</a></li>
+ <li class="main-nav__item"><a class="nav-main-item" href="https://kumardamani.net/post/" title="Posts">Posts</a></li>
</ul>
</nav>
@@ -43,9 +43,6 @@
<ul>
- <li><a href="https://kumardamani.net/post/programming-as-art/">Romanticism in Programming</a></li>
-
-
<li><a href="https://kumardamani.net/post/self-host/">Why do I self-host?</a></li>
@@ -87,7 +84,20 @@
</div>
</section>
- <footer class="page__footer"><p class="copyright"></p>
+ <footer class="page__footer"><p>
+
+
+
+
+
+
+
+
+
+
+</p>
+<br /><br />
+<p class="copyright"></p>
<p class="advertisement">Powered by <a href="https://gohugo.io/">hugo</a> and <a href="https://github.com/joeroe/risotto">risotto</a>.</p>
</footer>
diff --git a/public/tags/tech/index.xml b/public/tags/tech/index.xml
index 39ddf39..7bf143b 100644
--- a/public/tags/tech/index.xml
+++ b/public/tags/tech/index.xml
@@ -6,16 +6,7 @@
<description>Recent content in tech on Kumar Damani - Home</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
- <lastBuildDate>Tue, 29 Nov 2022 00:00:00 +0000</lastBuildDate><atom:link href="https://kumardamani.net/tags/tech/index.xml" rel="self" type="application/rss+xml" />
- <item>
- <title>Romanticism in Programming</title>
- <link>https://kumardamani.net/post/programming-as-art/</link>
- <pubDate>Tue, 29 Nov 2022 00:00:00 +0000</pubDate>
-
- <guid>https://kumardamani.net/post/programming-as-art/</guid>
- <description>&lt;p&gt;Why programming I see programming as an art form.&lt;/p&gt;</description>
- </item>
-
+ <lastBuildDate>Mon, 12 Sep 2022 00:00:00 +0000</lastBuildDate><atom:link href="https://kumardamani.net/tags/tech/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Why do I self-host?</title>
<link>https://kumardamani.net/post/self-host/</link>