Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
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

List of 32 messages in thread
TopicAuthorDate
What is ugly and what not in assembly?            01/01/70 00:00      
RE: What is ugly and what not in assembly?            01/01/70 00:00      
RE: What is ugly and what not in assembly?            01/01/70 00:00      
RE: What is ugly and what not in assembly?            01/01/70 00:00      
RE: What is ugly and what not in assembly?            01/01/70 00:00      
RE: What is ugly and what not in assembly?            01/01/70 00:00      
RE: What is ugly and what not in assembl            01/01/70 00:00      
RE: What is ugly and what not in assembl            01/01/70 00:00      
RE: What is ugly and what not in assembl            01/01/70 00:00      
RE: What is ugly and what not in assembly?            01/01/70 00:00      
Useage of nops            01/01/70 00:00      
RE: Useage of nops            01/01/70 00:00      
RE: What is ugly and what not in assembly?            01/01/70 00:00      
RE: What is ugly and what not in assembly?            01/01/70 00:00      
RE: What is ugly and what not in assembly?            01/01/70 00:00      
RE: What is ugly and what not in assembly?            01/01/70 00:00      
Nic, sorry you don't like my            01/01/70 00:00      
RE: Nic, sorry you don't like my            01/01/70 00:00      
RE: What is ugly and what not in assembly?            01/01/70 00:00      
What Nic didn't say            01/01/70 00:00      
RE: What Nic didn't say            01/01/70 00:00      
RE: Nic, sorry you don't like my            01/01/70 00:00      
RE: What is ugly and what not in assembly?            01/01/70 00:00      
RE: What is ugly and what not in assembl            01/01/70 00:00      
Apology gladly accepted            01/01/70 00:00      
RE: Apology gladly accepted            01/01/70 00:00      
RE: What Nic didn't say, keith            01/01/70 00:00      
RE: What is ugly and what not in assembl            01/01/70 00:00      
RE: John Deans            01/01/70 00:00      
RE: What is ugly and what not in assembl            01/01/70 00:00      
RE: Erik            01/01/70 00:00      
RE: Ijaz            01/01/70 00:00      

Back to Subject List