I am announcing the first Elegant Code give away contest.
Thanks to Cory, I have an extra copy of Beautiful Code, by Andy Oram and Greg Wilson. I already have a well worn copy of this excellent book, so this new one is up for grabs by our readers.
Here’s the Deal
You write an article for ElegantCode.com, and submit it to: contest at elegantcode dot com. The subject of your essay? If you have listened to the podcast, you won’t be surprised that the subject is "Defining Elegant Code". You tell us what Elegant Code means to you.
- You send in your article by midnight on Friday, March 28th.
- The Elegant Coders will read it and we will vote on a winner.
- I will send you the book (shipping is on me).
- We’ll post your article and attribute it to you as the winner of the contest.
- You win fame and glory.
If you submit an article and are not chosen as the winner, we reserve the right to publish your entry in part or whole on the blog as well, but we will always ensure you are credited for your work.
Good luck, and we look forward to hearing from you.
Topic: Skill of writing Code
1. Why code is not good ?
Every new comer to IT industry faces first question in his/her job “How do I write professional code ?” but before he/she gets the answer code has to be written to make software work becuase of deadlines.
So for a novice to write a beautiful code it will normally happens only after 1/2 or a year but already there is lot of crap left behind isn’t it?
2. How to write better code ?
I always beleive in code templates and modularization of code.
2.1 Code templates : will be helpful to write code faster and cleaner. Every organization should come up with basic and commonly needed API ( application programming Interfaces ) and these should be used where ever applicable.
2.2 Modularization : Write the code in modules e.g: Class methods,functions or Subroutines. This will increase code re-usability and less errors. Maintenace is always less and easy as only one place fix needs to be done.
2.3 Coding guidelines
Traning should always be there for all developers to make them aware of every possible coding guideline.
Coding guidelines improve readability and maintenace as well.
e.g: Local variable in a Method
a) lv_counter : Local Variable
b) lr_rectangle : Local Reference
Regards,
Vijay