Monday, 6 January 2014

Dario è Sempre in Ritardo

3 years of Italian in primary school, 4 years of Italian in high school and one semester of it at uni and the title is still my most remembered sentence (trans: Dario is always late).

You could probably have substituted Dario for Anna and still been correct. In primary school, we were learning about whales and the teacher said, "A blue whale's heart is about the size of Anna's family's car." I was astonished that the entire class new what kind of car my family had, and later my friend told me that it was because I was late for school every day, so when my mum dropped us off, someone would always point out that I was about to arrive and everyone would turn to look.

I was pretty much late for everything, until I showed up an hour late for a lunch with Sharon and MrMan5, and he said to me, "You know, once you get a job, this kind of stuff isn't going to be acceptable anymore." (I actually did have a job at this point, but I lived 5 minutes walk away - though I still managed to be late once or twice). From that moment on, I worked a lot harder on showing up on time.

However, judging from the last two parties I went to, showing up on time seems to be abnormal. We showed up half an hour late to a NYE party, and half the guests weren't even there, and the party didn't really "start" until around two and a half hours after the start time. The second party, I was an hour late due to a car usage clash, and when I arrived, I said, "Sorry for being so late", just as the host said, "Oh, you're early." I confirmed the start time with him and he said, "Oh, nah, that's in rectangular prism time™. I wasn't expecting anyone until X."

Is it now socially acceptable to be late? Is it the expectation that people shouldn't start arriving until an hour past the start time? I don't go to parties very often, but I am going to change that this year, and I don't really want to inconvenience the host.

Still, if this was the case, what is the point of the delayed start time? Why not just have the start time at the actual start time, and not an hour before you expect people to start showing up? I guess I'll show up a few more times to confirm that this delayed start is really a thing, since a sample size of 2 isn't really much to go on.

While I'm on the topic of party etiquette, I think parties should have a warning when there are going to be very young children present (newborns - old toddlers). I seem to have hit the age where this kind of thing is becoming more and more common. There is a phenomenon where the presence of young children just halts any intelligence conversation that is going on, and everything just devolves into baby talk and discussions on the stupid things that kids do. Even if you try to do something, you are constantly interrupted.

"So, did you still want to have dinner next Saturday?"
"Sure, let me just double check my- Oh, look, the baby opened its eyes! Everyone, look at how big her eyes are, she's just sooooooooo cute!"

If I ever become like this, please put me out of my misery. I don't know what a warning would do, actually, except maybe lower my expectations. Perhaps I am being too harsh. I keep being told that once I start having babies of my own, I will understand. Maybe I should use this time as preparation.

Thursday, 2 January 2014

30 Minutes


Spending time on /r/Dota2 means that you'll inevitably come across "simple suggestions" to make the game better. A lot of them are great ideas, and I'd love to see them in the game, but it really blows my mind when people say things like, "It's such a small thing, it would take like 5 minutes to fix it, why can't they fix it now?" I was probably in this camp as a beginner programmer, but now that I have a few years under my belt, my first reaction is that nothing is as simple as it sounds.

Disclaimer: I've never worked on a game outside of uni projects!

In this case, the "simple suggestion" was that the icon displaying who is using the courier updates when someone issues manual commands, not just for the automated ones.

Valve, please show us who us using the courier
People feeding the courier need to be identified and reported. Can't successfully do it if we can't see who is controlling courier.

So the user requirement is a couple of sentences. Seems like a reasonable request - leading the courier to its death means that the team must go without one for 3 minutes (and the other team gets bonus gold), which is time wasted going back to the fountain to get items. The current state is the courier only displays who is using it for the automated bring me my items command, and not, iirc, when you send it to the secret shop, or control it manually (although this is sometimes a bit broken).

Starting my timer now!

So based on the requirement, what the user wants is the icon to update when people control the courier manually. So if someone used the "bring my items to me" command on the courier, but someone else selected it mid-path and sent it to the secret shop instead, the icon would have to be updated with the player who issued that command. That's fairly straightforward.

GIVEN Player X issues a command to the courier
WHEN Player Y issues a command to the courier
THEN Override Player X's command with Player Y's
AND Change the courier usage icon to Player Y's character

But what about some of the edge cases?

What if Player Y's command is the automated "bring my items to me" command, but then the player dies while the courier is en route to them? The courier currently heads home in this case, and the display changes to nobody using it.



Not a game-breaking "exploit", but someone could theoretically go behind enemy lines, use the command to bring the courier to them while nobody is paying attention, die, and have the courier die, too. Should the courier icon have retained the icon of the previous user? Or is it just obvious in this case what happened?

What does the icon show when the courier is dead? At the moment, it's just a dead icon and the time remaining until it respawns.


Should it retain the icon of the last player to control it? What if that was the person who was trying to save it? That might cause some unwarranted blame. But OK, let's add that, too.

It's 5 minutes in, I haven't written a single line of code, and already we have some scope creep - we now have to modify the dead courier panel. Never done any serious UI programming, so I have no idea how easy/hard it'd be to add the hero portrait somewhere, maybe squish the numbers a little and make the dead courier icon smaller. Whatever ends up happening, there will be some small discussion over what's best.

Imaginary 10 minutes in now. Let's write some unit tests. Don't want our new code to break the existing stuff! Plus, this is another chance to come up with more edge cases. I tend to be fairly slow while writing unit tests, I find sometimes that half my day is gone and I've only written tests. :S But like I said, I'm slow. This imaginary person is a super gun dev, and can copy existing tests and modify for their own purposes. So let's say 10 minutes. 

Then comes writing the actual code. I can't possibly guess the structure of the Dota 2 code, but perhaps you'd have to parts of code that control controlling the courier so they trigger the update icon function. You'd also have to write some new code to control the icon for the dead courier panel. You're probably well past the 30 minute mark by now. And you know what, it's not even the end!

Next, the code will go to the testers. They perform some dark rituals and look for defects in the code you've written, but also to make sure that the thing that you wrote does what it's supposed to do.. Their job is to break it in any way possible, because every bug they find now is one less bug that gets complained about on the forums a day after the code goes live. They're going to do more than take a cursory look over to make sure everything is OK (I hope). They are tasked with breaking things, and they're pretty good at it! It may not be that this feature added a bug on its own, but this feature in combination with the other things going in this patch might have caused a problem. So it'll get chucked back into development to try and work out what the cause is. Once it's fixed, it goes back for another round of testing.

The testers give their all clear, then it's scheduled into a patch, and goes live once that patch is released. This is usually over a period of days, so if you manage to do it in half an hour, grats to you! But chances are, you overlooked something, and you'll be back fixing it up pretty quickly.

I'm not saying this process is 100% guaranteed to remove all bugs, but the more bugs you ship in your code, the lower the confidence people have in your final product. It's maybe OK in the alpha or beta stage, but in stuff that's live, it really doesn't look good - especially if those bugs are game breaking. Then you might get called in over the weekend and get told, "gg volvo can't do anything right".

Post-Christmas Party

I did end up going to the work Christmas party, and despite the fact that my boss wasn't there to see, I stayed for a massive 2.5 hours! That's 1 hour longer than my boss thought I'd stay, and half an hour longer than Grad Daniel thought I'd stay. But it didn't end there. We decided to go to Costco afterwards to try and find a PS4 for Intern Daniel, but it was a failure, as there were no PS4s in stock. However, I did get to play a poor duet on the keyboard with Grad Paul which he failed after playing 3 notes. I actually had a really good time, although the fact that I had a cider and a Guinness may have contributed to my positive memory of the evening.

In response to my last post, Super Chris said:
I think the reason people might get a bit peeved about turning up for an hour then taking off is that, if you do this consistently, then it kinda sends a message that the only reason you're going is to keep up appearances instead of genuinely wanting to be there. Or it could be that the people telling you this are just dicks.
I can definitely understand the reasoning behind that. I guess I always just thought they'd prefer that I "kept up appearances" than not showing up at all, but maybe that's not true. Although it wasn't my intention, leaving early probably gives the impression that I don't like that person, or I am not enjoying the event. That's my main motivation for trying to get myself to stay longer. I need to focus more on the fact that I'm there to enjoy the company of the people around me, and the activity isn't the main focus. So that's why, once again, my new year's resolution is to try and say no to less things.

On a more positive note, I feel like I am moving into the next stage in my life. I've mostly moved on from the university mindset, and my friendship group has really changed since then. It's almost like this is the end of a season of a TV show, and now the cast is changing to keep the show "fresh" and to replace the people who have moved on to bigger and better things.

(Warning, these are links to TV Tropes!)

The Cynic is definintely J. Of all the people I know, he makes me feel the most like a wide-eyed idealist, but at the same time, he is such a strong programmer that I find myself emulating him a lot.

Love Interest has definitely not changed, and is still MrMan5.5.

Ensemble Darkhorse is Grad Paul, who upgraded from Token Minority (is it mean of me to think of him that way?) and I find his Deadpan Snarker attitude suits my sense of humour so well. That and that fact that we seem to have some sort of unofficial Settlers of Catan alliance going on means that he's always fun to have around at work.

The Confidant goes to Albert, which is strange, because when we first became friends, I thought he was really one-dimensional. But it turns out that he just wasn't really used to talking to people about things that were really important to him. I think over the year, we've both opened up a lot, and even though he doesn't play Dota, it feels like he understands a lot of what's going on in my life. Plus, he has been a huge motivator for me to lose weight. He has been on his own fitness spree, and any time I feel like reverting back to my old ways, he is always there to push me to keep going.

Grad Daniel is the other half of my Adventure Duo. I think when it comes to work related things, I am more the main hero and he is the lancer, but when it comes to social related things, he is the main hero and I'm the lancer. We both like to comfort each other in our social awkwardness, but we've gotten a lot better since the start of the 2013. He also likes to push me into going to work events, which will help me keep my resolution this year.

¡Three Amigos! is either Olek/MrMan5.5, or Char/Julian. When it comes to MMOs, MrMan5.5 and I are a Battle Couple, with Olek rounding out the party. In strategy games, it's more Char and Julian.

I kinda feel like Sharon and Graham got Put on a Bus this year, but maybe that's my fault for not keeping in contact as much. Hopefully The Bus Comes Back this year. :)

Hmm, that's not very many people, actually. Well, here's to 2014 and meeting new people!