Search Here

Custom Search

Sunday, August 19, 2007

How solving ACM problems is helpful to develop quality software

Developing quality software is a big challenge for a software company. A software will be more quality-full if it has less bugs and high performance. But reducing bugs and improving performance is more challenging than developing the software. Here I will try to explain how solving ACM problems can be related to developing software.

When we take part in a programming contest we are given some problems to solve as part of the contest. Suppose we have decided to solve problem 'A' of the problem set. At first we go through the problem description very carefully. This is like understanding of the spec of a software. Then we think deeply and try to find out the algorithm to solve the problem which is like determining and planning the strategy to develop the software. After finding an algorithm to solve the problem we just code it and see whether the given sample input output of the problem is satisfied by our program. This is like developing the software and testing whether our desired output is achieved form the software.But we get upset when we submit the solution to the judge of the contest and get the result like "Wrong Answer" or "Time Limit Exceeded" or "Runtime Error" etc.

But what's wrong with our program?? We got the sample output absolutely correct after feeding the sample input to our program. Is there anything wrong with our code? Hmmm this is like getting bugs of the software. So, we should think deeply now whats wrong with our code. Then after several
modifications and submissions of the code we get the msg "Aceepted" from the judge. It means our code is 100% bugfree :)

Actually to get a program accepted we have to think very deeply and vastly in a realtime contest. While participating in a contest I saw many times that only for a single testcase my program did not get acceptance. Usually this is called special case in the problem solvers community. In a word we can say that who solves ACM problems have to think in a vast view about a problem and this fact helps him in a real-life software development. While developing a software if a programmer thinks in a very clever way about the requirements and different types of bugs may occur or any kind of security issues of the software then the software will be more bugless. And to improve performance of a software the underlying algorithm should be improved and most of the ACM problem solvers are conscious about improving performance of their algorithm which can be related to improving performance of a software.

Actually solving problems improve the vastness of thinking of a programmer. It gives a new dimension to his programming skill.

So far I have seen giant companies like Microsoft,Google hire ACM world finalists most of the time even before the completion of their graduation. But why? Because they know to develop a quality software of innovative idea ACM programmers are the best choice.

But there is a little bit problem with most of the ACM programmers. Throughout their student life they only learn C/C++ or at best Java and I observed they feel very less interest about professional software development. They only like to solve problems. If you ask them whats your favorite language they will reply you "C/C++". But if we grab these programmers and train them with professional software development tools and tactics then definitely we can build better software.


Shams said...

Solving ACM problems is different from working on real life enterprise application problems.
A mental shift for many things is required. e.g. To pay more importance to understanding client requirements rather than implementing proper mathematical logic analyzing in a short span of time is required, Use more classes and interfaces to do a simple task rather than have all your code in a single file, etc.

From my perspective solving ACM problems only ensure that you can think and you can code. But there really is more to software engineering.

Sowkot said...

You are right. But what I wanted to mean is solving ACM problems increase someone's thinking power for a solution. It increases to think about all possible test cases of a module of a software. Its true that to change the track from problem solving to software engineering practice is a little bit difficult. But when they will be accustomed to the best practices then they will be able to build better software.

Swakkhar Shatabda said...

to me, main thing that acm helps is "100% bug free" coding

David said...

I think that it's true that solving ACM problems it's a quite different to solving a "real life" one in a software development context, but the better legacy that we may obtain from solving ACM problems is that those "exercises" open our minds in a new way. It's another way to put our neurons in movement using and improving our knowledge of a tool like the languaje chosen.
David from Argentina