# How salty is your code?

**URL:** <https://boards.straightdope.com/t/how-salty-is-your-code/288385>\
**Category:** In My Humble Opinion\
**Created:** [February 4, 2005, 4:36pm UTC](https://boards.straightdope.com/t/how-salty-is-your-code/288385 "2005-02-04T16:36:36Z")\
**Posts on this page:** 8\
**Page:** 2

<div class="post-metadata">

**Author:** ![squeegee](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/squeegee/32/14537_2.png) [@squeegee](https://boards.straightdope.com/u/squeegee)\
**Post date:** [February 5, 2005, 4:36am UTC](https://boards.straightdope.com/t/how-salty-is-your-code/288385/21 "2005-02-05T04:36:16Z")

</div>

Hmm, I have the source to a very large commercial app handy, of the 1M+ lines- of-code size, so I just grepped it and found a few instances of F\*\*K, but all in third-party code that had been “adopted” into the core, and apparently not been cleaned well.

// Fucking idiot user. And by that I mean me.

// Fixed [serious bug caused by numbskull coding]. SHIT. FUCK. [this bug] affects all [platform] versions from v3.0 to 4.04. SHIT.

// Note the fuckup: [fuckup explained]

// Select it into the device and copy the fucker

// Fuck sync. Its back to async.

// [commented out setting of a struct member] what the fuck was this set for?

// TODO: this is clearly wrong, but [the previous approach] is fucked up, too.

// Swap out failed. Fuck. Oh well. [throws fatal error]

There’s also a popular imaging app I’m aware of where the programmers intentionally leave comments of this sort in the code: // BULLSHIT - initials - this code is clearly wrong for the following reasons [reasons explained]. It’s basically a vulger version of a FIXME or TODO convention, but named because the code that someone found is BULLSHIT (substandard) and should be cleaned up.

---

<div class="post-metadata">

**Author:** ![Shalmanese](https://avatars.discourse-cdn.com/v4/letter/s/45deac/32.png) [@Shalmanese](https://boards.straightdope.com/u/Shalmanese)\
**Post date:** [February 5, 2005, 12:38pm UTC](https://boards.straightdope.com/t/how-salty-is-your-code/288385/22 "2005-02-05T12:38:02Z")

</div>

> [@AHunter3](#):
>
> c) I’ve hidden an occasional silly easter egg. I had a script attached to a portal field that would go off to the related record and call a script in that other file, and I had a couple users persist on trying to click on it while in Find mode, which yielded a slew of error messages. Rather than simply suppress them and pop up a message reminding them they couldn’t do that in Find mode, I had the window zoom in and out 400% / 25% back and forth a couple times, beeping, and then speak out loud “Bad, very bad. System error. Crashes. Flames and screaming and babies crying for their mama.” before popping up the message “No, you can’t do that in Find Mode! Shall I put you in Browse mode and take you to the Purchase Order, or just leave you here in Find Mode?”

This not only strikes me as not funny and potentially alarming to novice users, but just plain bad design as well. If you don’t want users to click on a script in Find mode, then DONT ALLOW the script to be clicked in Find mode.

---

<div class="post-metadata">

**Author:** ![monica](https://avatars.discourse-cdn.com/v4/letter/m/a183cd/32.png) [@monica](https://boards.straightdope.com/u/monica)\
**Post date:** [February 5, 2005, 9:32pm UTC](https://boards.straightdope.com/t/how-salty-is-your-code/288385/23 "2005-02-05T21:32:35Z")

</div>

I’m in a computer science class, so I can’t use any strong language without upsetting the teacher.

---

<div class="post-metadata">

**Author:** ![bitwise](https://avatars.discourse-cdn.com/v4/letter/b/ea5d25/32.png) [@bitwise](https://boards.straightdope.com/u/bitwise)\
**Post date:** [February 5, 2005, 11:35pm UTC](https://boards.straightdope.com/t/how-salty-is-your-code/288385/24 "2005-02-05T23:35:48Z")

</div>

This reminds me of my compilers professor. We had to write some kind of code that hooked into his. I would see errors like “You are fucked.” Then, I searched through his code to find the error and saw

throw new Exception(“You are fucked”);

in several places. I generally found this to be annoying, because the error message didn’t tell me why I was fucked.

---

<div class="post-metadata">

**Author:** ![LtningBug](https://avatars.discourse-cdn.com/v4/letter/l/73ab20/32.png) [@LtningBug](https://boards.straightdope.com/u/LtningBug)\
**Post date:** [February 6, 2005, 9:22am UTC](https://boards.straightdope.com/t/how-salty-is-your-code/288385/25 "2005-02-06T09:22:36Z")

</div>

Hmm. Lemme think.

Curse words in my variable names? Nope, all those variables are appropriately named (using something close to Hungarian notation: m\_iParamCount [actual Hungarian would be m\_cParams]).

Curse words in my comments? Comments? And those would be?

Yeah, so, um, when I do write comments in my code, no salty language there either.

And anyway, the people I work for have scripts they run on any shipping code to find salty language.

---

<div class="post-metadata">

**Author:** ![nivlac](https://avatars.discourse-cdn.com/v4/letter/n/3bc359/32.png) [@nivlac](https://boards.straightdope.com/u/nivlac)\
**Post date:** [February 6, 2005, 10:13am UTC](https://boards.straightdope.com/t/how-salty-is-your-code/288385/26 "2005-02-06T10:13:30Z")

</div>

I have never used profanity in any comments in my code because those are written specifically for someone else to read, and you don’t want to offend them. But I have used “interesting” names for variables, but nothing too strong. After all, some variables are indeed crap or dung or do suck.

---

<div class="post-metadata">

**Author:** ![Just\_1](https://avatars.discourse-cdn.com/v4/letter/j/9e8a1a/32.png) [@Just\_1](https://boards.straightdope.com/u/Just_1)\
**Post date:** [February 6, 2005, 1:29pm UTC](https://boards.straightdope.com/t/how-salty-is-your-code/288385/27 "2005-02-06T13:29:33Z")

</div>

I remember once handing in a program for a CS class at uni that was in a file named “thisbytes”. Bytes? Get it? Does that count?

While at uni, I also competed in an ACM programming competition, where you program in a team of 3 and are given a bunch of problems to solve in 6 hours. One group (as explained to me by the group after the competition) were working on a problem that required them to handle 4 or 5 different situations. They deliberately left out one of these situations, as they didn’t have the time to complete it. So instead, during this situation they had their program print out something like “Oh fuck they’re testing it”, along with more profanity.

Now, when a team finishes a program that is a solution to a problem, they submit their program and it is run by some administrator against a series of input to see if the program is correct. And of course, they tested every possible situation, and so they saw the message. The administrator is then meant to hand a piece of paper to the group explaining to the group whether their solution was successful, and if not, why. We were all wondering why at the time the admin guy walked up to the group to hand them their results, and was visibly struggling not to laugh.

---

<div class="post-metadata">

**Author:** ![Go\_You\_Big\_Red\_Fire\_Engine](https://avatars.discourse-cdn.com/v4/letter/g/eada6e/32.png) [@Go\_You\_Big\_Red\_Fire\_Engine](https://boards.straightdope.com/u/Go_You_Big_Red_Fire_Engine)\
**Post date:** [February 6, 2005, 2:06pm UTC](https://boards.straightdope.com/t/how-salty-is-your-code/288385/28 "2005-02-06T14:06:44Z")

</div>

Does putting in a Uni assignment with “I’m sleeping my way to the top 😉 ;)” in the comments count?

Well I thought it was funny. I used to give test programs names. Like, LetsTestThisFucker, WhyTheFuckWontYouWork, etc etc. Frustration.

[Previous page](https://boards.straightdope.com/t/how-salty-is-your-code/288385.md?page=1)
