Showing posts with tag "leagueoflegends". Click to show all posts.
Nov. 23, 2014, 2:55 a.m.
So I've been working on a job application for Riot Games the past few weeks and actually have a phone interview with them on Monday! How exciting! Great thing that I lost my phone last week and don't have a replacement yet! :D ... :( [It's ok though, I have Wi-Fi calling on my new loaner phone]
Anyway, part of the application process required doing a programming test in which I created something I called the "Spellimobulator". You can see it here! BUT PLEASE FOR THE LOVE OF ALL THATS HOLY DO NOT USE IT JUST YET (as of 2015 its ok tho).
Why am I so adamant about this!? Well, Riot released a new champion called Kalista. She's a pretty awesome champion in the fact that her 'gimmick' consists of having an un-cancellable auto attack, but she can do a slight dodge-jump after each attack. It's really a cool concept, but of course seems quite difficult to master. Anywho, one of her abilities works interestingly in the fact that it gets a 0 second cooldown if you kill an enemy. My application would normally have a 'special case' function written for this ability to help better calculate its DPS. Of course, I haven't done that yet since school is conquering my life (thanks, 4000 word ethics paper). So, if I am calculating DPS by taking damage/cooldown, cooldown is marked as '0' in the API, and I stupidly do not have any try/except blocks to catch division by 0... then you can see what happens.
So Kalista did introduce a bug into my app, but it's good that she did. It's a pretty glaring bug. Any time you have division there should be either a 100% certainty you will never get a divisor of 0, OR you can just have something in place to handle the division by 0 when it happens. The text-based interface for Spellimobulator actually did have a try/catch block, but my web implementation does not. I'll definitely be fixing things before a certain company calls me on Monday, so expect it to be working by then. Geez thanks, Kalista