Friday, 26 June 2026

Five Ways Users Self-sabotage When Reporting Problems

In desktop support and in software development, there runs a common thread - responding to requests for help from users. And this remains some of the greatest tests of patience known to man. Not because the problems are tricky, though sometimes they can be. Not because the users are rude, though on occasion, a couple would greatly benefit from some goddamn manners. No, because sometimes, the way users report problems, just does not help themselves.

Let's go through a few ways that users' requests for help inspires intense rage could be improved.

1. "It doesn't work."

This is probably one of the most exasperating things a techie can hear. Because that phrase, and its numerous variations, basically tells you there's a problem, perhaps a general area, and that's all. It doesn't tell you anything else. No, the user informs you that there's a problem, and expects you to figure everything else from that mysterious statement.

Printer is on fire.

For example, telling us "help, I can't print" is a statement about as useful as a can of diesel to Elon Musk. "I can't print" could mean anything.

- the printer printed blank sheets of paper
- the printout was garbled.
- the print button on the screen did not respond to clicks.
- the print button could be clicked but nothing happened.
- the print button flashed, beeped, triggered the Fire Alarm and rebooted your life.

For extra aggravation points, the user might even write an email with a few paragraphs while including no information as to what the problem is, beyond "we're unable to print", ending with "we would appreciate your help as soon as possible". That in no way sounds like they want our help as soon as possible. In fact, it feels distinctively like they'd rather we take our own sweet time to decipher what the problem actually is, before we do a damn thing.

How To Do Better: Users should actually describe the damn problem beyond "it doesn't work". Because if it did work, there wouldn't be a need for this conversation.

2. What are we looking at?

The user tells you what they see on screen. Sometimes they even send you a screenshot. Neither of which is helpful, because what you see isn't an error message. It's something that looks perfectly innocuous on screen, and only the user knows why it's wrong.

Except the user has neglected to tell you exactly what is wrong. No, apparently having a tech degree means that you can somehow infer what the problem is, in the absence of any other indicators. Which leads me to think that the problem is not that systems have bugs. It's that system users think tech is actually witchcraft.

Not witchcraft.

So if you see a series of numbers in a column, you're supposed to magically know one of those numbers is supposed to be negative instead of positive. If you're sent a screenshot of a message that says "Record Saved", you're supposed to instinctively know that the problem was that the record was, in fact, not saved. Or perhaps the problem was that the record was saved when it shouldn't have been. Or perhaps the problem was that it was spelled in English, when the user's settings were in some other language. Who can tell?

What is with all this vagueness? Do users realize that if techies were capable of reading minds, we wouldn't be working here?

How To Do Better: Users should tell us exactly what they expected would happen but didn't. Without that information, it's hard to tell whether anything is wrong in the first place.

3. How did they get there?

This is when the user tells you what went wrong, and maybe even why it's wrong, but neglects to explain how it came about. Which is kind of like Hansel and Gretel wandering around in some dark forest and neglecting to leave breadcrumbs.

Leave us a trail!

In order to properly diagnose the source of the problem, we need to trace exactly the steps that the user took that led to the problem. In certain cases, this can actually be a case of the user using the system in ways it was not meant to be used. For example, trying to log in to a system and being unable to... and failing to mention that the URL they're using is the UAT site's rather than Production's.

Some users want to avoid looking stupid and leave out that information, perhaps hoping that the air of mystery will help. If I need to point out the irony here, you haven't been at this job long enough.

How To Do Better: The user was doing something that led to this. Whatever the user was doing, needs to be properly articulated because it is probably relevant.

4. Screenshots

For some unfathomable reason, when there's relevant information in a string that needs to be passed to the software developer - such as an id, URL or IP Address - users seem to prefer sending them as screenshots.

Exasperating as all hell when there's info in there that you now have to type out character by character, and probably make a few typos in the process. Now with modern tools such as LLMs that can analyze the image, this has become only slightly less exasperating.

Don't send pictures
of text, please!

Why is this completely stupid? Well, when you're being asked for help, generally, you'd expect those asking for help to at least try to make it easier for you to help them.

Also, copying and pasting text is significantly easier than manually reproducing text from a screenshot. But copying and pasting text takes about the same amount of effort as pasting a screenshot. Now, I could understand if the users were inconveniencing me in order to make their own lives easier... I wouldn't like it, but I would at least understand it. However, at this juncture, they're inconveniencing me without actually making things easier for themselves, so this entire exercise of pasting screenshots remains a damn mystery. It has zero practical value.

The truly horrifying thing is that this isn't confined to laypersons - other techies do it as well. Yes, this brand of insanity isn't confined to people who aren't actually expected to know better.

Bonus points for writing stuff down in handwriting that would make a doctor proud and sending a photo of it, instead of typing it like a normal person.

How To Do Better: Unless the information is wholly visual - colors, layout, etc - and does not include text of any kind that needs to be used by the support - ids, ip addresses, dates, etc - screenshots should not be used as a primary means of communicating the problem.

5. Jumping to Conclusions

This is when the user self-diagnoses and ends up sending you on a wild-goose chase. To be fair, even techies are capable of jumping to wrong conclusions with alarming frequency... except that in the case of techies, their wrong conclusions tend to be directionally correct. In the same ballpark, even.

Laypersons, as mentioned, tend to treat tech like witchcraft, so their wrong conclusions can be comically inaccurate. I remember one fascinating incident where the user reported that the changes to the database were not persisting. The next point of escalation was to the database team, because naturally, support had no direct access to the data. After days of barking up the wrong tree, it turned out that the fault was in the front-end code - it cached the previous result even though the data had been updated, thus misleading the user into thinking that it was a database problem.

What users should do, in these cases, is stick to the facts. The user should have just reported the simple fact that her display was showing previous data even though she had already updated it. This would have set support further back on the path, but at least they would not have been miles ahead on the wrong path.

Barking up the
wrong tree.

In this instance, though, I blame the techies for taking the complaint at face value in the first place. When are we going to learn to stop giving users so much credit? If you consulted a doctor and proceeded to diagnose yourself while asking for medication, could you expect to be taken seriously?

How To Do Better: Skip the diagnosis. Lay out the issue properly. Nobody's interested in your opinion - in fact, it tends to muddy the waters. Stick to facts.

Don't make yourselves un-rescuable

If users want help from techies, they should try making it easy for techies to help them. Or, at least, stop making it so devilishly hard. When you report a problem, just try to put yourselves in the shoes of the ones receiving your report, and see if it makes any damn sense.

Whats your problem?
T___T

Saturday, 20 June 2026

Web Tutorial: Bus Arrival App, Redux

Two years ago, I took you through the creation if this charming little app that could show you when your bus was arriving. And I took it on a rigorous test run that lasted that duration. In the process, I discovered what worked, and what needed work. Today I am going to be taking you through some upgrades I have done.

Don't look so shocked. Software is not dead. It evolves. Especially useful software.

Some problems I fixed...
- added visuals for bus types and capacity
- simplified data flow
- color scheme

Let's get to work! We will first streamline the data flow.

The first thing we'll want to do is remove the JavaScript. This upgrade removes all JavaScript in lieu of UI simplicity. To that end, this entire section needs to go.
<script>
function showArrivalFor($bus)
{
    var hide = document.getElementsByClassName("arrival");

    for (var i = 0; i < hide.length; i++)
    {
        hide[i].style.display = "none";
    }

    var show = document.getElementById("arrival_" + $bus);
    show.style.display = "block";
}
</script>


Remove this entire div. We want everything to be visible when the data is fetched. No more strategically hiding some of it. This means there are less steps for the user to go through, reducing interface friction.
<div id="bus" style="display:<?php echo (count($buses) == 0 ? "none" : "block");?>">
    <h1>&#128655; BUS SERVICES</h1>
    <?php
    foreach($buses as $bus)
    {
    ?>
        <button onclick="showArrivalFor('<?php echo $bus->ServiceNo; ?>');">
        <?php
            echo $bus->ServiceNo;
        ?>
        </button>    
    <?php    
     }
     ?>
</div>

<br />


Remove this too. We won't need it any more.
#bus button
{
    background-color: rgb(50, 0, 0);
    color: rgb(255, 255, 255);
    border-radius: 5px;
    border: 3px solid rgba(0, 0, 0, 0.5);
    padding: 5px;
    width: 5em;
    font-size: 20px;
    font-weight: bold;
}


In this section, the div should still be styled using the arrival CSS class, but the style that hides it, should be removed, as well as the id attribute.
<?php
    foreach($buses as $bus)
    {
?>
    <div class="arrival">
        <h1> BUS <?php echo $bus->ServiceNo; ?> ARRIVAL TIMINGS</h1>
        <?php
            if ($bus->NextBus)
            {
                 echo "<h2>" . formatArrivalTime($bus->NextBus->EstimatedArrival) . "</h2>";
            }

            if ($bus->NextBus2)
            {
                echo "<h2>" . formatArrivalTime($bus->NextBus2->EstimatedArrival) . "</h2>";
            }

            if ($bus->NextBus3)
            {
                echo "<h2>" . formatArrivalTime($bus->NextBus3->EstimatedArrival) . "</h2>";
            }
        ?>
    </div>
<?php      
    }
?>  


So far so good....


Next, the Color Scheme

Now here's a bit of styling. I enlarged the front to almost double what it was previously, changed the background color to orange, and gave container a white translucent border.
body
{
    background-color: rgb(200, 150, 0);
    font-family: sans-serif;
    font-size: 25px;
}

#container
{
    border-radius: 20px;
    border: 3px solid rgba(255, 255, 255, 0.5);
    padding: 2em;
}


I also removed some of these properties. They're no longer necessary.
#container div
{
    /* border-radius: 20px; */
    /* border: 3px solid rgba(100, 0, 0, 0.2); */
    padding: 0.5em;
    color: rgb(0, 0, 0);
}


That wasn't too hard!


More changes. A couple things are happening here. I remove borders from the rendering of the textbox and button for a clean flat look. I also change the button and hover color.
#stop input
{
    border-radius: 5px;
    border: 0px solid rgba(0, 0, 0, 0);
    padding: 5px;
    width: 10em;
    height: 1em;
}

#stop button
{
    background-color: rgb(255, 200, 0);
    color: rgb(255, 255, 255);
    border-radius: 5px;
    border: 0px solid rgba(0, 0, 0, 0);
    padding: 5px;
    width: 10em;
}

#stop button:hover
{
    background-color: rgb(150, 50, 0);
}


While we're at it, let's declutter by removing these icons.
<!--<h1>&#128655; BUS STOP <?php echo $busStop;?></h1>-->
<h1>BUS STOP <?php echo $busStop;?></h1>


<!--<h1>&#128652; BUS <?php echo $bus->ServiceNo; ?> ARRIVAL TIMINGS</h1>-->
<h1>BUS <?php echo $bus->ServiceNo; ?> ARRIVAL TIMINGS</h1>


Looks cleaner now, doesn't it?


In fact, let's clean this up even more.
<!--<h1>BUS <?php echo $bus->ServiceNo; ?> ARRIVAL TIMINGS</h1>-->
<h1><?php echo $bus->ServiceNo; ?></h1>


In the CSS, we provision styling for all h1 tags in arrival. The important thing is that it's floated left. The rest is just aesthetics. I'm going for white text on a yellow background, with rounded corners.
#stop button:hover
{
    background-color: rgb(150, 50, 0);
}

.arrival h1
{
    background-color: rgb(255, 200, 0);
    color: rgb(255, 255, 255);
    border-radius: 5px;
    border: 0px solid rgba(0, 0, 0, 0.5);
    padding: 5px;
    width: 4em;
    height: 40px;
    font-size: 30px;
    font-weight: bold;
    float: left;
    text-align: center;
}

</style>


So now that long-ass title has been reduced to a number.


Now provision some styling for h2 tags. We want them to be a more rounded white block, and appear to the right of the bus number. Thus, floating left is a must.
.arrival h1
{
    background-color: rgb(255, 200, 0);
    color: rgb(255, 255, 255);
    border-radius: 5px;
    border: 0px solid rgba(0, 0, 0, 0.5);
    padding: 5px;
    width: 4em;
    height: 40px;
    font-size: 30px;
    font-weight: bold;
    float: left;
    text-align: center;
}

.arrival h2
{
    background-color: rgb(255, 255, 255);
    border-radius: 15px;
    border: 0px solid rgba(0, 0, 0, 0.5);
    padding: 5px;
    width: 7em;
    height: 40px;
    font-size: 25px;
    font-weight: bold;
    float: left;
    text-align: center;
    margin-left: 0.5em;
}

</style>


But oops, this is a mess.


Add this line here to make sure floats are cleared.
    <?php
        if ($bus->NextBus)
        {
            echo "<h2>" . formatArrivalTime($bus->NextBus->EstimatedArrival) . "</h2>";
        }

        if ($bus->NextBus2)
        {
            echo "<h2>" . formatArrivalTime($bus->NextBus2->EstimatedArrival) . "</h2>";
        }

        if ($bus->NextBus3)
        {
            echo "<h2>" . formatArrivalTime($bus->NextBus3->EstimatedArrival) . "</h2>";
        }
    ?>
</div>
<br style="clear: both" />


All better now.


Presenting additional data

The final part is here. I want to show bus type and capacity, which is data already present in the API response. I simply did not make use of it the last time. Time to address that oversight!

First, let's relocate the logic to a function, so that the heavy lifting gets concentrated in one place. We'll create busArrivalDisplay() shortly, and retain formatArrivalTime().
<?php
/*
    if ($bus->NextBus)
    {
        echo "<h2>" . formatArrivalTime($bus->NextBus->EstimatedArrival) . "</h2>";
    }

    if ($bus->NextBus2)
    {
        echo "<h2>" . formatArrivalTime($bus->NextBus2->EstimatedArrival) . "</h2>";
    }

    if ($bus->NextBus3)
    {
        echo "<h2>" . formatArrivalTime($bus->NextBus3->EstimatedArrival) . "</h2>";
    }
*/

    if ($bus->NextBus)
    {
        echo busArrivalDisplay($bus->NextBus);
    }

    if ($bus->NextBus2)
    {
        echo busArrivalDisplay($bus->NextBus2);
    }

    if ($bus->NextBus3)
    {
        echo busArrivalDisplay($bus->NextBus);
    }
?>


In here, we modify formatArrivalTime() slightly to replace "T". It may or may not come up, but why take the chance, eh? Then create busArrivalDisplay(), with obj as a parameter. obj will contain all the information you need. The classes here are based on the Load property in the returned response.
function formatArrivalTime($strTime)
{
    $newStr = str_replace("+08:00", "", $strTime);
    $newStr = str_replace("T", " ", $newStr);
    return date("h:i A", strtotime($newStr));
}

function busArrivalDisplay($obj)
{
    $html = "<h2 class='capacity_" . $obj->Load . "'>";
    $html .= formatArrivalTime($obj->EstimatedArrival);
    $html .= "</h2>";

    return $html;
}


We will make use of the various possible values of capacity. In the CSS, we define different colors for capacity. "SEA" means that there are seats, so the color is green. "SDA" means that there's standing space, so we use yellow. "LSD" means that there's limited standing space. The bus is almost full. So use deep red for this.
.arrival h2
{
    background-color: rgb(255, 255, 255);
    border-radius: 15px;
    border: 0px solid rgba(0, 0, 0, 0.5);
    padding: 5px;
    width: 7em;
    height: 40px;
    font-size: 25px;
    font-weight: bold;
    float: left;
    text-align: center;
    margin-left: 0.5em;
}

.capacity_SEA
{
    color: rgb(0, 200, 0);
}  

.capacity_SDA
{
    color: rgb(200, 200, 0);
}    

.capacity_LSD
{
    color: rgb(200, 0, 0);
}
</style>


So now we have differently-colored times.


Now for bus types. Basically, I only care about the difference between single and double decker buses. Therefore, all other bus types will just use the same image as the single decker bus.

I used some stock images for this. I actually have only two images. The others are all duplicates with different names.

(img)
icon_.png
icon_BD.png
icon SD.png



icon_DD.png


Then we add this line. This adds a transparent PNG, according to the bus type, to the information.
function busArrivalDisplay($obj)
{
    $html = "<h2 class='capacity_" . $obj->Load . "'>";
    $html .= "<img height='30' src='icon_" . $obj->Type . ".png' /> ";
    $html .= formatArrivalTime($obj->EstimatedArrival);
    $html .= "</h2>";

    return $html;
}


Beautiful!

Enjoy this version!

I really think it's more user-friendly, especially on mobile. Before this, I tested it on desktop, but it doesn't really make sense to do that because, well, if you're trying to look up bus arrival data outdoors, why would you be using a laptop? Yeah I know, I dropped the ball. It's on me. Hopefully this makes up for it!

Stay bus-y,
T___T

Friday, 12 June 2026

Film Review; Black Mirror Season Seven, Redux (Part 3/3)

Next we have the sequel to Black Mirror Series Four's USS Callister, USS Callister: Into Infinity!

Anyone who hasn't watched USS Callister is encouraged to go have a gander - because it's great and because this sequel will make a hell of a lot more sense after that.

The Premise

Following the events of USS Callister, Nanette and the crew of USS Callister roam the universe of the Infinity game, but find life hard in this virtual universe, resorting to robbing players for credits for their continued survival. Their antics catch the attention of the original Nanette and Walton, who venture into Infinity to investigate.

The Characters

Cristin Milloti as Nanette Cole. Milloti portrays original Nanette as excitable and adorably clumsy, and lacking in confidence. Unlike clone Nanette, who has experienced loss and grown into her role of leadership. Milotti brings the acting chops she displayed in The Penguin, over to this episode, quite handily. Did I also mention that she's remarkable easy on the eyes either way?

Jimi Simpson as James Walton. In his own words, "Captalist Asshole". Seriously, Walton is an even bigger dickbag the second time around, and Simpson's acting is off the charts as he now shows different sides of the same character by playing original Walton and clone Walton. Original Walton is selfish, narcissistic and opportunistic. He doesn't care about anyone but himself (and his son, a brief but noteworthy few seconds in the episode) and his ignorance of his own company's products and staff, is a running joke and even a plot point later on. Clone Walton, on the other hand, has matured into someone who thinks of others and is deeply regretful of his past actions.

Jesse Plemons as clone Robert Daly. In Breaking Bad, Plemons acted as the unstable psycho Todd Alquist, and he carries over shades of that same performance as socially awkward nerd Daly. This time round, the performance is even more nuanced - we see an early incarnation of Daly who is still awkward and shy, but nonetheless shows Nanette (and us) why someone like him ultimately can't be trusted with power.

Osy Ikhile as coffee intern Nate Packer. Packer undergoes quite the transformation from how he was in the original USS Callister. Here, he's a grim warrior who ends up being the captain once Nanette is gone. From an intern, to a leader. I like it.

Milanka Brooks as receptionist Elena Tulaska. Her character doesn't change much, but Brooks takes the opportunity to show that while original Elena is cold and snarky, clone (and foxy blue-skinned!) Elena has a heart.

Paul G Raymond as programmer Kabir Dudani. He has the least character development in the original and the sequel. Original and clone Dudani are both computer nerds with no real severe character tics and are just unlucky. They stay pretty much constant through the episodes.

Billy Magnussen as Karl Plowman. His arc is short but significant. Offline, he's a jovial gym bro and in the game, the trauma of USS Callister has turned him into a restless manchild. He does sacrifice himself heroically to save the others, though how much of it is just poor impulse control, is up to interpretation.

Bilal Hasna has a brief appearances as Kris El Masry, reporter. Sharp as a tack. Asks hard questions, and keeps Walton on the back foot. This guy has "mild-mannered reporter" written all over his face, but when he hits hard, he hits. Hard.


Iolanthe is hilarious as Pixie Bunkin and her hot pink equipment. That character brought so much energy in.

The Mood

A colorful space adventure, complete with spaceships and laser battles and gunfights on alien planets.

What I liked

Multiple character arcs. The original had the cast play different versions of the same character. This time round, it's even more pronounced because we've had time to get used to the characters and we see how the originals are like versus how their clones have evolved into different people. Trauma really shapes character.


The visual of the space battle is epic.

The joint cameos of Nisha and Grawp. I don't like the fact that Demon 99 exists as an episode, but I couldn't help but feel intense glee when they appeared. These two are so watchable!


That gag with Rocky, the hole in its back, and Walton's relationship with it. It's vulgar as shit, and I'm all here for it!


I don't know about anyone else, but this big pink gun is some seriously cool shit.

What I didn't

The ending was just a bit too similar to the premise of Black Museum. Just felt like a huge letdown.

Michaela Coel is missing from the cast as Shania Lowery. I get it; it's not exactly the showrunners' fault that she didn't reprise the role. It could be for any given reason, and they made the effort to explain her absence as having been killed in action. It actually added to the narrative tension because this tells the audience that the crew can die now. What I have an issue with is that at the end of USS Callister, Nate Packer and her looked like they were going to be in some kind of relationship, and now in the sequel, I would have expected the character to be way more upset than Nanette at Shania's death.

Conclusion

Did USS Callister really need a sequel? It's up for debate. I thought the original left it in a good spot. This sequel is good fun, I'll grant you, but was it necessary?

My Rating

8 / 10

Final Thoughts on Black Mirror Series Seven

It's been a long time coming, but Black Mirror has finally gotten its act together and is back at its best. We're seeing six badass episodes, each hitting us in emotional places. This installment started out strong and somehow got even stronger at the end. Plaything and Eulogy were outstanding in particular, with the others being more than decent. The silliest episode in my opinion was Bete Noire, and even that was a worthy addition to the Black Mirror collective.

It's good. It's really good. Whatever sins Black Mirror may have committed in the past few iterations, all is forgiven. It's a return to form, and long overdue.

Spacing out,
T___T

Tuesday, 9 June 2026

Film Review: Black Mirror Series Seven, Redux (Part 2/3)

The next episode is Eulogy, and it's a bit of a mood whiplash from the preceding episode, but just as good, if not better.

The Premise

Philip receives a call that his old flame Carol has passed away. In order to collect recollections for her memorial, Philip goes through a program by Eulogy designed to read his memories, unearthing some interesting ones...


The Characters

Paul Giamatti absolutely knocks it out of the park in the role of Philip Connarty. Philip is a surly, bitter, cranky old guy. Giamatti carried this episode by serving up an entire buffet of emotional delivery. He also serves as narrator for most of the recollections. He gives us a moving portrayal of a deeply flawed man who loved passionately, experienced guilt, lashed out in anger, and finds closure in forgiveness. Giamatti was immediately recognizable to me as the antagonist in Shoot Em Up. Upon watching this episode, I gained a newfound respect for this man's range.

Patsy Ferran as Kelly Royce, Carol's daughter and the AI that serves Eulogy. She acted as the foil to Philip's general grumpiness, appearing upbeat and chirpy most of the time, occasionally delivering quite the witty barb. The meat of this episode belonged to Giamatti, but without Ferran to play off against, it wouldn't have worked as well.

There were plenty of others in the cast, but they either had no speaking parts, extremely limited screen time or merely appeared as still images... or all at the same time.

The Mood

It begins with a scene of an elderly man trimming rose bushes in some quiet countryside or other. A very placid scene. And the pacing stays slow and steady even as more upsetting memories and twists are revealed. There's a pervading sense of sorrow, old anger and sentimentality, though at no point does the viewer get the sense that anyone is in any particular danger. It's not that kind of Black Mirror episode, and yet it absolutely works.

What I liked

It's a very small cast. Only two actors have any sort of work to do - the rest either appear in non-speaking and/or non-moving roles. Thus, it's up to Paul Giamatti and Patsy Ferran to hold up this episode all by themselves. And these two, quite amazingly, get it done.

Black Mirror is famously full of violence, vulgarity and downer endings. On the rare occasion when things get sentimental and sweet, like now, even admidst the sorrow permeating the episode, it really hits home.



The visuals are amazing. They give us a pretty darn good idea of what it's like to virtually dive into a still photograph, and have AI render everything in 3D. The side effects of Philip using sharpies and knives to erase Carol's face from photographs, are disturbingly rendered as well. It's glorious... with just a hint of spooky.

What I didn't

DHL sending the package by drone was a detail I could have done without. That was so out of left field. I don't actually think drone delivery is too far-fetched, though having it take place in such a casual manner, probably is. There are regulatory issues to think about, especially since the company Eulogy is in the UK and Philip is in the USA or something. And it wasn't even really relevant to the story.


Still, it's a very minor detail in what was otherwise an excellent episode.

Conclusion

This episode was genius. It had the Black Mirror DNA - fantastical tech being used in novel ways, flawed characters acting out and inevitable human tragedy. Though, in this case, the tech brings about a somewhat happy ending. This might actually be my favorite episode in an above-average season of Black Mirror.

My Rating

9.5 / 10

Next

USS Callister: Into Infinity

Sunday, 7 June 2026

Film Review: Black Mirror Series Seven, Redux (Part 1/3)

Welcome back! We're going to continue the review of Black Mirror Series Seven. I promise you, it doesn't let up!

The next episode is Plaything, and it's quite the mindfuck.

The Premise

Mentally disturbed Cameron Walker is hauled into a police station where he is interviewed by the police for a possible murder. What follows is Walker's telling of a bizzarre story that has a terrifying conclusion in the present day.

The Characters

Peter Capaldi provides a gripping portrayal of Cameron Walker, a computer nerd who gets sucked into the world of the Throng. And boy, does he deliver. When we first see him, he's a friendly but awfully goofy character who talks silly. By the end of the episode, he's become full-blown deranged and the twist in that master plan is served with such maniacal glee it almost hurts to watch.

Lewis Gribben is a younger Cameron Walker. Had a physical resemblance to Paul Bettany. We get to see him slowly unravel from a shy nerd to murderous lunatic. Gribben brings across the shitload of anxiety this role probably requires, really well.

James Nelson-Joyce as DCI Kano. Stern, cold, uncompromising. Chomping at the bit to prosecute Walker. I had fun watching this guy grind his teeth and try to curb his impulse to beat Cameron Walker to a pulp.

Michele Austin as Jen Minter. She's in the interview for psychological evaluation. We see glimpses of a sense of humor. She's the reasonable authority figure in the room.

Darryl Foster as PC Mo Raiker. Kind of fades into the background if not for that afro, if I'm being honest.

Ami Tredrea as WPC Yvonne Best. She looks constantly serious and focused. Of her and her partner, she's the one that gets most of the dialogue.

Will Poulter reprises his role as Colin Ritman from Bandersnatch. Poulter brings his intense stare back into the Black Mirror universe, and I am here for it! When Colin Ritman emphasizes that the Throng are living and sentient, his deadly earnest delivery really sells it. Poulter has limited screen time in this one, but he makes the absolute most of it.

Asim Chaudhry, too, reprises his role as Mohan Thakur from Bandersnatch. Part manic, part affable, all boss. "My name's Mo but you can call me God."

Josh Finan plays Lump the drug dealer with much goofiness and gusto, complete with annoying shit-eating grin and wild-eyed stare. He was hugely entertaining.

Jay Simpson is Gordon, Walker's boss at PC Zone. At first I thought I was looking at John Cusack. There's a very unsettling air of menace about him as he's on the phone pressuring Cameron to meet a deadline. This actor should have been off playing a mob boss or something, instead of this. Wasted here.

Special mention to Kave Niku as the shopkeeper in the beginning sequence. That look of exasperation was golden.

The Mood

The subdued colors, smoke and debris suggests a dystopian future at the start. In the first few minutes, the mood shifts to a police procedural vibe, with all the trappings of modern-day police drama. Halfway through, flashbacks take us in a new direction - it's a tech thriller both creepy and uncanny. Other than that, once the episode goes into the interview room, the action doesn't leave it, other than through the narrative supplied by Cameron Walker.

What I liked

The game itself looks pretty damn awesome. It's available to download on Google Play. You need a Netflix account to play it. My plate's a little full at the moment, but dammit I want to play this game.


Another thing I loved were the tie-ins to Bandersnatch. Thronglets is a game, and Bandersnatch features a gaming company. So yes, the link to Tuckersoft was genius. Bonus points for that poster of Bandersnatch II!


That twist at the end with the sharpie and how it was used. It was a deliciously horrific end.


Did I mention the sound effects from the game? The squeals, the shrilling, and the ominous hum. It all totally got me.

What I didn't

I have mixed feelings on this. On one hand, that whole surgically inserting a port into the back of his head sequence was suitably gross for a series like Black Mirror.


And on the other hand, I've always liked Black Mirror for tech that is fantastic, but at least plausible. This is just... not. It is pretty bizarre and creepy though, I'll give them that.

Conclusion

What an episode. What. An. Episode!

Plaything is probably one of the creepiest things Black Mirror has produced ever, and has one of the darkest ever endings. I don't know what the writer of this epsiode had been smoking while creating this, but whatever it was, it worked!

My Rating

9 / 10

Next

Eulogy

Monday, 1 June 2026

Bolt CEO's dangerous logic for axing his entire HR Team

It's been a couple weeks since I last heard the news that the entire HR Team at Bolt was fired by CEO Ryan Breslow.

Now I'm not a fan of HR, and I like to warn people that mistaking HR as your friend is a mistake they should make only once, if at all. Hell, "nobody at work is your friend" is a good principle to have, and HR should probably head that list.


But anyone expecting me to join the pile-on and gloat about "HR finally getting a taste of their own medicine"? Sorry lads, I'm going to have to disappoint you today. This is a dodgy move at best.

What happened

Bolt was valued at around $11 billion in 2022 when Breslow stepped away, and lost up to 90% of its valuation by 2026. Breslow returned to make sweeping changes, starting with removing about 30% of staff, including the HR function.

Breslow was on record glibly saying the following.
"We had an HR team, right? And that HR team was creating problems that didn't exist. And those problems disappeared when I let them go."

Don't know about you, but this simultaneously caused me amusement and discomfort. It reminded me of a joke I used to make as a smoker.
"I've been smoking for years, but when I read about all the different toxins I've been inhaling into my body, I got so disturbed that I stopped reading."

Turn that racket off!

I mean, would you turn off the fire alarm just because it made a loud distracting sound every time there was a fire? Or remove the brakes on your car to make it incapable of slowing down?

Yes, that's the TeochewThunder equivalent of sticking your head in the sand.

Another disturbing idea

Breslow was also quoted as saying, sounding somewhat conciliatory.
"Those HR professionals have really important insights when you're in a peacetime at a larger company. But we're a remote company, it's not like - a lot of the potential issues that you would have in a workplace don't really exist because you're not in the same room as somebody."

Did our boy just say we don't really need HR if we're remote? Maybe not, but it sounded an awful lot like it. And in case that's the takeaway anyone gets from this, I'm going to shut it down right now.

HR problems don't exist only if people are in the same room together. Remote workers still have to get paid, appraised and onboarded. They still interact with other workers, even online. Company leadership may still, in their zeal, make errors in judgement they need to be warned about. And in certain cases, HR problems get more intense precisely because it's remote. Workplace bullying, for example. I've encountered wankers who became even bigger wankers simply because being remote meant they weren't in immediate danger of being bitch-slapped for talking shit taken to task for being impolite. Come now, we all know someone like that.

What did he just
say to me?!

The only way remote work lessens the need for HR would be if HR's only function was just to look pretty and ask how everyone's day was. And that's not how it works. Not even a little bit.

So no... HR does not become less relevant because the company structure is remote. Sometimes, in those cases, HR becomes more relevant.

The real danger

Let's give Breslow the benefit of the doubt. Let's say HR was really creating problems where there were none, or making issues out of non-issues. Mountains out of molehills. Playing office politics, or worse, identity politics. Overreaching like they were cosplaying Dhalsim in Street Fighter.

Maybe. And even then, saying "they made problems so I got rid of them, problem solved" is a dangerous path to go down.

The point is, what often looks like non-issues slowing things down unnecessarily, are actual problems that laypersons just aren't equipped to handle. And let me be clear; this is not about defending HR.

Not interested in
defending HR.

What if it was an entire team of software developers who were fired because business people started thinking that software devs and their trifling concerns were slowing shit down? We've got LLMs that can generate code now, so business people don't actually need techies to write code.

However, business people are not software engineers, and being able to produce code doesn't magically make them so. Business people have largely the same concerns as software developers - aesthetics, functionality, compliance, security, maintainability - but ask a business person and software developer to rank all these in order of importance, and their answers would look very different. Go ahead, ask business people what they'd do if you told them implementing unit tests would add another week to deployment time at minimum. I'm not saying that all business people would give you an answer that would have you internally questioning your life choices, but the fact is that business and tech people have very different priorities. That tends to introduce resistance into the decision-making process.

What if people started thinking that, armed with LLMs, they could just replace software engineers and get rid of that resistance? Y'all know it's a matter of time someone starts going down this road, if they haven't already. I've seen business people make apps using LLMs, with sometimes comical results. But let's not pretend that eventually replacing techies isn't on the cards.

Au Revoir, Bolt HR!

Still think the firing the entire HR team isn't a big deal? You're right, it's probably not. But the reasoning - that's something we need to look at.

Time for me to Bolt,
T___T

Thursday, 28 May 2026

Web Tutorial: VueJS Financial Projector (Part 3/3)

At long last, we get to the exciting part! No more CRUD functions - now it's purely display.

Add this to the data. monthItems is an array of data from January to December. monthItemsTemplate is an array that shows us what that data is supposed to look like. The idea here is that the display will refresh when monthItems changes... but I don't want it to render constantly when I recalculate, so I have a temporary array to hold the new completely recalculated array in until I'm ready to replace monthItems.
data: {
    currentIndex: 0,
    errors: {
        name: "",
        amount: "",
    },
    items:[
        {
            name: "",
            month: 0,
            amount: 0
        }
    ],
    monthItems: [],
    monthItemsTemplate: [

    ],

    months: [
        "All", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
    ]
},


So right now, this is it. The table looks like this. The first element at index 0 is an object that's just a placeholder. The other rows correspond with the month names - index 1 for "Jan", index 2 for "Feb", etc.
monthItems: [],
monthItemsTemplate: [
    { monthName: "", itemsIn:[], itemsInTotal:"", itemsOut:[], itemsOutTotal:"", cumulative: "" },
    { monthName: "Jan", itemsIn:[], itemsInTotal:0, itemsOut:[], itemsOutTotal:0, cumulative: 0 },
    { monthName: "Feb", itemsIn:[], itemsInTotal:0, itemsOut:[], itemsOutTotal:0, cumulative: 0 },
    { monthName: "Mar", itemsIn:[], itemsInTotal:0, itemsOut:[], itemsOutTotal:0, cumulative: 0 },
    { monthName: "Apr", itemsIn:[], itemsInTotal:0, itemsOut:[], itemsOutTotal:0, cumulative: 0 },
    { monthName: "May", itemsIn:[], itemsInTotal:0, itemsOut:[], itemsOutTotal:0, cumulative: 0 },
    { monthName: "Jun", itemsIn:[], itemsInTotal:0, itemsOut:[], itemsOutTotal:0, cumulative: 0 },
    { monthName: "Jul", itemsIn:[], itemsInTotal:0, itemsOut:[], itemsOutTotal:0, cumulative: 0 },
    { monthName: "Aug", itemsIn:[], itemsInTotal:0, itemsOut:[], itemsOutTotal:0, cumulative: 0 },
    { monthName: "Sep", itemsIn:[], itemsInTotal:0, itemsOut:[], itemsOutTotal:0, cumulative: 0 },
    { monthName: "Oct", itemsIn:[], itemsInTotal:0, itemsOut:[], itemsOutTotal:0, cumulative: 0 },
    { monthName: "Nov", itemsIn:[], itemsInTotal:0, itemsOut:[], itemsOutTotal:0, cumulative: 0 },
    { monthName: "Dec", itemsIn:[], itemsInTotal:0, itemsOut:[], itemsOutTotal:0, cumulative: 0 }

],


After this, we need a new method, sortItemOrder(). This populates the monthItems array with the correct data. Because elements added, updated or removed in items will trigger a recalculation of cumulative values. The idea for monthItems is that each month, from January to December, will show totals after calculating incoming and outgoing funds.
    setCurrentIndex: function(val) {
        this.currentIndex = val;
    },
    sortItemOrder: function() {

    }

}


We declare a temporary array, tempMonthItems. As its value, we use a copy of monthItemsTemplate using the structuredClone() function. At the end of this method, we're going to replace monthItems with tempMonthItems after processing it. (For more about the structuredClone() function, follow this link.)
sortItemOrder: function() {
    let tempMonthItems = structuredClone(this.monthItemsTemplate);

    this.monthItems = structuredClone(tempMonthItems);

}


As part of that process, we're going to fix the elements in tempMonthItems corresponding to months 1 to 12, i.e, January to December. Index 0 is the placeholder element.
sortItemOrder: function() {
    let tempMonthItems = structuredClone(this.monthItemsTemplate);

    for (let i = 1; i <= 12; i++) {

    }


    this.monthItems = structuredClone(tempMonthItems);
}


We populate itemsIn and itemsOut. itemsIn in each element of tempMonthItems, is the array of every element in items where month is "All" or the current month, and amount is more than 0. itemsOut in each element of tempMonthItems, is the array of every element in items where month is "All" or the current month, and amount is more than 0. To get this data, we use the filter() method.
sortItemOrder: function() {
    let tempMonthItems = structuredClone(this.monthItemsTemplate);

    for (let i = 1; i <= 12; i++) {
        tempMonthItems[i].itemsIn = this.items.filter((item) => {return item.amount > 0 && [0, i].indexOf(item.month) != -1});
        tempMonthItems[i].itemsOut = this.items.filter((item) => {return item.amount < 0 && [0, i].indexOf(item.month) != -1});
    }

    this.monthItems = structuredClone(tempMonthItems);
}


Then we want the sum of all items in itemsIn and itemsOut, and assign those values to the itemsInTotal and itemsOutTotal properties, using the reduce() method. (For more about the reduce() method, follow this link.)
sortItemOrder: function() {
    let tempMonthItems = structuredClone(this.monthItemsTemplate);

    for (let i = 1; i <= 12; i++) {
        tempMonthItems[i].itemsIn = this.items.filter((item) => {return item.amount > 0 && [0, i].indexOf(item.month) != -1});
        tempMonthItems[i].itemsOut = this.items.filter((item) => {return item.amount < 0 && [0, i].indexOf(item.month) != -1});

        tempMonthItems[i].itemsInTotal = tempMonthItems[i].itemsIn.reduce((sum, item) => sum + item.amount, 0);
        tempMonthItems[i].itemsOutTotal = tempMonthItems[i].itemsOut.reduce((sum, item) => sum + item.amount, 0);

    }

    this.monthItems = structuredClone(tempMonthItems);
}


The cumulative property is 0 if we're looking at January because we haven't accumulated anything yet at the start of the year. Thus, if i is 1 or less, cumulative is 0.
sortItemOrder: function() {
    let tempMonthItems = structuredClone(this.monthItemsTemplate);

    for (let i = 1; i <= 12; i++) {
        tempMonthItems[i].itemsIn = this.items.filter((item) => {return item.amount > 0 && [0, i].indexOf(item.month) != -1});
        tempMonthItems[i].itemsOut = this.items.filter((item) => {return item.amount < 0 && [0, i].indexOf(item.month) != -1});

        tempMonthItems[i].itemsInTotal = tempMonthItems[i].itemsIn.reduce((sum, item) => sum + item.amount, 0);
        tempMonthItems[i].itemsOutTotal = tempMonthItems[i].itemsOut.reduce((sum, item) => sum + item.amount, 0);

        tempMonthItems[i].cumulative = (i > 1 ? : 0);
    }

    this.monthItems = structuredClone(tempMonthItems);
}


If we're at February or later, we take the remainding funds of the current month (itemsInTotal + itemsOutTotal) and add the cumulative property of the previous month, to derive the current month's cumulative value.
sortItemOrder: function() {
    let tempMonthItems = structuredClone(this.monthItemsTemplate);

    for (let i = 1; i <= 12; i++) {
        tempMonthItems[i].itemsIn = this.items.filter((item) => {return item.amount > 0 && [0, i].indexOf(item.month) != -1});
        tempMonthItems[i].itemsOut = this.items.filter((item) => {return item.amount < 0 && [0, i].indexOf(item.month) != -1});

        tempMonthItems[i].itemsInTotal = tempMonthItems[i].itemsIn.reduce((sum, item) => sum + item.amount, 0);
        tempMonthItems[i].itemsOutTotal = tempMonthItems[i].itemsOut.reduce((sum, item) => sum + item.amount, 0);

        tempMonthItems[i].cumulative = (i > 1 ? tempMonthItems[i].itemsInTotal + tempMonthItems[i].itemsOutTotal + tempMonthItems[i - 1].cumulative : 0);
    }

    this.monthItems = structuredClone(tempMonthItems);
}


With that done, we make sure to run sortItemOrder() at the end of addUpdateItem() and removeItem().
    this.setCurrentIndex(0);
    this.sortItemOrder();
},
removeItem: function(index) {
    this.items.splice(index, 1);
    this.setCurrentIndex(0);
    this.sortItemOrder();
},
setCurrentIndex: function(val) {
    this.currentIndex = val;
},


Now, for the HTML!
There, in pnlFinancialProjection, have a table. These are the headers.
<div id="pnlFinancialProjection" class="panel">
    <table>
        <tr class="header">
            <td width="20%">MONTH</td>
            <td width="20%" class="numeric">IN</td>
            <td width="20%" class="numeric">OUT</td>
            <td width="20%" class="numeric">REMAINING</td>
            <td width="20%" class="numeric">CUMULATIVE</td>
        </tr>
    </table>

</div>


And here's your table taking shape...


Then we render rows for every element in monthItems other than the one at index 0.
<table>
        <tr class="header">
            <td width="20%">MONTH</td>
            <td width="20%" class="numeric">IN</td>
            <td width="20%" class="numeric">OUT</td>
            <td width="20%" class="numeric">REMAINING</td>
            <td width="20%" class="numeric">CUMULATIVE</td>
        </tr>

        <tr v-for="(monthItem, monthItemIndex) in monthItems" v-bind:key="monthItemIndex" v-if="monthItemIndex > 0">

        </tr>

</table>


We put in the month name, itemsInTotal, itemsOutTotal, and in the case of the REMAINING column, we calculate it on the spot. If the result is positive, we style it using inText, otherwise we use outText. In both cases, we also use numeric. We do the same for cumulative.
<tr v-for="(monthItem, monthItemIndex) in monthItems" v-bind:key="monthItemIndex" v-if="monthItemIndex > 0">
    <td>{{ monthItem.monthName }}</td>
    <td class="numeric inText">{{ monthItem.itemsInTotal }}</td>
    <td class="numeric outText">{{ monthItem.itemsOutTotal }}</td>
    <td v-bind:class=" monthItem.itemsInTotal + monthItem.itemsOutTotal > 0 ? 'numeric inText' : 'numeric outText'">{{ monthItem.itemsInTotal + monthItem.itemsOutTotal }}</td>
    <td v-bind:class=" monthItem.cumulative > 0 ? 'numeric inText' : 'numeric outText'">{{ monthItem.cumulative }}</td>

</tr>



Let's test this app!
Add the item "Salary" for all months. I'm just going to put SGD 6,000 here.


Then we'll balance it out with "Expenses", which is an outgoing item for all months. We set it at SGD 1,000. Look at the financial projection now.


Then we have "Income Tax", which is to be paid in May.


Then I declare "Annual Bonus" in December, an incoming item at another SGD 6,000.

And let's say I pay "AIA Insurance" in September. Now in the financial projection, you can see that the REMAINING column is starting to show red.

Here, I add "Womb Tax" for all months, which is my quaint codeword for money I give my mother.


And "Investments" for all months. Now you can see , more of the REMAINING column has turned red. The CUMULATIVE column adjusts automatically as well.


Right on the money,
T___T

Monday, 25 May 2026

Web Tutorial: VueJS Financial Projector (Part 2/3)

The next part is to display items in a table, so you can see what items you added.

In the HTML, inside the pnlItems div, add a table. The header will be styled using the CSS class header, while the AMOUNT column will be styled using the CSS class numeric.
<div id="pnlItems" class="panel">
    <table>
        <tr class="header">

            <td width="20%">MONTH</td>
            <td width="40%">NAME</td>
            <td width="20%" class="numeric">AMOUNT</td>
            <td width="10%"></td>
            <td width="10%"></td>
        </tr>
    </table>
</div>


header will be in bold, and numeric means that text is aligned right. That's really all there is to it.
.panel
{
    float: left;
    padding: 10px;
    border-radius: 20px;
    outline: 1px solid rgba(255, 150, 0, 0.5);
    margin-right: 10px;
    margin-bottom: 10px;
}

.numeric
{
    text-align: right;
}

.header
{
    font-weight: bold;
}


label
{
    width: 5em;
    font-size: 0.5em;
    float: left;
}


So we've got the beginnings of a table.


Now let's add content. We want the rows to render for as many elements there are in items. We also want to set key because it's a repeated HTML element we're creating.
<div id="pnlItems" class="panel">
    <table>
        <tr class="header">
            <td width="20%">MONTH</td>
            <td width="40%">NAME</td>
            <td width="20%" class="numeric">AMOUNT</td>
            <td width="10%"></td>
            <td width="10%"></td>
        </tr>

        <tr v-for="(i, index) in items" v-bind:key="index">
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
        </tr>
    </table>
</div>


In here, we add the month, the name and amount. Note that the amount column is styled using the numeric CSS class.
<tr v-for="(i, index) in items" v-bind:key="index">
    <td>{{ months[i.month] }}</td>
    <td>{{ i.name }}</td>
    <td class="numeric">{{ i.amount }}</td>
    <td></td>
    <td></td>
</tr>


Now we can test this. When you refresh, the first item in items appears.


Now add something. Here I call it "Investment Dividend" and say it's incoming of SGD 1,500. Hey, a guy can dream.


Click the ADD button and you see it appears. So far so good.


Now add something else, an outgoing amount. Wifey's birthday isn't in March and I wish I spent only a thousand, but this is just an example.


See? Some things to correct.
- The amount appears negative. Would be nice if we could color code this.
- It appears in order of entry, which is fine until you have like 50 items.
- We also want to not show the first item.


We start off by adding these CSS classes, inText and outText. So incoming money is marked in green, and outgoing money in red.
label
{
    width: 5em;
    font-size: 0.5em;
    float: left;
}

.inText
{
    color: rgb(0, 200, 0);
}

.outText
{
    color: rgb(200, 0, 0);
}


input[type=text], input[type=number], select
{
    width: 10em;
    padding: 0em;
}


Then we change the class. Instead of just styling using numeric, we use a combination of numeric and inText or outText, depending on whether the amount is positive.
<tr v-for="(i, index) in items" v-bind:key="index">
    <td>{{ months[i.month] }}</td>
    <td>{{ i.name }}</td>
    <td v-bind:class="i.amount > 0 ? 'numeric inText' : 'numeric outText'">{{ i.amount }}</td>
    <td></td>
    <td></td>
</tr>


Now in the HTML, we add a conditional. This means the HTML element renders only if index is greater than 0.
<tr v-for="(i, index) in items" v-bind:key="index" v-if="index > 0">


If you retry everything, you should see that incoming and outgoing amounts are colored differently, and the first row no longer appears. But soon, we'll be doing something bigger.

In computed, add the method sortedItems(). This actually returns the sorted view of the items array.
computed: {
    sortedItems: function() {
        return this.items

    }
},


Here, we use the map() method to iterate through items and return the index and the element as a new object. This serves to preserve both the index, index and the element, item.
computed: {
    sortedItems: function() {
        return this.items
        .map((item, index) => ({ item, index }))
    }
},


And we continue by chaining on a sort() method, sorting by the month property of item. This works because we need the index... but sorting items and adding or removing from it, might change index.
computed: {
    sortedItems: function() {
        return this.items
        .map((item, index) => ({ item, index }))
        .sort((a, b) => a.item.month - b.item.month);
    }
},


Now we'll need to change this. Instead of iterating through items, we iterate through sortedItems and we change all mentions of i to si. Since each element of sortedItems is made of index and item, if we want to refer to the element's properties, we have to refer to it as item.
<tr v-for="si in sortedItems" v-bind:key="si.index" v-if="si.index > 0">
    <td>{{ months[si.item.month] }}</td>
    <td>{{ si.item.name }}</td>
    <td v-bind:class=" si.item.amount > 0 ? 'numeric inText' : 'numeric outText'">{{ si.item.amount }}</td>
    <td></td>
    <td></td>
</tr>


We'll then add two buttons. One is an UPDATE button and will run the setCurrentIndex() method, passing in index as an argument. The other is a DELETE button that runs the removeItem() method, also passing in index as an argument.
<tr v-for="si in sortedItems" v-bind:key="si.index" v-if="si.index > 0">
    <td>{{ months[si.item.month] }}</td>
    <td>{{ si.item.name }}</td>
    <td v-bind:class=" si.item.amount > 0 ? 'numeric inText' : 'numeric outText'">{{ si.item.amount }}</td>
    <td><input type="button" value="UPDATE" @click="setCurrentIndex(si.index)" /></td>
    <td><input type="button" value="DELETE" @click="removeItem(si.index)" /></td>
</tr>


There be buttons! And you may notice, if you enter a June item first and then a February item, they are now sorted properly by month regardless of what order they were entered in. The first default element from items is no longer there, filtered out by the conditional.


Create these two methods. removeItem() has a parameter, index. setCurrentIndex() has a parameter as well, val.
methods: {
    addUpdateItem: function() {
        this.errors.name = "";
        this.errors.amount = "";

        let nameValue = this.$refs.itemName.value.trim();
        let amountValue = parseFloat(this.$refs.itemAmount.value.trim());
        let monthValue = parseInt(this.$refs.itemMonth.value);
        let errors = 0;

        if (nameValue == "") { this.errors.name = "Required"; errors++; }
        if (amountValue <= 0 || isNaN(amountValue)) { this.errors.amount = "Must be positive"; errors++; }
        if (errors > 0) return;

        if (this.$refs.itemTypeOut.checked) amountValue = amountValue * -1;

        if (this.currentIndex == 0) {
            this.items.push({
                name: nameValue,
                month: monthValue,
                amount: amountValue
            });
        }
    },
    removeItem: function(index) {

    },
    setCurrentIndex: function(val) {

    }

}


setCurrentIndex() is straightforward - simply assign the value of val to currentIndex.
removeItem: function(index) {

},
setCurrentIndex: function(val) {
    this.currentIndex = val;
}


removeItem() uses the splice() method to remove the element at position index in items, then resets currentIndex to 0 (just in case it was something else).
removeItem: function(index) {
    this.items.splice(index, 1);
    this.setCurrentIndex(0);

},
setCurrentIndex: function(val) {
    this.currentIndex = val;
}


Now, let's test this. Add this item - "Bonus A" at SGD 5,000 in May. Then add "Bonus B" at SGD 15,000 in June. Click on UPDATE for "Bonus B". setCurrentIndex() should ensure that Bonus B's details appear in the upper right! Also note that the button now says "UPDATE"! That's because currentIndex is no longer 0.


Click on DELETE for "Bonus A". The item vanishes, and setCurrentIndex() changes currentIndex back to 0, so the upper right panel changes as well.


Update the addUpdateItem() method. Before, we only handled the case for currentIndex being 0. Now if currentIndex is not 0, this means it's an update. And we update the values accordingly. The values, of course, have already been validated.
addUpdateItem: function() {
    this.errors.name = "";
    this.errors.amount = "";

    let nameValue = this.$refs.itemName.value.trim();
    let amountValue = parseFloat(this.$refs.itemAmount.value.trim());
    let monthValue = parseInt(this.$refs.itemMonth.value);
    let errors = 0;

    if (nameValue == "") { this.errors.name = "Required"; errors++; }
    if (amountValue <= 0 || isNaN(amountValue)) { this.errors.amount = "Must be positive"; errors++; }
    if (errors > 0) return;

    if (this.$refs.itemTypeOut.checked) amountValue = amountValue * -1;

    if (this.currentIndex == 0) {
        this.items.push({
            name: nameValue,
            month: monthValue,
            amount: amountValue
        });
    } else {
        this.items[this.currentIndex].name = nameValue;
        this.items[this.currentIndex].amount = amountValue;
        this.items[this.currentIndex].month = monthValue;
    }


    this.setCurrentIndex(0);
},


In pnlItem, we add another button. It says "NEW", and when you click on it, it sets currentIndex back to 0. And it renders only if currentIndex is greater than 0.
<p>
    <label for="itemAmount">Amount</label>
    <br />
    <input ref="itemAmount" id="itemAmount" type="number" v-bind:value="Math.abs(items[currentIndex].amount)">
    <span class="error">{{ errors.amount }}</span>
</p>
<input type="button" value="NEW" @click="setCurrentIndex(0)" v-if="currentIndex > 0" />
<input type="button" v-bind:value="currentIndex == 0 ? 'ADD' : 'UPDATE'" @click="addUpdateItem" />


Again, add these items - "Bonus A" at SGD 5,000 in May. Then add "Bonus B" at SGD 15,000 in June. Click UPDATE for Bonus A. The NEW button appears!



Ignore that button for now. Set the amount to 8000 and click UPDATE (the one in the top right corner). It should reflect the new value in the list of items below.


Now click the UPDATE button on "Bonus B". See the NEW button appear again? What happens when you click it? That's right - it should set currentIndex to 0 and give you the "New Item" view.


Next

Showing the Financial Projection.The next part is to display items in a table, so you can see what items you added.

In the HTML, inside the pnlItems div, add a table. The header will be styled using the CSS class header, while the AMOUNT column will be styled using the CSS class numeric.
<div id="pnlItems" class="panel">
    <table>
        <tr class="header">

            <td width="20%">MONTH</td>
            <td width="40%">NAME</td>
            <td width="20%" class="numeric">AMOUNT</td>
            <td width="10%"></td>
            <td width="10%"></td>
        </tr>
    </table>
</div>


header will be in bold, and numeric means that text is aligned right. That's really all there is to it.
.panel
{
    float: left;
    padding: 10px;
    border-radius: 20px;
    outline: 1px solid rgba(255, 150, 0, 0.5);
    margin-right: 10px;
    margin-bottom: 10px;
}

.numeric
{
    text-align: right;
}

.header
{
    font-weight: bold;
}


label
{
    width: 5em;
    font-size: 0.5em;
    float: left;
}


So we've got the beginnings of a table.


Now let's add content. We want the rows to render for as many elements there are in items. We also want to set key because it's a repeated HTML element we're creating.
<div id="pnlItems" class="panel">
    <table>
        <tr class="header">
            <td width="20%">MONTH</td>
            <td width="40%">NAME</td>
            <td width="20%" class="numeric">AMOUNT</td>
            <td width="10%"></td>
            <td width="10%"></td>
        </tr>

        <tr v-for="(i, index) in items" v-bind:key="index">
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
        </tr>
    </table>
</div>


In here, we add the month, the name and amount. Note that the amount column is styled using the numeric CSS class.
<tr v-for="(i, index) in items" v-bind:key="index">
    <td>{{ months[i.month] }}</td>
    <td>{{ i.name }}</td>
    <td class="numeric">{{ i.amount }}</td>
    <td></td>
    <td></td>
</tr>


Now we can test this. When you refresh, the first item in items appears.


Now add something. Here I call it "Investment Dividend" and say it's incoming of SGD 1,500. Hey, a guy can dream.


Click the ADD button and you see it appears. So far so good.


Now add something else, an outgoing amount. Wifey's birthday isn't in March and I wish I spent only a thousand, but this is just an example.


See? Some things to correct.
- The amount appears negative. Would be nice if we could color code this.
- It appears in order of entry, which is fine until you have like 50 items.
- We also want to not show the first item.


We start off by adding these CSS classes, inText and outText. So incoming money is marked in green, and outgoing money in red.
label
{
    width: 5em;
    font-size: 0.5em;
    float: left;
}

.inText
{
    color: rgb(0, 200, 0);
}

.outText
{
    color: rgb(200, 0, 0);
}


input[type=text], input[type=number], select
{
    width: 10em;
    padding: 0em;
}


Then we change the class. Instead of just styling using numeric, we use a combination of numeric and inText or outText, depending on whether the amount is positive.
<tr v-for="(i, index) in items" v-bind:key="index">
    <td>{{ months[i.month] }}</td>
    <td>{{ i.name }}</td>
    <td v-bind:class="i.amount > 0 ? 'numeric inText' : 'numeric outText'">{{ i.amount }}</td>
    <td></td>
    <td></td>
</tr>


Now in the HTML, we add a conditional. This means the HTML element renders only if index is greater than 0.
<tr v-for="(i, index) in items" v-bind:key="index" v-if="index > 0">


If you retry everything, you should see that incoming and outgoing amounts are colored differently, and the first row no longer appears. But soon, we'll be doing something bigger.

In computed, add the method sortedItems(). This actually returns the sorted view of the items array.
computed: {
    sortedItems: function() {
        return this.items

    }
},


Here, we use the map() method to iterate through items and return the index and the element as a new object. This serves to preserve both the index, index and the element, item.
computed: {
    sortedItems: function() {
        return this.items
        .map((item, index) => ({ item, index }))
    }
},


And we continue by chaining on a sort() method, sorting by the month property of item. This works because we need the index... but sorting items and adding or removing from it, might change index.
computed: {
    sortedItems: function() {
        return this.items
        .map((item, index) => ({ item, index }))
        .sort((a, b) => a.item.month - b.item.month);
    }
},


Now we'll need to change this. Instead of iterating through items, we iterate through sortedItems and we change all mentions of i to si. Since each element of sortedItems is made of index and item, if we want to refer to the element's properties, we have to refer to it as item.
<tr v-for="si in sortedItems" v-bind:key="si.index" v-if="si.index > 0">
    <td>{{ months[si.item.month] }}</td>
    <td>{{ si.item.name }}</td>
    <td v-bind:class=" si.item.amount > 0 ? 'numeric inText' : 'numeric outText'">{{ si.item.amount }}</td>
    <td></td>
    <td></td>
</tr>


We'll then add two buttons. One is an UPDATE button and will run the setCurrentIndex() method, passing in index as an argument. The other is a DELETE button that runs the removeItem() method, also passing in index as an argument.
<tr v-for="si in sortedItems" v-bind:key="si.index" v-if="si.index > 0">
    <td>{{ months[si.item.month] }}</td>
    <td>{{ si.item.name }}</td>
    <td v-bind:class=" si.item.amount > 0 ? 'numeric inText' : 'numeric outText'">{{ si.item.amount }}</td>
    <td><input type="button" value="UPDATE" @click="setCurrentIndex(si.index)" /></td>
    <td><input type="button" value="DELETE" @click="removeItem(si.index)" /></td>
</tr>


There be buttons! And you may notice, if you enter a June item first and then a February item, they are now sorted properly by month regardless of what order they were entered in. The first default element from items is no longer there, filtered out by the conditional.


Create these two methods. removeItem() has a parameter, index. setCurrentIndex() has a parameter as well, val.
methods: {
    addUpdateItem: function() {
        this.errors.name = "";
        this.errors.amount = "";

        let nameValue = this.$refs.itemName.value.trim();
        let amountValue = parseFloat(this.$refs.itemAmount.value.trim());
        let monthValue = parseInt(this.$refs.itemMonth.value);
        let errors = 0;

        if (nameValue == "") { this.errors.name = "Required"; errors++; }
        if (amountValue <= 0 || isNaN(amountValue)) { this.errors.amount = "Must be positive"; errors++; }
        if (errors > 0) return;

        if (this.$refs.itemTypeOut.checked) amountValue = amountValue * -1;

        if (this.currentIndex == 0) {
            this.items.push({
                name: nameValue,
                month: monthValue,
                amount: amountValue
            });
        }
    },
    removeItem: function(index) {

    },
    setCurrentIndex: function(val) {

    }

}


setCurrentIndex() is straightforward - simply assign the value of val to currentIndex.
removeItem: function(index) {

},
setCurrentIndex: function(val) {
    this.currentIndex = val;
}


removeItem() uses the splice() method to remove the element at position index in items, then resets currentIndex to 0 (just in case it was something else).
removeItem: function(index) {
    this.items.splice(index, 1);
    this.setCurrentIndex(0);

},
setCurrentIndex: function(val) {
    this.currentIndex = val;
}


Now, let's test this. Add this item - "Bonus A" at SGD 5,000 in May. Then add "Bonus B" at SGD 15,000 in June. Click on UPDATE for "Bonus B". setCurrentIndex() should ensure that Bonus B's details appear in the upper right! Also note that the button now says "UPDATE"! That's because currentIndex is no longer 0.


Click on DELETE for "Bonus A". The item vanishes, and setCurrentIndex() changes currentIndex back to 0, so the upper right panel changes as well.


Update the addUpdateItem() method. Before, we only handled the case for currentIndex being 0. Now if currentIndex is not 0, this means it's an update. And we update the values accordingly. The values, of course, have already been validated.
addUpdateItem: function() {
    this.errors.name = "";
    this.errors.amount = "";

    let nameValue = this.$refs.itemName.value.trim();
    let amountValue = parseFloat(this.$refs.itemAmount.value.trim());
    let monthValue = parseInt(this.$refs.itemMonth.value);
    let errors = 0;

    if (nameValue == "") { this.errors.name = "Required"; errors++; }
    if (amountValue <= 0 || isNaN(amountValue)) { this.errors.amount = "Must be positive"; errors++; }
    if (errors > 0) return;

    if (this.$refs.itemTypeOut.checked) amountValue = amountValue * -1;

    if (this.currentIndex == 0) {
        this.items.push({
            name: nameValue,
            month: monthValue,
            amount: amountValue
        });
    } else {
        this.items[this.currentIndex].name = nameValue;
        this.items[this.currentIndex].amount = amountValue;
        this.items[this.currentIndex].month = monthValue;
    }


    this.setCurrentIndex(0);
},


In pnlItem, we add another button. It says "NEW", and when you click on it, it sets currentIndex back to 0. And it renders only if currentIndex is greater than 0.
<p>
    <label for="itemAmount">Amount</label>
    <br />
    <input ref="itemAmount" id="itemAmount" type="number" v-bind:value="Math.abs(items[currentIndex].amount)">
    <span class="error">{{ errors.amount }}</span>
</p>
<input type="button" value="NEW" @click="setCurrentIndex(0)" v-if="currentIndex > 0" />
<input type="button" v-bind:value="currentIndex == 0 ? 'ADD' : 'UPDATE'" @click="addUpdateItem" />


Again, add these items - "Bonus A" at SGD 5,000 in May. Then add "Bonus B" at SGD 15,000 in June. Click UPDATE for Bonus A. The NEW button appears!



Ignore that button for now. Set the amount to 8000 and click UPDATE (the one in the top right corner). It should reflect the new value in the list of items below.


Now click the UPDATE button on "Bonus B". See the NEW button appear again? What happens when you click it? That's right - it should set currentIndex to 0 and give you the "New Item" view.


Next

Showing the Financial Projection.