3 ms·
In one place, you say that programmers should pre-validate that inputs are not long. I would suggest quantifying that somehow. I suspect some developers will no
by hyperpape 6y ago
In one place, you say that programmers should pre-validate that inputs are not long. I would suggest quantifying that somehow. I suspect some developers will not realize that a 30 character input is "long".
- citrin_ru 6y agoAt the same time some sites/systems impose too strict size limits which makes impossible to enter e. g. a long name or a long address. And such problems are almost inevitable if a programmer makes assumptions about input data based on a limited personal experience. https://github.com/kdeldycke/awesome-falsehood https://github.com/kdeldycke/awesome-falsehood tries to address this.
- davisjam314 6y agoThank you for the suggestion. I added notes about typical sizes depending on the complexity of the regex. TLDR: ~30 chars is too long for exponential regexes. 1K-5K chars are too long for quadratic regexes. Higher polynomials blow up somewhere between 100 and 1000 characters.