Posts

Showing posts from August, 2011

Tips on coding style..

Well his post will be regarding some tips on coding style. I googled about this topic, checked many sites, read many posts, finally made a list on them... Meaningful names to variables -- i.e., name them meaningfully so that it corresponds as closely as possible to verbal description of its usage. Maintain a labbook from the beginning of a project to the end. Code each variable so that it corresponds as closely as possible to a verbal description of the substantive hypothesis the variable will be used to test. Errors in code should be corrected where they occur and the code re-run. Separate tasks related to data-manipulation vs data-analysis into separate files. Each program should perform only one task. Do not try to be as clever as possible when coding. Try to write code that is as simple as possible. Each section of a program should perform only one task. Use a consistent style regarding lower and upper case letters. Use