rf gopher mirror
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.

60 lines
2.2KB

  1. # Best Bug
  2. my pal and i accidentally introduced a bug in our code that sorta took up a personality of its own, heres the story.
  3. # the setting
  4. 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.
  5. the goal was to create an engine to play last card, and all the entries would be run against each other and ranked.
  6. this was in about two hours in one of the uni labs.
  7. > pretty boring stuff
  8. it had that yellow glow of the lights as well, because it was getting dark outside.
  9. # the fun
  10. we started implementing a pretty basic card counting thing, and to pass the time a bit were talking about our 'ai'
  11. > its super good at card games, even the basic ones
  12. > its like outta yugioh, its kaiba or something
  13. > yeah jojos poses every turn, better than the rest
  14. *etc etc*
  15. so we finished up after...
  16. ***having to deal with whatever maven is***
  17. i still dont understand the hundred different package management things, why do they have to keep changing? `/rant over`
  18. # uh oh
  19. we ended up placing second, losing to the guy that already worked for the company running the event.
  20. we lost points because we didnt understand the state format correctly, but i believe we understand it right.
  21. what theyd done is ~~super gross~~ ~~logically wrong~~ had any collection of cards as the java version of `Maybe Cards` such that rather than an empty list being `[]`, the whole thing was a `Nothing`.
  22. a collection of cards that has zero cards in it is still a set, and therefore should be represented by `[]` or equivilent. `/rant over`
  23. 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.
  24. # neato bug
  25. this cemented the persona of this bug to be a kaiba-esque dramatic dickhead, threatening to fall off buildings if he loses, but saying:
  26. > huh! first player advantage? thats for **noobs**, you take it
  27. and yeeting the other player first turn.
  28. # fin
  29. 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.
  30. `:wq`