|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- <!doctype html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <meta http-equiv="x-ua-compatible" content="ie=edge">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <meta name="referrer" content="no-referrer">
- <title>rf - Best Bug</title>
- <link rel="stylesheet" href="../../css/default.css" />
- <link rel="shortcut icon" href="favicon.ico" type="image/x-icon"><link rel="shortcut icon" href="../../images/favicons/favicon32.png"><link rel="apple-touch-icon-precomposed" sizes="144x144" href="../../images/favicons/favicon144.png"><link rel="apple-touch-icon-precomposed" sizes="114x114" href="../../images/favicons/favicon114.png"><link rel="apple-touch-icon-precomposed" sizes="72x72" href="../../images/favicons/favicon72.png"><link rel="apple-touch-icon-precomposed" sizes="57x57" href="../../images/favicons/favicon57.png">
- </head>
- <body>
- <header>
- <div class="logo">
- <a href="../../">Regular Flolloping</a>
- </div>
- <nav class="navbar">
- <a href="../../">Home</a>
- <a href="../../about/">About</a>
- <a href="../../contact/">Contact</a>
- <a href="../../archive/">Archive</a>
- </nav>
- </header>
-
- <main role="main">
- <h1>Best Bug</h1>
- <article>
- <section class="header">
- Posted on May 21, 2019
-
- </section>
- <section>
- <p>my pal and i accidentally introduced a bug in our code that sorta took up a personality of its own, heres the story.</p>
- <h1 id="the-setting">the setting</h1>
- <p>at university comp sci, me and my buddy entered a programming contest that was run by a health company. it was free, and we thought we might be able to get some of the prizes.</p>
- <p>the goal was to create an engine to play last card, and all the entries would be run against each other and ranked.</p>
- <p>this was in about two hours in one of the uni labs.</p>
- <blockquote>
- <p>pretty boring stuff</p>
- </blockquote>
- <p>it had that yellow glow of the lights as well, because it was getting dark outside.</p>
- <h1 id="the-fun">the fun</h1>
- <p>we started implementing a pretty basic card counting thing, and to pass the time a bit were talking about our ‘ai’</p>
- <blockquote>
- <p>its super good at card games, even the basic ones</p>
- </blockquote>
- <blockquote>
- <p>its like outta yugioh, its kaiba or something</p>
- </blockquote>
- <blockquote>
- <p>yeah jojos poses every turn, better than the rest</p>
- </blockquote>
- <p><em>etc etc</em></p>
- <p>so we finished up after…</p>
- <p><strong><em>having to deal with whatever maven is</em></strong></p>
- <p>i still dont understand the hundred different package management things, why do they have to keep changing? <code>/rant over</code></p>
- <h1 id="uh-oh">uh oh</h1>
- <p>we ended up placing second, losing to the guy that already worked for the company running the event.</p>
- <p>we lost points because we didnt understand the state format correctly, but i believe we understand it right.</p>
- <p>what theyd done is <del>super gross</del> <del>logically wrong</del> had any collection of cards as the java version of <code>Maybe Cards</code> such that rather than an empty list being <code>[]</code>, the whole thing was a <code>Nothing</code>.</p>
- <p>a collection of cards that has zero cards in it is still a set, and therefore should be represented by <code>[]</code> or equivilent. <code>/rant over</code></p>
- <p>the affect of this on ol` kaiba boi (aka kAIba which added to the charm) was that if it was the first player of a game, it would crash, timeout and the game manager would default to a pass.</p>
- <h1 id="neato-bug">neato bug</h1>
- <p>this cemented the persona of this bug to be a kaiba-esque dramatic dickhead, threatening to fall off buildings if he loses, but saying:</p>
- <blockquote>
- <p>huh! first player advantage? thats for <strong>noobs</strong>, you take it</p>
- </blockquote>
- <p>and yeeting the other player first turn.</p>
- <h1 id="fin">fin</h1>
- <p>memorable bugs are the best kind of bugs, and have a life all of their own. part of the magic of programmation is finding these so you gotta pay attention.</p>
- <p><code>:wq</code></p>
- </section>
- </article>
-
- </main>
-
- <footer>
- powered by <a href="http://jaspervdj.be/hakyll">Hakyll</a>
- </footer>
- </body>
- </html>
|