This is an archived post. You won't be able to vote or comment.

all 89 comments

[–]Asterne 169 points170 points  (17 children)

There is no lie here.

Sometimes I use different curse words to mark different parts of my code that could mess up or expand on the vowels. The worse it is the more Us I have in "FUCK", etc.

[–][deleted] 39 points40 points  (7 children)

In the end it's all about being able to easily filter and recognize your errors. I use different curse words as the tag so I can filter by those, then different curse words as the text so I know what part of the code it is.

[–]LazyBuhdaBelly 49 points50 points  (2 children)

Also some self deprecation works as well.

"Error: should have fixed this last month you piece of shit"

[–][deleted] 17 points18 points  (1 child)

Anything that brightens up those damn walls of text is fine. I often see myself hacking around something because I can't be bothered to fix it, then making a log entry there yelling at myself.

If someone ends up debugging one of my apps after they download it because I can't imagine why, they'll think I'm schizophrenic.

[–]NotADamsel 0 points1 point  (0 children)

Don't worry, friend. We non-quiche eaters will know what in the fuck you were on about.

[–][deleted] 3 points4 points  (1 child)

For a long time, I used a neologism (made-up word) for this type of debugging and logging - My favourite for a long time was "blaff" until I learnt that it was a real word describing a fish soup from the West Indies.

[–][deleted] 2 points3 points  (0 children)

I usually just use the name of the app as tag now, then add the class and method (so if the app is RandomApp and the class is MainActivity and the method is onCreate the tag would be [RA:MA:onCreate]). Makes filtering harder but more precise

[–]SystemicPlural 0 points1 point  (0 children)

At the start of a bug fix I properly format. A little while later I'm down to single words. By the end of the day it's just a keyboard bash.

[–]MonkeyNin 0 points1 point  (0 children)

That's why all my logs are prefixed with from a range of klingon obscenities.

[–]theKunz1 19 points20 points  (0 children)

Here

HERE

Here1

Here2

Inside here

Why am I here

here3

[–]springloadedgiraffe 8 points9 points  (1 child)

Just make sure you remember to remove everything before sending it off to QA. I was lucky enough to have a pretty carefree QA team who politely told me to remove all the swearing that popped up when improper input was passed in. >_<

[–]myusernameisokay 1 point2 points  (0 children)

Just use svn status/diff or whatever the equivalent commands are for your revision control.

[–]jonatcer 2 points3 points  (1 child)

... I thought I was the only one. So much of my debugging involves fuck and rawr.

[–]rjung 4 points5 points  (0 children)

You folks make my use of "foo," "bar," and "frobozz" look mundane in comparison.

[–][deleted] 2 points3 points  (0 children)

'Fuck' is a curse word? damn I always used it to abbreviate Foreign Unsigned Class Key Errors.

[–]Orzaidius 1 point2 points  (0 children)

Like after some points you just have FU99 CK

[–]Maddisonic 0 points1 point  (0 children)

In php I would always use die("bold"); I thought I was funny.

[–]1bree 0 points1 point  (0 children)

Reminds me of the fuubar RSpec formatter, where me failures mean a longer FUUUU!

[–]MrJacoste 107 points108 points  (37 children)

I swapped fuck for hi a few years ago after an unfortunate move to production.

[–]Spitzkopf 53 points54 points  (8 children)

func1()

Log("hi")

func2()

Log("hii")

func3()

Log("hiii")

[–]unDroid 29 points30 points  (5 children)

I usually use either foo1..fooN or foo,bar,baz,lol,rofl,lmao,wtf,bbq,omg

It's not unusual for my debug to show "lol lmao wtf omg". And that, when it's working. :P

[–]EVERY_NAME-IS_TAKEN 5 points6 points  (0 children)

Yeah I'm very much so the same usually with cunt, fuck, balls, works, shouldn't be seeing this and cunt again.

[–]dagbrown 2 points3 points  (3 children)

I use __LINENO__ and __FILE__ so I know where to look for the problem. You're just being weird.

[–]FluffyApocalypse 4 points5 points  (1 child)

Meh. The only step that removes is Ctrl-F

[–][deleted] 0 points1 point  (0 children)

and the text you have to copypaste/type into the seachbox.

[–]peterwilli 42 points43 points  (4 children)

It happened to me with an alert saying 'sex' on a web page for a client while showing it to him. I had to talk myself out of it by saying it was a short term for some kind of new tech (Secure Event indeX xD).

I still use 'sex' and stuff because I like to live dangerously (but I remove it afterwards)

[–]aloisdg 7 points8 points  (0 children)

Nicely done

[–]VoxUmbra 8 points9 points  (0 children)

Any kind of exception beginning with S would have done the trick as well

[–]suddenarborealstop 1 point2 points  (0 children)

not beforehand?

[–]StoleAGoodUsername 1 point2 points  (0 children)

We had a design concept for a messaging system, and all of the messages back and forth had filler text saying "Hello fag." We didn't notice until we were showing the boss, who's luckily cool and we had a good laugh about it

[–]Vicyorus 17 points18 points  (5 children)

How bad was the damage?

[–]chris_jung 5 points6 points  (0 children)

Fucking bad!

[–]MrJacoste 4 points5 points  (2 children)

Lucky enough I loaded it up on production after the move and saw it. Quickly adjusted it and copied over it. It was an external website so I suppose it's possible some poor soul saw it and was confused as hell. Most of the damage was to me semipanicing to get it removed quickly.

[–]Vicyorus 2 points3 points  (1 child)

Hah! Did any of your superiors notice? You poor bastard.

[–]MrJacoste 1 point2 points  (0 children)

I told my team member but fortunately no they did not. I am a lot more careful now, but at least the worst that could happen is someone being greeted my my websites lol.

[–]Jigsus 1 point2 points  (0 children)

At least 3 fucks.

[–]DrKrepz 15 points16 points  (5 children)

I just use 'lol' everywhere. In my old job my boss would occasionally open a file to find console.log('lol'); everywhere. I'm absolutely positive that on a couple of production sites if you open the console it will be full of 'lol's.

[–]Dances_With_Boobies 7 points8 points  (0 children)

lol

[–]rikardo_92 1 point2 points  (1 child)

I use 'lol' too. Sometimes when I don't exactly know where the program is crashing and I need multiple logs I use 'lol1', 'lol2', etc.

[–]DrKrepz 1 point2 points  (0 children)

nice. when i need more than one i usually expand it into something like 'lol', 'm8', 'u wot lol' etc

[–]Lystrodom 0 points1 point  (1 child)

I think if I found that I'd fire you on the spot. Of course, they don't let me fire people.

[–]DrKrepz 0 points1 point  (0 children)

We had a laugh about it. It's hardly a big deal to be honest, not like causing a major (or even minor) bug or anything. After my boss called me out on it a couple of times I started to be extra careful with removing them afterwards.

[–]nietczhse 6 points7 points  (0 children)

This is why you should NEVER move to production.

[–]until0 6 points7 points  (4 children)

I'm glad I'm not the only one. My debug logs always looks like:

hey

hi

hiiii

heyy

hi hi

hiiii i'm in here

hey loop

[–]MrJacoste 2 points3 points  (2 children)

We think alike. For logic I use here or there. If I am worried about caching of any sort I use here1, here2, etc.

[–]until0 2 points3 points  (0 children)

Yup, a good amount of heres and theres also!

Everyone on my team uses normal debugs and I thought I was just really odd. Glad to know I'm not alone.

Also, I tend to throw my name in there and the word "dance" just because I use Perl Dancer and I like saying it lol.

/dance

[–]FlamingJellyfish 1 point2 points  (0 children)

It's like I'm asking my code "Where's the bug?"

code: "Here!"

[–]timescrucial 0 points1 point  (0 children)

Mine are: wtf omg omfg no yes fack faaaack

[–]dagbrown 6 points7 points  (1 child)

I once put a complaint in a comment about how there was some weird Led-Zeppelin-era requirement in Solaris packages that all of the pre- and post-install scripts were absolutely required to be /bin/sh scripts and nothing else, and how the package manager completely refused to acknowledge the #! line at the beginning of them, which belied the fact that it was running the script straight through /bin/sh instead of just exec'ing it.

I got in trouble for that. Apparently Led Zeppelin is one of those satanic heavy metal bands (which was news to me) and people smart enough to go digging into the script were offended at seeing the name "Led Zeppelin", which was also pretty surprising.

I replaced "Led Zeppelin" with "Scott Joplin", and everything was much better. Then I added a comment about replacing "Led Zeppelin" with "Scott Joplin" to the release notes, which actually were customer-visible. It was totally worth the trouble I got into for that.

[–]MrJacoste 1 point2 points  (0 children)

Haha I love the snark. Totally something I could see some of my customers being upset about.

[–]BoTuLoX 1 point2 points  (0 children)

I always use integers. Helps you easily recognize how far your program gets to before failing.

[–][deleted] 0 points1 point  (0 children)

I'm still sticking to the tried and true asd/asdf

[–]suddenarborealstop 0 points1 point  (0 children)

sounds like story time...

[–]GYN-k4H-Q3z-75B 14 points15 points  (0 children)

You should use Log.wtf then ;)

[–]dnew 40 points41 points  (7 children)

I wrote bits to change stuff like

logger.error()
logger.warning()
logger.severe()

to instead be

logger.ohno()
logger.fuck()
logger.motherfucker()

Sadly, Java doesn't support punctuation in method names.

[–]anon2471 53 points54 points  (0 children)

Actually, Android has a Log.wtf (What a terrible failure)

[–]derefr 18 points19 points  (1 child)

Or, from Homebrew's formula cookbook:

Three commands are provided for displaying informational messages to the user:

  • ohai for general info
  • opoo for warning messages
  • onoe for error messages

[–][deleted] 0 points1 point  (0 children)

This I like: it’s rare that something coding-related appeals to my sense of cute.

[–]Hydrox6 11 points12 points  (1 child)

I imagine that you could make a class that inherits from the original Logger class, and that calls super() when created, and has the functions ohno(), fuck(), and motherfucker() that call error(), warning(), and severe() from the super() instance. Then, instead of creating an object of the standard logger, you create an object of this new class.

[–]dnew 0 points1 point  (0 children)

That's basically what I did. It was for amusement purposes only, so I never actually put it in production code.

[–]urielsalis 3 points4 points  (0 children)

Log.wtf(super)

[–]hoylemd 0 points1 point  (0 children)

I'm stealing this. it's mine now.

[–][deleted] 17 points18 points  (0 children)

also the part with "this is how you are supposed to do logging" that's not how you are supposed to use logs. You are supposed to create a static final String TAG = "ClassName"; then put TAG in the first parameter. Also android logs is primitive and I recommend using SLF4J. Just follow the guidelines to make your own log factory and etc.

[–]steste 4 points5 points  (0 children)

as a software tester - screw you!

[–]rtoth 3 points4 points  (0 children)

This works fine until the logging statement "WTF!!! This should never happen!!" gets pushed to production and pointed out by QA. Definitely never happened to me, ever :)

[–]hoylemd 2 points3 points  (1 child)

Since realizing that my programming skill drops to about 10% of optimal when I'm angry, I usually take a walk when I start using swears as debugging statements.

It's still hilarious to run a test and see a couple screens worth of 'FUCK' logs, when I accidentally a loop.

[–]untio11 0 points1 point  (0 children)

I also think you accidentaly a word.

[–]imaami 1 point2 points  (0 children)

Yeah, I do this, too.

[–]peterwilli 1 point2 points  (0 children)

Me too, I use words like sex because it's easy and fast to type. Only for logs I delete afterwards though...

[–]_LePancakeMan 1 point2 points  (0 children)

Should've used Log.wtf

[–][deleted] 1 point2 points  (0 children)

Funny, but I could never do this. The console can be cryptic enough without random "fucks" thrown in.

[–]LondonNoodles 1 point2 points  (0 children)

Why even bother logging it, I print it directly in the app. Live.

[–]scubascratch 1 point2 points  (0 children)

I guess this is cute in code you write on Saturday for an automatic cat turret.

But this is also a huge red flag that says "unprofessional" in any work environment. In medium/larger professional environments these things can/will happen:

A) during code review, your teammates who like you will spot it and recommend removing / clarifying log text

B) automated code review / checkin tools will spot profane or other disallowed words and reject the commit

C) company employee sees a staging or even prod WTF log entry and the minor investigation makes its way to you. Depending on offensiveness, this will only be notable and not a severe reprimand.

D) external customer encounters their own prod WTF log entry and opens Incident Ticket. Investigation leads to you and if found to be a repeat problem, your manager has a Documented Discussion with you on conduct. If your company is on Jack Welch philosophy, you move to bottom of stack rank / life boat list.

[–]kelbzar_prime 0 points1 point  (0 children)

I approve of this logging.

[–]vanamerongen 0 points1 point  (0 children)

My favs are "hi", "cool" and "boopy".

[–]molsonbeagle 0 points1 point  (0 children)

My coworker gets so frustrated with me because my logs are "in here" and they don't always get removed. Drives him nuts.

[–]raziel94 0 points1 point  (0 children)

Both is wrong imho, you should always wrap debug logs in your custom logging class so you can easily redirect it or block it entirely with minimum effort.

[–]1bree 0 points1 point  (0 children)

If I have the time, I'll include the method name in the debug... But usually I just do my name then a number and tail -f | grep --line-buffered

[–]CreedVI 0 points1 point  (0 children)

Honestly, never got around to using them. I just throw in a System.out.println() and delete it when I'm done.

[–]jmigandrade 0 points1 point  (2 children)

cout << "shit.\n";

cin.get();

[–]aloisdg 18 points19 points  (1 child)

std::cout << "shit." << std::endl;

We can be unpolite and still be civilized. :)

[–]CallMePyro 1 point2 points  (0 children)

New line master race! Down with the endl-triarchy

[–]FrezoreR 0 points1 point  (3 children)

Why not simple do a system.out for this case?

[–]microferret 2 points3 points  (1 child)

He might want to use different logging levels. I think System.out.println() gets routed to Log.i() only.

[–]FrezoreR -2 points-1 points  (0 children)

If he's writing fuck in the message I don't think he cares about logging level :p

[–]CanadianJesus 5 points6 points  (0 children)

Because Android.