Programming-y things… (2017-02-19)

  • Code is more often read than written
  • Locality is execution is important. So is locality of reference.
  • The more code you touch, the more potential bugs you introduce.
  • Tests can confirm the presence of bugs, not the absence of bugs.
  • Keeping comments in synch with the code right next to it is nearly impossible. But it’s much more possible than keeping it anywhere else.
  • Can methods be too short? Sure. But just between you and me, how often have you seen that?
  • Just because they’re rows in the same database table doesn’t mean they’re the same kinds of things. (I’m not a great fan of factories — but dealing with the impedance mismatch of ORM-land is a place where they really, really belong.)
  • Use single assignment as much as possible. Introducing a new variable is probably cheaper than adding in the amount of reasoning necessary when reusing variables.
  • Nearly any rule can be broken if the scope within which the effects can be seen is sufficiently small.
  • You can tell a lot about code from how it looks from across the room.
  • Write code that is easy to delete, not easy to extend. (This is one of my favorites of recent days. You should probably read it.)
  • Dammit…SIMPLE!!! Don’t give the “surprising behavior” anywhere to hide!!
  • Data that serves different purposes should not live together. It will cause trouble.
  • Writing fearlessly does not come free. Or easy. But it can be cheap.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s