code structure

properties

Properties vs. Public Variables

I occasionally see code with properties like this: private int name; public int Name {     get { return name; }     set { name = value; } } As I see it, there are three things to consider here. 1. When is a property not a property? When it's a glorified public variable. Why waste everyone&

By Jeff Atwood ·
Comments

clean code

Pretty Code, Ugly Code

Christopher Seiwald's Seven Pillars of Pretty Code [http://www.perforce.com/perforce/papers/prettycode.html] argues that code that looks good, works good: 1. Code changes should blend in with the original style.It should not be possible to discern previous changes to a file without seeing the

By Jeff Atwood ·
Comments