Tuesday, May 22, 2007

Best of ever written, in 4 years :-)



Programs as poems:

If you look at some body’s code, you will see it as a poem, not merely a software program. That’s how they write it. Impressed by those cool programmers, I tend to follow lots and lots of code tricks and style in whatever I write. Recently, I was developing a java based application for my personal use. If you are interested to listen, I could continue telling the best I have don’t in it,

  1. No use of Class level (or global) variables. (Because they confuse programmers to trace the parts, where they are initialized & modified.)
  2. No hard-coding. (Because, tough to change later)
  3. No bad smells in code. (no big methods, no big expressions, no big conditions, no complex loops)
  4. Standard, naming conventions (I use some times underscore too, in java. why dont you ask 'why'? )
  5. Exception handling – (Anti pattern imitated)
  6. Large scale of reusable code. (Seriously)
  7. Use of Design Patterns – (that’s a sign of great future)
  8. Proper (styled) Java doc comments, (you will be impressed if you see it.)
  9. Code refactoring, using tools.(one should really do)
  10. Code inspection, using tools. (rare tools)

I couldn’t post the code here; I would post the code somewhere & give the link here.

4 comments:

Manikanda kumar said...

I'm also writing better code these days with the help of tools and best practices learnt from reading others code. I use Eclipse 3.3 for my development. Along with that i use additional plug ins like FindBugs, Lint4J, PMD, CAP, etc., which has configured set of rules for Best Practices, removing code smells, coding guidelines, etc.,

When i started studying design patterns, i came to know lots of design patterns I've been using without knowing they are design patterns. e.g., Decorator (Java IO), Adapter, Singleton, etc., I feel that design patterns should be part of OOPS curriculum in college, it would have been really useful if we had in our curriculum.

Happy Coding :-)

Manivannan P said...

Thats great mani. I would recommend you to have a look at Intellij Idea, a good IDEA. Will be good for code refacroring & inspection.

I'll also try the tools you mentioned.

Ramprasad said...

Tools are actually a great tools
That's how the name got coined. :)

They support the great saga of reusability..

-
http://ramprasad.livejournal.com
http://emacsian.livejournal.com

Admin said...

This is the best post ever, will like to read more from you.
I came across some race horse and a camel supplements for pre race stimulant and anti inflammation. Here you can see more
Buy Poison 15ml Online
Buy Kynoselen 100ml Online
Buy Bio blocker 100ml Online
Order Fluvet 50ml Online
Buy Diurizone 50ml Online
Buy Dexarace 20ml Online
Buy Dexapheylarthrite Online
Dexacortyl 100ml Horse Camel Supplements
Buy Dexa-Chlorid 50ml online you can as well whatsapp text +1(415)237-3209 , wickr: maxme007 or email:miradukes6@gmail.com for more details