118
\$\begingroup\$

Your boss managed to read the secret hidden message. He didn't end up firing you, though, he just made you a secretary and forbade you from writing code.

But you're a programmer. You need to write code. You must code.

Therefore, your code needs to look as similar to English as possible, make sense, and look as little like code as possible. Your code should take a list of integers (either in a function, or STDIN), and return that list sorted (returning it, or STDOUT).

Any language can be used, but I'm looking for the most creative solution, (kudos if your code looks like a business letter).

This is a popularity contest!

\$\endgroup\$
11
  • 18
    \$\begingroup\$ whitespace to the rescue? \$\endgroup\$
    – kaine
    Commented Sep 5, 2014 at 19:26
  • 20
    \$\begingroup\$ Or SPL. \$\endgroup\$
    – Dennis
    Commented Sep 5, 2014 at 20:06
  • 6
    \$\begingroup\$ I thought of SPL too, but Chef may be fun as well :P \$\endgroup\$
    – Adriweb
    Commented Sep 7, 2014 at 0:12
  • 1
    \$\begingroup\$ Funny.. there are no ruby submissions yet! :P \$\endgroup\$ Commented Sep 9, 2014 at 8:22
  • 1
    \$\begingroup\$ SPL might be possible, but it's severely limited on how big the list may be. I might attempt it at home tonight. Would be a really weird business letter to read though. \$\endgroup\$
    – Nzall
    Commented Sep 10, 2014 at 11:50

28 Answers 28

178
\$\begingroup\$

GolfScript

Dear Boss Man.

It came to my attention that my keyboard needs replacement; the keys required to write the
symbols ~ $ ` . and } are not functioning properly.

It's very difficult to work like this! Please instruct the IT department to exchange the faulty
keyboard as soon as possible.

Sincerely,

Dennis

Try it online!

How it works

  • Undefined tokens (e.g., most English words) are noops in GolfScript.

  • . ; duplicates the input string and discards the copy.

  • ~ $ evaluates the input string and sorts the resulting array.

  • ` inspects the array (for pretty printing).

  • . and duplicates the output string and discards the copy.

  • } is a "super comment" since it is unmatched; everything following it is ignored.

\$\endgroup\$
7
  • 126
    \$\begingroup\$ I'm guessing you wrote this on your other keyboard? \$\endgroup\$
    – Geobits
    Commented Sep 5, 2014 at 20:23
  • 16
    \$\begingroup\$ Perhaps he wrote it with the mouse keyboard hidden in the accessibility gaboodle? \$\endgroup\$
    – Tally
    Commented Sep 7, 2014 at 19:34
  • 54
    \$\begingroup\$ It's an inline comment... it's a block comment... it's a SUPER-COMMENT! \$\endgroup\$
    – Doorknob
    Commented Sep 7, 2014 at 19:55
  • 11
    \$\begingroup\$ @Geobits: Let's assume that "are not functioning properly" translates to "requires multiple attempts to eventually get the characters on the screen" \$\endgroup\$
    – justhalf
    Commented Sep 8, 2014 at 1:37
  • \$\begingroup\$ Or he used Character Map. \$\endgroup\$
    – dan04
    Commented Sep 9, 2014 at 2:42
124
\$\begingroup\$

PHP

Defines a function called item that will sort an array that you pass it.

Dear Boss,
I have successfully discovered all brackets.
The ones marked with question marks are the ones which I am not sure about.
The ones marked with asterisks can be used both as an opening and closing delimiter.
(
)
{
}
[
]
>?
<?
/*
'*
"*

Thank you for reading my memo. In other news, the */ function item (#12 in the list of things that have an asterisk before them) was discovered recently, which I read on a local news site.
#12 is my favorite function item! Just thought you'd be interested. Sorry if this is too off-topic; here's some business stuff. Imagine that you had some (let's say you have a combination of $10
& $money) # of dollars (i.e. you have $10 + $money). Now, here's the important part. It's so important, I'll separate it from the rest of this message with the brackets I discovered:

{
#10 in my personal list of things to remember about money management is that you have to be careful. I still haven't been able to
sort #9 out yet (I bought the manual from someone else), but #9 also seems to be about being careful. You also have to guard the dollars
($money); #13 says that if you don't protect them by putting them in a bank or something, they might be stolen.
}

   //-----------------------\\
  //   Signed,               \\
  //   Your great employee   \\
   //-----------------------\\

It looks much better if you paste it into a text editor and resize the window so that you can see the entire thing on your screen at once.

\$\endgroup\$
3
  • 133
    \$\begingroup\$ "I have successfully discovered all brackets." Someone's going for employee of the month! \$\endgroup\$ Commented Sep 6, 2014 at 0:19
  • 24
    \$\begingroup\$ -1: You missed « and ». (In seriousness, +1.) \$\endgroup\$
    – Kevin
    Commented Sep 6, 2014 at 21:19
  • 6
    \$\begingroup\$ Wow man. :D Can't stop laughing \$\endgroup\$
    – Ven
    Commented Sep 8, 2014 at 15:12
77
\$\begingroup\$

Python 2

'''''''''''''''''''''''''''''''''''''''''''''
One of the phones in the office seems to be broken, so it needs to be fixed.

''''''''''''''''''''
This memo was made while testing the functionality of its buttons since
some of them didn't seem to work.
''''''''
1 (no alphabets) working with no problem
''''''''
abc working with no problem
'''''''''
def working (partially):
 please                                              =( 'o" :\
 at least I figured out that this was a problem!     :')
 # list (phone number list) was missing as well, so I need to:

 #1
 print (please, sorted (partially)) [1] # list, and [2] the memo
 #2
 return
 #3
 check (making-sure, ghi-jkl-etc. works)

''''''''''''''''''
\$\endgroup\$
1
  • 52
    \$\begingroup\$ +1 love how you snuck in def to mean 'the letters on phone key 3'. \$\endgroup\$ Commented Sep 6, 2014 at 19:25
73
\$\begingroup\$

Python 2

'''
                        5th of September 2014

Dear Boss,

I  am writing    this Mail because     i want to discuss  
 the recent   incident.
I am Thankful    that you did not fire   me, and gave me a secretary position instead.
I dont have any    experience in being a     sec retary and I am not very. good at   writing mail,
so please   excuse any spelling,   grammar or   formating   errors  in     this mail.

I will       certainly     try to improve  and do   my best in my new job      and will'''
'from now on strictly ';exec'''ute your orders.   =
Firstly      i want to    sincerly        apologize my   dumb behaviour,it was  idiotic ( and childish ).
I   really  ;apologize  to you. it  wont  .happen again, sir. If   i   could  
 only   reverse   the  timeline       (to undo it all). Then i would;
I   really   promise to never  write  code in any form

Can i talk about that   in   a   meeting with  you?
  Maybe    today at'''[4::15]#in the afternoon?

Finding the right words was a real pain.

Input: [1,7,4,3]
Output: [1,3,4,7]

\$\endgroup\$
3
  • 59
    \$\begingroup\$ This looks like those emails I get from Nigeria lol \$\endgroup\$ Commented Sep 8, 2014 at 4:49
  • 7
    \$\begingroup\$ @ChrisCirefice Well, these mails probably contain hidden code as well ;) The spacing and somewhat poor wording in my code is because every 15th character of the string after the exec forms a new string which is then executed. So the whole program is basically exec"y=input();y.sort();print y" \$\endgroup\$
    – Markuz
    Commented Sep 8, 2014 at 12:45
  • 2
    \$\begingroup\$ The ''' multiline string at the top is a dead giveaway, sadly, but +1 for "from now on strictly ';exec'''ute your orders." and good effort :p \$\endgroup\$
    – Thomas
    Commented Sep 12, 2014 at 10:47
68
\$\begingroup\$

NetLogo

To Manager [IT]

Let Sue sort it; then
show Sue the end to the end

With indentation and capitalization changes, the code becomes clear(er). This defines a function called manager which takes a list as input and prints the list sorted.

to manager [IT]
  let sue sort IT; then (semicolons introduce a comment)
  show sue
  the
end

to the
end
\$\endgroup\$
2
  • 9
    \$\begingroup\$ Definitely doesn't look like code. \$\endgroup\$
    – Dennis
    Commented Sep 9, 2014 at 17:40
  • 1
    \$\begingroup\$ I like this one a lot. \$\endgroup\$ Commented Sep 9, 2014 at 18:11
62
\$\begingroup\$

C

Input as space-separated list through STDIN, output as space-separated list through STDOUT.

Dear Boss, 

I have made for you a decision about my employment a t your company. At about noon 
a letter explaining this shall be presented to you, as I am a lazy person. As you 
are a fool, I will say no more. And I look forward to never seeing you again.

Insincerely, 
Steward Pitt

This should be compiled with:

gcc bossletter.c -o bossletter -Dam='+++' -Dwill='---' -Dthis='{' -Dhave=';' 
-Ddecision=',' -Dquit='*' -Dfor='(' -Dmy=')' -Dbrain='}' -Dlie=']' -Dnoon='-quit'
-DD='' -Dto='D' -Dyou='D' -Dfool='you' -Das='to' -Dday='D' -Dno='fool' -Dcake='Pitt'
-Dlook='you' -DPitt='the' -Dthe='as' -DBoss='a[9999 lie' -DAs='a have' -Dlazy='my' 
-Dperson='lazy have company' -Dyour='this' -DInsincerely='a' -Dcompany='b' 
-Demployment='int quit' -DDear='struct this employment a have brain b have' 
-Dbe='scanf for' -Dis='I[' -Dnever='for presented " " decision' -Dthat='4 decision' 
-Dagain="my have b" -Dt='decision quit about have' -Dshall='while for' 
-Dpresented='"%" to "d"' -Dletter='have brain' -DAt='a have return quit' 
-Dmore='have b' -DAnd='a have shall' -Dare='qsort for' -Dforward='--my printf' 
-Dexplaining='main for my' 
-Dsay='1 decision that made my day' 
-DSteward='Boss have no brain' 
-Dseeing='the cake is a lie'

The code expands to:

struct{ int *a; } b;
a[9999], I;
made(a, about) int *a, *about; {
    b.a;
    return *about - *a; 
}
main(){
    while(scanf("%d", I++ + a));
    b.a;
    qsort(a, I-- - 1, 4, made);
    b.a;
    while(I--) printf("%d ", I[a]);
    b.a, a[9999];
}
\$\endgroup\$
6
  • 44
    \$\begingroup\$ +1 for preprocessor abuse. Of course with that sort of thing you could arguably make it read like any piece of code you want. \$\endgroup\$
    – fluffy
    Commented Sep 6, 2014 at 6:26
  • 16
    \$\begingroup\$ You should have given meaning to keywords and variables and only used the preprocessor for special characters like braces. You didn't even make an effort. \$\endgroup\$
    – bebe
    Commented Sep 6, 2014 at 15:24
  • 3
    \$\begingroup\$ @bebe the more insolent the abuse, the better, IMHO :). \$\endgroup\$
    – user16991
    Commented Sep 6, 2014 at 19:52
  • 10
    \$\begingroup\$ Next codegolf is to make this "source" compile to an implementation of Conway's Game of Life. -D golf! \$\endgroup\$
    – slebetman
    Commented Sep 8, 2014 at 8:12
  • 3
    \$\begingroup\$ @fluffy I love preprocessor abuse in obfuscated C. You can make almost anything in it valid C code with enough #define/-Ds. \$\endgroup\$
    – Claudia
    Commented Sep 8, 2014 at 21:35
24
\$\begingroup\$

Python 2 & 3

Unfortunately, the employees of today just can't stop using hashtags all over the place...

#WritingALetter #Business    Dear Boss,
#SecondLine    I found this scrap of paper on the floor. It said "

def sortl(l):        # define a function
    return sorted(l) # returns the list, sorted "

#ScrapOfPaper    Just thought I should let you know.
#Honesty    From Laurence

[Worth a try, I guess?]

\$\endgroup\$
2
  • 23
    \$\begingroup\$ Great excuse for using comments, but unfortunately it contains actual code \$\endgroup\$
    – user16402
    Commented Sep 6, 2014 at 15:15
  • \$\begingroup\$ Add print "hello" at the end \$\endgroup\$ Commented Sep 16, 2015 at 20:50
23
\$\begingroup\$

Dogescript

It's basically English, right?

shh oooot! my  keyybr oad is brokn. i ne ed neew 1.
such fixs much keys
keys dose sort
wow keys

translates to:

// oooot! my keyybr oad is brokn. i ne ed neew 1. 
function fixs(keys) {
    keys.sort();
    return keys;
}
\$\endgroup\$
1
  • 23
    \$\begingroup\$ I think your boss will fire you if you write like this... \$\endgroup\$ Commented Jul 16, 2016 at 10:36
23
\$\begingroup\$

Detour

Dear Boss Man
I thought I had put your recovered files on drive z.
In reality it was downloaded to the main drive, C://users/boss/recovery. Sorry for the confusion!

Interpreter Permalink

How it works:

The only important part is ://, and the line above it, z.. : means "put input here", the first / reflects it up to z, which is sort; it then goes up, wraps across the top, keeps going up from the bottom, then hits / from below, which bounces it left to the other /, which does the same thing, except this time wrapping around to ., or output.

Simplified version:

Detour

Dear Boss Man             
             z.
            ://

Try it online!

\$\endgroup\$
20
\$\begingroup\$

Brainfuck

Hey boss! This is the public key that you asked!

>,[[-[>>+<<-]>+>]<[<<]>,]+>[>+<-]>[>[>+<<->-]<[<<.>>-]<<[>>+<<-]>>+>>]

Pretty cool huh?

Copyright note:

Note: I copy pasted it from here. As far as I know, that codes from site are has copyright cc by-sa 3.0 with attribution. If this method is illegal, let me know and I will try to delete this.

\$\endgroup\$
5
  • 5
    \$\begingroup\$ "Your code needs to look as little as code as possible." \$\endgroup\$ Commented Sep 6, 2014 at 9:03
  • 32
    \$\begingroup\$ It's a public key for encryption! Not code! Different! \$\endgroup\$
    – Realdeo
    Commented Sep 6, 2014 at 9:03
  • 2
    \$\begingroup\$ @Realdeo Don't forget the , on the second line will read more input after the program ran \$\endgroup\$ Commented Sep 6, 2014 at 9:19
  • \$\begingroup\$ Good catch! Editing it \$\endgroup\$
    – Realdeo
    Commented Sep 6, 2014 at 9:21
  • 5
    \$\begingroup\$ With brainfuck it should be much easier to just incorporate the code in plain text. > for example can be used for quotes (that's how it works in emails) and so on. \$\endgroup\$
    – Ingo Bürk
    Commented Sep 6, 2014 at 10:42
20
+500
\$\begingroup\$

Vyxal

Dear Boss,

Quite worryingly, the printer has stopped working. Please bring a hammer, a battleaxe and a potentiometer. 

Sincerely, 
Joe

Try it Online!

By some miracle, Dear Bo leaves the original input on top. ss sorts it twice, , outputs, Q, halts the program, then the rest is unexecuted.

\$\endgroup\$
2
  • 3
    \$\begingroup\$ I'm sorry, but who is Joe? \$\endgroup\$
    – lyxal
    Commented Aug 18, 2021 at 11:15
  • 7
    \$\begingroup\$ @exedraj JOE MAMA LMFAO \$\endgroup\$
    – user
    Commented Aug 19, 2021 at 13:44
17
\$\begingroup\$

JavaScript

I'm not sure if I can outsmart him, but I can throw him off my trail!

/*Hello Bossman
I feel the need to alert you to a pressing matter.
Nothing Dan from Marketing's head seems to be */function/*ing anymore.
I have a lot of evidence, but not enough time to */sort/* through it.
Should I just send it to you directly */(/*although I'm sure you have about a thou*/s/*and other things to do*/)/*?
Nah, here's it in a summary:

Dan seems to be overly facinated by the */{/* key on his keyboard, and presses it many times a minute.
He */return/*ed his new Galaxy */s/*4, after trying to eat it, multiple times.*/.

/*When Dan was tasked to */sort/* through the Haberson account, he attempted to stab his computer multiple times with a ruler */(/*he was eventually deterred by Jenny)
Everyone backed off for a few days, but we all remembered.
Later, we approached him about the incident, he claimed hostile working conditions and that he was unable to */function(/*.
I think he m*/a/*y need to see a psychatrist.

None of us feel safe to approach him on the topic again*/, b/*rining up conflict is something most of us like to avoid. (except Jenny*/)
{/*Dan was then moved to a different spot in the building, in an attempt to give him a new environment.
Despite the move he */return/*ed to his old desk every day, and wrote */a - b/* on the walls of the new spot.
We all just sort of accepted that and the layout planner gave up after a week or two.

One week we got a new employee in the office. When she went to say Hi to Dan, he screamed a - b over and over.
Not sure what his fascination is there. b-c is a much superior algorithm.

We're not really sure what caused this, but one day he switched from the { key to the */}
/*key. Dan switched back the next day.

There is an ongoing betting pool on what will happen next (general categories mostly*/)
/*Currently the betting for him stabbing an actual person is at almost $20,000.

Please do something about Dan. If anything start a reality TV show from the security tapes.

On a completely unrelated note, I love this new */}/* key, it's really neat looking. Did my keyboard always have this?
Sincerely,
Zeke*/

function sort(s) { return s.sort(function(a,b) { return a-b }); }

\$\endgroup\$
3
  • 17
    \$\begingroup\$ Comment abuse kinda renders this more obvious. \$\endgroup\$
    – Claudia
    Commented Sep 8, 2014 at 21:39
  • \$\begingroup\$ Although it's really obvious what's happening, I love the "Dan" story. I hope it is not based on actual events :p \$\endgroup\$
    – rydwolf
    Commented Oct 5, 2020 at 15:52
  • \$\begingroup\$ I kinda used your technique for my answer (uncommenting some parts to create the function) \$\endgroup\$
    – user100690
    Commented Mar 18, 2021 at 8:56
13
\$\begingroup\$

LiveScript

Try figuring this one out...Been sending him emails like this the whole time to allow for easy, more versatile copy-paste.

# Mr. Boss,
#
#     So, I'm done with this job. It is driving
#     me crazy. We aren't allowed to have *any*
      fun =#(. I am planning on leaving this
#     company while you all poorly attempt to
#     sort all this out. Also, I would like to
#     mention that a specific single bit in the
       sort # for your in-house algorithm gets
#     inverted. Happy hunting while I have fun
#     programming for another company far more
#     grateful than yours.
#
# Best regards,
# Your handy little programmer-turned-secretary.

1. Its standard library, Prelude.ls, has a native sort function.
2. Note the two missing hashes (comments). The first is far more obvious than the second.

It parses as this: "fun = sort", and compiles to this: "var fun; fun = sort;"

\$\endgroup\$
1
  • 2
    \$\begingroup\$ By the way, the syntax highlighter is a fail. One of the comments isn't parsed correctly. \$\endgroup\$
    – Claudia
    Commented Sep 22, 2014 at 22:01
8
\$\begingroup\$

JavaScript (ES6)

      (a) => /*----------*\ <= (a)
       |      Announcement      |
  .   (a)    \*----------*/    (a)   .

 sort (/* YOUR DOCUMENTS BEFORE 2/5 )*/

     ($,_) => /*--------*\ <= (_,$)
      |         Warnings         |
 //  (_-$)    \*--------*/    ($-_)  //

      /*( NO SMOKING IN OFFICE */)

Try it online!

Yes, I know the boss likes fancy decorations in his notices so I capitalized the texts and surrounded the texts with fancy symbols :)

PS. Why is the office still using TELNET?

Actually, removing comments and redundant blanks makes the stuff into (a)=>(a).sort(($,_)=>($-_)), and that's what the stuff intends ;P

\$\endgroup\$
8
\$\begingroup\$

05AB1E

Dear Boss‚

I hope I{qualify for this new function. I once again want to sincerely apologize for my earlier secret message.
Thank you for giving me the opportunity to work at this department instead.
I must admit it's hard to resist the urge to write code, but I'll do my best.

Thank you.

Kind regards from your new secretary,
Kevin Cruijssen

Try it online. (TIO uses the legacy version which is a bit faster. Works the same as the new 05AB1E version, though.)

Explanation:

05AB1E code ignores newlines and spaces outside of strings or compressed string/numbers (except when using the (if-)else-statement I just found out in an earlier attempt of making this program.. >.>), so let's do the same in this explanation.

DearBoss‚Ihope # These are all no-ops; they do execute, but won't affect the output:
D              #  Duplicates the (implicit) input-list
 e             #  Calculates the number of permutations of each item in the list
               #  (NOTE: this might time-out depending on the values in the input-list)
  a            #  Check if these numbers are letters (becomes a list of 0s / falsey values)
   r           #  Reverse the items on the stack
    B          #  Base conversion
     o         #  Raise 2 to the power of each number
      s        #  Swap the top two items on the stack
       s       #  Swap the top two items on the stack
        ‚      #  Pair the top two items
               #  (NOTE: This is not a regular comma (,), since that would print the top of
               #   the stack to STDOUT, which we of course don't want here.)
         I     #  Push the input-list again
          h    #  Convert each value to hexadecimal
           o   #  Raise 2 to the power of each integer value
            p  #  Check for each if it's a prime
             e #  Calculate the number of permutations of each item again

I{q            # Then the actual program comes:
I              #  Push the input-list
 {             #  Sort it
  q            #  Stop the program
               #   This makes everything that comes after it no-ops
               #   And will output the top of the stack implicitly as result

Try it online with added debugger-mode to see all this in action.

\$\endgroup\$
1
  • 2
    \$\begingroup\$ +1 for being natural. \$\endgroup\$ Commented Sep 21, 2019 at 5:28
5
\$\begingroup\$

JavaScript (Node.js)

Attachment => (

`Date: 2019/5/30

Dear my Majestic Boss,

Re: Business Trip to Japan

I'm writing to confirm itinerary for the next trip to Japan will be as follows:

`? (Tennoji, Osaka) => ("Shinsaibashi Tower", Osaka)

|| // Day 1

Tennoji [Osaka, "sort"] 
(Hotel = (JPY$14112, Taxed) => `So I will stay here for one night, and I will be charged this price:

`? JPY$14112 + (0 - Taxed) 
:`This is the total price and what I will claim afterwards.`

):0) (Attachment)

|| // Day 2

"Shinsaibashi Tower" [Conference, `NOT FOR SHOPPING`]

`I will be coming back on Day 2, so the trip will not cost too much hopefully.

Best regards,
The-former-programmer`

Try it online!

Okay this is an itinerary apparently. Another answer in different direction after one year.

The really important part is Attachment => (Tennoji => Tennoji["sort"]((JPY$14112, Taxed) => JPY$14112 - Taxed))(Attachment)

\$\endgroup\$
2
  • \$\begingroup\$ Very clever answer, +1 \$\endgroup\$
    – user100690
    Commented Mar 18, 2021 at 16:46
  • \$\begingroup\$ I love how you used a tagged template call at the end. \$\endgroup\$
    – emanresu A
    Commented Mar 12, 2022 at 8:27
5
\$\begingroup\$

CJam

Hi; Isaq

\~O~/
 (1)
 @O@
/   \*

*~50 Times!

;;  WINNINGS  ;;
;;            ;;
;;]  $10000O  ;;

p1 is "where Kings sit', according to Shakesphere or someone. All I know is that after 4 straight years
of earning second in the national clown contest, it sure feels great to be on top for once. My clown
ASCII art could use some work, but hopefully I did a solid representation of our troupe. I can't believe
this was the one year you were sick, but we went and earned the $100k in your absence.

See you Monday,

Ethan

'I remain just one thing, and one thing only, and that is a clown." -

Try it online

Apparently my job is at a clown troupe that just won the grand prize, my boss's name is Isaq, and my signature didn't work and forgot to credit Charlie Chaplin.

Notes:

This was afwul. CJam throws an error on any character that isn't a command or whitespace, or when we try to take input but there isn't any, or you try to do a command but the stack's empty, etc. This means that knruvxylqo is unusable for the actual code (except the one q at the start to load in the array), and emth are also notably difficult. So of the famous rstlne from Wheel of Fortune, we have left... s. English is going to be hard. I'll be explaining what happens on each character, but not really why because there's so much to go through, especially with the clown. (also I don't know why a couple of the things work shh...)

Explanation:

I tried a few greetings to open us off (Greetings, Hello, etc.) and Hi was the only viable one. The others either threw errors or consumed input. Hi just pushes 17 and makes sure it's an int. The ; then throws that 17 away.

Isaq gives us ["18"] by pushing 18, stringifying it, and putting it in an array. q then gives us our input array as a string.

Row one of the clown: \ swaps our two elements. ~ takes "18" out of the array. O pushes an empty string. ~ makes it disappear. / throws away "18" but puts our input string into an array.

Row two: ( takes our input out of the array, but leaves an empty string before it on the stack. 1 pushes 1. ) increments that 1.

Row three I brute-forced after writing row 5, because I knew kinda what I needed it to do. @ rotates our array so the input is on bottom and empty string on top, O adds another empty string, and @ rotates it so 2 is on top.

Row four: / gets rid of the 2, \ swaps the identical empty strings, and * gets rid of one of them.

Out of the clown now. The next * gets rid of our other empty string, leaving just the input string. Finally, we parse it into a bunch of numbers with ~. 50 Times! ends up just pushing a 50 and a 0 when all is said and done.

Now into the winnings block. ;; gets rid of our 50 and 0. WINNINGS takes advantage of the fact that CJam doesn't yell at you if you scream at it because capital letters are variables. Unfortunately, that means it also pushes a bunch of junk. The next 8 ;s take care of that.

We're just back to our input numbers now. We'll use a not-so-sneaky ] to turn them into an array and $ to sort them. We just need to output with p now, but unfortunately for it to make sense we need some money first. We push 10000, plus an O because we need two things for the upcoming semicolons to destroy.

After a simple p, we've printed our sorted array! It's not much of a letter though. 1 and is are harmless. We start a quote with ", then end it with ' to let us write in English unimpeded. We do the inverse with a quote at the end to close up, and the -throws what we have left on the stack away so it doesn't automatically output. This way, it looks like we intended to attribute the quote, but forgot.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ The only person here who knows the name of their boss. :) \$\endgroup\$
    – user92069
    Commented Jul 27, 2020 at 8:09
4
\$\begingroup\$

Jelly, 91 bytes

Gee Boss,
Go to Starbuck. Whoops, forgot the (sorry for the dot, my keyboard's messed up)
Ṣ

Try it online!

\$\endgroup\$
3
\$\begingroup\$

Groovy

'Dear Bossman,
I finally found the formula to calculate the salary for the new employees.
In the salary software just enter the following:'
print "${(args.toList()*.toInteger()).sort()}"'
Sincerely,
Employee'
\$\endgroup\$
11
  • 16
    \$\begingroup\$ You're not supposed to be writing code. That's code. \$\endgroup\$ Commented Sep 6, 2014 at 6:56
  • 7
    \$\begingroup\$ I quite like this one. It's just hiding the code in plain sight. \$\endgroup\$
    – user16991
    Commented Sep 6, 2014 at 19:55
  • 4
    \$\begingroup\$ LOL you should put "I've found the Excel formula" then. Though I'm quite familiar with Excel, the reference never crossed my mind. \$\endgroup\$
    – user16991
    Commented Sep 7, 2014 at 9:30
  • 5
    \$\begingroup\$ @kuroineko Excel formulas dont have such a programmy syntax, do they? \$\endgroup\$
    – An SO User
    Commented Sep 7, 2014 at 11:50
  • 3
    \$\begingroup\$ 8 upvotes and 9 downvotes? Wow; this is controversial. \$\endgroup\$
    – Ypnypn
    Commented Sep 9, 2014 at 0:14
3
\$\begingroup\$

Excel

=LET( me, say that I understand your decision.  I was hoping to work our issues, out, B4#, 
things, got so out of control. I hope we can as Boss and, Programmer, SORT(out), our, 
issues and work better together in the future,

Sincerely,
John Smith, Programmer)
\$\endgroup\$
2
\$\begingroup\$

Zsh

I don't know whether the code or the creative writing was harder.

: RE: The state of the evaluation process; eval `#problems'

: While I appreciate your enthusiasm, going to `print `
: this for the world to see isn't helpful in the long run.
: Please, don't make any more enemies than you already have.
:
: > People seem to just want that `'$'`: It's a big problem
: > which needs to be resolved. People need to buy into the
: > company's team-based philosophy `'{'`: ... ''}''
:
: While I do not deny that people "just want that '$'",
: I absolutely disagree that it's a _bad_ thing. Employees
: should not be guilty for wanting to leave for greener
: pastures, so you should try and provide _some_ incentive
: to stay.
:
: > And yet everyone want's to just check "(y)" or `'(n)'`
: > without giving _any_ further feedback... You're too LAZY!
:
: I want to stop you here. Accusations like this against my
: team are _not_ to be tolerated. We do a _lot_ behind the 
: scenes which you _clearly_ aren't aware of. Please refrain
: from `'@-ing'' any of my team, and think with a bit more
: empathy next time, thank you.

-- Gamma :-}'

Try it online!

  • Note: This will create files named "People" and "without" in the directory it is run from.

  • From the first line, you can see the eval, followed by backticks.

  • # comments continue to end-of-line, stopping quotes or backticks from being resolved, so we use : no-ops to indent.

  • The standard pattern we make use of throughout this is `: lots of filler text.... : more filler text, then an important `'X'` : back to the garbage

  • At the end is one exception: Everything from @-ing to the last } is not no-op'd.

  • When the substitution has finished, it reads: eval print $'${(n)@-ing any of my team, and think with a bit more\n: empathy next time, thank you.\n\n-- Gamma :-}' The garbage after the @ does nothing, so this is equivalent to print ${(n)@}, which is simply a numeric sort of the parameters.

\$\endgroup\$
1
\$\begingroup\$

Ly

Dear BOss Ma&n.

    That jOb P&uts me in one of the best
    emotions that I've ever had!

    As for my recent incident, I promise that I 
    will never touch code ever again. Thanks a
    lot for allowing me to be a secretary instead
    of firing me! 

Your faithful secretary,
petStorm

Try it online!

\$\endgroup\$
0
1
\$\begingroup\$

Pyth

Dang those bounce back emails, I've been broke ever since the boss started charging us for every mistype. And he wonders why I wanted to quit in the first place...

De$tination_unreachable:"Reason message:\
Couldn't find the address [email protected]\
Company email servers charge for wasted electricity on bounce back emails:\
In this case, the charge was " $ 596.42; "\
Remember, this charge is employee specific, so make sure it doesn't happen again :3\
Please be more careful when typing your email addresses in the future.\

If you would like to refute this charge, your transaction ID is: " pSSQhaYk ";
\$\endgroup\$
1
\$\begingroup\$

JavaScript

/*
I always start my letters with /* because it means "slashstar", a great name for a weapon.
So in case you forgot what an asterisk was, */asterisk/*is used as a sidenote in papers, and the function it serves */=/*is to get on your nerves when I write */papers/*. You made me a secretary */=>/* I really enjoy my job. Now, I need to sort the */papers/* in order because you like neat and tidy things. So I made a method */./* A guide to */sort/*ing follows: Start by finding the first paper */(/*the one on top), and then find the next one, */(/*wh*/a/*tever follows*/,/* nothing else.
Then compar*/e/* them and place the longer one on top.
Next, repeat (the process I told you before*/)/* */=>/* you should already see a clear pattern emerging. One of the best ways to compare, if you like automation, is */a-e/*, this returns the difference in characters.
In the end, (having gone through all the papers*/)/*, you should have a sorted pile of papers.

Regards,
Secretary ;(
*/

A secretary who seems to enjoy his job on the outside gives his boss a method of sorting his messy pile of papers in an attempt to get his coding job back.

\$\endgroup\$
2
  • \$\begingroup\$ Hmmm... mystery: the snippet worked when I posted the answer but now it gives an error... \$\endgroup\$
    – user100690
    Commented Mar 18, 2021 at 16:52
  • \$\begingroup\$ Fixed now........ \$\endgroup\$
    – user100690
    Commented Mar 18, 2021 at 16:53
1
\$\begingroup\$

Javascript

s=/*  <k6cM   L    zE0        2]B^   cyF   #hq%  m(xg       
[   ; u      e &  &   V       1   + T   H h     =           
$   T }cJF* H7Yj} *&P8        n^D>  N   ;  0O+   [G{        
<   s >     w   < S  8        (   Q !   2     9     2    {  
Ya8u  qf]?H Z   J 6   5       sRvz   **/  x=>x  //yE    c   





.sort         (   (   a         ,          be)   =>a   -be   )/*(  DM@    r   E   v ]   9 g0$wh  QBD        
  0          { 1  3x EK        $ f        D   9 a   I 3   D P     @   !  > *  %6 hd I{ 9D {     *   %       
  P         )Di!D N x #       h%8>f       rM;5  }2d]  @   b g  =+ hTJ}  $;yC? H z s V S 1 U{zBV ;SRV        
  i         a   s G   4       Q   {       3     G  T  c   H z   l r  8  Z   | a   0 *   T C     S  9     p  
+0oUy       1   I t   8       B   ^       w     h   +  O?P   #%4  {   ] l   Z D   M [   W LPTIx L   *   K   

r   ]  ffv  ]3DUs         p          0u1l Q-*:a  -E{   ssD  0uLoS Aw@77   j    ^QU  V   @       
sF  G 6   1   f          A J        n     n     &   * +   I m       L    n 5  y   O  % h        
C x N !   j   k         =)fy9        g]Y  ;fvcN V     R;0D  (1wy+   d   QrXc7 +@c}    X         
{  f+ o   W   z         |   5           } -     r   P $  %  J       t   B   1 C  z    C         
>   f  cVR    l         1   K       [5Vw  mvQ2g  j[K  +   # g2G-)   -   W   L f   (   J     H 

WhA|F        6fi  }   F 0T4AI jmx#I       e   D  <tG  O   z 
  H         W   ( I   4   W     M         TZ  Z *   r z   e 
  ]         g k W <   q   X     1         { Y r p   } t   Z 
  9         M  (  a   i   G     e         >  s{ 4   ^ 2 9 n 
Y9S=y        xc $  1P|  gOnp*   Q         0   b  s#P   [*/

Maybe he likes art? I mean, it's almost readable...

When comments and whitespace are removed you get s=x=>x.sort((a,be)=>a-be) and that's all that matters.

\$\endgroup\$
1
\$\begingroup\$

Jelly

Dear Boss,
    One of the apps on the electronic is not working. I need this to be fixed ASAP.

Thanks,
    MarṢ

Try it online!

\$\endgroup\$
0
\$\begingroup\$

Python 3.8 (pre-release)

''' Re: Re: Comput#{6Qroblems '''
" "
" ' Greetings,    '"
" ' The other day, I noticed an issue with my PC; occasionally,\
" ' the program freezes f^?L';g="oooor {there it is!}}"
" ' a few seconds, then fills up with gibberish. Coulddd"<g;I=(
" ' r`|r   get your "*-0+input (g>#Et it?) on this problem--
" ' *"and"\0n how to fix it? {It is so annoYk!$/yying...}") )
" ' Sincerely(5@/Z~ S."
" "
" Wow. This is one serious issue. Searching online for similar bugs fofm"
" \\\\\xd1d not help, as none of the candidates seemed to behave quit3\
" '/-B%e like yours did. I will keep searching, though--this HAS to be'
" 7@";(e:=sorted)  ;["out eventually...\
" ]#VWait, I got it too? Ughh...:.%jG\xF6
"\
After doing some more invasive detectivework, I think I found the culprit.\
It was a file named "!=g[6^~0]>'. When I first found that file, my '
d=eval(I+''#&uation of it was that it was a little suspicious. So I opened
#m*`it up, and (if my knowledge of programming is still good after 10 years
)# it definitely seemed liKK%^2e some code that would periodically "type in
" random keys. On Friday, I will send you a ">=g;print(e(["<{"]*~5+d))#))-\
'copy of the code--maybe YOU can tell if it is causing the problem or not.\
  /^^^^^^^^^\
 / Sincerely,\
/  Your Boss  \
'"""'""''""'"""

The good thing about Python is that you can make it look like English, or you can make it look like complete garbage.

Try it online!

\$\endgroup\$
-2
\$\begingroup\$

C#

// Dear Boss Man,

/*i have a */public/*shed a*/ List /*of*/ <string>/*s
to*/ Sort /*for you on our internal website
please take a look at the */(List /*of*/ <string>/*s and*/ check){
/*them for company restrictions. please also */check /*the */.Sort();/*ing of the     list*/
/*furthermore could you please */return /*an email to me in which you state your */check/*ing state*/;}

// sincerely your slave Rob
\$\endgroup\$
3
  • 9
    \$\begingroup\$ My god that's hard to read... \$\endgroup\$
    – Beta Decay
    Commented Sep 8, 2014 at 17:41
  • 15
    \$\begingroup\$ Looks too codey. \$\endgroup\$
    – Claudia
    Commented Sep 8, 2014 at 21:41
  • 4
    \$\begingroup\$ Obvious comments :) The first line reads public List <String>, without a lot of hassle :) \$\endgroup\$
    – Martijn
    Commented Sep 9, 2014 at 7:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.