11111111111111111111111111111111111111111111111111111111111111+1

Archive for the ‘Day Job’ Category

CAS Number Format and Check Digit Validation

CAS numbers are used to uniquely identify every chemical man can find or dream up. There are a staggering 60,000,000+ in the CAS number registry and 12,000 more are added daily. These numbers have a specific format mask with a check digit at the end. For a project I needed a simple client side CAS# […]

Regular Expressions Suck

All I want is a simple mask for valid JavaScript numbers. I expect a bit of complexity in handling exponents, Hex and the Octal formats all in one, but I wasn’t expecting something this cryptic. I like code that you can simply read, whereas this monstrosity requires a full page of explanation. /^[+-]?(0[0-7]+|0x[\da-f]+|((0|[1-9]\d*|0\d*[89]\d*)(\.\d*)?|\.\d+)(e[+-]?\d+)?)$/i Blah! EDIT: […]

Technology Selection

The technology choices a startup makes will haunt them forever. No matter which selections are made they won’t be a perfect fit and there will be some degree of pain down the road. It doesn’t matter how careful and insightful the vetting process was or what other headaches were averted. No, it will all be […]