Albert Einstein: "Every thing should be made as simple as possible—but no simpler"
This was a question that started bugging me in the past few months..... About the differences in native styles and techniques of program Development and variations in development styles with respect to each platform. I've tried asking about this to a pretty good number of professionals and tutors but none of them were able to actually give me a satisfactory answer.... Now This is what I could talk about the prospect...
Every one knows that each language comes with it's own syntax and conventions. But there are also some programming styles or methodologies that when followed can gurantee you better productivity.It is claimed that following a particular programming style will help programmers to read and understand source code conforming to the style, and help to avoid introducing errors.
It is said that discipline is required in coding for a developer as much as it is required for an individual in his daily life It all amounts to writing correct codes and at the same time achieving understandability and maintainability. What I'm going to speak of is not exactly of the programing styles of every mentioned language but it could rather be termed as programming philosophy.
Even the Best algorithm if implemented in wrong style/manner cant do any good to you but at the same time a Good Programming Style won't help you fix an ill routed algorithm either....both of them actually go hand in hand.
There are some general programming style and etiquette you need to follow which most people know and are derived usually from the basic C programming itself which need not be mentioned. That's one case and the other one is every language/platform has it's own independent set of etiquette which when followed help you to bring out the best from your codes w.r.t the platform. I may sound a bit confusing but you will start understanding it sooner with a few examples. Usually some of them are followed by most of the programmers from the beginning yet fail to observe them independently and much more are learnt with experience. While some skill sets are restricted to very highly skillful programmers who need not always be experienced. While with more practice developers tend to implement their own techniques which may support their style and may even back-fire at times.In simpler words this is stated as "A Programer tends to evolve with experience."
What I'm talking here is about generally adopted practices and also my observations and opinions which people may agree or disagree with me there again I'm still a rookie and what i'm saying may not be cent percent accurate but i can guarantee accuracy of at least 95%. And i would surely want to know more from experienced people about their observations and adopted practices. Why I'm writing this topic here is I just wanted to share the info. and the earlier you learn those techniques and etiquette the better it is for the Individual.
Here are some of the common etiquette that I've learnt over the period
1.) Try to write Self-explanatory codes rather than writing complicated codes and then adding comments to explain them. This is because in such cases at times the comments just make it more complicated for others to understand apart from making the program look bulkier. Have just the optimal amount of comments in your program. KISS (Keep it so simple) –principle is the most widely recognized programming paradigm which suggests writing the codes in the most simple and self-explanatory manner. The principle has been further developed by modern Software Development methodologies like Agile & Extreme programming
2.) Choose the platform or programming language depending on the project requirements at hand, Or select it according to the one that is most conducive and profitable to the problem/task at hand. And for this you should have a vast knowledge of every language available in the market.
3.) Use short yet self descriptive names for variables, objects, methods, classes, files, & directories.
4.) Using distinctive variables for distinct object instead of sticking to one.
5.) Avoid using the Jump statements to the maximum extent unless there really exists no way to achieve that task.
6.) In most programing languages handling of long pieces of codes is a tricky subject so to maintain the interoperability it is always suggested to break it into smaller codes. Much has been written about this in various code conventions and coding standards
and this list continues that way.
[continued....]
No comments:
Post a Comment