We have lots of tips for golfing in specific languages, but what about other types of challenge? Has anyone wondered how to improve their popularity-contest answers?
What general tips do you have for gaining popularity (i.e. upvotes) in popularity-contests? I'm looking for ideas which can be a...
Musical Washing Machine
I have a washing machine with a knob and several buttons. The knob selects the type of laundry and the buttons cycle through water temperature, etc. options. When pressed, these each create a musical note. There are five musical notes that can be made, in this ascending...
To be perfectly honest, I absolutely agree with #3. A bit of formatting
Makes the post more readable
proves that the user put a bit of effort into it
prevents the "Wall of Text crits you" effect
stands out
allows me to spot important points more easily
puts some structure into the posting
And...
Accordion is a solitaire card game I recently came across where nearly every layout is solvable, but incredibly hard.
52 cards are placed in a random order. Each turn, you remove the first of two cards that:
Share a suit or a number and
Are at a distance of 0 (adjacent) or 3 (two cards in bet...
@jrenk I've only ever won a code golf challenge once. Most of the time I use languages like R and Julia, which are ill-suited for golfing, but I have a lot of fun.
PHP, 101 96 99 98 77 72 bytes
<?for(;2>$t=gmp_strval(gmp_gcd(~++$i,7+$e+=$t))or$argv[1]-=print"$t ";);
Usage:
Call the Script with an argument: php -d error_reporting=0 script.php 30
If you want to test it you need to uncomment ;extension=php_gmp.dll in your php.ini
--> extension=php_gmp....
JavaScript (ES6), 91
Recursive gcd, iterative main function. Not so fast.
Usual note: test running the snippet on any EcmaScript 6 compliant browser (notably not Chrome not MSIE. I tested on Firefox, Safari 9 could go)
F=m=>{
for(G=(a,b)=>b?G(b,a%b):a,o=[],p=7,n=1;m;d>1&&(o.push(d),--m))...
I have an idea for a challenge, but I think it has been done before, but I'm not sure
the idea is that your source code must be smaller than C bytes (which is some constant which I've not decided on)
then your code must generate expressions using operators I'll define (think +-*/^, etc) for every number between 1 and N (where N is some constant which I've not decided on)
then your score is the total number of bytes for all expressions
Now I don't know PHP or how exactly it fits into HTML, but I had an idea that you could run a PHP script in a Stack Snippet. Is this true, and if so could you give some examples?
Battle of the Brainfucks
code-golf brainfuck
Challenge
Using Brainfuck or a Brainfuck Derivative, you must write the shortest program to output the nth self-describing number.
Self describing numbers
A self describing number is an integer m in which each digit d at position n counts how many...
@BetaDecay I'm not sure restricting to BF is particularly interesting. For one thing, Golunar would definitely cause answers to be pretty short already
Once people find the right language, I think most answers will be using the same one
Wait sorry, not Golunar. Gimme a sec
Hmm actually... @BetaDecay what happens when n >= 10?
@MartinBüttner I just read the "Labyrinth" description and wanted to note there is already a BF derivative where control flow is determined by the layout of a maze: esolangs.org/wiki/Mice_in_a_maze
You must have found a different description than me:
> A selfish 16-year old girl is given 13 hours to solve a labyrinth and rescue her baby brother when her wish for him to be taken away is granted by the Goblin King.
The cameraman's fiancee is a producer for CNN, she was just celebrating her last day with the crew when this happened, as they were about to move to Charlotte (presumably NC).
From now on, every time you submit a bug report on meta, you should reference Bill Woodger's comments here and be sure to draw those freehand red circles: meta.stackoverflow.com/q/303306/3224483
The circle tool can only do circles and ellipses, though. If you need to comment with badly moused text (and arrows pointing to the circles, of course), then you need two tools, when one would do if you're freehanding it.
I can believe that. My point was that unless you're drawing them constantly all day, a single gaming session will by far outweigh any freehand circle drawing ;)
Then again, even most legitimate exercises aren't great for your wrists, either. Poor wrists :(
Which reminds me... I got a modded server hosted on Creeperhost. It can handle five mindful players. Right now I'm playing with other friends, but I am thinking about restarting once my friends quit playing and Calvin's server dies. Then I'll open it to PPCG users if there is any interest
I dunno. I'm not sure how it shows off their JS knowledge much. It's not exactly complicated looking. It seems more like a "You know what would be cool? Clouds." from above to me.