Content deleted Content added
m Signing comment by 86.142.127.235 - "→Can't see the forest for the trees - new section added: " |
|||
Line 128:
During coding, if you have "seen" the code before (for example three or more consecutive lines that are almost identical to ones you have written before), it is already time to consider refactoring by putting the code in a sub-routine (procedure/function) or making it into a reusable macro. Not only will this often make it quicker to write the rest of the program, but it means that the re-organized section of code is more transportable to your next program that might need it. It also means that if the code is subsequently used in another program, it has been partially tested by earlier programs. COPY and PASTE do not acheive the same result since very often the code is subtly changed after copying and probably results in more errors rather than less (the same statements are spread everywhere but have multiple versions - a definite increase in entropy).
I could go on but suffice it to say this article is very misleading. There is really no substitute for good programming and part of that is understanding the code that is being written in its context (so that when something doesn't work, you find out why, not try something new). <span style="font-size: smaller;" class="autosigned">— Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[Special:Contributions/86.142.127.235|86.142.127.235]] ([[User talk:86.142.127.235|talk]]) 08:14, 19 August 2011 (UTC)</span><!-- Template:Unsigned IP --> <!--Autosigned by SineBot-->
|