<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="https://dario.technology/feed.xml" rel="self" type="application/atom+xml" /><link href="https://dario.technology/" rel="alternate" type="text/html" /><updated>2026-10-26T05:46:53+00:00</updated><id>https://dario.technology/feed.xml</id><title type="html">Dario Macieira Mitchell</title><subtitle>A blog about technology and ethics</subtitle><entry><title type="html">Thoughts on Tableau and the Hyper Database</title><link href="https://dario.technology/thoughts-on-tableau-and-the-hyper-database/" rel="alternate" type="text/html" title="Thoughts on Tableau and the Hyper Database" /><published>2026-10-26T00:00:00+00:00</published><updated>2026-10-26T00:00:00+00:00</updated><id>https://dario.technology/thoughts-on-tableau-and-the-hyper-database</id><content type="html" xml:base="https://dario.technology/thoughts-on-tableau-and-the-hyper-database/"><![CDATA[<p><em>More like complaints about Tableau Cloud.</em></p>

<p>Tableau is not exactly the gold standard for data reporting, but it is certainly a workhorse. Just about every analyst has heard of it, and most know how to use it. Those two facts are probably its major selling points at this point.</p>

<p>Anyone who has dealt with Tableau support, tried to achieve anything reasonably complex, or been responsible for paying for the subscriptions has probably wished they were using something else at some point.</p>

<p>I’ve been in all three camps, and I have to report that my experience has not been good. Yes, it is clunky as all hell. But this post is not even about that. It is about the fact that Tableau Cloud is not a reliable piece of data architecture.</p>

<p><em>It’s also to advertise the fact that I – with the help of coworkers at my current job – created a Tableau mod basically that optimizes extract refreshes for Redshift connections in Tableau – <a href="https://github.com/mcoirad/tableau-hyper-refresher">check it out!</a></em></p>

<h2 id="lack-of-observability">Lack of observability</h2>

<p>You get a Jobs page that, in theory, tells you which tasks are failing or passing. But the results do not always contain the name of, or a link to, the content or task that failed. Sometimes all you learn is that a task failed.</p>

<p>The Metadata API does not always reflect the most recent state, either. Recent workbooks and data sources may not be visible through the API, spawning orphaned job results. An October 26 Tableau Cloud update somewhat improved the presentation without fixing the metadata problem. It also caused a major outage, which I discuss below.</p>

<p>Even when you can identify what failed, the best you get is an error message—there are no logs. If you care about logs, you need to use Tableau Server.</p>

<h2 id="tableau-uses-a-generic-postgresql-driver-to-connect-to-redshift">Tableau uses a generic PostgreSQL driver to connect to Redshift</h2>

<p>In recent updates, Tableau introduced a dedicated Redshift driver, which mostly fixes the issue I am about to describe. But I believe Tableau also uses a generic PostgreSQL driver as a fallback, without telling you when it does so.</p>

<p>If you have a multi-node Redshift setup and look closely, you will often see your leader node running very hot while the other nodes remain underutilized. I believe this is caused by two things, although I cannot confirm them because of the aforementioned lack of observability:</p>

<ul>
  <li>Sometimes, for whatever reason, Tableau uses the generic PostgreSQL driver, which does not parallelize the results.</li>
  <li>Even with the Redshift-specific driver, compute nodes send everything through the leader node.</li>
</ul>

<p>In either scenario, you get a performance bottleneck. If you have many report and data-source refreshes, they will clog up your system while using only a fraction of the available resources.</p>

<p><a href="https://github.com/mcoirad/tableau-hyper-refresher">To get around that, I had to implement my own Tableau–Redshift connector that fully parallelizes data transfer from Redshift to Tableau data sources.</a></p>

<h2 id="incremental-refreshes-are-a-joke">Incremental refreshes are a joke</h2>

<p>Tableau’s incremental refreshes are append-only, other than time-window-based delete-and-insert functionality. That means they work for only a fraction of use cases.</p>

<p><a href="https://github.com/mcoirad/tableau-hyper-refresher#configuration">For this reason, I implemented UPSERT functionality in my Tableau Hyper refresh process.</a></p>

<h2 id="hyper-is-a-memory-demon">Hyper is a memory demon</h2>

<p>The backend for Tableau extracts is Hyper, an in-memory-optimized analytical database. And boy, does it like memory.</p>

<p>Although Hyper does not require the entire dataset to fit in RAM, it aggressively uses available memory to accelerate processing. <a href="https://tableau.github.io/hyper-db/docs/hyper-api/hyper_process/">Tableau’s documentation notes that Hyper processes can consume up to 80% of system memory.</a></p>

<p>This makes working with large extracts locally—or running multiple concurrent Hyper processes—particularly fun. If you are building your own extract pipeline, you had better plan your memory allocation and job concurrency accordingly. I imagine that this also contributes to the price of Tableau Cloud, given all the compute they have to spin up.</p>

<h2 id="major-outages-are-not-always-reported-on-the-tableau-status-page">Major outages are not always reported on the Tableau Status page</h2>

<p>A recent Tableau Cloud update took out most of our reporting for four days, followed by additional recovery time. Worse, it broke our filters and resulted in a major information-security incident.</p>

<p>Our root-cause analysis identified some things that could have been designed more defensively on our end, but the outage ultimately started with Tableau. Unfortunately, we had no way to detect the issue other than reports from end users. Tableau confirmed that it was a bug in the update and that other users were experiencing it, but it was not reported on the official status or community pages.</p>

<p>This has left us needing to write smoke tests for our reporting—something else to maintain on top of software for which we are already paying a good deal of money.</p>

<h2 id="poor-to-non-functional-version-control">Poor to non-functional version control</h2>

<p>Expecting to pass all changes to Tableau reports through Git is probably asking too much, although you can do that with other reporting tools. At a minimum, I would like to be able to restore previous versions of data sources and workbooks through the UI. You can do that for workbooks, but not for data sources.</p>

<p><a href="https://help.tableau.com/current/pro/desktop/en-gb/qs_revision_history.htm#data-changes-and-deletions">As I found out, changing a connection type—for example, switching a data warehouse from Redshift to Snowflake—also corrupts the past versions stored in Tableau Cloud.</a> You cannot undo a connection-type change by restoring a previous version, so you had better make your own backups before a migration like that.</p>

<h2 id="tldr">TL;DR</h2>

<p>Tableau is a self-service analytics platform that becomes frustrating when treated as a production data-infrastructure component. It is designed to make building and sharing reports easy, not to meet the reliability and observability standards that engineers expect from production systems.</p>

<p>Yet Tableau provides just enough functionality to encourage teams to build critical reporting infrastructure around it without offering the tools necessary to maintain that infrastructure properly. It is a great tool to start a team or company with—as long as you plan to leave the team after it grows.</p>]]></content><author><name>dario</name></author><category term="blog" /><category term="data engineering" /><category term="software development" /><category term="startups" /><category term="research" /><category term="data science" /><summary type="html"><![CDATA[Why Tableau Cloud becomes frustrating when it is treated as production data infrastructure, from observability gaps to extract refreshes and version control.]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://dario.technology/assets/images/markdown.jpg" /><media:content medium="image" url="https://dario.technology/assets/images/markdown.jpg" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Glyph Grammar Part 2</title><link href="https://dario.technology/glyph-grammar-pt2/" rel="alternate" type="text/html" title="Glyph Grammar Part 2" /><published>2026-07-12T00:44:00+00:00</published><updated>2026-07-12T00:44:00+00:00</updated><id>https://dario.technology/glyph-grammar-pt2</id><content type="html" xml:base="https://dario.technology/glyph-grammar-pt2/"><![CDATA[<h1 id="glyph-grammar-online-demo"><a href="https://dario.technology/glyph-gen/">Glyph Grammar Online Demo</a></h1>

<h2 id="long-time-no-post">Long time, no post</h2>

<p>I can’t believe it has been a year since my last post. I really thought I could do a monthly post, I sort of kept that up for awhile but yeah… sometimes life gets in the way. In fact I’ve been busy, and haven’t had a lot of time for creative projects. The main things that happened this past year were:</p>

<h4 id="i-started-a-new-job">I started a new job</h4>

<p>I now work at <a href="https://ignite-reading.com/">Ignite Reading</a>, a startup focused on improving early childhood literacy. It is actually a really cool place (I’ve begun drinking some of the koolaid). The work there has been enough to fill out a couple more posts on itself. An example of something I’ve worked on is a Tableau Server extension that allows faster extract refreshes, including support for incremental loads. But that job has kept me on my toes in some new ways so a lot of mental energy has been on that the past year.</p>

<h4 id="i-traveled-the-world">I traveled the world</h4>

<p>Using home in Washington DC as a base I’ve done a lot of traveling for weddings, events, and just for fun. I got to six new countries this year which is crazy for someone who did not like traveling just a few years ago! In fact it is a lifetime of traveling in one year. Sitting here and typing this out I feel insane!  and improved my french, spanish, and picked up some Arabic and Japanese. To be honest I wish I had studied a bit more before each visit, but now I have motivation to continue learning.</p>

<p>I don’t post a lot of photos, but here is one relevant one.
<img src="/assets/images/glyphs/museum.jpg" alt="The Mesha'Stele" />
The Mesha’Stele from the Moabite kingdom!</p>

<h4 id="ai-changed-basically-my-entire-profession">AI changed basically my entire profession</h4>

<p>No way of getting around it, “software engineering” and basically any other job mediated by the virtual world has been changed up a bit by this AI thing. In theory it makes projects like this easier, but in practice I’ve been spending a decent amount of time figuring out how to do my job as a data engineer in better ways. There’s been a whole another wave of attempts at automation and everyone is trying to figure out what is worth automating and where the human should remain in the loop. This could be another post as we are headed in an interesting direction with where the AI bubble has gotten to. <a href="https://medium.com/@macieiramitchell">I think my old posts about the ramifications of the technology have largely stayed true though.</a></p>

<p>So yes, between the above not a lot of room for fun little side quests. My main computer workstation of course has been at home while traveling. Even so…</p>

<h1 id="glyph-grammar-part-2">Glyph Grammar, Part 2</h1>

<p>In the last post I left off before actually getting to generating new glyph procedurally. That has been the focus of my recent work. Basically my plan was:</p>

<ol>
  <li>Come up with a simple way to describe glyphs</li>
  <li>Come up with way to generate version of that simple representation</li>
</ol>

<p>Honestly going back I probably could have skipped step 1. And just gone ahead and written out the line segments and curves using an existing system. But whatever. So I created the ‘glyph grammar’ which I could use to describe the phoenician alphabet.</p>

<p><img src="/assets/images/glyphs/phoe1.png" alt="Phoenician Alphabet, rendered from the glyph grammar" /></p>

<p>Once that was done, the Runic alphabet was also pretty easy.</p>

<p><img src="/assets/images/glyphs/runic1.png" alt="Runic Alphabet, rendered from the glyph grammar" /></p>

<p>And roman. And katakana. Etcetera. (I haven’t finished implementing those because I’m lazy. Or don’t have time. You choose)</p>

<p>So now onto generation</p>

<h2 id="generating-new-alphabets">Generating new alphabets</h2>

<p>As shown in my last post generating random glyphs is easy. But generating good looking ones is harder.</p>

<p><img src="/assets/images/glyphs/attempt5.png" alt="Early attempts" /></p>

<p>The approach I ended up taking was to induce a little probabilistic grammar from an existing alphabet. Basically, you take a source set like Phoenician, implement it in the glyph grammar, and then do some automated analysis of the forms.</p>

<p>Things like:</p>

<ul>
  <li>how often the basic shapes (triangles, rectangles, arcs, and starbursts) appear</li>
  <li>how often glyphs are single cells versus grids</li>
  <li>how often shapes are overlaid</li>
  <li>what kinds of rotations show up</li>
  <li>which bitmasks are common</li>
  <li>what modifiers are used</li>
  <li>how complex each glyph slot tends to be</li>
</ul>

<p>So instead of hard-coding “Phoenician-like glyphs should look like this”, the program looks at the actual Phoenician definitions and builds a grammar from them.</p>

<p>The generated grammar is serializable too, which I like. It means the learned grammar is an actual artifact, not just some temporary runtime state. You can generate it, save it, reload it, and use it later without needing the original source glyphs.</p>

<p>It looks something like this:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>{
  "metadata": {
    "source": "phoenician",
    "glyphCount": 22
  },

  "structureModel": {
    "what kind of node?": {
      "grid": 0.70,
      "overlay": 0.10,
      "primitive": 0.20
    },
    "if grid, what shape?": {
      "one row": 0.65,
      "two rows": 0.35
    },
    "if overlay, how many shapes?": {
      "2": 0.90,
      "3": 0.10
    }
  },

  "attributeModel": {
    "which primitive?": {
      "triangle": 0.40,
      "square": 0.25,
      "arc": 0.20,
      "starburst": 0.15
    },
    "which rotation?": {
      "none": 0.50,
      "90": 0.15,
      "180": 0.10,
      "270": 0.25
    },
    "which visible edges?": {
      "all": 0.30,
      "left+bottom": 0.20,
      "diagonal-ish": 0.15
    }
  },

  "slotProfiles": {
    "aleph": {
      "source": "T5r270*S17",
      "should be roughly": {
        "complexity": "low-medium",
        "density": "medium",
        "symmetry": "mostly horizontal",
        "segments": "2-6",
        "overlays": "0-2"
      }
    }
  },

  "acceptanceRules": {
    "minimumScore": 0.42,
    "minimumConnectivity": 0.50,
    "maximumComplexity": 0.60,
    "minimumNovelty": 0.04
  }
}
</code></pre></div></div>

<p>The first version of this did technically work, but the results were not so great looking to human eyes.</p>

<p>That led to the second big piece: scoring.</p>

<h2 id="scoring-glyphs">Scoring glyphs</h2>

<p>I needed a way to push the generator to acceptable looking glyphs. I am no linguistics expert but there are some forms that can tracked and measured.</p>

<p>So I added a scoring system. Each glyph gets compiled down into geometry, and then I extract a bunch of features from that geometry:</p>

<ul>
  <li>symmetry</li>
  <li>connectivity</li>
  <li>density</li>
  <li>visual balance</li>
  <li>complexity</li>
  <li>novelty</li>
  <li>component count</li>
  <li>segment count</li>
  <li>occupied area</li>
</ul>

<p><img src="/assets/images/glyphs/scoring.png" alt="Glyph scoring system" /></p>

<p>This is very much a heuristic system. This isn’t some grand theory of letterforms. The original glyph grammar doesn’t even model the source alphabets perfectly. It is more like giving the program a few crude senses.</p>

<p>For example, connectivity is useful because lots of generated glyphs would otherwise be disconnected fragments floating near each other. Density is useful because the generator can accidentally make shapes that are either almost empty or completely overworked. Balance helps catch glyphs where all the visual weight ends up shoved into one corner.</p>

<p>Symmetry turned out to be trickier than I expected. My first version was too literal. It looked for mirrored points, but that is not really how people perceive symmetry. A glyph can feel symmetric even if the sampled geometry does not line up perfectly. So I added a more forgiving symmetry coverage metric that samples the rendered geometry and checks how well reflected points are covered.</p>

<p><img src="/assets/images/glyphs/symmetry-tracking-diagram.svg" alt="Symmetry tracking v1 and v2" /></p>

<p>Once I had scoring, generation became a rejection-sampling problem.</p>

<p>For each glyph slot, the generator samples a candidate from the induced grammar, compiles it, scores it, and compares it against the profile learned from the source glyph in that slot. If it is close enough, it accepts it. If not, it tries again. It is a dumb system that is using brute force, but it is okay at a first step.</p>

<p>But basically we create a glyph that according to heuristics, is an equivalent to the glyph in the source set.</p>

<h2 id="generating-a-whole-set">Generating a whole set</h2>

<p>I added some heuristics at the set level too. Something that seems to be common in the source sets are repeated structures. So I make sure a set has some level of repitition of some of the base features it decides to use.</p>

<h2 id="making-it-usable">Making it usable</h2>

<p>I added a UI which was pretty easy to spin up (yay AI). There are a lot of options to constrain the generation, and while they can produce better results the brute force method can actually be quite slow as candidates will often fail to meet the bounds for acceptance.</p>

<p>I had some fun with the rendering because I couldn’t actually find a good JS library to use for drawing the glyphs so I wrote some of my own methods for simulating brush strokes.</p>

<h2 id="where-it-is-now">Where it is now</h2>

<p><a href="https://dario.technology/glyph-gen/">The current version of the Glyph Grammar prototype is hosted here.</a></p>

<ol>
  <li>Pick a source alphabet.</li>
  <li>Parse every glyph in that alphabet.</li>
  <li>Induce a probabilistic grammar from the parsed structures.</li>
  <li>Build score profiles for each glyph slot.</li>
  <li>Generate candidate glyphs from the induced grammar.</li>
  <li>Score and reject candidates until something acceptable appears.</li>
  <li>Evaluate the generated alphabet as a set.</li>
  <li>Preview the result as both a glyph table and sample writing.</li>
</ol>

<p>That is the basic loop.</p>

<p>The generated alphabets actually look kind of decent. But things are still a big WIP, haven’t even finshed implementing the source alphabets (the AI drafts were not super great). I had to stop in the middle to force myself to write this post basically.</p>

<p><img src="/assets/images/glyphs/result1.png" alt="Result based on phoenician alphabet" />
<img src="/assets/images/glyphs/result2.png" alt="Result based on phoenician alphabet" />
<img src="/assets/images/glyphs/result3.png" alt="Result based on runic alphabet" />
<img src="/assets/images/glyphs/result4.png" alt="Result based on runic alphabet" /></p>

<p>The next step though is to make the generation smarter. Some sort of evolutionary algorithm or something would probably work. But until next time. (hopefully next month, not next year!)</p>]]></content><author><name>dario</name></author><category term="blog" /><category term="procedural generation" /><category term="data science" /><category term="2D Arts" /><category term="startups" /><summary type="html"><![CDATA[Part two of Glyph Grammar, covering learned procedural alphabet models, glyph scoring, symmetry tracking, and generated writing systems.]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://dario.technology/assets/images/markdown.jpg" /><media:content medium="image" url="https://dario.technology/assets/images/markdown.jpg" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Glyph Grammar: A System for Procedurally Generating Alphabets</title><link href="https://dario.technology/glyph-grammar-a-system-for-procedurally-generating-alphabets/" rel="alternate" type="text/html" title="Glyph Grammar: A System for Procedurally Generating Alphabets" /><published>2025-06-28T22:44:00+00:00</published><updated>2025-06-28T22:44:00+00:00</updated><id>https://dario.technology/glyph-grammar-a-system-for-procedurally-generating-alphabets</id><content type="html" xml:base="https://dario.technology/glyph-grammar-a-system-for-procedurally-generating-alphabets/"><![CDATA[<h3 id="life-update">Life Update</h3>
<p>Have been pretty good at making a monthly update here on my site the last year or so, but have seemed to miss the month of May. This blog has all less been aimed at getting people to read and look at my work, more about keeping myself accountable with creative activities. However past couple months have been pretty busy with a lot of life and work stuff so haven’t had to time to progress things to make a post here. One thing I started doing IRL though is Improv Comedy over at a local theater called <a href="https://thisismettlesome.com/">Mettlesome</a>. performing and specifically improvising in front of an audience is something new and very different for me (by the gods, I became an engineer for a reason!) and something I can recommend to anyone looking to improve social skills after the pandemic.</p>

<h2 id="inspiration">Inspiration</h2>
<p>In keeping with thoughts about fantasy world building, I was thinking about how alphabets are created. Was looking at the Phoenician alphabet specifically and was inspired how each glyph could generally be broken down into discrete parts. Yes, technically it is all lines, but beyond that it is just rectangles, triangles, and circles, with some segments removed on occasion.</p>

<p><img src="/assets/images/glyphs/wiki_phoe.png" alt="Phoenician Alphabet - source Wikipedia" /> <em>Phoenician Alphabet - source: Wikipedia</em></p>

<p>So to create new Phoenician-like alphabets, we’d just need a system to generate, modify, and combine those shapes.</p>

<h2 id="procedural-glyphs">Procedural Glyphs</h2>

<p>Early attempts were kind of sketchy
<img src="/assets/images/glyphs/attempt1.png" alt="Early attempts" />
<img src="/assets/images/glyphs/attempt2.png" alt="Early attempts" /></p>

<p>Naive attempts at randomization, while sort of interesting, didn’t approach something that looked like an alphabet.</p>

<p><img src="/assets/images/glyphs/attempt3.png" alt="Early attempts" />
<img src="/assets/images/glyphs/attempt4.png" alt="Early attempts" />
<img src="/assets/images/glyphs/attempt5.png" alt="Early attempts" /></p>

<p>Some of this was due to bugs in the code, but I didn’t really have an overall way of organizing everything.</p>

<h2 id="glyph-grammar">Glyph Grammar</h2>
<p>Then I remembered L-Systems. Basically a formal grammar for procedurally creating interesting models. I didn’t think L-systems were the answer really for the procedural generation, but an L-system style grammar could be implemented (and eventually we could test out the L-system, although recursive fractals don’t really seem to be the best solution for generating alphabets). However a grammar would be useful for reducing characters down to a string representation which would make use some other interesting analysis.</p>

<p>The grammar I ended up using was:</p>

<h4 id="primitives">Primitives:</h4>
<ul>
  <li><code class="language-plaintext highlighter-rouge">C</code>: Circle</li>
  <li><code class="language-plaintext highlighter-rouge">T</code>: Triangle (3 sided polygon)\</li>
  <li><code class="language-plaintext highlighter-rouge">R</code>: Rectangle (4 sided polygon, technically a square)</li>
  <li><code class="language-plaintext highlighter-rouge">S</code>: Starburst, 8 lines by default</li>
</ul>

<h4 id="modifiers">Modifiers:</h4>
<ul>
  <li><code class="language-plaintext highlighter-rouge">|</code>: Denote new row</li>
  <li><code class="language-plaintext highlighter-rouge">*</code>: Denote overlapping primitives</li>
  <li><code class="language-plaintext highlighter-rouge">[]</code>: Group primitives</li>
  <li><code class="language-plaintext highlighter-rouge">X</code>: where X is a decimal representation of a bitmask indicating which segments of a primitive to show. Ie (R1) (0001 in binary) would show a rectangle with only its first segment showing) R9 (1001 in binary) would show the first and last segments. Triangles are 3 bits (e.g. 101), while starbursts are 8 bits (e.g. 01010101), representing the cardinal and ordinal directions. No number indicates the full primitive is shown.</li>
  <li><code class="language-plaintext highlighter-rouge">rX</code>: Rotation, where X is a decimal representation of the angle to rotate the glyph by. (e.g. Tr90, rotate triangle by 90 degrees)</li>
</ul>

<h3 id="phoenician-alphabet">Phoenician Alphabet</h3>
<p>Using this grammar you can encode the entire Phoenician alphabet into a simple JSON:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>phoenician_glyphs = {
  "aleph": "T5r270*S17",
  "bet": "Tr270|R6",
  "giml": "T3r270|R2",
  "delat": "T",
  "he": "R3|R3|R3|R3",
  "waw": "S146",
  "tet": "S170*C",
  "zayin": "R5*S17",
  "het": "R12R6|R13R7|R13R7|R9R3",
  "tet": "C*S170",
  "yod": "R3|R3R4",
  "kap": "S177|S1",
  "lamed": "S17|S3",
  "mem": "T5r180 T5r180 R8 | R0 R0 R8 | R0 R0 R8",
  "nun": "T5r180 R8 | R0 R8 | R0 R8",
  "samekh" : "R3R9|R3R9|R3R9|R3R9",
  "ayin": "C",
  "pe": "C3",
  "sade": "S19S130",
  "qop": "[C*S17]|S1",
  "res": "Tr270|R2",
  "shin": "T5r180T5r180",
  "taw": "S170"
}
</code></pre></div></div>

<p>Which when combined with a grammar parser produces the following image:</p>

<p><img src="/assets/images/glyphs/final_alphabet.png" alt="Phoenician Alphabet Rendered by the GlyphGrammar parser" /></p>

<p>Pretty accurate, main remaining issues are the ‘sade’ and ‘pe’ glyphs which aren’t completely accurate to the originals. This begs a few additions to the grammar:</p>

<ul>
  <li><code class="language-plaintext highlighter-rouge">t</code>: transpose a glyph, so that not everything has to perfectly fit the grid system</li>
  <li><code class="language-plaintext highlighter-rouge">s</code>: scale a glyph</li>
  <li><code class="language-plaintext highlighter-rouge">c</code>: curve a line segment, potentially with some simple parameter for the bezier curve</li>
  <li>starbursts work off of a consistent radius. we need an option for a starburst with lines effectively reaching the bounds of the box, rather than a circular radius</li>
</ul>

<p>Implementing the above would get this to 1.0 and also let us fully implement the Runic alphabet. Although we could implement most of those glyphs right now as well.</p>

<p><img src="/assets/images/glyphs/wiki_rune.png" alt="Runic Alphabet - source Wikipedia" /> <em>Runic Alphabet - source: Wikipedia</em></p>

<p>Technically with the above we could also implement Chinese characters too. <a href="https://github.com/LingDong-/rrpl">When doing research for the above I found there’s a project that sort of does that already in a cool way too</a></p>

<h3 id="procedural-generation">Procedural Generation</h3>
<p>We got this far without getting to the main point: actually procedurally generating new alphabets. We had too much fun with the grammar and ran out of time (i wanted to make a post of something for this month). We could try an actual L system, while I don’t think that would be what we want it would at least be interesting to see the results. Rather we should do some analysis and base our procedural rules on the alphabets we already have available, sample the ratios and combinations that come and repeat them. And also do something for symmetrey. We’ll get to that next.</p>

<h3 id="working-demo">Working Demo</h3>

<iframe width="100%" height="300" src="//jsfiddle.net/mcoirad/yrkmvpas/11/embedded/result/dark/" frameborder="0" loading="lazy" allowtransparency="true" allowfullscreen="true"></iframe>

<p>As an aside I used JS Fiddle for this but I think I won’t again. The IDE doesn’t work well on Firefox and at one point bugged out, costing me some unsaved work that I had to do. But it is what I used so far. Please forgive the code, right now it is basically a messy sketchbook, not a finished piece lol.</p>]]></content><author><name>dario</name></author><category term="blog" /><category term="game development" /><category term="procedural generation" /><summary type="html"><![CDATA[Introducing Glyph Grammar, a system for defining and rendering alphabets with procedural rules, starting from Phoenician and runic forms.]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://dario.technology/assets/images/markdown.jpg" /><media:content medium="image" url="https://dario.technology/assets/images/markdown.jpg" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Migrating my basketball stats workflow to the cloud</title><link href="https://dario.technology/migrating-basketball-stats-workflow-to-cloud-copy/" rel="alternate" type="text/html" title="Migrating my basketball stats workflow to the cloud" /><published>2025-04-09T22:44:00+00:00</published><updated>2025-04-09T22:44:00+00:00</updated><id>https://dario.technology/migrating-basketball-stats-workflow-to-cloud%20copy</id><content type="html" xml:base="https://dario.technology/migrating-basketball-stats-workflow-to-cloud-copy/"><![CDATA[<h2 id="moving-to-google-cloud">Moving to Google Cloud</h2>

<p>With the NBA season finishing up I returned to my basketball stats project.
So far I’ve been running it locally or in Cloud IDEs such as Cloud9. Cloud9 sunset awhile ago so I switched over to the Google Cloud IDE after experimenting with Github CodeSpaces. Both seem pretty comparable but I went with the Google Cloud IDE since I was aiming to use that cloud provider anyways.</p>

<p>I chose Google Cloud over AWS since it is better for analytics and a bit more lightweight for single-person projects like I am working on. I use AWS much more professionally but it is always good to branch out lol.</p>

<p>My goal this around was to get my whole workflow which downloads and uses data locally to fully use the cloud. The architecture I settled on iteratively was:</p>

<ul>
  <li>Data stored in Bigquery</li>
  <li>ETL, basic analysis, static site generation in Cloud Run Functions &amp; Jobs</li>
  <li>Orchestration with Workflows</li>
  <li>Site publishing with Jekyll + Github Actions (already done)</li>
</ul>

<p><img src="/assets/images/nba/bk_pipeline.png" alt="Basketball Stats Pipeline Architecture" /></p>

<p>Nothing too fancy but pretty well optimized for cost, costs less than a quarter to run. For now am running it weekly.</p>

<h3 id="next-steps">Next steps</h3>

<p>Now there are a few different directions to go in. A big fun goal would be being able to produce automated trade grades on trades as they happen. To do that I would need to do a few things:</p>

<ul>
  <li>Player projections (i.e. what total BPM will a player produce in the next couple of years?)</li>
  <li>Team projections (i.e. will this team be good or bad, relevant for values of picks)</li>
  <li>Team strategy (i.e. is the team tanking – in which being bad would be a good thing)</li>
  <li>Salaries (i.e. does a move save money, there is some value in that)</li>
</ul>

<p>None of these pieces needs to be super in-depth or rigorous. But we’d like to have these data points for the trade grade model.</p>

<p>For now will be thinking these through while continue to iterate on the current pipeline. I am also thinking about a GraphQL back-end for the site rather than a statically generated site. But I haven’t decided yet.</p>

<p><a href="https://www.dario.technology/the-grunfeld">Site is currently accessible here</a></p>]]></content><author><name>dario</name></author><category term="blog" /><category term="data engineering" /><category term="data science" /><summary type="html"><![CDATA[Migrating a basketball statistics workflow from a local setup to the cloud, including pipeline architecture, automation, and deployment tradeoffs.]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://dario.technology/assets/images/markdown.jpg" /><media:content medium="image" url="https://dario.technology/assets/images/markdown.jpg" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Random Diplomacy Maps Part 2</title><link href="https://dario.technology/random-diplomacy-maps-part-2/" rel="alternate" type="text/html" title="Random Diplomacy Maps Part 2" /><published>2025-03-25T22:44:00+00:00</published><updated>2025-03-25T22:44:00+00:00</updated><id>https://dario.technology/random-diplomacy-maps-part-2</id><content type="html" xml:base="https://dario.technology/random-diplomacy-maps-part-2/"><![CDATA[<h2 id="continued-working-on-random-map-generation-for-diplomacy">Continued working on random map generation for Diplomacy</h2>

<p>I got some feedback on my map generation tool from Diplomacy players that mentioned some more features that would be useful for balance:</p>

<ul>
  <li>Every player has access to the water</li>
  <li>All water zones are connected</li>
  <li>Each player has access to at least one neutral supply center</li>
  <li>Central players have a bonus supply center</li>
  <li>Starting supply centers do not border other players’ starting supply centers</li>
</ul>

<h3 id="managing-water-access">Managing water access</h3>
<p>To ensure water access, I added a check for each player to see if they are bordering water. To ensure water connectivity I had to implement a check to group all water zones in groups that are connected. If the list is larger than 1 the water zones are not all connected.</p>

<p>First we connect all the coastal zones. For now for simplicity we are only supporting “Kiel” type coasts, where a naval unit can move across land to another adjoining body of water.
<img src="/assets/images/maps/details/waterconnections.png" alt="Water connections" /></p>

<p>Then all the deep bodies of water that are no adjacent to land (these are tracked separately)
<img src="/assets/images/maps/details/waterconnections2.png" alt="Water connections" /></p>

<p>In this example all players can access water, but not all water zones are connected.
<img src="/assets/images/maps/details/waterconnections3.png" alt="Water connections" /></p>

<p>To solve this, we want to be able to draw rivers that can connect bodies of water. We want our rivers to look natural, so we’ll adjust their paths to following terrain height values.</p>

<p>The first attempt was drawn with too wide a width lol.
<img src="/assets/images/maps/details/waterconnections4.png" alt="Water connections" /></p>

<p>A lower width looks better.
<img src="/assets/images/maps/details/waterconnections5.png" alt="Water connections" /></p>

<p>Instead of a hardcoded start and end point, we want the starting and ending points to be from two different groups of unconnected water zones – we’ll find the closest zones in each group and attempt to connect them. We’ll also want to keep drawing rivers until everything is connected. Provinces are regenerated each time a river is drawn so the political map will look different.
<img src="/assets/images/maps/details/waterconnections6.png" alt="Water connections" /></p>

<p>We also added a couple of improvements – random names for regions – as well as an additional method to find large groups of land pixels and add them as territories (usually adds a couple of islands as regions which is fun)
<img src="/assets/images/maps/details/waterconnections8.png" alt="Water connections" /></p>

<p>What is not pictured is the starting composition of units. They can be armies or navies. This is addressed in the WebDiplomacy variant export which includes an option to specity naval/army unit balance. As an option there can be a fleet minimum, such as 1, to ensure every player has a fleet.</p>

<h3 id="supply-center-balance">Supply center balance</h3>
<p>As here the most central player (calculated by average distance to each other players’ territories) has been given an extra unit. The number of most central players to boost has been added as an option to the generation process
<img src="/assets/images/maps/details/waterconnections9.png" alt="Water connections" /></p>

<p>In addition supply center generation has been changed from randomly placing supply center to now attempting at the beginning to give each player a supply center at the closest available neutral location. This is not always 100% fair but is a lot more fair than the random placement.</p>

<p>What is still to be done is avoiding starting supply centers between different players that border each other. That will be an option for a next update.</p>

<h3 id="webdiplomacy-variant-export">WebDiplomacy Variant export</h3>
<p>The maps themselves are fun to play with, but the end goal was always to support use in Diplomacy game hosting software. The main platform in-use is WebDiplomacy, so I’ve added experimental support for exporting the required files for us in WebDiplomacy. These can be exported with the ‘Export’ button. What this does is generate several versions of the map (small and large), as well as place the city names in separate images finally. It generates the necessary PHP scripts to install the variant. Everything is zipped client-side and then downloaded from the browser. At some point it would be cool to add the ability in WebDiplomacy to have a ‘random map’ game mode where the system generates the variant dynamically – but that will take some more work to fully integrate.
<img src="/assets/images/maps/details/variant.png" alt="Water connections" /></p>

<p>That’s it for now as I rotate back to my other projects. <a href="https://p5js.org/">p5.js</a> has been a great tool and has been much more performant that the generation <a href="/creating-fantasy-maps/">I was pursuing in Unity3D with C#</a>. At some point I want to return to this again as a starting point for some more Game Dev but that will wait for now.</p>

<p><a href="https://dario.technology/DiplomacyMapGenerator/">UPDATE: generator now hosted on github pages</a></p>

<iframe src="https://dario.technology/DiplomacyMapGenerator/" width="1050" height="1550"></iframe>]]></content><author><name>dario</name></author><category term="blog" /><category term="game development" /><category term="procedural generation" /><summary type="html"><![CDATA[Part two of random Diplomacy map generation, focused on water connections, environmental modeling, variants, and improving map playability.]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://dario.technology/assets/images/markdown.jpg" /><media:content medium="image" url="https://dario.technology/assets/images/markdown.jpg" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Finished Morrowind Hlaalu Lamp</title><link href="https://dario.technology/finished-hlaalu-lamp/" rel="alternate" type="text/html" title="Finished Morrowind Hlaalu Lamp" /><published>2025-02-20T22:44:00+00:00</published><updated>2025-02-20T22:44:00+00:00</updated><id>https://dario.technology/finished-hlaalu-lamp</id><content type="html" xml:base="https://dario.technology/finished-hlaalu-lamp/"><![CDATA[<h2 id="finished-a-lamp">Finished a lamp</h2>

<p>Not much but I finally finished staining and putting together a lamp I had designed for a gift based on House Hlaalu from Morrowind.</p>

<p>House Hlaalu being the most mercantile and pro-Empire of the three Morrowind houses.
<img src="/assets/images/lamps/hlaalucastle.jpg" alt="Hlaalu Castle" />
<img src="/assets/images/lamps/hlaalumeme.png" alt="Hlaalu Meme" /></p>

<p>I think I joined the Telvanni in my playthrough but I was always an Imperial sympathizer. Nobody likes the Camonna Tong!</p>

<p><a href="https://www.youtube.com/watch?v=8r7xmuSx6Pg">I found this video to be helpful for an intro to staining the wood.</a></p>

<h3 id="pretty-happy-with-the-final-product">Pretty happy with the final product</h3>
<p><img src="/assets/images/lamps/finished_hlaalu1.jpg" alt="Morrowind Hlaalu Lamp" /></p>

<p><img src="/assets/images/lamps/finished_hlaalu2.jpg" alt="Morrowind Hlaalu Lamp" /></p>

<p>In my next design I think I will add a way to cover up the corners which I think are super emblematic of lasercut things. But just a minor point to fit.</p>

<p>Design files here: <a href="https://github.com/mcoirad/morrowind-lasercutting-files">https://github.com/mcoirad/morrowind-lasercutting-files</a></p>]]></content><author><name>dario</name></author><category term="blog" /><category term="IRL technology" /><category term="laser cutting" /><category term="morrowind" /><summary type="html"><![CDATA[A finished Morrowind Hlaalu lamp build, with photos, design choices, fabrication notes, and reflections on turning fan art into hardware.]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://dario.technology/assets/images/markdown.jpg" /><media:content medium="image" url="https://dario.technology/assets/images/markdown.jpg" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Procedural Generation for Diplomacy Maps</title><link href="https://dario.technology/procedural-generation-for-diplomacy-maps/" rel="alternate" type="text/html" title="Procedural Generation for Diplomacy Maps" /><published>2025-01-25T22:44:00+00:00</published><updated>2025-01-25T22:44:00+00:00</updated><id>https://dario.technology/procedural-generation-for-diplomacy-maps</id><content type="html" xml:base="https://dario.technology/procedural-generation-for-diplomacy-maps/"><![CDATA[<h2 id="returning-to-maps">Returning to Maps</h2>

<p><a href="https://github.com/kestasjk/webDiplomacy">WebDiplomacy</a> is a great open source gaming project. It basically creates an online platform for playing the Diplomacy board game, something that has been played by mail since the 1960s. It is a very simple and elegant game that provides a sometimes brutal introduction to the game theory concepts of cooperation and betrayal.</p>

<p>In the past I had my own server that I set up to play with coworkers during the pandemic. <a href="https://github.com/mcoirad/gameofthrones-diplomacy">I even created my own Game of Thrones variant</a></p>

<p><img src="/assets/images/maps/got.png" alt="Game of Thrones Diplomacy Map" /></p>

<p>I was recently on the road and had the idea to return to it, but with the question of what would be involved in generating fairly balanced random maps.</p>

<h2 id="diplomacy-random-map-editor">Diplomacy Random Map Editor</h2>

<p>Compared to my last attempt at random map generation, I tried to keep things lightweight and relatively efficient.</p>

<p>The main steps were:</p>
<ul>
  <li>Generate perlin noise</li>
  <li>Smooth/Modify with a gradient</li>
  <li>Set the water level dividing into water and land</li>
  <li>Place cities, using a minimum distance that they must be apart</li>
  <li>Calculate the actual territories off of the city placement, using the landscape to determine boundaries</li>
  <li>Create players, assign them territories</li>
  <li>Place supply centers</li>
</ul>

<p>The most fun was coming up with the gradients, which are sort of the flavors for each map type.</p>

<h3 id="radial-map">Radial Map</h3>
<p><img src="/assets/images/maps/diplomacy_radial.png" alt="Randomly Generated Radial Diplomacy Map" /></p>

<h3 id="mediterranean-map">Mediterranean Map</h3>
<p><img src="/assets/images/maps/diplomacy_med.png" alt="Randomly Generated Mediterranean Diplomacy Map" /></p>

<h3 id="spiral-map">Spiral Map</h3>
<p><img src="/assets/images/maps/diplomacy_spiral.png" alt="Randomly Generated Spiral Diplomacy Map" /></p>

<h3 id="flat-map">“Flat” Map</h3>
<p><img src="/assets/images/maps/diplomacy_none.png" alt="Randomly Generated Diplomacy Map" /></p>

<p>And of course:</p>

<h3 id="custom-image-map">Custom Image Map</h3>

<p>The silliest is probably the ability to build a random map off of an imported image. This allows the creation of some rather cursed variants.</p>

<h4 id="battle-of-austria-hungarys">Battle of Austria Hungarys</h4>
<p><img src="/assets/images/maps/austriabattle.png" alt="Randomly Generated Diplomacy Map" /></p>

<h4 id="battle-for-mcdonalds">Battle for McDonalds</h4>
<p><img src="/assets/images/maps/mcdonalds.png" alt="Randomly Generated Diplomacy Map" /></p>

<h2 id="map-editor">Map Editor</h2>
<p><a href="https://dario.technology/DiplomacyMapGenerator/">UPDATE: generator now hosted on github pages</a></p>
<iframe src="https://dario.technology/DiplomacyMapGenerator/" width="1050" height="1400"></iframe>]]></content><author><name>dario</name></author><category term="blog" /><category term="game development" /><category term="procedural generation" /><summary type="html"><![CDATA[Generating random Diplomacy board game maps with territory layouts, sea connections, coastlines, and constraints for playable strategy.]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://dario.technology/assets/images/markdown.jpg" /><media:content medium="image" url="https://dario.technology/assets/images/markdown.jpg" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Executive Basketball Stats: Methods Rundown</title><link href="https://dario.technology/basketball-executive-example-analysis/" rel="alternate" type="text/html" title="Executive Basketball Stats: Methods Rundown" /><published>2024-12-05T22:44:00+00:00</published><updated>2024-12-05T22:44:00+00:00</updated><id>https://dario.technology/basketball-executive-example-analysis</id><content type="html" xml:base="https://dario.technology/basketball-executive-example-analysis/"><![CDATA[<ul id="markdown-toc">
  <li><a href="#documentation-of-full-analysis" id="markdown-toc-documentation-of-full-analysis">Documentation of full analysis</a>    <ul>
      <li><a href="#the-data" id="markdown-toc-the-data">The Data</a>        <ul>
          <li><a href="#ernie-grunfeld" id="markdown-toc-ernie-grunfeld">Ernie Grunfeld</a></li>
          <li><a href="#draft-calculations" id="markdown-toc-draft-calculations">Draft Calculations</a>            <ul>
              <li><a href="#calculating-the-value-of-future-draft-picks" id="markdown-toc-calculating-the-value-of-future-draft-picks">Calculating the value of future draft picks</a></li>
            </ul>
          </li>
        </ul>
      </li>
      <li><a href="#executive-ratings" id="markdown-toc-executive-ratings">Executive Ratings</a>        <ul>
          <li><a href="#signing-rating" id="markdown-toc-signing-rating">Signing Rating</a></li>
          <li><a href="#trade-rating" id="markdown-toc-trade-rating">Trade Rating</a></li>
          <li><a href="#draft-rating" id="markdown-toc-draft-rating">Draft Rating</a></li>
          <li><a href="#overall" id="markdown-toc-overall">Overall</a></li>
        </ul>
      </li>
    </ul>
  </li>
</ul>

<h1 id="documentation-of-full-analysis">Documentation of full analysis</h1>

<p>Here I’m trying to set out and summarize my methods for rating executive managers in the NBA. Some of this is for my own benefit since the analytical pipeline code doesn’t lend itself well to high-level documentation internally.</p>

<p>I had to move the pipeline off of AWS with <a href="https://horovits.medium.com/disruption-ahead-aws-quietly-axing-services-033e7518eefb">the sunsetting of AWS Cloud9</a> which I was using as the development and execution environment for this pipeline. I tried Github Codespaces but it doesn’t yet seem to have great support on Firefox. I also tried a Jupyter notebook, but this pipeline is a bit too heavy for something like that so have continued to work off of the command line in Linux.</p>

<h2 id="the-data">The Data</h2>

<p>For our analysis utilize a transactions database from basketball-reference.com that lists the transactions credited to the NBA executives who were in charge of player personnel decisions.</p>

<p>For each transaction we note if it was a “signing”, “trade” (involving 2 or more teams), or a draft selection. A current limitation is that we do not track outgoing free agent departures, counting them as a sort of negative “signing”.</p>

<p>Each transaction is linked to one or more players, as well as future draft picks.</p>

<p>As noted before, the main stat that we calculate is something I call “Executive BPM”:</p>

<p><code class="language-plaintext highlighter-rouge">Player BPM * Number of minutes played for team</code></p>

<p>Which gives us a number of (debatable) value that we can use to compare the relative merit of each of an executive’s decisions.</p>

<h3 id="ernie-grunfeld">Ernie Grunfeld</h3>

<p>As an example, we’ll use the namesake of the project: Ernie Grunfeld. He was an executive at three different teams: the New York Knicks, Milwaukee Bucks, and the Washington Wizards.</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>{
	'exec_name': 'Ernie Grunfeld', 
	'exec_teams': ['NYK', 'MIL', 'WAS'], 
	'tenure_years': [
		['1991', '1999'], 
		['1999', '2003'], 
		['2003', '2019']
	]
}
</code></pre></div></div>

<p>Each of those tenures had a number of decisions representated by transactions:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># Numbers of transactions recorded by tenure
{'NYK': 68, 'MIL': 32, 'WAS': 187}

# An example transaction
{
	'name': 'Gilbert Arenas', 
	'transaction': 'added Gilbert Arenas to WAS', 
	'transaction_bpm': 48535.3, 
	'transaction_date': datetime.datetime(2003, 8, 8, 0, 0), 
	'transaction_direction': 1, 
	'team': 'WAS', 
	'transaction_id': 100, 
	'transaction_type': 'signing', 
}
</code></pre></div></div>

<h3 id="draft-calculations">Draft Calculations</h3>

<h4 id="calculating-the-value-of-future-draft-picks">Calculating the value of future draft picks</h4>

<p>To keep our calculations quick and dirty, we’ll need to make some assumptions about our picks. At some point we could include estimates about guesses about exactly where the pick will lie, which would be great for future lottery picks, but for now we’ll just calculate and include average values for first and second round picks.</p>

<p>Going back to the very first seasons that we have BPM for (1973) we can calculate the total BPM for every draft pick, and calculate the average value at each draft position.</p>

<p><img src="/assets/images/nba/avg_bpms.png" alt="Average BPMs by pick" /></p>

<p>Funnily enough, the last pick (60th) comes in at positive. This owes to two factors:</p>
<ul>
  <li>players that never play in the NBA (of which there have been many at the 60th pick) don’t count negatively in the model</li>
  <li>Isaiah Thomas</li>
</ul>

<p>While this chart is useful, what we really want to know is what is the average difference between players at positions with X difference? I.e. what is the average difference between players picked three picks apart? This will be useful for comparing the performance of executives.</p>

<p><img src="/assets/images/nba/avg_improvement_by_draft_bonus.png" alt="Average Draft Improvement by pick" /></p>

<p>Then we can have an average value for both first and second round picks.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>avg_first_round_pick_value = 4482.63789898384
avg_second_round_pick_value = -3475.340543872585
</code></pre></div></div>

<p>Well according to this analysis, second round picks don’t really help teams.
Of course, this shows a problem with our model, it assumes executives should always be building the most competitive team they can, and doesn’t account for tanking which is an important strategy. Second round picks might generally not develop into helpful players, but they have value for rebuilding teams who have more bandwith to play and develop players starting from below-average floors.</p>

<p>Similarly for first round picks – lottery picks are extremely more valuable than the picks in the bottom half of the first round. The bottom half of the first round is functionally similar to a second round pick.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt;&gt;&gt; avg_first_half_first_round_pick_value
11710.675185347987
&gt;&gt;&gt; avg_second_half_first_round_pick_value
-3004.681368131869
</code></pre></div></div>

<p>Future steps of improving the model would include making an estimate of the position of a first round pick (whether it is in the lottery or not) based on current team performance – or including a confidence range on the value of the pick.</p>

<h2 id="executive-ratings">Executive Ratings</h2>

<p>Using the above data, we can try to come up with some useful measures of different aspects of an executive’s performance:</p>

<h3 id="signing-rating">Signing Rating</h3>

<p>Even with having calculate ‘Executive BPM’ there are still several ways we can try to use it to measure an executive’s ability.</p>

<p>For example, because Executive BPM is greatly affected from signing or drafting superstar players, we might try to measure an executive’s ability to improve a team on the margins by making a large amount of smaller but smart decisions. So we can calculate a rating based off of a percentage of transactions that were either “good” (resulted in net BPM gain) or “bad” (resulted in net BPM loss). This won’t be a perfect absolute measure, since I haven’t integrated free agent departures in our dataset, but will work as a relative measure for comparing executives.</p>

<p>In Grunfeld’s case, over the course of his career he signed 181 players. However, according to our model, his percentage of “good” signings puts him at the <strong>51th percentile</strong> among all the executives profiled, which is decidedly average. If we were grading all the executives on a curve, we’d give him a <strong>C</strong>.</p>

<h3 id="trade-rating">Trade Rating</h3>

<p>This is similar to the signing rating, execpt that we are usually considering more than one player to calculate our net EBPM rating.</p>

<p>One difference is the inclusion of draft picks. Here we add the average value of first/second round picks to the net EBPM of a transaction for considering if it is positive or negative.</p>

<p>Ernie Grunfeld rates here in the <strong>30th percentile</strong>, decidedly below-average. On our “curved” rating system we’d give him a <strong>D</strong></p>

<h3 id="draft-rating">Draft Rating</h3>

<p>This is a bit different, we could just consider total BPM, but an interesting way to quantify an executive’s drafting ability to calculate the relative position of an executive’s draft picks’ value compared to the actual position they were taken in. For example, if a player is taken with the 1st pick of the draft, but is only the 5th best player in the draft, the executive responsible would be picking 4 spots below where they should be in the draft.</p>

<p>To be able to calculate this, we’ll reference our above analysis of draft picks to calculate the average net position benefit of having Ernie Grunfeld draft your players: <strong>-3.321429</strong>. That means on average Grunfeld was drafting three spots below the pick he was making.</p>

<p>That’s not good, but also not the very worst, as that ranks in the <strong>39th</strong> percentile, with a <strong>D+</strong> rating. Grunfeld is known for his big busts from his time with the Wizards, like Jan Vesely, but he had some coups over his career such as when at the Milwaukee Bucks he drafted Michael Redd with the 48th pick, who later became an all-star. Most interestingly, the drafting of John Wall is rated as a negative pick since Wall was picked with the first pick of the draft, but only was the second best player of his draft class.</p>

<h3 id="overall">Overall</h3>

<p><img src="/assets/images/nba/grunfeld.png" alt="Ernie Grunfeld Manager Performance" /></p>

<p>The previous ratings and this hasty chart of EPM over time seem to back up the thesis of this project that Ernie Grunfeld was a mediocre manager who stayed on for too long at the Wizards. He certainly had some high points, but they definitely were not with the Washington Wizards.</p>

<p>Next I’ll take a look at Tommy Sheppard, Grunfeld’s successor in DC who ended up being fired only a few years later. I’d like to compare Sheppard’s tenure directly to Grunfeld’s to see the differences.</p>

<p>In the meantime there are still some TODOs for the analytical pipeline. The biggest priorities are:</p>
<ul>
  <li>cleaning up the dataset, as the data from basketball-reference.com contains some obvious errors that will need to be fixed.</li>
  <li>finding a way to include free agent departures within the dataset.</li>
  <li>being able to use advanced stats other than BPM would be nice to better gauge transaction.</li>
</ul>]]></content><author><name>dario</name></author><category term="blog" /><category term="data engineering" /><category term="data science" /><summary type="html"><![CDATA[A methods rundown for NBA executive analytics, using draft value, player development, BPM trends, and case studies like Ernie Grunfeld.]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://dario.technology/assets/images/markdown.jpg" /><media:content medium="image" url="https://dario.technology/assets/images/markdown.jpg" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Multiplayer Visual Novel Framework pt. 3</title><link href="https://dario.technology/multplayer-visual-novel-update/" rel="alternate" type="text/html" title="Multiplayer Visual Novel Framework pt. 3" /><published>2024-11-15T02:44:00+00:00</published><updated>2024-11-15T02:44:00+00:00</updated><id>https://dario.technology/multplayer-visual-novel-update</id><content type="html" xml:base="https://dario.technology/multplayer-visual-novel-update/"><![CDATA[<h2 id="hitting-a-milestone">Hitting a milestone</h2>

<p>After a lot of hard work and effort, finally hit a preliminary milestone in this game’s development. Basically I’ve now got the scripting engine to the point where I can do just about everything that it needs to replicate the original game demo I produced in Renpy. Certainly have not replicated all of Renpy, but a minimum of functionality for the dialogue and exploration systems.</p>

<p>I’ve taken the trouble of creating <a href="https://gist.github.com/mcoirad/e4b7de3f9794f51207882a3733e7043b">an automated running count (using Google App Script)</a> of <a href="https://docs.google.com/document/d/1eqjGHiL9UlSgFJ7AQlC8XVqqODP9ANND7Dhm50MLwaY/edit?usp=sharing">where we are in the engine implementation</a>:</p>

<p><img src="/assets/images/gameart/progress1.png" alt="Game Engine Progress" /></p>

<p>We are still about halfway through, despite all the continued work, but that’s more due to me continuing to flesh out some of the needed features of the game and thus adding more detail to the roadmap.</p>

<p>The main part of it is the scripting engine, which like Renpy, allows for writing out the dialogue in script files.</p>

<h3 id="creating-a-scene">Creating a scene</h3>
<p><img src="/assets/images/gameart/engine_example1.gif" alt="Game Demo Example" /></p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># Begin
scene
{
	addHotspot(newspapers, [look], (0.25, 0.1), (0.22, 0.19))
	addHotspot(certificates, [look], (0, 0.55), (0.25, 0.35))
}
fadeToBlack(noise)
setBackground(boss_office_back);setForeground(boss_office_front);fadeFromBlack(noise)
</code></pre></div></div>

<h4 id="hotspots-and-items">Hotspots and items</h4>
<p>Our scripting engine defines a ‘scene’ by a collection of items and hotspots. Items are just images that are separate from the backgrounds. Hotspots are areas of interactivity that may or may not contain an image. We don’t have a real name for the scene, but we use a label prepended by a hashtag ‘#’ which also functions as a comment.</p>

<p>The current example doesn’t include any items, which can be added by <code class="language-plaintext highlighter-rouge">addItem()</code>. Instead there are hotspots for ‘newspapers’ and ‘certificates’. Each hotspot has a list on interactions that will come up on a popup menu if the hotspot is interacted with, in this case each just has ‘look’. The final arguments just provide the position and size of the hotspots, relative to the size of the screen.</p>

<p>The actual images of backgrounds are defined separately from the scene.</p>

<h4 id="background-action-scripting">Background action scripting</h4>
<p>Here we make use of some redefined actions to control the image backgrounds.</p>

<p><code class="language-plaintext highlighter-rouge">fadeToBlack</code> and <code class="language-plaintext highlighter-rouge">fadeFromBlack</code> control scene transitions, using a ‘noise’ effect.</p>

<p><code class="language-plaintext highlighter-rouge">setBackground</code> and <code class="language-plaintext highlighter-rouge">setForeground</code> use our layer system to provide two levels of backgrounds, one in front of and one behind our characters.</p>

<h3 id="dialog-system">Dialog System</h3>
<video controls="">
  <source src="/assets/images/gameart/example_engine2.mp4" type="video/mp4" style="max-width:100%;" />
  Your browser does not support the video tag.
</video>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># Intro
narrator "Here we are, at the boss' office."
enter(Boss,interactive=true,options=[look,talk]);setPosition(Boss,0.5,0.65)
Boss "So you're wondering why I called you in tonight." 
Boss "This is a real important case.{a} I don't know if you knew this about Gonzalez but she was colonel on the police force before making a big career in politics."
...
Boss "Mess up, and you'll be on the K9-unit clean-up detail."
@AP "&lt;i&gt;Uh oh.{a} They won't even let the robots do that kind of work. If it came to it, I would rather be fired.&lt;/i&gt;"
@AP "&lt;i&gt;I think my Boss is watching out for me, but it's hard to tell sometimes.&lt;/i&gt;"
Boss "And before you leave, one more thing..."
Boss "Kirke fixed up the...{a} whatchamacallit{a} &lt;b&gt;&lt;color=red&gt;EMP scanner&lt;/color&gt;&lt;/b&gt; thing, make sure to drop by the lab and take that with you." addKeyword(emp_scanner)
jump(Explore)
</code></pre></div></div>

<h4 id="character-management">Character Management</h4>
<p>We enter the ‘boss’ character using <code class="language-plaintext highlighter-rouge">enter()</code>, setting him to <code class="language-plaintext highlighter-rouge">interactive</code> (meaning the character will also have an interaction hotspot in exploration mode), as well as interaction options ‘look’ and ‘talk’. We also use <code class="language-plaintext highlighter-rouge">setPosition()</code> to place him in the middle of the scene. The engine will automatically search for this character’s art files in the Resources folder. The framework will also automatically search for a speaking animation and play it while the dialogue for a character is in progress.</p>

<p>Similar to Renpy sytax, we start off dialog lines with a character’s name, and then dialog in doublequotes. Thing like dialog stops <code class="language-plaintext highlighter-rouge">{a}</code> and HTML styling like italics and bold text are all supported.</p>

<p>One difference is that since this is multiplayer is that there is support for relative dialogue. In this case we have the <code class="language-plaintext highlighter-rouge">@AP</code> which stands for ‘active player’, i.e. generally whoever initiated the dialogue or interaction.
In addition we have support for running our action functions within and at the end of each speech definition.</p>

<p>Finally we use a very important action, <code class="language-plaintext highlighter-rouge">jump()</code> which jumps to the aforementioned labels, which are defined with hashtags. In this case, the script jumps to a label which begins the exploration mode.</p>

<h3 id="going-from-here">Going from here</h3>
<p>You’ll notice I haven’t posted the actual code that is behind the framework. Earlier I did consider the idea of releasing the framework, potentially as a licensed asset. That still is the goal, however, my priority now has changed to just working on my game. Plenty of behaviors are hardcoded and I’m not yet at the point where I want to spend too much time on cleaning things up and responding to questions and bugfixes. There will be time for that later, once the game is in a more advanced state. (Happy to still share code on a private basis with anyone interested)</p>]]></content><author><name>dario</name></author><category term="blog" /><category term="game development" /><category term="interactive narratives" /><category term="2D Arts" /><summary type="html"><![CDATA[A development update on the multiplayer visual novel framework, including game engine progress, interaction design, and technical direction.]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://dario.technology/assets/images/markdown.jpg" /><media:content medium="image" url="https://dario.technology/assets/images/markdown.jpg" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Thinking beyond SQL: When DBT is not the answer</title><link href="https://dario.technology/thinking-beyond-sql/" rel="alternate" type="text/html" title="Thinking beyond SQL: When DBT is not the answer" /><published>2024-11-04T02:44:00+00:00</published><updated>2024-11-04T02:44:00+00:00</updated><id>https://dario.technology/thinking-beyond-sql</id><content type="html" xml:base="https://dario.technology/thinking-beyond-sql/"><![CDATA[<p>While thinking through a bunch of things related to data engineering with data warehouses, I decided to note some things and turned it into an article.</p>

<p><a href="https://medium.com/@macieiramitchell/thinking-beyond-sql-when-dbt-is-not-the-answer-317eee5a56a5">I posted it on Medium, you can access the full text there.</a></p>

<p>In summary I noted my frusterations with DBT and its limitations. It is still a good tool but I don’t think it is a great data engineering tool. It is a great analytics tool though, if that makes sense. But following SWE practices with feel to some degree feels like you are fighting with it. But it isn’t unique in that case.</p>

<p>As a data engineer I like <a href="https://sqlmesh.com/">SQLMesh</a> a lot more and will be following that ecosystem with a lot of interest.</p>]]></content><author><name>dario</name></author><category term="blog" /><category term="data engineering" /><category term="software development" /><summary type="html"><![CDATA[Why dbt is not always the right answer for data engineering, and where SQLMesh, software engineering practices, and orchestration can help.]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://dario.technology/assets/images/markdown.jpg" /><media:content medium="image" url="https://dario.technology/assets/images/markdown.jpg" xmlns:media="http://search.yahoo.com/mrss/" /></entry></feed>