Computer programming is a very large and evolving field, but there are many ways in which developers can learn and update in order to meet the challenges of software engineering. Among these means, there is competitive programming, a “sport” increasingly practiced in the industry. Competitive programming is believed to be a good tool for building programming muscle. However, an extreme pursuit of competitive programming would be dangerous and unnecessary. For some experts, it doesn’t make you a good programmer.
Competitive programming: definition and objectives
Competitive programming is a mental sport that allows you to code a given problem under given constraints. To be more specific, take any sport, consider cricket for example, you are entering the game for the first time. One hit and one miss, do it a few times and you’ll end up hitting one in the ropes. Now think of a programming competition like a game of cricket. You compile a code and submit it, you may receive a WA (Wrong Answer). Change the code, resubmit it and you might get your first AC (Accepted / Correct Answer).
Thus, competitive programming is an intellectual sport that usually takes place over the Internet or a local area network and involves participants trying to program according to specifications provided. The participants are called sports programmers. As part of a programming competition, the host typically presents a set of logical or mathematical problems – also called puzzles – to participants (the number of which can vary from a few tens to several thousand), who must write capable computer programs. to solve each problem.
Usually, the judgment of the result is based on the number of problems solved in the allotted time, but can also include other factors (quality of the result produced, execution time, size of the program, etc.). For the experts, the single and clear objective of these programming competitions is to “prepare a programmer so that his logical capacity increases and that he is able to write code in a difficult situation”. Competitive programming is recognized and supported by several multinational software and Internet companies, such as Google and Facebook – who regularly hire through these competitions.
However, while competitive programming has become very famous over the past decade – with the rise of GAFAM and many other large multinationals – experts believe that it has now deviated from its original purpose and is now tending to become unnecessary. . In fact, as the competitions followed one another, competitive programming preparation platforms (leetcode, geeksforgeeks, etc.) appeared. They began to collect to constitute a collection of answers to the exercises of these competitions to allow the candidates to practice before presenting themselves.
That said, according to Kislay Verma, a technologist, things got ugly afterwards. With increasing access to these questions, the organizers of these contests and the companies that rely on these questions in job interviews have started asking increasingly difficult questions during coding rounds in the framework. interviews with students (often with less than 5 years of experience). Expectations for these trials would currently be meaningless, Verma said. “We left the skill behind and we are now in the realm of fetishism,” he said.
Has competitive programming become unnecessary?
“In response, college students are now obsessively engaging in competitive programming to stay on top. In this bizarre arms race against job applicants, companies are asking increasingly tough questions in a misguided attempt to raise the bar. Students respond by doing nothing other than solving every question available on every competitive programming website, ”added Kislay Verma. According to him, the process of interviewing young engineers, as it exists today, presents a systemic problem.
To him, it doesn’t matter whether newbies are above a certain skill bar in logic, coding, and algorithms – it’s all the same. “This is a classic case of using a metric. A bonus is given to the ability to solve very complex questions on data structures. To meet this unnecessarily high standard, students are doing whatever it takes, ”he said. He believes that being able to solve typical problems with data structures and algorithms is a signal in the larger interview process.
“By lowering the bar of questions too high, organizations can allow students to exercise their curiosity and develop their passion for something unique to them – their favorite technology, their favorite technology stack, their favorite industry. This will help them find people who can be trained, who are motivated and who have a genuine interest in the technology beyond a gamified version of it, ”Verma advocates. “It would all be nice if it helped people become infinitely better programmers (it doesn’t) or at least stand out from the crowd,” he laments.
According to Verma, currently students who have 37 million stars on codingninjas, extra-super-advanced on leetcode, or uber-coding-lord status on codeforces routinely fail the process. maintenance because EVERYBODY around them is on the same level. And in the pursuit of this level, they would have ignored a lot of other fundamentals that they should have learned or things that they could have explored and tried on their own. He also deplores the fact that in recent years these students have limited programming to these contests or platforms.
“When asked what kind of technologies they find interesting, several students have told me in recent years that they are only enthusiastic about competition programming and that they have no other interest in software engineering. or technology as such, ”Verma said. According to him, it is the responsibility of organizations to draw attention to this problem and to concentrate on other aspects of software engineering.
“At least on other academic subjects, if nothing else. But almost always, the first interview is a very difficult data structure challenge that mere mortals cannot overcome. Thus, subsequent rounds always evaluate people who have a competitive programming bias. This funnel will never allow a different breed of software engineers to pass through, ”he cautions.
Competitive programming ignores the fundamentals
There are two sides to each other when it comes to the usefulness of competitive programming. First and foremost, Verma’s reviews are supported by a group of people who believe that competitive programming doesn’t make you a good software engineer. The group explained that competitive programming teaches you bad practices, such as abusing dangerous programming constructs or data structures to optimize code or simply saving typing when writing the code (like variable names in one. letter, macros, etc.), global variables and status in the program, etc.
It would also encourage not using common design patterns, not using OOP, not documenting code, and generally writing code that is difficult to maintain because it is not. not well designed. “You could say that a person only does this in competition, but my experience has shown me that this is not true, because if you learn to program in a certain way, you will do the same in a certain way. other contexts, ”said one person who agrees with Verma. According to her, the skills that you will acquire by doing competitive programming are more than useless.
“In real life, I have yet to come across a situation where I have to use an algorithm used in a programming competition. But if you need them, you don’t implement them yourself, but you use a library that handles all the work, ”the developer said. According to him, the Dijkstra implementation that most competitive programmers use is a toy, not something you would never use in enterprise software. He believes that competitive programming completely misses what it is supposed to do: “teach developers the fundamentals”.
“The fundamental skill that competitive programming doesn’t teach you – and which I think is the most important thing for a good software engineer – is to use Google to find documentation online. Most of the mistakes that I see being made by young software engineers could easily be avoided if they did a simple Google search and read the official documentation (not a random blog post), ”he said. .
“And yet in programming competitions, you are prohibited from using the Internet. I find it silly, it’s like being asked to write code with a typewriter just because in the past keyboards and screens didn’t exist, ”he added.
Read also : 10 Best Websites To Learn Programming
Competitive programming still plays a role
According to the second group, competitive programming is useful in teaching you to think and teaching you some skills. He believes that the most useful impacts of competitive programming have to do with teaching you to program effectively. “The most important piece of advice I received for competitive programming was to get away from the computer. The biggest pitfall in programming is writing code before you know how to solve a problem, as that tends to encourage you to spend all your time making no progress on finding a solution, ”said one of them. them.
According to him, another useful skill is the ability to debug algorithms. Debugging a competitive programming problem usually comes down to taking some failing input and trying to figure out where the error is in the algorithm (expressed in poorly written, commented out code!). Learning to debug algorithms under the time pressure of a competition, he said, also requires being able to quickly decide if the algorithm is bad, or if the implementation is bad, as well. than to determine the places where errors are most likely to occur.
“This type of experience translates very usefully into professional programming, and debugging is a skill that seems poorly learned by most young programmers,” he said. While citing several other advantages of competitive programming, he still recognizes that the previous group is right on one point. He believes that competitive programming may be unnecessary in the form it is presented by platforms like etcode. According to him, “the apparent goal of competitive programming, namely building a good repertoire of algorithms and advanced data structures, is practically unnecessary.”
“When competitive programming gets to the level where you have to memorize all the data structures and all the advanced algorithms to do better, that’s where improving rankings don’t translate into better programmers anymore, in my opinion. But there are still a lot of skills to be learned to move up the competitive rankings before reaching this point, ”he said.