Trouble in the Jungle

Architectural jokes aside, we, the Maronic development team, have some real problems. And they're not related to code directly. As you may remember, our little indie company consists of only me, a canary named Michael that acts as a product manager, and two cat designers that sleep most of the day, but do produce some decent mockups from time to time. We have no QA (that's quality assurance guys) whatsoever. Maybe that's one of the reasons our game keeps crashing all the time.

Lately, Michael has introduced me to a parrot named Kenny, who happens to be QA:

interface QA {
fun doesMyCodeWork(): Boolean
}

interface Parrot {
fun isEating(): Boolean
fun isSleeping(): Boolean
}

object Kenny : QA, Parrot {
// Implements interface methods based on parrot schedule
}
This section will use objects for the sake of simplicity.

Parrot QAs are very motivated. They're ready to test the latest version of my game any time. But they really don't like to be bothered when they are either sleeping or eating:

class MyMind {
val qa = Kenny

fun taskCompleted() {
if (!qa.isEating() && !qa.isSleeping()) {
println(qa.doesMyCodeWork())
}
}
}

In case Kenny had any questions, I gave him my direct number:

object Kenny : ... {
val developer = Me
}

Kenny was a hard-working parrot. But we had so many bugs that we also had to hire a second parrot QA, Brad. If Kenny is free, I give the job to him, as he's more acquainted with our project. But if he's busy, I check if Brad is free, and give this task to him:

class MyMind {
...
val qa2 = Brad

fun taskCompleted() {
...
else if (!qa2.isEating() && !qa2.isSleeping()) {
println(qa2.doesMyCodeWork())
}
}
}

Brad, being more junior, usually checks up with Kenny first. And Kenny also gave my number to him:

object Brad : QA, Parrot {
val senior = Kenny
val developer = Me
...
}

Then Brad introduces me to George. George is an owl, so he sleeps at different times than Kenny and Brad. That means that he can check my code at night. The problem is, George is an avid football fan. So before calling him, we need to check if he's watching a game now:

class MyMind {
...
val qa3 = George

fun taskCompleted() {
...
else if (!qa3.isWatchingFootball()) {
println(qa3.doesMyCodeWork())
}
}
}

Kenny as a habit checks with George too, because George is a very knowledgeable owl:

object Kenny : QA, Parrot {
val peer = George
...
}

And George checks with Kenny, because Kenny is also into football, it seems:


object George : QA, Owl {
val mate = Kenny
...
}

George loves to call me during the night with his questions:

object George : QA, Owl {
val developer = Me
...
}

Then there's Sandra. She's a different kind of bird, because she's not a QA, but a copywriter:

interface Copywriter {
fun areAllTextsCorrect(): Boolean
}

interface Kiwi

object Sandra : Copywriter, Kiwi {
override fun areAllTextsCorrect(): Boolean {
return ...
}
}

 I try not to bother her, unless it's a major release:

class MyMind {
...
val translator = Sandra

fun taskCompleted(isMajorRelease: Boolean) {
...
if (isMajorRelease) {
println(translator.areAllTranslationsCorrect())
}
}
}

OK, now I have a few problems:

  • First, my mind almost explodes trying to remember all those names. So might yours.
  • Second, I also need to remember how to interact with each one. I'm the one doing all the checks before calling them.
  • Third, notice how George tries to confirm everything with Kenny, and Kenny with George? Luckily, up until now, George is always watching a football game when Kenny calls him. And Kenny is asleep when George needs to confirm something with him. Otherwise, they would get stuck on the phone for eternity...
  • Fourth, and what bothers me the most, is that Kenny plans to leave soon to open his own startup, ParrotPi. Imagine all the code we'll have to change now!

All I want to do is to check if everything is alright with my code. Someone else should do all this talking!

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.221.249.198