News for hackers. Stuff that matters.
Re:WAT the WTF do programmers use as debug strings? by forgottenpass on Wednesday November 06, 2013 @02:35PM (#6684903)

    "\x1B[1;36;40m" "\n" "\x1B[0;37;40m"
I keep a file sitting around with versions for different colors/languages.
Re:WAT the WTF do programmers use as debug strings? by splawn on Wednesday November 06, 2013 @04:02PM (#6685489)
Thank you for this idea! My worst days will now be in color from now on. :)
Re:WAT the WTF do programmers use as debug strings? by hiharryhere on Wednesday November 06, 2013 @04:20PM (#6685583)
Any chance you could chuck those on a gist? Sounds mighty handy!
Re:WAT the WTF do programmers use as debug strings? by bandy on Wednesday November 06, 2013 @01:02PM (#6684146)
Really? 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.
Re:WAT the WTF do programmers use as debug strings? by caruana on Wednesday November 06, 2013 @01:13PM (#6684241)
really? 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 ...
Re:WAT the WTF do programmers use as debug strings? by bandy on Thursday November 14, 2013 @04:26PM (#6735711)
Really. Identical error and debugging messages that might as well have all said "Foo!" across a 300,000+ LOC subsystem.
Re:WAT the WTF do programmers use as debug strings? by RossM on Wednesday November 06, 2013 @02:12PM (#6684748)
In 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).
Re:WAT the WTF do programmers use as debug strings? by jweather on Wednesday November 06, 2013 @04:30PM (#6685636)
"this should never happen" and/or "how did you get here?"
Re:WAT the WTF do programmers use as debug strings? by claudiowilson on Wednesday November 06, 2013 @02:14PM (#6684768)
I use the ever eloquent, "yolo".
Re:WAT the WTF do programmers use as debug strings? by NoodleIncident on Wednesday November 06, 2013 @01:22PM (#6684336)
herp, derp, flurp, and slurp are immensely useful words for one-off variables in an interactive interpreter.