Do you remember my post about the interview question? It’s one of my problems in our Code Challenge that I would like to share in this post.
Code Challenge is one of our exciting activities last year where we can learn from each other by solving the problems in a contest. I also published the tool on Github for who wants to host this kind of event, please don’t hesitate to contact me if you want to use or need any support.
It makes sense, everybody always needs to improve as every organisation needs to go forward. And learning is a good way to keep us improved and motivated. We have thought about the contest that allows every developers join to learn and measure their coding skill, and we held the Code Challenge last year that was involved by all our developers as contestants.
Joining the contest with our colleagues is very fun thing as we can learn from others and see how good we are right now. But it’s not easy for the host because there are various specific platforms or technologies in one organisation or teams, then the contest should target on a shared knowledge or skills in the whole team. To be fair, we should remove all the dependencies that relate to the language or platform uses and back to the basic of software development: programming.
Follow my experience, the ACM ICPC is very good format that focus on the programming but it seems still complex and has language limitation. Project Euler suits us better but it should have the time constraint to identify the winner.
Our Code Challenge is mostly like the Project Euler format with time limitation as ACM ICPC. It was being held bi-weekly in 5 rounds, each round run from 13:00 to 17:00. In 4 hours, the contestants try to solve about 5 or 6 problems by following rules:
- Solve problems in order. The contestant needs to solve a problem before taking the next one. So the problems should be arranged by their difficulties.
- Result comparison. It doesn’t matter with the contestants’ solution as they can solve the problem by any programming language (or sometimes by non-programming as by Excel skill). A problem just shows the issue with a specific input data and compare the result with correct solution.
- Multiple submissions. Contestant can try submit his solution many times as he wants to get the problem solved. The time spend for a problem is that the time he starts the contest to the first attempt of accepted solution.
- Faster is better, careful is good. The contestants are ranked by these criteria in order:
- Number of solved problems. The more number of solved problems are, the higher rank of contestant is.
- Number of submission. If some contestants have the same number of solved problems, the number of submission should be counted. The contestant get higher rank by fewer attempts.
- Time spend. The time spend should be the last criteria as its precision was counted to millisecond :). It is the total time spend of all solved problems.
As our experience, there are some good things we could have from Code Challenge:
- Fun. It could come from various sources such as a story in problem or the solution. In the 3rd round, we all surprised by a problem can be solved in 3 minutes as it normally takes at least 15 minutes for programming. But it’s so easy to calculate and submit the possible results manually. Yes, he’s so smart.
- Share and learn. After the contest, we always sit together to share our different solutions of those problems, so we can learn from others and see what was the best way to solve them.
- Improve. We of course had a good chance to learn from others or from practice during the contest preparation for getting improved.
- Motivate. Beside the award for winner, there were some secondary awards such as the best newbie, first solved problem, last accepted attempt…etc for our guys trying to get.
And there are a lot of good things you would see as I think you should host at least one Code Challenge in your team.
Yes, there are various good things we had but in another hand, some minor issues came.
You could see that our format and tool were designed to target the purpose: removing the technology dependencies where contestant can solve the problem by any language (or by non-programming). But the issue is moved to the problem set as we should design them as free-language algorithm – it’s usually not easy. A lot of problems can be solved quickly by Java, C# but much slower in C++ by coding time but versa in running time.
Another issue is that somebody is very good at basic programming and algorithm but someone isn’t. I truly believe that a good developer should be good at algorithm but it seems not work today as the technology goes so far and developer can build the very good products with a normal algorithm background. He of course cannot be bad but doesn’t need to be very strong in algorithm to be a good developer as some years ago because the high-level technologies support us too much. For example, 10 years ago, every good developer needs to know what best sorting algorithm in his case in C++ but today a normal developer doesn’t care about this, just call Sort() method in C# and it would do in the best way. And of course, the results are mostly the same no matter he knows the Sort() method would run by any algorithm. It’s proved in our Code Challenge last year as there was only 1 winner for all rounds. He is very talent and strong in algorithm but isn’t a top guy in product development.
They are just the minor issues we would face in any contest that targets to wide range of developers. The problem content is the best way to resolve these issues but it usually takes much time to create a good problem like that. Contest is not fair but we should keep it as good as possible 🙂
I will share our problems that were used in our Code Challenge last year in some next posts and hope that you can find some interesting things.
And here is the system we have used: https://github.com/hiennvn/code-challenge. It may have some bugs because it just was the first MVP and one of my 24-coding-hours projects. But it worked fine for us last year.
Keep calm and love code.
Don’t want to wait for my next post? Try this problem:
A motor bike plate number is in the format [AB-CD EFG.HI]. Its value is defined by: AB x C + EFG x HI, if C is a letter, its value is its ASCII code. A plate number is called NICE one if its EFG contains its HI, then its value is doubled than normal. Give you a list of place numbers, find the biggest value.
For example: A plate 29-C1 320.12 has value 5783 (= 29*67+320*12)
What is the biggest value of
507 total views, 2 views today