| ??? 08/16/02 21:25 Read: times |
#27371 - RE: What is ugly and what not in assembly? |
An observation of mine: "beautiful code works, ugly code does not".
A statement/philosophy of mine:" I do not give a hoot if a program works if it is maintainable". I have seen much "working" code that was not maintainable and invariably there has been "that little glitch" which was impossible to find in the spaghetti. Beatutiful maintainable code is not a result of programming, it is a function of system design taking place before the first line of code is written. A few comments (please use many in your programs) 1) short variable names are OK if the comments tell the story long names rarely do e.g. the ultimate piece of balderdash i have heard is "C is self-documenting". Users of long names often end up abbreviating the long name so that they end up with a long meaningless name and believe that saves then from the duty to comment. 2) I detest comments that explain the instruction, not the program such as: push acc;save the accumulator on the stack. 3) plenty of blank lines between subroutines/functions, none inside. 4) every subroutine must in the header explain what it alters. maybe more to come, this is it for now. Erik |



