Thursday, February 26, 2015

Coder Body Types

Which one are you?

Programming can be frustrating in many cases, but those starting out on learning a language should not have a reason to be frustrated if the basics are established correctly.  Creating a project should not start with opening the IDE and starting to program.  the problem should be understood and well researched before a meaningful UML, pseudo code, and/or a flowchart can be created to guide the development process.  Only after spending enough time on the design and algorithm should the coding begin.  If the correct IDE and language is selected, the coding portion should take the least amount of time.  that requires for someone to know the syntax intricacies of the language, but a good design will take much of the frustration out of coding.  The last and most important stage is the testing phase that can reveal all the semantic errors since the compiler will not be helpful in identifying those type of logical errors.  A good programmer will spend enough time on testing the code and test all the scenarios the application will face until a high level of certainty is achieved of the application reliability.  

So, as a beginning programmer, you are most likely spend way too much time on your coding and implementation because you have not spent enough time on the design of your project.  Even if you spend enough time on researching and taking courses that help you understand the math behind the problems and you can design a great algorithm, you might not see the value of through testing of the application and might introduce many logical errors into the application since implementing a design can be tricky.

This simple example could cause many hours of troubleshooting and frustration: 

float fahrenheit=82;
float celsius = ( fahrenheit -32 ) * ( 5 / 9 );

This is simple code can be fixed by ( 5 / 9.0 ) to turn an integer division into a mixed division and have a real number as a result instead of an integer that would always be zero.  This kind of mistake can be caused by a good design and bad implementation, but proper testing methodology can reveal this mistake.  Testing should be done with at least 32 and 212 for an easy to see known value result of 0 and 100.  Other values like a positive value and a negative value could also be used to test the proper sign of the results.  

So, understand the syntax of the language and the intricacies of computer operations to reduce time spend on coding and increase the time spent on design and testing to ensure the proper solution. 

                   Advanced                                     Beginner                                           Intermediate


No comments:

Post a Comment