Saturday, September 17, 2016

ticking time bomb

A few weeks ago I became paranoid about using int/int where bigint/long should be used in T-SQL/C# and using an inappropriate hodgepodge of the two. It's such an easy mistake to make. This is something that can sleep, sleep, sleep as a bug past unit tests, past the testing team, and right into production where it will sit unnoticed until... KABOOM! What to do? The old FramesDirect.com (a .com experience of mine) convention of naming variables with a few leading characters to decry type may be applicable for variable distinctions to distinguish long and bigint? The approach used would ideally be less dirty though. The FramesDirect way was "Hungarian notation" (it's a thing) and a string you might otherwise name address would become sAddress in that paradigm. There were some leading encodings like three characters long. Nasty stuff.

No comments:

Post a Comment