Over you

364 9 1
                                    

It's been two hours since I started working on this task, but I still can't find a solution.

This happens every day. It's so frustrating.

I'm sitting at my desk, with my laptop in front of me and a now-cold cup of chamomile tea beside it.

I turn around and see that Verosika hasn't moved from the bed.

The last thing that succubus did was tidy up the kitchen after breakfast, just like she said. Then she threw herself on the bed, and hasn't moved since, only changing position from time to time.

Maybe she's mortified by what happened earlier, because she looks very defensive, moving from one position to another while hiding her face. And she avoids turning towards me.

I turn my gaze back to the monitor.

Luckily, the nausea she gave me passed quickly, and I was able to have breakfast and get to work without any issues.

Since I haven't received any updates or further instructions from work on what to do, I just continue the tasks left unfinished from yesterday.

I can't complete this damn algorithm.

It's awful being stuck on the same point for too long. And it's stressful too. Especially when you try everything to find a solution, yet nothing works.

«Why can't I figure out where the error is?» I mutter to myself, staring at the screen. The code seems correct, but something clearly isn't working.

I see Verosika in the reflection of the dark monitors next to the one that's on. She's raised her head and is staring ahead.

Damn it... why can't I stop looking at her? She's distracting me from work, damn it!

But it's my fault after all.

It's a step forward that I'm not staring at her ass. And that nice little tail of hers.

She gets up from the bed and walks over to the bookshelf, right in front of the bed, between the kitchen door and the bathroom door.

Meanwhile, I try to hold back tears of frustration.

«Y/N, there's a book missing here. Look, there's an empty space that shouldn't be here. The books are all numbered, but number 3 is missing.»

I turn towards her, distracted. «An empty space?»

«Yes,» she says, pointing to the bookshelf. «I don't know how it happened, but there's a gap right here between these two books.»

Her words make me think. An empty space between the books... just like the gaps I see in the results of my program. An idea strikes me. I quickly review my code and realize that the problem might be in the comparison logic I'm using to sort the objects. I'm only comparing the main field, but there are other fields that could create "gaps" if not handled properly.

I realize I'm ignoring the secondary conditions when the main comparison is equal, which causes the elements to "skip" the position they should occupy.

I immediately modify the compareTo() method of my object to include a more detailed comparison:


@Overridepublic int compareTo(MyObject other) { int primaryComparison = this.primaryField.compareTo(other.primaryField); if (primaryComparison != 0) { return primaryComparison; } else { // Handle secondary comparison to avoid "gaps" int secondaryComparison = this.secondaryField.compareTo(other.secondaryField); if (secondaryComparison != 0) { return secondaryComparison; } else { return this.tertiaryField.compareTo(other.tertiaryField); } 

A web developer AND The succubusWhere stories live. Discover now