These days there are a lot of contest in the programming world, but are they really helping?
What's the cost?
I mean it is good to be fast but at what cost? as it said in Clean Code by Robert C. Martin we are like authors and the code we write should be like well-written newspaper article;
writing code fast and dirty is not a good thing besides why should we write code in hurry? it makes me remember my math exams with all the stress.
What's the point?
Having a course named 'Competitive programming' made me think what's the point? isn't coding more about being patient and find the best solutions then write it clean? what is your opinion about programming contests?
Top comments (15)
I had a course "Approaching Programming Contests" at University and I liked.
It was clear from the beginning that I would never attend that contest for competition because I didn't match the rules for application.
In this case it wasn't possible to get away with a bad algorithm. The problem size was to big, if your algorithm didn't scale well, you got a time out.
This course gave me the opportunity for pair programming including a physical room, an adviser who picked suitable problems for us to solve and pizza, which I am not so much into.
I learned by multiple experience to solve a problem before starting to program, how good it is to have a second opinion and someone to discuss with and got a new point of few in my learning.
This course war the only course at university where we solved problems with absolutely no hint in which topic to find the solution. All other courses provided a context about which hinted by default what kind of solution we were looking. (Like if the topic is dynamic programming, it is very clear that the solution is to be found in the area of dynamic programming.)
This definitely improved my skills in deciding which algorithm to choose. To me this is an important part of keeping the things you learned.
So, I would attend this course again, but I guess not all courses are that useful, it depends.
yes I have the same course and I like the timeout rule but my only problem is the time of the competition otherwise if you have time its fun to solve problems with good algorithms, Thank you very much for your comment!
Yes, the competition part didn't provide much value for me, too.
But the rest did. I guess, a lot of people are not that much into solving problems just to have them solved, maybe they need some extrinsic motivation?
Our adviser tried to put time pressure on us, but my programming partner and I were little impressed as we were out of competition. I see this part as completely useless, I don't think you can hurry learning or that there is any short way for understanding.
Can you choose to take this course or do you have to take it?
I have to take it but its pretty much same topics as data structures and algorithms courses.
Ok, so you can only try to find what values it provides to yourself, and don't have to decide if it is worth the effort and time for you.
The topics were kind of same in my courses, too. But the focus was different. In data structures and algorithms we had to do a lot of proves, in APC we used that knowledge and the focus was on deciding and implementing. But I heard some universities use this courses to drill their students to bring fame to the university by winning many competitions.
Yes, Thanks!
its basically to incourage programmers/developers to try their skills, and also as to be a part of event. They might learn new idea on that events.
Some contest are not that actually that important, it totally depends on the programmer if he/she likes to join that event.
Thanks for your comment🙏🏻
I agree - I write my best code when I have 9 hours of sleep, a cup of hot coffee, and no meetings for the day :)
However, learning to write "decent" code to solve problems in high-stress situations like fixing production issues or interviews is an invaluable skill to have. Competitive programming has helped me sharpen that skill.
exactly!
it makes sense thanks!
On the other hand, you get fast feedback at which point your code is "to ugly" to serve it's purpose.
For example, giving your variables names which are considered crappy by some standard might cause you problems or it might not. Maybe you will experience trouble understanding what you wrote 10 minutes ago, maybe you will see that it it totally reasonable to name variables "i" and "n" everybody will know what meaning they have. You can experience how context is important. Don't waste you time to build a framework-like object-oriented structure for your data for a problem that could be solved with 20 lines of code.
If you can solve a problem a problem with a bad algorithm in 2 minutes, it can't be that bad. It seems to be good enough. It's when you build a house, what's good and what's bad design depends on the purpose. Is your basement crappy or good? It depends, do you want to build a hut to spend your weekends in summer or a skyscraper?
Exactly, Thanks!
Thanks for your comment but isn't it bad to just solve the problem?
imagine solving a problem with a very bad algorithm and a dirty code in 2 minutes vs solving a problem with a very good algorithm and a clean code in an hour; don't you prefer the second one?