If I had a dollar for every hour I spent debugging strange code issues because of a trailing space....
-
If I had a dollar for every hour I spent debugging strange code issues because of a trailing space....
-
R.L. Dane :Debian: :OpenBSD: 🍵replied to Mike :nixos: last edited by
Very curious, in which language does a trailing space introduce breakage?
-
@codemonkeymike Always "trim" your strings. That's the lesson I learned.
-
Mike :nixos:replied to R.L. Dane :Debian: :OpenBSD: 🍵 last edited by
@rl_dane well really its an issue with the Kit (convertkit) API.
A user had a tag in their account WITH a trailing space.. (why does Kit allow this? no idea)
But I was trying to find a match with no space. (didnt find a match clearly) so went to create the no space tag.. but the Kit API crashed because it didnt let me create the non space tag because it thought it was equal..
So not language specific really..
-
@jenselbaek i always trim MINE.. but the lesson is I apaprently have to trim incoming strings from other APIs too because I can't trust that they trimmed haha
-
@codemonkeymike @jenselbaek well, if i put it on you to trim my strings, that gives my code better benchmarks
🧐
-
@rasmus91 @jenselbaek you sneaky son of a.....