226 lines
14 KiB
HTML
Generated
226 lines
14 KiB
HTML
Generated
<!DOCTYPE html>
|
||
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
|
||
<head>
|
||
<meta charset="utf-8" />
|
||
<meta name="generator" content="pandoc" />
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
|
||
<meta name="author" content="Juno Takano" />
|
||
<meta name="dcterms.date" content="2024-08-10" />
|
||
<title>Giving up simplicity • jutty.dev</title>
|
||
<style>
|
||
code{white-space: pre-wrap;}
|
||
span.smallcaps{font-variant: small-caps;}
|
||
div.columns{display: flex; gap: min(4vw, 1.5em);}
|
||
div.column{flex: auto; overflow-x: auto;}
|
||
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
|
||
/* The extra [class] is a hack that increases specificity enough to
|
||
override a similar rule in reveal.js */
|
||
ul.task-list[class]{list-style: none;}
|
||
ul.task-list li input[type="checkbox"] {
|
||
font-size: inherit;
|
||
width: 0.8em;
|
||
margin: 0 0.8em 0.2em -1.6em;
|
||
vertical-align: middle;
|
||
}
|
||
.display.math{display: block; text-align: center; margin: 0.5rem auto;}
|
||
/* CSS for syntax highlighting */
|
||
pre > code.sourceCode { white-space: pre; position: relative; }
|
||
pre > code.sourceCode > span { line-height: 1.25; }
|
||
pre > code.sourceCode > span:empty { height: 1.2em; }
|
||
.sourceCode { overflow: visible; }
|
||
code.sourceCode > span { color: inherit; text-decoration: inherit; }
|
||
div.sourceCode { margin: 1em 0; }
|
||
pre.sourceCode { margin: 0; }
|
||
@media screen {
|
||
div.sourceCode { overflow: auto; }
|
||
}
|
||
@media print {
|
||
pre > code.sourceCode { white-space: pre-wrap; }
|
||
pre > code.sourceCode > span { display: inline-block; text-indent: -5em; padding-left: 5em; }
|
||
}
|
||
pre.numberSource code
|
||
{ counter-reset: source-line 0; }
|
||
pre.numberSource code > span
|
||
{ position: relative; left: -4em; counter-increment: source-line; }
|
||
pre.numberSource code > span > a:first-child::before
|
||
{ content: counter(source-line);
|
||
position: relative; left: -1em; text-align: right; vertical-align: baseline;
|
||
border: none; display: inline-block;
|
||
-webkit-touch-callout: none; -webkit-user-select: none;
|
||
-khtml-user-select: none; -moz-user-select: none;
|
||
-ms-user-select: none; user-select: none;
|
||
padding: 0 4px; width: 4em;
|
||
}
|
||
pre.numberSource { margin-left: 3em; padding-left: 4px; }
|
||
div.sourceCode
|
||
{ color: #cccccc; background-color: #303030; }
|
||
@media screen {
|
||
pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
|
||
}
|
||
code span.al { color: #ffcfaf; } /* Alert */
|
||
code span.an { color: #7f9f7f; font-weight: bold; } /* Annotation */
|
||
code span.at { } /* Attribute */
|
||
code span.bn { color: #dca3a3; } /* BaseN */
|
||
code span.bu { } /* BuiltIn */
|
||
code span.cf { color: #f0dfaf; } /* ControlFlow */
|
||
code span.ch { color: #dca3a3; } /* Char */
|
||
code span.cn { color: #dca3a3; font-weight: bold; } /* Constant */
|
||
code span.co { color: #7f9f7f; } /* Comment */
|
||
code span.cv { color: #7f9f7f; font-weight: bold; } /* CommentVar */
|
||
code span.do { color: #7f9f7f; } /* Documentation */
|
||
code span.dt { color: #dfdfbf; } /* DataType */
|
||
code span.dv { color: #dcdccc; } /* DecVal */
|
||
code span.er { color: #c3bf9f; } /* Error */
|
||
code span.ex { } /* Extension */
|
||
code span.fl { color: #c0bed1; } /* Float */
|
||
code span.fu { color: #efef8f; } /* Function */
|
||
code span.im { } /* Import */
|
||
code span.in { color: #7f9f7f; font-weight: bold; } /* Information */
|
||
code span.kw { color: #f0dfaf; } /* Keyword */
|
||
code span.op { color: #f0efd0; } /* Operator */
|
||
code span.ot { color: #efef8f; } /* Other */
|
||
code span.pp { color: #ffcfaf; font-weight: bold; } /* Preprocessor */
|
||
code span.sc { color: #dca3a3; } /* SpecialChar */
|
||
code span.ss { color: #cc9393; } /* SpecialString */
|
||
code span.st { color: #cc9393; } /* String */
|
||
code span.va { } /* Variable */
|
||
code span.vs { color: #cc9393; } /* VerbatimString */
|
||
code span.wa { color: #7f9f7f; font-weight: bold; } /* Warning */
|
||
</style>
|
||
<link rel="stylesheet" href="../assets/css/style.css" />
|
||
<link rel="alternate" type="application/rss+xml" title="RSS (English)" href="https://blog.jutty.dev/assets/rss/en.rss"/>
|
||
<link rel="alternate" type="application/rss+xml" title="RSS (Português)" href="https://blog.jutty.dev/assets/rss/pt.rss"/>
|
||
<link rel="icon" type="image/ico" href="../assets/img/favicon.ico">
|
||
<script src="../assets/js/post-l10n.js" defer></script>
|
||
</head>
|
||
<body>
|
||
<header id="title-block-header">
|
||
<div id="title-container">
|
||
<h1 class="title">Giving up simplicity</h1>
|
||
</div>
|
||
</header>
|
||
<main class="article">
|
||
<p><em>or</em></p>
|
||
<h1 id="unwinding">Unwinding</h1>
|
||
<p>Due to a worker strike, the university semester ended late this year.
|
||
That meant everything had to be compressed into little more than a month
|
||
in order to wrap up what would have taken four. Now that we’re almost
|
||
through it, my mind wanders to writing. It is almost always what springs
|
||
from the void in me, what has been winded up loosens and the scattered
|
||
meaning starts to recollect into the drain of language and swirl through
|
||
the piping of my nervous system.</p>
|
||
<p><em>Wind</em> is air that has been somehow compressed. If there was
|
||
no pressure pushing it anywhere, it would be just expansive air,
|
||
floating in peace with the atmosphere.</p>
|
||
<p>If you’d entertain this thought further, consider a work of visual
|
||
art. It can be more figurative, clearly depicting shapes that mean
|
||
something, and therefore able to convey an array of ideas to whatever
|
||
extent of detail the artist wants. Conversely, it can be more abstract,
|
||
where ideas will be a lot more sparse, possibly to the point where
|
||
nothing at all is conveyed other than the appearance, whatever aesthetic
|
||
is employed being the whole message in itself. Very little is packed
|
||
into the work, just like the air you can’t even feel weighing on
|
||
you.</p>
|
||
<p>In computing, and more specifically in the realm of programming – a
|
||
craft presently overshadowed by the semantically starved jargon of
|
||
whatever the department responsible for inflating public perception
|
||
numbers is called these days – simplicity is often emphasized. Code is
|
||
supposed to be clear, expressive and clean. A software application is
|
||
supposed to have as few dependencies as possible, and strive to keep it
|
||
simple, or risk stupidity.</p>
|
||
<p>While that is a lofty goal, and while clear, expressive and clean
|
||
code is a refreshing and tranquilizing sight, more often than not
|
||
software just can’t be simple.</p>
|
||
<p>Not having dependencies means implementing more and more yourself.
|
||
There are corner cases to cover, tests to run, different architectures
|
||
and operating systems to support. Even the simplest of software ideas,
|
||
say, a calculator, a program that prints back a sentence in reverse,
|
||
that displays a picture you give it, whatever you conceive as the
|
||
simplest use case, is hardly ever implemented with simplicity in the
|
||
naïve sense of something that is, quite literally, simplistic.</p>
|
||
<p>More often than not, simplicity is actually abstraction. The breaking
|
||
apart of complexity behind a simpler facade. More so a way to manage
|
||
complexity by conveying it simply than to enact simplicity in its actual
|
||
sense. Each step in abstraction is actually a layer deeper into
|
||
intricacy. And yet, it makes things immensely easier to manage and
|
||
understand.</p>
|
||
<p>For some reason, I have always felt very drawn to abstract works.
|
||
Staring into them, there is no expectation to understand, get, or argue
|
||
about. Interestingly, to me that also means they couldn’t be any more
|
||
clear. It does not mean a specific, intelligible message is conveyed
|
||
from the artist to me, rather, it means whatever impression is caused on
|
||
the viewer was never intended to reach too deep anyways. It never
|
||
intended to carry that much through its medium.</p>
|
||
<p>Sometimes, too much detail, no matter how specific, can draw an idea
|
||
so far out that it becomes harder and harder to grasp. In contrast to
|
||
that, a brisk exposition can get the message across like lightning.</p>
|
||
<p>So detail does not always convey meaning, although it can convey a
|
||
specific meaning to someone who will bear with you as you build the
|
||
context for it. Otherwise, you could convey your message just as
|
||
effectively in an abstract manner if your receiver already has that
|
||
context from the outset.</p>
|
||
<p>In computing, such possibility is simply absent from us. No context
|
||
whatsoever can be assumed, and if it is present, that is because some
|
||
other structure is providing it.</p>
|
||
<p>Complexity produces confusion, confusion produces frustration, and
|
||
frustration can lead to either surrender or a rebound. So the
|
||
interesting thing about this pressurizing of ideas is that it springs
|
||
back into action a process that may reverse it or deflect into something
|
||
else entirely.</p>
|
||
<p>Instead of surrendering to the frustration of complexity, sometimes I
|
||
actually take the time to recollect myself and analyze it into
|
||
understanding. This feeling of winning over something that had me on my
|
||
knees and ready to give up is a very gratifying one. It convinces me I
|
||
can squeeze grit from despair if I bet on it and willingly risk
|
||
desperation in order to see it through.</p>
|
||
<p>Yet, after chasing the deadline of effort all of it relaxes back into
|
||
this state. In it, the only way to rest is to embrace complexity as the
|
||
whole, and simplicity as one of its manifestations. It is so cold right
|
||
now in the south, but in the north it is not. Four days and nine hours
|
||
ago it was the peak of the winter. I’m wrapped in blankets and the room
|
||
is dark like the depths of a submarine cave, LED lights here and there
|
||
like fluorescent eyes blinking in silence.</p>
|
||
<p>The professor had us build games and then present them to the whole
|
||
faculty. Among the outputs, one algorithm I produced stuck with me for
|
||
what I deem is simplicity. It is responsible for causing an enemy to
|
||
chase the player by finding the difference between their positions and
|
||
lowering it:</p>
|
||
<div class="sourceCode" id="cb1"><pre
|
||
class="sourceCode python"><code class="sourceCode python"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a>func move_to(x, y):</span>
|
||
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a> var x_difference <span class="op">=</span> <span class="va">self</span>.global_position.x <span class="op">-</span> x</span>
|
||
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a> var y_difference <span class="op">=</span> <span class="va">self</span>.global_position.y <span class="op">-</span> y</span>
|
||
<span id="cb1-4"><a href="#cb1-4" aria-hidden="true" tabindex="-1"></a> </span>
|
||
<span id="cb1-5"><a href="#cb1-5" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span> <span class="bu">abs</span>(x_difference) <span class="op">></span> chase_speed:</span>
|
||
<span id="cb1-6"><a href="#cb1-6" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span> x_difference <span class="op">></span> <span class="dv">0</span>:</span>
|
||
<span id="cb1-7"><a href="#cb1-7" aria-hidden="true" tabindex="-1"></a> <span class="va">self</span>.global_position.x <span class="op">-=</span> chase_speed</span>
|
||
<span id="cb1-8"><a href="#cb1-8" aria-hidden="true" tabindex="-1"></a> <span class="cf">else</span>:</span>
|
||
<span id="cb1-9"><a href="#cb1-9" aria-hidden="true" tabindex="-1"></a> <span class="va">self</span>.global_position.x <span class="op">+=</span> chase_speed</span>
|
||
<span id="cb1-10"><a href="#cb1-10" aria-hidden="true" tabindex="-1"></a> <span class="cf">else</span>:</span>
|
||
<span id="cb1-11"><a href="#cb1-11" aria-hidden="true" tabindex="-1"></a> <span class="va">self</span>.global_position.x <span class="op">+=</span> x_difference</span>
|
||
<span id="cb1-12"><a href="#cb1-12" aria-hidden="true" tabindex="-1"></a></span>
|
||
<span id="cb1-13"><a href="#cb1-13" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span> <span class="bu">abs</span>(y_difference) <span class="op">></span> chase_speed:</span>
|
||
<span id="cb1-14"><a href="#cb1-14" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span> y_difference <span class="op">></span> <span class="dv">0</span>:</span>
|
||
<span id="cb1-15"><a href="#cb1-15" aria-hidden="true" tabindex="-1"></a> <span class="va">self</span>.global_position.y <span class="op">-=</span> chase_speed</span>
|
||
<span id="cb1-16"><a href="#cb1-16" aria-hidden="true" tabindex="-1"></a> <span class="cf">else</span>:</span>
|
||
<span id="cb1-17"><a href="#cb1-17" aria-hidden="true" tabindex="-1"></a> <span class="va">self</span>.global_position.y <span class="op">+=</span> chase_speed</span>
|
||
<span id="cb1-18"><a href="#cb1-18" aria-hidden="true" tabindex="-1"></a> <span class="cf">else</span>:</span>
|
||
<span id="cb1-19"><a href="#cb1-19" aria-hidden="true" tabindex="-1"></a> <span class="va">self</span>.global_position.y <span class="op">+=</span> y_difference</span></code></pre></div>
|
||
<p>It could be further abstracted. The logic is repetitive. The math
|
||
could be condensed. But should it? Would that make it harder or easier
|
||
to understand? And to whom? There is no single answer, and yet I would
|
||
really appreciate knowing.</p>
|
||
</main class="article">
|
||
</body>
|
||
<footer>
|
||
<hr/>
|
||
<div class="footer-text">
|
||
<span id="author-pre-text">posted by</span>
|
||
<span class="author">Juno Takano</span>
|
||
<span id="date-pre-text">on</span>
|
||
<span class="date">August 10, 2024</span>
|
||
<span class="footer-back" aria-role="nav" aria-label="Navigate back">
|
||
↩ <a id="footer-back-link" href="../index.html">Back</a>
|
||
</span>
|
||
</div>
|
||
</footer>
|
||
</html>
|