MGPT or Machine Graded Programming Tests are test conducted by CDAC [Formerly NCST], India. CDAC branches are spread across the country which enabled India to spearhead IT revolution and are pioneers in developing various indigenous products. NCST- National Centre for Software Technology branches which were merged with CDAC to make it a single entity CDAC. NCSTs were well known for carrying out world class research & Development activities. NCST introduced online testing product called PARIKSHAK to test the aspirants of its courses. These PARIKSHAKS are programmed with test cases and corresponding results. It has high level intelligence to run the program, to check the syntax, check the program code and to check test case conditions, finally giving verdict on your program. PARIKSHAK has “no mercy” policy. You have time limits, you have to stick to the syntax, and you have to really get all test cases cleared. A violation of this will result in knocking out of test. And for getting through the tests you always have to get all the test case cleared. Either yes or no is the only output you can expect. For instance, consider PARIKSHAK is verifying the output of 10 test cases, and it got 9 test cases cleared, then also you could get answer NO. You can expect a YES only when you are through all the 10 test cases. There were lots and lots of instances of merely missing the last test case. MGPTs are conducted to test your skills in JAVA.
.
.
I being an FPGDST aspirant of 2006 got my first MGPT cleared from CDAC Electronics city campus, Bangalore and the second from CDAC, Khargar, Mumbai. Though lucky to be one among the very few, to crack two MGPTs which is a major criteria, I also faced tough times and missed chances due to a single NO, or even no YES. I want to share on what I have learned from my past experience of 5 attempts out of which 2 was fruitful.
.
.
To Crack an MGPT a cool mind and focus is necessary.
.
MGPT has two main parts
1. To get the logic and to convert the logic into program codes in paper
2. To convert the rough code on paper to a working program .
.
So initial part that is, the logic has a great impact on the overall performance of program. The stronger you make the logic, the stronger your code will be. While developing logic.
1. The test cases which are given as examples will help you a lot. This might help you in deciding the range. They act as clues.
2. Also check for extreme conditions, this could be the important one which you will miss out of 10 test cases.
3. Always think of alternate logics, and choose the best one to get coded first.
.
.
The rough program which is an exact conversion of logic.
The importance at this level, is to identify,
1. What is to be tested first, which you are not sure of?
For e.g.: if you are not sure of whether a string to string addition is possible through "str1 + str2" go for it and verify.
If this isn’t working check alternative ways, like char array conversion addition, substring addition, appending.
eg2. It can be on, how to take input read as word, line then parse it.
2. Secondly identify the areas which you think may fail during practical.
for e.g.: Suppose you are aware that this area may go wrong, note it down initially and check during practical the step by step results using print command.
Always put an alternative version to tackle this noted problems.
3. Also categorize your rough program into sections, like getting input, converting them; checking of conditions, solution part, output section.
4. Check whether there are chances of for an overflow in your loops. This happens mainly in while loop.
.
.
Now you are ready to go to labs. Here what you have to do?
1. First of all, a cool mind and attitude, at the same time should be a focused.
2. Secondly minimum typing errors, which will cost you heavily. Typing speed has less importance than the accuracy.
3. If the program is having an output as must in certain conditions, try out printing those outputs first. This will show you which test cases are applicable for that conditions. Also this will show you how many are left with other test cases. Follow these only if you are sure one output is mandatory.
4. Also most of us forget to note down the input/output specifications, which is of extreme importance. The main area to focus is the output.
5. Then check out for those which you were not sure of, like string to string addition initially. This will reduce your time cost. Otherwise you keep on writing the program as of from paper, after which you recognize this idea is not working. Also to check this you have to put so much print commands. So to bring down the costs, try this.
6. Then keep on coding.
7. Submit your program. If the PARIKSHAK Is coming up with No’s throughout, check firstly the sector/piece of code you have noted down as viable to failure. Then check the other parts. This only works when you are sure, the initial sectors before this steps are all correct. Or better way is to command a section/sector fully and check. This will help you to trace the error incase of exceptions, infinite loops. Rather than going step by step and printing those, this method will bring down the time factor at the same time is effective.
8. Then after checking the program and making it foolproof, submit it.
9. Still "NO" s. Don’t worry here is what the solution is >> Wrong LOGIC. So logic is a main factor. If you had made alternate logic. Comment the old logic/ don’t remove and apply the new one. And check which one among the alternatives are giving you more "YES"/all "YES". Apply the efficient logic and modify it incase you are merely missing the chances.
.
So initial part that is, the logic has a great impact on the overall performance of program. The stronger you make the logic, the stronger your code will be. While developing logic.
1. The test cases which are given as examples will help you a lot. This might help you in deciding the range. They act as clues.
2. Also check for extreme conditions, this could be the important one which you will miss out of 10 test cases.
3. Always think of alternate logics, and choose the best one to get coded first.
.
.
The rough program which is an exact conversion of logic.
The importance at this level, is to identify,
1. What is to be tested first, which you are not sure of?
For e.g.: if you are not sure of whether a string to string addition is possible through "str1 + str2" go for it and verify.
If this isn’t working check alternative ways, like char array conversion addition, substring addition, appending.
eg2. It can be on, how to take input read as word, line then parse it.
2. Secondly identify the areas which you think may fail during practical.
for e.g.: Suppose you are aware that this area may go wrong, note it down initially and check during practical the step by step results using print command.
Always put an alternative version to tackle this noted problems.
3. Also categorize your rough program into sections, like getting input, converting them; checking of conditions, solution part, output section.
4. Check whether there are chances of for an overflow in your loops. This happens mainly in while loop.
.
.
Now you are ready to go to labs. Here what you have to do?
1. First of all, a cool mind and attitude, at the same time should be a focused.
2. Secondly minimum typing errors, which will cost you heavily. Typing speed has less importance than the accuracy.
3. If the program is having an output as must in certain conditions, try out printing those outputs first. This will show you which test cases are applicable for that conditions. Also this will show you how many are left with other test cases. Follow these only if you are sure one output is mandatory.
4. Also most of us forget to note down the input/output specifications, which is of extreme importance. The main area to focus is the output.
5. Then check out for those which you were not sure of, like string to string addition initially. This will reduce your time cost. Otherwise you keep on writing the program as of from paper, after which you recognize this idea is not working. Also to check this you have to put so much print commands. So to bring down the costs, try this.
6. Then keep on coding.
7. Submit your program. If the PARIKSHAK Is coming up with No’s throughout, check firstly the sector/piece of code you have noted down as viable to failure. Then check the other parts. This only works when you are sure, the initial sectors before this steps are all correct. Or better way is to command a section/sector fully and check. This will help you to trace the error incase of exceptions, infinite loops. Rather than going step by step and printing those, this method will bring down the time factor at the same time is effective.
8. Then after checking the program and making it foolproof, submit it.
9. Still "NO" s. Don’t worry here is what the solution is >> Wrong LOGIC. So logic is a main factor. If you had made alternate logic. Comment the old logic/ don’t remove and apply the new one. And check which one among the alternatives are giving you more "YES"/all "YES". Apply the efficient logic and modify it incase you are merely missing the chances.
.
####################################################
Please note that, this won’t work for everyone. But I advise you to try this out. This method will help you, to bring down the time and effort factor. This method will surely change the way you code the program.
####################################################

4 comments:
Nice Post...
Congratulations to you for clearing 2 MGPTs.
Thank u
Uncle ....
Cool effort to bring down your thoughts ...
Congrats !!!
Congrats.
I'm very new to this, I have some doubts regarding MGPT.
Who will provide the problem statement?
After submission of program, Do we need to pass inputs or that system will generate random inputs and checks for the output?
Post a Comment