Your review is Submitted Successfully. ×
vishal singh@vishalsngh
Jul 16, 2003 03:36 PM, 2546 Views
(Updated Jul 16, 2003)
The Art of Programming

My stint with programming started way back in VI class when I bought myself a Programmable Scientific Calculator. The idea of being able to make something do or think the way u want it to, simply delighted me. Ever since, though am not professionally a programmer, I keep writing “small” programs. I feel I  shld share my exp with u all, so here goes the write-up. I am not going to dwell in to the details of language selection or tools such as IDE available, am going to stress on techniques and philosophy. I will discuss in detail about Input section, such as designing of user interfaces, the processing part, such as complex data structures and writing ones own functions instead of being limited by library functions and the output part, the formatting and presentation of processed data in upcoming reviews.


Programming requires crystal clear vision about problems, good analytical and logical mind and a probing, innovative and intuitive approach to solutions. To new beginners, my experience says that if you arent good at Mathematics, you better reconsider your decision to be a programmer. You can survive, but you may not be a winner.


Whatever project u might undertake, always remember one thing: the sole purpose of computing software is to expedite an otherwise cumbersome process and to eliminate human errors. Also, the human interface to the Software should be intuitive and easy.


Whatever the problem might be, there would always be Input, some processing and the output. Its very important at initial stages that the I/O and the processing parts along with and the connecting pipes of your code are correctly identified. This guarantees one thing, the code is modular from its very inception. This completes a very important portion of  ur program algorithm. While developing algorithm for your program, don’t start developing the algorithm for the entire code, though it may vary according to the size of the code. Small programs need not require any written algorithm at all, while bigger programs may require days of careful study and analysis. After sometime though, u might develop a habit of writing the code straightaway, with the algorithm constantly developing inside ur brain! And this is not true for small programs, size doesn’t matter!


In fact, I take it as a parameter to judge my capabilities.


Always remember that a good programmer is one who writes code in such a way that at least 60% of the code can be reused in other programs. That is to say, the code is made independent of the context of the calling code. All the processing done, all the variables declared and all the results generated are local to that piece of code. The idea should always be to call the code by passing values in such a way that no global reference is made. The results generated should be passed back that in no way affect the global context of the code. This helps in saving lot of time when writing new code, as modules written can be easily used to fill in spaces in much larger programs. Also, try writing ur own code for pre-defined functions if u feel ur not getting some feature u wld want to implement. For instance, I wrote a input function when I found that the standard input functions were inadequate to incorporate the features I wanted such as checking against wrong entry, providing editing capabilities to the user, and allowing space in character input. To some it might sound like re-inventing the wheel, but haven’t we graduated from the wooden wheel to radial tyres, huh?


TO be continued.

(0)
Please fill in a comment to justify your rating for this review.
Post
Question & Answer