Linked by Thom Holwerda on Mon 3rd Sep 2012 20:46 UTC, submitted by MOS6510
General Development I like this one: "By definition, a program is an entity that is run by the computer. It talks directly to the CPU and the OS. Code that does not talk directly to the CPU and the OS, but is instead run by some other program that does talk directly to the CPU and the OS, is not a program; it's a script." Here's the other eleven.
Permalink for comment 533722
To read all comments associated with this story, please click here.
RE: Copy/Pasting
by Laurence on Mon 3rd Sep 2012 22:39 UTC in reply to "Copy/Pasting"
Laurence
Member since:
2007-03-26

"4. Copy/Pasting is not an antipattern, it fact it helps with not making more bugs"

I think what he/she means is that side effects are bad.

I actually kind of agree with their point. I just think they made their point terribly.

It does make a lot of sense to reuse existing code, not just because it's quicker that writing entire methods from scratch, but because (hopefully) you've already tested that code as well.

Obviously there needs to be a balance though, eg if you're having to kludge together code just to make it possible to paste source from another project, then you really should have been writing that code afresh instead of cutting corners.

But on the whole, programming is as much about reusing existing tools to fix new problems as it is about writing new tools too.

[edit]

--------------------------------------------------

10. Classes should fit on the screen. (+22/-7) by Jay Bazuzi

If you have to use the scroll bar to see all of your class, your class is too big.

Code folding and miniature fonts are cheating.


hahahaha one of my old college lecturers actually used to teach this.

Edited 2012-09-03 22:48 UTC

Reply Parent Score: 5