DEV Community

Discussion on: HackerRank Is Teaching You to Write Terrible Code

Collapse
 
raddevon profile image
Devon Campbell • Edited

Here's the problem with that: junior developers are using HackerRank to practice because they're being sent there by recruiters and companies to complete coding problems as part of job interviews. If that's the site that gets them the job, it seems natural to practice there as well.

It's easy for you and I to look at this with a more robust perspective and say, "Well, of course this isn't the code you're supposed to write in production," but that's not made clear to a new developer. They don't have the tools yet to be critical of the efficacy of this code in other contexts. Competitive coders will have those tools, but HackerRank does nothing to keep out those who are not competitive coders and it doesn't make it clear that the platform is only intended for them or even just that the code is not production-quality.

If I were inexperienced, interviewing for a job and they sent me to test for the job on HackerRank, I would assume the code used on HackerRank reflects the code they will want me to write on the job. Why would they want to test whether or not I can write code they won't accept from me if I'm an employee?

So, HackerRank may not claim to teach people to code, but they are teaching people to code, for better or for worse (in my opinion, for worse).

Thanks for reading and sharing your perspective, Bruno.

Collapse
 
wojtekidd profile image
Wojtek Cichoń

Thank you for this post. I'm 3 months into a Python Bootcamp and started doing a basic Python path there. The code they suggest in their basic arithmetic tasks is really weird and questions all I've learned so far. It's good to hear that I'm not the only confused person around.

Collapse
 
brunooliveira profile image
Bruno Oliveira

Wow, thank you so much for your reply! :) (I assume you're also far more experienced than me, so this is a great perspective)
I agree with what you say indeed, junior devs or people just "going at it for the job", even if they're good at algorithms, can definitely pick up very bad habits from that scaffolding code that lies there.
Unfortunately competitive programming is literally a competition so writing unsafe, sluggish but blazingly fast I/O routines and taking some dubious shortcuts it's the norm there (top competitors using C/C++ would have hundreds of lines amongst macros and custom I/O routines just to shave off ms on reading and processing input) and unfortunately some junior devs can definitely approach those platforms completely misguided and start their career with the left foot there... Ultimately experience and long exposure to production code will fix all of these quirks but I agree it's a big problem with more and more companies "outsourcing" code challenges on these platforms nowadays. Thanks a lot for your reply