Teaching (Computing)

From Jtkwiki
Revision as of 11:26, 9 February 2010 by Jtkim (talk | contribs)
Jump to navigationJump to search


Common Programming Problems and Mistakes

Anti-Patterns

The anti-patterns described are quite basic and thus may be of little interest advanced programmers. I list them here mainly because I seem them repeatedly appearing in beginner's coding. Presumably some of these are widely known and have names other than those I use below. You're welcome to point out these in the discussion page.

Parallel Indexes and Arrays

Synopsis: Several attributes are stored in several arrays, such that attributes with the same index pertain to the same thing.

Problem: If it's one (coherent) thing, then it should be represented as one instance.

Solution: Use one array consisting of instances that each contain several attributes.