# Sandbox for Proposed Challenges

This "sandbox" is a place where Code Golf users can get feedback on prospective challenges they wish to post to main. This is useful because writing a clear and fully specified challenge on your first try can be difficult, and there is a much better chance of your challenge being well received if you post it in the sandbox first.

Sandbox FAQ

## Posting

Write your challenge just as you would when actually posting it, though you can optionally add a title at the top. You may also add some notes about specific things you would like to clarify before posting it. Other users will help you improve your challenge by rating and discussing it.

When you think your challenge is ready for the public, go ahead and post it, and replace the post here with a link to the challenge and delete the sandbox post.

## Discussion

The purpose of the sandbox is to give and receive feedback on posts. If you want to, feel free to give feedback to any posts you see here. Important things to comment about can include:

• Parts of the challenge you found unclear
• Problems that could make the challenge uninteresting or unfit for the site

You don't need any qualifications to review sandbox posts. The target audience of most of these challenges is code golfers like you, so anything you find unclear will probably be unclear to others.

If you think one of your posts needs more feedback, but it's been ignored, you can ask for feedback in The Nineteenth Byte. It's not only allowed, but highly recommended!

It is recommended to leave your posts in the sandbox for at least several days, and until it receives upvotes and any feedback has been addressed.

## Other

Search the sandbox / Browse your pending proposals

The sandbox works best if you sort posts by active.

To add an inline tag to a proposal use shortcut link syntax with a prefix: [tag:king-of-the-hill]. To search for posts with a certain tag, include the name in quotes: "king-of-the-hill".

Get the Sandbox Viewer to view the sandbox more easily!

# Self-Obfuscator Program

According to Wikipedia,

obfuscation is the deliberate act of creating source or machine code that is difficult for humans to understand.

In this challenge, you need to create a program that'll be able to obfuscate itself and produce a program with the same functionality, using the shortest amount of bytes required.

## Rules

• Standard loopholes are prohibited.
• The output must always be consistent for each input. If you take the original code (iteration 0) and run it through itself 10 times to get a very long obfuscated code (iteration 10), running the initial code through it should give a code identical to iteration 1 code.
• The output must be at least twice as long from the input for each iteration.

### Obfuscated, not verbose

• The obfuscation process must make the code longer, but it mustn't add any comments, no-op or no-effect statements, or any statements or expressions that don't directly affect the output code.
• The output should have minimal resemblance to the input. No sequence of 5 bytes should repeat in the output.
• The code must be able to obfuscate itself, obfuscations of itself from further ahead iterations and code from earlier iterations. It's not required to be able to obfuscate anything else.
• Bonus in code golf is highly discouraged. And "the output should have minimal resemblance to the input" should be more rigorously defined. Nov 13 '21 at 23:19
• The idea is fine, but you need more detailed and cleaner define about obsfucate and the meaning of statement that don't directly affect the output code
– okie
Nov 22 '21 at 8:43

# The number of alphabets in 3 seconds

In 3 seconds, output as many alphabets as possible. The output may be separated by consistent character.

An alphabet here is this:

abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ


# Meta

• Is this clear?
• I'm not really sure about the tagging.
• This should be closed, because machine code can do this with a lot of "A" prints without loops and win. this is off-topic Jan 10 at 15:50
• I don't think this is off-topic as it have a clear "objective winning criteria". But I am afraid that this question may be marked as a duplicate to codegolf.stackexchange.com/questions/215216/…
– tsh
Jan 11 at 6:51

# TDG - Test Driven Golf

Our company requires unit testing before code can be deployed to production. Unfortunately, my code is written in esoteric programming languages, none of which have test runners.

## Challenge

Write a test runner for a programming language (here after called Language X) that takes Language X source code and Language X test cases then outputs the results of running the test cases.

NOTE: The language used to write the test runner does not necessarily have to be Language X.

## Specification

### Input

The runner should take in:

• Code written in Language X
• Test cases written in Language X

### Output

The runner should produce:

• At least a list of test cases. For each test case, include:
• The test case name
• A Truthy value if the code executes without errors and no assertions failed
• A Falsey value if the code errors or an assertion failed

### Test Runner

• The test runner can be written in any language. The only constraint is that the source and test code language be the same
• Each test runner must at least provide a helper/utility/function to assert that a value is truthy
• Assert.True(false) => Fails test
• assertTrue(1 == 3) => Fails test
• is_truthy 1 => Doesn't fail
• [[ "a" = "a" ]] => Doesn't fail

### Test Cases

• Each test case must have a name/be name-able
• it("does stuff", _ => ...) => it does stuff
• it_does_stuff = _ => ... => it_does_stuff
• func ItDoesStuff() {...} => ItDoesStuff
• A code block of language X code

### Submissions

For consistency, here are some recommendations:

• Title should be: # Language X runner written in Language Y
• Where Language X is the source and test code language
• And Language Y is the language the runner is written in
• Runner code in a ## Runner section
• Example input source code in a ## Example Source section
• Example input test code in a ## Example Tests section
• Example output in a ## Example Output section

## Sandbox Questions

• Is this challenge too board?
• Is this challenge too big?
• I've created some basic test runners in a single file before and with some elbow grease, I think you could say small (submit-able on CGCC) and add a few nice things
• Does fit here?
• Is there room for creativity?
• The testing syntax and features for the test cases are left up to the implementation
• How golf-able the test syntax is
• How the code and test cases interact
• What asserts/helpers are provided
• Syntax for skipping test cases
• Syntax for beforeEach/afterEach
• Harder features like parameterized tests and fixtures are possible
• Similarly, the features for the test runner are left pretty open ended
• TAP output
• JUnit output
• Test isolation and parallelization
• Harder features like specific failure messages and code coverage aren't impossible
• "Input: Source code written in language X, Test cases written in language X" I don't understand. Are we providing the input to our own programs? Or are we meant to detect the language? 2 days ago
• This doesn't make sense as a pop-con, there's very little room for creativity 2 days ago
• @thejonymyster, I've added some clarity (hopefully). The test runner should be for testing a specific language (no detecting) and it would take in some code (not it's own source) and some tests in that language. 2 days ago
• @cairdcoinheringaahing, there is a fair spectrum of test runners and testing syntaxes out there. So I was thinking there was some room for creativity (especially since I don't think any of them are made for golfing). I've added some comments to that end. I couldn't think of a better tag 2 days ago

# Who Loses The number guessing game?

You are playing a number guessing game. You know everyone's guesses, and who won, and want to figure out who was in last place.

Your task is to take a dictionary of guesses as input, along with the name of the winner. You should then return the name of the player whose guess was the farthest from the winner's, or if there are multiple, the lowest.

A input:

[{"Joe": 800, "Mama": 1000, "Biden": 1200}, "Joe"]


Means that the aproxximate score winner is Joe, The next is Mama, Mama is greater than Joe and Mama is greater than Biden.

So the loser is Biden.

All guesses are guaranteed to be unique

## Test cases

[{"A": 100, "B": 200, "C": 300}, "A"] => "C"
[{"Hello": 200, "World": 201}, "World"] => "Hello"
[{"Blah": 210, "Bruh": 984, "Boo": 314}, "Boo"] => "Bruh"
[{"A": 6, "B": 7, "C": 666, "D": 1000}, "C"] => "A"
[{"AC": 100, "BE": 200, "CE": 300}, "B"] => "CE"


# Meta

• Any feedback?

• Dupe?

• What's the point of having this weird input format? Why not just take and return indices? 16 hours ago

## Code-challenge: Guess my number

### The challenge

You have a number from 1 to 10 in mind, and your program should ask questions to find out which number. These questions can be any questions, the program only has to find out the number as fast as possible.

Your program should ask a question, such as "Is the number a prime?", and the user must answer either y or n (yes or no). Ask questions until you know the number.

### The scoring

To calculate the score, you need to take the sum of the question count for each number. For example, if you need 1 question to find the number 1, 2 questions to find the number 2, and so on, the score is 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10, so the score is 55.

Important note: the question count for a specific number must always be the same. For example, if you need 4 questions to find out the number 10, then you have to ask always 4 questions to find out the number 10, otherwise it is impossible to calculate the score.

• boooring. The Huffman tree for a uniform set is any perfectly balanced tree. The question asks us to perform a binary search on the usr device. Is the number greater than 5? Is the number greater than 2? Is the number greater than 1? Hey' I think it's 1. Jan 2 '14 at 11:49
• Maybe if this were a pop-contest and the goal was to make the most original set of questions while still keeping the score at its theoretical minimum. Jan 3 '14 at 5:28
• This is off-topic and AI is off-topic for this site Nov 12 '21 at 17:39

Bovine Ignorance

I'm curious about code which still works after being mangled by figlet, toilet, cowsay et al, but I'm not sure whether this in any way sane.

What I'm toying with is a challenge in which a participant may submit any program in any language. It should be possible to use this program's source code as input to cowsay or whatever, and the result should be another valid program in any language, which still does a similar thing. For instance, the following bf program prints Hello world! with no newline:

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


$instnm corresponds to the number of the instruction, the count of things displayed, starts from 1. Your program may take an input, and send the data, in any way (except the ones in Rules) to the Reciever. Remember there's no internet. The winner will be the user with shortest bytes of code. # Rules ## As a good code golfer, you may not: • You can't use program arguments to send the data. • It must be an application. • If you apply for the bonus, mind you have to make both programs, if not, just the sender. • The string you have to send it has to be STRICT, no different ones, if not, unvalid answer. (I decided to call that "Strict JASON Protocol", get the joke?) # Bonus You can make the reciever program, and you get -1 byte. Not much, but k. (In bytes, you must not decrement your byte result, you must do: "n Bytes + Bonus") # Example Input and Output ## Input: From Sender program: Dance! or Stop! ## Protocol: Inbetween both commands $displaytext:"Dance!";$instnm:5 ## Output: In Reciever program: Dance! (9) or Stop! (187) # Overall objective: Send data between two programs, without internet connection. Edit: i can't post an example answer, because then i can give ideas of how to do this codegolf/puzzle, while the ideas are limited, i'm finding for the creativity of the user. • I have no idea what you're asking me to do. Feb 3 '16 at 21:26 • It is pretty clear what is asking you to, is defined in Task (You must make the shortest (and winner) code possible, that sends data to the reciever, using this protocol), all the story and background is defined on Introduction. I dont see any hole on the post. Feb 3 '16 at 22:11 • @TheCrimulo Example answer? Feb 7 '16 at 7:06 • There is no Example, because you are just sending the same info you wrote in. If you type ´Dance!´, the output will be Dance! (n), n being the number of the sequence. The idea isn't to read input, and append (n) to it. You have to make it, in anyway (except command args/internet), dropping out the enoded data (input in the protocol), and, if necessary, make a reciever program, the reciever program its a bonus that discounts 1 byte, also, it can help you making your sender smaller. I can, i.e., make a file with the info on it. As explained, the reciever will read it. Feb 7 '16 at 15:54 # Biggest single character This challenge is simple, its like the challenges we've had before where the goal is to produce the biggest output one can. But in this one, you can only use one character in your code. You get no input, your code has to be a single character (not byte), and the person with the largest output in byte wins, ties broken by posting time. • Doesn't this boil down to which language has the biggest output stored in a predefined variable? Apr 3 '16 at 20:50 • @DenkerAffe true. maybe i should make it 2 byte src code. that might allow some interesting stuff Apr 3 '16 at 20:52 • I think I would raise the char amount a bit more to allow for some competition between the same language. Also you should keep in mind that this rules out every non-golfing language. While this should be allowed per meta consensus, I am not sure how much the community likes this. Apr 3 '16 at 20:58 • G for pyth wins :D :D Apr 4 '16 at 4:45 • Befunge & co. would probably win via infinite output. If output has to be finite though, I wouldn't consider this a very interesting challenge since it would just be one big language hunt. Apr 4 '16 at 10:27 • Actually, N in Seriously wins. 11752 bytes output. – user45941 Apr 6 '16 at 4:06 • @Mego Vitsy wins. 0 bytes, 11752 bytes of output. Apr 7 '16 at 17:07 # Alphabetization 101 (popularity contest) Your task is to use all 52 letters of both the uppercase and lowercase alphabet, ONCE and ONCE only, and make a program. You are free to use any other ASCII character more than once, or use a letter of the alphabet more than once if it's required for the language to function. ## Meta: • Not sure if this has been done before. • Any questions regarding the task? • Not really meta: Is there any place I can go to (like a chat or something) to post a question about BF? StackOverflow probably isn't suitable. Apr 17 '16 at 6:48 • Come to our chatroom! :) Apr 17 '16 at 6:50 • I would vote to close this as too broad. It's not a particularly interesting restriction per se, and it certainly doesn't make a good question without some restriction on the task to be performed. Apr 17 '16 at 14:07 • @PeterTaylor That's why it's a popularity contest, though - it lets the people decide whether the program made is good or not. What WOULD be a good restriction on the task? Apr 18 '16 at 1:40 • The popularity-contest tag is not an excuse for a broad challenge. "Write a program that does anything..." is pretty much the definition of "too broad", regardless of any source code restriction put on the program. So at least you should choose a specific task. Could be anything really, but if it relates to the restriction it might be more interesting (e.g. a pangram checker). Even so, I agree with Peter that the restriction isn't particularly interesting. There are tons of languages where it's trivial to avoid unwanted letters and then include the remaining ones in a string or comment. Apr 21 '16 at 7:04 # Why did I come to Sandbox? I have a very specific challenge, and I wanted to see if it was too specific. The challenge is to output "Valdosta ACM" using the shortest number of characters with the BrainF**k programming language. I've noticed it isn't the norm to specify a programming language on this domain, so I've come here to get feedback on whether or not this is acceptable. # Introduction As a challenge to the members of my local Association for Computing Machinery(ACM) chapter, I asked them to produce the shortest Brainf**k code that would output "Valdosta ACM". This was a very fun challenge for all of our members, and we got very competitive! I was impressed with the solutions turned in, but I wondered if it was possible to beat our best solution. Surely it's possible, but who could do it? # Challenge Output the string "Valdosta ACM". Stipulations: • Use only the Brainf**k programming language (you can test your code here) • No input can be accepted by your program • Your program must halt • The space in the string must be ASCII character #032. These are the ASCII values of each character, as they appear in the string, for convenience:  086 097 108 100 111 115 116 097 032 065 067 077  The winner is determined by the shortest code, by character count. # Example Input and Output ### Input: NO input is allowed ### Output: Valdosta ACM • Welcome to Programming Puzzles & Code Golf! Thanks for using the Sandbox. :) A few things to note: 1.) Generally we discourage language-specific challenges, 2.) typically code golf is scored by bytes rather than characters, and 3.) printing a fixed string like this would be insufficiently different from the Hello, World! challenge to avoid it being closed as a duplicate. Apr 25 '16 at 3:38 • Thanks Alex! Since I want to compare the results of my local competition with the results of the challenge here, is there anything I could change about the challenge to make it acceptable? I don't see a way to do this, but I was so excited about seeing if anyone here could do better than our coders. And thanks for the warm welcome! :) Apr 25 '16 at 3:48 • You could look at Brainf**k solutions to other challenges (like this one), and see if the techniques used there can help you improve your solution. Apr 25 '16 at 7:09 • We also have a tips question that may be of interest. Apr 26 '16 at 6:30 • Although this particular challenge is probably too similar to "Hello, World!" (as Alex pointed out), if you had a different challenge that you wanted to see solutions for in a specific language, you can still post it but just allow all languages to compete. If you don't see solutions in your specific language you can post a bounty for that language to encourage it. Apr 26 '16 at 6:33 # The FitnessGram™ Code Golf Test Same concept and rules to the well-known Rick Astley post a while back, only instead of using samples of various sizes, sample length is limited to what number sample it is. And different text for the program to write. It's code golf, so standard loopholes apply, and fewest bytes wins. • Closed as a dupe. And/or unclear. May 19 '16 at 20:04 • Paragraphs of text are boring for compression. Unless there's some particular structure in the text, the same techniques apply to all of them. – xnor May 19 '16 at 20:07 • First off, thank you for using the Sandbox before posting on main. That said, I don't understand what your challenge is supposed to be: what is the sample length? What is a sample? In addition to that, if this challenge winds up being "print some fixed string" then it is a duplicate of the rick astley post, as the techniques used for compression will be identical. May 19 '16 at 20:09 • we want to give them a challenge, not a flashback.... – user56309 Aug 4 '16 at 19:42 • This sandbox post has had little activity in a while and little positive reception from the community. Please improve / edit it or delete it to help us clean up the sandbox. – user58826 Jun 9 '17 at 14:12 # Obfuscate your program In this challenge, you must create a program which does something but you need to obfuscate it so that it becomes hard to understand (so don't explain it in your post). It can accept anything as input and output anything. Score The shorter program (in bytes) which hasn't been understood wins. Example Can you guess what does this code calculate? var t=1e5,s=t/1e4,n=s*0.1,i=n*s*7.5,r=!true,b=1,t='01'.split('').map(c=>parseInt(c)).concat(Array(i).join('.').split('.').map(m=>{a=r+b;(r=b)&&(b=a);return a})),t=t.join('').length,b=s,t=r,s=4+NaN;  Rules • You should say what language you used • You must not use any obfuscation tool • At a minimum, you should state an actual objective: "obfuscate a program that does x". Otherwise it's just too broad and will likely be closed as such. You'll also need something else to explain the scoring, since "shortest that isn't understood" seems odd to me. Understood when? How do you show that it hasn't been understood? Do you mean something like Cops and Robbers?. Jun 4 '16 at 19:06 • This sandbox post has had little activity in a while and little positive reception from the community. Please improve / edit it or delete it to help us clean up the sandbox. – user58826 Jun 9 '17 at 14:12 ## "01_firstHole" Challenge for Performance Golf First there was code golf. Now, there is Performance Golf. FORE! ## Motivations This is a crowd-sourced approach to easier and better performance troubleshooting. Performance problems are everywhere, so java technicians need access to easy-to-use diagnostic tools at every step of the SDLC. ## How to play? 1. Start by installing the live demonstrations of Java Performance Problems in this repo. 2. Pick one of the six holes of golf to play. You can do this by picking one of the six numbered folders in the repo. This particular codegolf.stackexchange.com challenge is for the 01_firstHole. 3. One at a time, run the 'a' load test and the 'b' load test for the hole you selected. The a & b tests are two different implementations of the same REST/SOA service. See the 'installing' link, above, for how to run the tests. 4. Compare the performance of the two tests, a & b. Which has better response time / throughput? 5. Using the least amount of tooling/instrumentation, identify the performance problem of the slower test. Hook it up your self and run the tests. 6. At codegolf.stackexchange.com, there is one "Stack Exchange Challenge" for each hole of golf. Post the following two things for your solution to that challenge: • Post a description of the tools/techniques you used to detect the performance problem. Must be detailed enough so that others can reproduce your work. Performance golf always compares two different loads -- a & b. The solution must identify the inefficient code in the slower of the two examples. It must also show the absence of that inefficient processing in the faster of the two examples. • Tally the number of strokes for your approach, using the "Scorecard" below. All solutions must specify the # of strokes incurred, and it must be specified in the answer heading/title. 7. Upvote the solutions that best identify the performance problem and have the fewest strokes (see Scorecard, below). Similar solutions on different platforms (Mac/Linux/MS-Win) deserve roughly the same number of upvotes. ## Scorecard This scorecard determines the approach with the least amount of tooling/instrumentation. Lowest score wins! • 1 stroke if JVM restart is required to hook up your monitoring tool of choice. • 1 stroke for any tool with any$$licensing cost. • 1 stroke for every separate install process. No strokes for JVM and pre-installed OS tools. • 1 stroke for tools/techniques specific to a particular Database vendor. Ex: Oracle AWR report. Even ‘EXPLAIN PLAN’ solutions are proprietary. ## Example One -- zero strokes :-D This example does not use this github repo, but it will give you the general idea. This solution to solving a high CPU problem would get lowest=best instrumentatin score: zero strokes. Only JVM and OS tools are used (thread dump and top -H). There are no tool license costs and a JVM restart was not required for the thread dump. ## Example Two -- 3 strokes :-( This example also does not use this github repo, but it will give you the general idea of what we mean by the best troubleshooting with the least tooling/instrumentation. A modern, commercial profiler (YourKit, JProfiler, etc...) would easily solve the high CPU problem in example 1. But look how many strokes (1+1+1=4!) are taken off with this approach: * 1 stroke because a JVM restart is required to hook up the tool * 1 stroke because there are licensing costs. * 1 stroke to install profiling the tool • Answers in this site normally involve writing code, so this doesn't really appear to be on topic. Jun 16 '16 at 7:43 • Thanks for using the sandbox! I do however, see some problems with this challenge. For one, I think you would need to clarify a lot of the stroke criteria, as something like "rarely used" is pretty subjective. In addition, there doesn't seem to be a way to enforce a person to not use a high level tool, and then after figuring out the problem finding it again with a more basic tool. Even further, why couldn't someone look at another answer and then reuse their data to get a better score? cont... Jun 16 '16 at 13:22 • After all that, there doesn't seem to be an objective winning criterion, unless it is number of strokes. If number of strokes determines the winner, then won't there be many ties? I think you would need something more granular. Jun 16 '16 at 13:24 • Sounds like I need to work on the "rarely used" part mentioned by @FryAmTheEggMan. Regarding the same commenter's comments about the high-level tool and the basic tool. That is part of the natural progression of monitoring. We learn to do it one way, then we learn a better, less intrusive, less expensive way. As long as the user of the basic tool is "detailed enough so that others can reproduce your work", who cares how much refinement was involved? Jun 16 '16 at 22:45 • Regarding @FryAmTheEggman's question of "many ties". I look at auction sites like eBay as reasonable crowd-sourced arbiters of value of a given object for sale. I was hoping the voters would provide that kind of assessment, but I see where lack of objectivity could cause cronyism and perhaps other problems. Could someone point me to codegolf tolerance/lack of for ties? I'll try to work on that. Jun 16 '16 at 22:48 • @FryAmTheEggman, you mentioned that my "rarely used" criteria was pretty subjective. That's a good call, so just edited / removed that. Jun 18 '16 at 21:36 • @FryAmTheEggman, the "many ties" concern could also looked at from a different perspective -- that Performance Golf will provide a very useful "catalog" of answers. This "catalog" concept got 18 upvotes here. Jun 18 '16 at 21:43 • The catalogue concept is a failed experiment, and your mention of it is one of the reason why. "It's a catalogue question" should not be used to justify why a question should be closed even though it's off-topic and wouldn't have an effective scoring mechanism even if it were on-topic. Jun 19 '16 at 13:31 # Make a Fork Bomb code-golf under construction, please constructively (no pun intended) criticize Create a program which forks itself at twice and exits, or forks itself once and idles. Whether it continues forever or exits is your choice. Forks can be OS forks or simply a command to relaunch the program. ## Rules • No spoon bombs allowed, please. • Don't make any assumptions about the location of the program. # Bash, 10 chars ./$0|./$0&  Acts as a standard punching bag for other solutions. # Microsoft Windows Batch file, 5 chars  %0|%0  Anybody who beats this one gets a million internet points. (and maybe a bounty) • I assume that the downvote is because someone considers that this violates our policy on malicious code. I think it's borderline, but if it's on the right side of the border then the question has other issues. 1. Why fork itself at least twice? Surely forking once is enough for a fork bomb? 2. Define "OS forks" in a way which doesn't rely on the OS being POSIX. Or, better, remove that requirement: it seems to me to limit the languages permitted more than necessary for no benefit. 3. What's a spoon bomb? Google is not being helpful. Jul 14 '16 at 13:49 • @PeterTaylor 1. the chat said it was fine 2. If you only fork once and exit, you have a constant amount of processes 3. Good idea. Any tips for windows forks? 4. it's a joke Jul 14 '16 at 16:38 • I'm downvoting because I think it's close enough to malicious. A fork bomb can hang a computer. Jul 22 '16 at 19:27 # Stump The Golfing Languages This is the seed of an idea. I'm unclear on the details that might make it work. I want people to submit answers in the form of a program in a "normal" language (defined how?), such that reproducing its functionality in a golfing language isn't much smaller. That is, I want to find the algorithms that Jelly and Pyth and Matl and such are not optimized for. I would appreciate suggestions on how to make this work. Maybe cops and robbers? Maybe each entry just contains two programs, and comments are given to help golf the smaller one? • The only language that could possibly win is mathematica Aug 23 '16 at 1:52 • Aug 23 '16 at 1:53 • It's very easy to come up with boring examples e.g. print this exact trace, reproduce the output of this random number generator, etc. I don't see any way to get interesting answers. Aug 23 '16 at 6:31 • @feersum I'd probably disqualify errors and crashes and stacktrace outputs and such, and maybe all built-in non-trivial algorithms. Thanks for pointing those out. Aug 24 '16 at 7:26 • @DestructibleWatermelon you don't have to beat the golfing language to win. The winning entry will probably still have a shorter Jelly solution than Python (or whatever). Aug 24 '16 at 7:27 • I don't know of any golfing languages where creating a simple webserver is possible. All this would be is finding a task that isn't normally required for when doing code-golf – Blue Aug 24 '16 at 14:16 • I'm thinking of restricting it to algorithms and output, not stuff like network and file access. Aug 24 '16 at 22:11 # Draw "Stack Exchange" Stack Exchange has many site (159) and It has a logotype too. Anyway, In this challenge you'll need to draw Stack Exchange in the most shortest way. This is a code-golf. challenge. ## Rules 1. Have fun! 2. You've to draw Stack Exchange, you can't use Paint or something like that, you can't use libraries. • Challenges that start with "Most creative" are almost certainly guaranteed to not generate creative answers (or any answers for that matter) Sep 8 '16 at 13:47 • @Fatalize I changed the challenge. Sep 8 '16 at 13:54 • Now there is basically no interesting solution possible to the challenge, because there is no patterns in Stack Exchange. So all shortest solutions will to print that string directly or a compressed version of it. Sep 8 '16 at 13:58 # Open the browser, polyglot edition. polyglotcode-challenge Your job is to open a browser window of the default browser to https://codegolf.stackexchange.com in as many languages as possible. Your code must open the browser itself, and cannot rely on an open one. ## Rules • Versions of the same language are considered a single language • Define "default browser" in the context of non-Windows OSes. Sep 25 '16 at 21:47 • @PeterTaylor Whatever browser the open command works with. There was a previous version of this challenge, it worked then. Sep 25 '16 at 22:24 # Mad lads! Inspired by the paper calculator episode of Numberphile. Your challenge in this puzzle is to take in two two-bit (0-3) numbers and output the sum of the two numbers... using ordinary household objects. Some possibilities of how this can be done: Dominoes Paper Marbles music box (+ some helpers..) ## Input: input must always be involving two sets of two-bit integers, which can be represented by anything you like, so long as the cardinality of the representations is the same. ## Output: The output should be a single 3-bit integer which represents the addition of the two inputs. ## Rules: • your device cannot have the capability to connect to the internet in any way (sorry, this also disqualifies carrier pigeons). Your device must also not be able to perform this function alone (eg a calculator). • It must be somewhat original. put your own twist on it! • though, your entry can be alive (does your dog add??), so long as your entry is not in discomfort. • Pictures are required for each entry to show how it works. videos would be better, but aren't required! • The sole function of your machine does not have to be adding, it can do other things as well. This means that older projects that may serve a slightly different function are welcome, so long as they meet the rules stated above. • Your device can be as simple or as complex as you like, so long as it doesn't get to a point where it's completely esoteric. ## Judging: You will be judged based on ease of use, ease of understanding, as well as originality! This means that entries should be easily explained, used, and be unique in some way. This is a , so the most upvotes wins! good luck! • In my opinion, this is not a programming challenge. Once we start leaving the realm of a computer-based programming paradigm, a challenge becomes more difficult to test, replicate, and verify. Plus, something done with Dominoes, for example, may not "run" to completion 100% of the time, and in my opinion that makes it non-deterministic. Sep 26 '16 at 18:43 • Related meta: meta.codegolf.stackexchange.com/a/10151/34718. TLDR, if you want to program with dominoes, find or create a domino simulator where programs can be scored in bytes. Instead of marbles, use Marbelous. Sep 26 '16 at 18:52 • @mbomb007 what about papers, and counting dogs? This isn't a code golf, it's a popularity contest – user56309 Sep 26 '16 at 19:20 • Popcons still require the use of programming languages. meta.codegolf.stackexchange.com/q/2028/34718. See both linked meta questions. What you are trying to do is off-topic for this site. Sep 26 '16 at 19:42 • @mbomb007 I'm not sure you linked the correct thing. I have found no reference of popularity contests in your recent link.. – user56309 Sep 26 '16 at 19:44 • Rules and meta consensus apply to all challenges, not just code-golf. Sep 26 '16 at 20:21 • Popcons should be held to a higher standard than other questions, not a lower one as your comments imply. Sep 27 '16 at 7:33 ## 99 selttob fo reeb no eht llaw popularity-conteststring I teb ev'uoy lla draeh tuoba eht doog 'lo 99 selttob fo reeb no eht llaw. Llew ti os sneppah taht I emoc morf na evitanretla esrevinu - eht esrevinu erehw ew etirw gnihtyreve ni esrever! Ew peek eht snoitisop fo lanigiro hguoht. Siht osla snaem reporp noitazilatipac fo tsrif (ekil rettel ni siht txet). Ruoy egnellahc si ot etirw a margorp taht stuptuo eht lausu 99 selttob fo reeb no eht llaw, tub ni esrever (ni ruo egaugnal uoy dluow llac ti 99 bottles of beer on the wall). Siht si a ytiralupop tsetnoc, os teg evitaerc dna yrt ot sserpmi eht dworc. Doog kcul! I bet you've all heard about the good ol' 99 bottles of beer on the wall. Well it so happens that I come from an alternative universe - the universe where we write everything in reverse! We keep the positions of original though. This also means proper capitalization of first letter(like in this text). Your challenge is to write a program that outputs the usual 99 bottles of beer on the wall, but in reverse (in our language you would call it 99 selttob fo reeb no eht llaw). This is a popularity contest, so get creative and try to impress the crowd. Good luck! Elpmas fo derised tuptuo: Sample of desired output: 99 selttob fo reeb no eht llaw, 99 selttob fo reeb. Ekat eno nwod dna ssap ti dnuora, 89 selttob fo reeb no eht llaw. 89 selttob fo reeb no eht llaw, 89 selttob fo reeb. Ekat eno nwod dna ssap ti dnuora, 79 selttob fo reeb no eht llaw. ... 1 elttob fo reeb no eht llaw, 1 elttob fo reeb. Ekat eno nwod dna ssap ti dnuora, on erom selttob fo reeb no eht llaw. On erom selttob fo reeb no eht llaw, on erom selttob fo reeb. Og ot eht erots dna yub emos erom, 99 selttob fo reeb no eht llaw. • There's no need for the reversed text in the description - it distracts the viewer from the challenge at hand. Oct 21 '16 at 12:06 • @Qwerp-Derp I wanted to make this a bit more "unique" and "immersing", so I thought about giving the reversed description(I like it). I also included original text(although in spoilers), but I was also wondering about distracting readers. Do you have some other idea on how to keep both versions without making it look obscure? Oct 21 '16 at 12:10 • 1. This should not be a popularity-contest. 2. It's fundamentally a duplicate of codegolf.stackexchange.com/q/64198/194 . 3. If you're going to muck around with the question text, write a program that mucks it around correctly. "elpmaS" doesn't follow the specified transformation rule. Oct 21 '16 at 12:34 • @PeterTaylor 1. why not? 2. It's not. You can't simply reverse, and counting is a bit different. Oct 21 '16 at 13:24 • Do X creatively popularity contests have fallen out of scope. This will get closed if posted on main. Oct 21 '16 at 13:46 • @Dennis Damn, too bad. I guess I won't be posting it then, it's boring "shortest code". Oct 21 '16 at 14:16 • What does this add to the original '99 bottles of beer on the wall'? Oct 21 '16 at 20:54 • This sandbox post has had little activity in a while and little positive reception from the community. Please improve / edit it or delete it to help us clean up the sandbox. – user58826 Jun 9 '17 at 14:08 # Best n out of 2n - 1 ### Challenge: This one should be relatively simple. Output this exact text: Best [n] out of [2n - 1].  given n as an input. ### Input: Just the integer n, can be from stdin or as an argument. n will always be greater than 0. ### Output: The exact text above. Trailing spaces/newlines are allowed. ### Rules: This is , so shortest code in bytes wins. Standard loopholes are forbidden. ### Meta: Is this too simple? What other tags should be included, ? • Seems like a dupe of 2spooky4me, just with a different operator. Nov 1 '16 at 17:52 • Your wording specifies "this exact text" while I think your intent is "Best 5 out of 9." or the like. Nov 1 '16 at 17:53 • @Geobits Aha, I knew I remembered a similar challenge. Just forgot the exact name, so I thought maybe I was just imagining things after I tried to find it. My bad. Nov 1 '16 at 17:55 # Google Home / Amazon Echo - Turing complete? Your challenge is to try to make a turing machine based on Google Home and Amazon Echo, see this video. You must describe how to set up the machine, and how to give it input. You must also describe a program for integer addition. It should compute 1+1 to be 2, 200+55 = 255, 200+56 = 0, and so on for all other combinations of 2 8-bit integers. • It's basically not possible... Dec 2 '16 at 19:52 • VTC as unclear and too broad. What are you even expecting as an answer? Dec 2 '16 at 19:52 • @EasterlyIrk A set of commands that send the 2 computers into infinite loop, reading commands endlessly from a list of commands for the other to run, eventually processing a computer program and finally calculating the answer to the universe. Dec 2 '16 at 20:14 • @TùxCräftîñg Why not? I mean other than that we have yet to prove their turing-completeness. Dec 2 '16 at 20:14 • @SoniEx2 so only 1 of each computer? And what defines a command? Dec 2 '16 at 20:16 • @EasterlyIrk A command is anything that starts with "Hey google" or "Alexa" and triggers a successful response on either of the computers. Dec 2 '16 at 20:19 • Are we allowed to program the Echo and Google device? If so this is trivial. If we're supposed to construct a sentence that winds up having the devices compute using existing services like the calendar in the video, there are plenty of web sites that can process a variety of languages and read back the solution. Echo has basic math built in. Dec 2 '16 at 21:09 • I really hope this can be tweaked into a challenge because the youtubes would be awesome. Dec 2 '16 at 21:12 • @wyldstallyns tbh I have no idea what I'm doing... But yes, you're allowed to program both of them. Dec 2 '16 at 22:51 • A question should ideally be self-contained. In this case the APIs for Google Home (whatever that is) and Amazon Echo (whatever that is) probably won't fit in the question, but an overview and links to the APIs would. Dec 2 '16 at 23:03 • @PeterTaylor This isn't a matter of APIs. This is a matter of voice commands. Dec 3 '16 at 0:19 # Make a Simple GUI application I have made a simple glade layout. The chalenge is to remake it in as few bytes as possible. The glade file: <?xml version="1.0" encoding="UTF-8"?> <!-- Generated with glade 3.20.0 --> <interface> <requires lib="gtk+" version="3.20"/> <object class="GtkApplicationWindow"> <property name="can_focus">False</property> <property name="title" translatable="yes">Remake me!</property> <child> <object class="GtkBox"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="orientation">vertical</property> <child> <object class="GtkButton"> <property name="label" translatable="yes">hello</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> </object> <packing> <property name="expand">False</property> <property name="fill">True</property> <property name="position">0</property> </packing> </child> <child> <object class="GtkLabel"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="label" translatable="yes">world</property> </object> <packing> <property name="expand">False</property> <property name="fill">True</property> <property name="position">1</property> </packing> </child> </object> </child> <child> <placeholder/> </child> </object> </interface> • This probably doesn't break any rules, but it also doesn't seem that fun. It would be preferable if it was a more substantial task than simply golfing the code you already wrote. – Wheat Wizard Mod Feb 18 '17 at 2:09 ### Rock Paper Scissors Lizard Spock This game is from The Big Bang Theory, an extended version of the classic Rock Paper Scissors game. Objective To create a full program that I can run to play Rock Paper Scissors Lizard Spock against an "AI". The opponent ("AI") will pseudo-randomly choose their option after receiving user input. The program must be run with user input of the following; | Input | Meaning | |------- |---------- | | R | Rock | | P | Paper | | S | Scissors | | L | Lizard | | SP | Spock |  The game is played with the following rules that Sheldon tells us; Scissors cuts Paper Paper covers Rock Rock crushes Lizard Lizard poisons Spock Spock smashes Scissors Scissors decapitates Lizard Lizard eats Paper Paper disproves Spock Spock vaporises Rock Rock crushes Scissors Once you've taken user input, psuedo-randomly chosen the AIs option, you must output either "Player wins (<<user_input>> vs <<ai_input>>)" or "AI wins (<<user_input>> vs <<ai_input>>)". In the event of a tie (both the user and AI choose the same options), you must output "It's a tie" Sample Runs //Player chooses Scissors (S) //AI chooses Paper (P)$ php -f rpslsp.php S
Player wins (S vs P)

//Player chooses Spock (SP)
//AI chooses (R)
$php -f rsplsp.php SP Player wins (SP vs R) //Player chooses Lizard (L) //AI chooses Scissors (S)$ php -f rsplsp.php L
AI wins (L vs S)

//Player chooses Lizard (L)
//AI chooses Lizard (L)
\$ php -f rsplsp.php L
It's a tie


Rules

• Standard loopholes apply.
• The computer must choose an input at random (pseudo random) so that on each program run, the AI chooses (in a perfect world) a different input and that each input has the same percentage of being chosen.

This is code-golf so the shortest code in bytes wins.

• "A full program" means that we're not allowed to return the result from a function? Must it be a full program?? Mar 13 '17 at 12:55
• @Mr.Xcoder What I mean is we are able to run it in environments like TIO or REPL.it
– ʰᵈˑ
Mar 13 '17 at 13:01
• 1. It's not true that the game is from BBT. BBT made a cultural reference to a preexisting game. 2. The output spec is incomplete because it doesn't say what to do in the case of ties. Mar 13 '17 at 14:32
• @PeterTaylor Ah, I've only known the game exists because of TBBT, though the origin of the game doesn't really affect anything except maybe tread on the toes of some serious competitive RSPLSP players. Thanks for reminding me about it being a tie.
– ʰᵈˑ
Mar 13 '17 at 14:36
• Mar 17 '17 at 19:42