4 ms·
WAT the WTF do programmers use as debug strings?
- bandy 13y agoReally? I give location and context and the Why of the message. I make sure that every message is unique (unlike the code I changed in a certain once-prominent US firm's three-letter operating system) as well. I clearly know nothing and shouldn't be in the profession.
- caruana 13y agoreally? i think you might be mistaking exception logging for quick debug lines, like when a certain line isn't being hit for some reason and you just want to quickly know if it does hit. you would clearly delete these quick messages before checking in. No need to get so dramatic ...
- bandy 13y agoReally. Identical error and debugging messages that might as well have all said "Foo!" across a 300,000+ LOC subsystem.
- NoodleIncident 13y agoherp, derp, flurp, and slurp are immensely useful words for one-off variables in an interactive interpreter.
- RossM 13y agoIn PHP I tend to do something like: dd(__DIR__.'/'.__FILE__.':'.__LINE__); Which prints out the current script and line, and then stops execution (where dd is var_dump+exit).
- claudiowilson 13y agoI use the ever eloquent, "yolo".
- forgottenpass 13y ago"\x1B[1;36;40m" "\n" "\x1B[0;37;40m" I keep a file sitting around with versions for different colors/languages.
- splawn 13y agoThank you for this idea! My worst days will now be in color from now on. :)
- hiharryhere 13y agoAny chance you could chuck those on a gist? Sounds mighty handy!
- jweather 13y ago"this should never happen" and/or "how did you get here?"