teej_dv sneakily wins coding challenge hosted on ThePrimeagen’s channel in 25 seconds
The coding contest on ThePrimagean’s Twitch channel, featuring teej_dv, roxkstar74 and bashbunni, proved to be more than profitable, with all sorts of hilarity in the live stream.
Streamer teej_dv returning the same value for the function it took in the URL shortener challenge was probably one of the most talked about incidents after the clip went viral.
The fact that the creator’s trickery went unnoticed at the time made it all the more hilarious and outrageous for various viewers. Read on to learn more about what was probably the biggest coding contest on Twitch.
How did teej_dv complete the URL shortener challenge in 25 seconds?
(Watch from 02:08:12 to check the full URL shortener challenge)
About two hours into the stream, Primagean issued another challenge for contestants:
“Tinyurl is a URL shortening service where you insert a URL…and it returns a short URL like this (shows examples). Design a class to encode a URL and decode a small URL.”
He also clarified that there are no real restrictions on how streamers will go about it and that they are free to take on the challenge as they see fit:
There are no restrictions on how your encoding and decoding algorithms should work. You just need to make sure that the url can be encoded into a small url and it can be decoded into the original url.
After clarifying all the rules for the challenge, Primagean also remarked that the key to winning the challenge is in the language the programmers get:
“I’m just saying it totally depends on the language I get. It’s just a function of how fast I can Google these answers, isn’t it?”
After the randomizer assigned languages to everyone, teej_dv celebrated getting PHP, the most suitable language for this challenge.
“It’s my time to shine.”
The main time-consuming aspect of this challenge would be building the encoding and decoding side of things. However, teej_dv ignored this aspect because he directly wrote the code for the program to return the same value he passed.
This basically meant that the streamer put the desired result as the source value to get the result they wanted.
The contest took place on Leetcode, an online coding practice software, which did not verify the presence of the decoding and encoding algorithms, it only verified that the result was that which the algorithms would have provided.
Fans react to teej_dv using shortcut during ThePrimagean contest
Viewers seemed divided, with some believing that teej_dv found a legitimate loophole in the challenge and used it to win, and another section felt that he blatantly cheated.
Most viewers felt that it was up to the developers of Leetcode to do better while creating these challenges.
teej_dv is a lead developer at NeoVim who mostly streams when working on open source stuff. Although coding streams are still a very niche part of Twitch, the coder has made a name for itself with its innovative plugins and core feature development.