tA's crappy blog
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

82 lines
4.3KB

  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="x-ua-compatible" content="ie=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1">
  7. <meta name="referrer" content="no-referrer">
  8. <title>rf - Best Bug</title>
  9. <link rel="stylesheet" href="../../css/default.css" />
  10. <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">
  11. </head>
  12. <body>
  13. <header>
  14. <div class="logo">
  15. <a href="../../">Regular Flolloping</a>
  16. </div>
  17. <nav class="navbar">
  18. <a href="../../">Home</a>
  19. <a href="../../about/">About</a>
  20. <a href="../../contact/">Contact</a>
  21. <a href="../../archive/">Archive</a>
  22. </nav>
  23. </header>
  24. <main role="main">
  25. <h1>Best Bug</h1>
  26. <article>
  27. <section class="header">
  28. Posted on May 21, 2019
  29. </section>
  30. <section>
  31. <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>
  32. <h1 id="the-setting">the setting</h1>
  33. <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>
  34. <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>
  35. <p>this was in about two hours in one of the uni labs.</p>
  36. <blockquote>
  37. <p>pretty boring stuff</p>
  38. </blockquote>
  39. <p>it had that yellow glow of the lights as well, because it was getting dark outside.</p>
  40. <h1 id="the-fun">the fun</h1>
  41. <p>we started implementing a pretty basic card counting thing, and to pass the time a bit were talking about our ‘ai’</p>
  42. <blockquote>
  43. <p>its super good at card games, even the basic ones</p>
  44. </blockquote>
  45. <blockquote>
  46. <p>its like outta yugioh, its kaiba or something</p>
  47. </blockquote>
  48. <blockquote>
  49. <p>yeah jojos poses every turn, better than the rest</p>
  50. </blockquote>
  51. <p><em>etc etc</em></p>
  52. <p>so we finished up after…</p>
  53. <p><strong><em>having to deal with whatever maven is</em></strong></p>
  54. <p>i still dont understand the hundred different package management things, why do they have to keep changing? <code>/rant over</code></p>
  55. <h1 id="uh-oh">uh oh</h1>
  56. <p>we ended up placing second, losing to the guy that already worked for the company running the event.</p>
  57. <p>we lost points because we didnt understand the state format correctly, but i believe we understand it right.</p>
  58. <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>
  59. <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>
  60. <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>
  61. <h1 id="neato-bug">neato bug</h1>
  62. <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>
  63. <blockquote>
  64. <p>huh! first player advantage? thats for <strong>noobs</strong>, you take it</p>
  65. </blockquote>
  66. <p>and yeeting the other player first turn.</p>
  67. <h1 id="fin">fin</h1>
  68. <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>
  69. <p><code>:wq</code></p>
  70. </section>
  71. </article>
  72. </main>
  73. <footer>
  74. powered by <a href="http://jaspervdj.be/hakyll">Hakyll</a>
  75. </footer>
  76. </body>
  77. </html>