ความคิดเห็นที่ 3
Nice post :-) coz most of programmers dont pay attention to "comments" and "readable code" at all or less!!! in a real software industries these r the most important issue. even if u wrote a wonderful program run fast as constant time take very few Ks but unreadable, no one gonna hire u or they gonna fire u soon.
For stylist, in java IDE tools like VAJ or VAME or brand new Eclipse, provide "code format" feature that u can write any style as u want, and ivoke that feature, it will automatic adjust ur code to be standard, which it's been set as default format.
For the comment is a bit tricky coz no tool provide u an auto comment!! then u have to do by urself and make sure others understand what u said. The common rule is, u ve to say somthing in general for those class or method (i.e. what does this class or method do, NOT how). And dont try to specify ur explanation specifically like, "myHash has myKey be a key and myObj be a value which obtain from blah blah...... " coz if u change something in program and forget to change the comment, what's blizzard !! if someone try to hack ur code!!
Oops! a good programmer prefer to write the comments before start writing code!!
btw, there r lots of rule u can finde at sun web site on the how to "documentation" page.
จากคุณ :
:-) - [1 เม.ย. 2545 02:23:40]
|
|
|