6 tips for writing more maintainable code
-
-
Less vertical scrolling anyway... ;)
.dan.g. AbstractSpoon Software email: abstractspoon-todolist-support(at)googlegroups(dot)com
-
Less vertical scrolling anyway... ;)
.dan.g. AbstractSpoon Software email: abstractspoon-todolist-support(at)googlegroups(dot)com
-
Less vertical scrolling anyway... ;)
.dan.g. AbstractSpoon Software email: abstractspoon-todolist-support(at)googlegroups(dot)com
Simple, set your text editor to wrap lines.
"If you don't fail at least 90 percent of the time, you're not aiming high enough." Alan Kay.
-
REM Please ignore that I don't actually know how to write proper VB6 :laugh:
REM LALALALALALAicanthearyouLALALALA
REM Makes all error messages go away
On Error Resume Nextsub UnpolishableTurd
Count = Count/MAGIC_NUMBER_CONSTANT REM ZERO_CONSTANT defined as 0 elsewhere
end subREM confirms UnpolishableTurd doesn't error
sub ICanHazUnitTest
UnpolishableTurd()
end subQuote:
Comment your code
Got comments
Quote:
Don’t forget about error checking
I handled every possible error
Quote:
Use less code
In as little code as possible
Quote:
Write code that can be easily modified
That's why I'm using a constant instead of hard coding my magic number
Quote:
Write code that can be easily tested
I have tests
Quote:
Fix the problem, not the symptoms
Oh elephant
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, waging all things in the balance of reason? Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful? --Zachris Topelius Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies. -- Sarah Hoyt