Questions tagged [popularity-contest]

A popularity-contest is a competition where the answer with the highest vote tally (upvotes minus downvotes) wins. As these are frequently closed, read the tag info and post your challenge to the sandbox first.

11
votes
3answers
5k views

Display the explosion of a star in ASCII-art

The goal is to animate a star exploding in ASCII art, starting from a single star character * to a supernovae and finally to the space void. Rules : You have to ...
111
votes
7answers
24k views

So obviously, P = NP [closed]

SAT is the problem of determining whether a boolean expression can be made true. For example, (A) can be made true by setting A=TRUE, but (A && !A) can never be true. This problem is known to ...
6
votes
9answers
3k views

Make two programs communicate with each other

Task: Your task is to create two programs in different languages that can communicate one-way to each other. Your sending (tx) program will take input, for either stdin or a query, and send it along ...
69
votes
8answers
9k views

Is it dark outside? Draw a sun map!

Our closest star, the sun, is quite fidgety. The times it rises and sets depend on where you are, and whether it is winter or not. We would like to be able to deduce if the sun is shining outside ...
95
votes
73answers
18k views

Why isn't it ending? [closed]

Your task: To write a program that should obviously terminate, but it never (to the extent of a computer crash) does. Make it look like it should perform a simple task: adding numbers, printing ...
5
votes
1answer
826 views

Let us create a sonnet quine! [closed]

There are programs that will output its source code to standard output and do nothing else. They also access no external output. This type of program is known as a quine, and is a common code ...
62
votes
42answers
9k views

π Day puzzle for 3/14

Happy π Day. The goal of this question is to calculate the area for a circle of radius 3, where A = πr². The catch is that you have to use the constant π that is defined in a different language than ...
12
votes
2answers
2k views

What do you see in an inkspot? Rorschach generation' [closed]

So I'd like you to attempt to generate Rorschach images like the below image: Here is a link to further inspiration. This is a popularity contest, but I will say that colours are likely to be more ...
24
votes
32answers
7k views

Obfuscation Challenge [closed]

You are to write a program that does one of the following. Only displays "Hello World" does nothing else Quits and nothing else (no output, no errors.) Takes one line of input, parses it as an ...
0
votes
0answers
154 views

Create a chain of programs in different languages [duplicate]

Create a program in any language, which outputs the source code for a program in another language, which outputs the source code for a program in another language, and so on. Please post at the top ...
90
votes
109answers
23k views

4, 8, 15, 16, 23, 42 [closed]

4, 8, 15, 16, 23, 42 Write a program that outputs this sequence of numbers infinitely. However, The Numbers must not appear in your source code anywhere. The following is not a valid Java program to ...
8
votes
1answer
2k views

Create a random 3D asteroid

Imagine you are working on a 3D adaptation of the classical video game Asteroids. Your task is to write an algorithm that can create a random 3D asteroid. This is a popularity contest, not code golf. ...
7
votes
3answers
2k views

Determine the critical path

In project management there's a method, called the critical path method, that is used for scheduling activities and for determining which activities' timings are crucial (i.e. critical) and for which ...
55
votes
35answers
12k views

Could you please tell me the time? [closed]

You know that your language's clock/time API's are broken and they are not reliable at all. So you are not allowed to use any built-in API to access system time/date. But you also know that your ...
2
votes
2answers
310 views

Generate code in another language [duplicate]

Write a program in language A which outputs a program in language B where: Language A != Language B The output is itself a solution to this question. This is a popularity contest. If you want to ...
184
votes
50answers
35k views

Trolling the troll [closed]

A troll has captured you and is forcing you to write malware (defined as a program that damages the computer that runs it). The troll can read and understand code, but is not so good at spotting bugs. ...
12
votes
4answers
2k views

Worst Abuse of CSS? [closed]

What is some of the coolest/best/worse abuses of CSS? For example, these shapes, or using multiple box-shadows to make pixel art. popularity-contest ending on 16/04/14.
10
votes
3answers
862 views

These are my lucky dice [closed]

Implement a program or function which simulates common dice for role playing games. It should handle at least the d6 and d20, the two most common dice. However, it should work as stereotypical gamers ...
12
votes
9answers
845 views

Divide and stay Happy. Who cares about the Conquer part?

Well, when I buy gifts for my two wives, I want them to feel equally important to me, but it's hard to go shopping with fixed budgets. Instead, I buy a bunch of stuff and divide them into two groups ...
1
vote
1answer
202 views

Predictable unpredictability [closed]

Ever programmer knows, that programs need to be predictable. Any code that is not predictable will do something undefined and therefore most likely crash or worse. But when I tried to figure out what ...
197
votes
81answers
24k views

What? No error? [closed]

Your task is simple. Write a program that should obviously produce an error on first glance either when compiled or run, but either doesn't or produces some other unrelated error. This is a popularity ...
43
votes
52answers
8k views

Alphanumeric Hello World [closed]

Your goal is to write "Hello, World!" (minus the quotes). This is a popularity-contest, so most up votes wins. Code length will be used to break ties. Anything goes, as long as it is within the ...
14
votes
57answers
17k views

Write a function that takes (x, y) and return x to the power of y WITHOUT Loops [closed]

This is a really neat short challenge. Write a function or a procedure that takes two parameters, x and y and returns the ...
82
votes
16answers
16k views

Undefined Behavior Killed My Cat [closed]

Undefined Behavior Killed My Cat It's well known that undefined behavior can kill your cat [citation needed]. But can it? Your Task Write a program that invokes undefined behavior. Describe a ...
28
votes
21answers
5k views

Limerick Hello World [closed]

A rhyming program you write Attempting to win the fight For winning the contest and vote It must compute "Hello World" Then print it very polite The most popular poem will win. The requirements are: ...
11
votes
2answers
2k views

ASCII-art logic gate diagram

I challenge you to write a code to make an (extended) ASCII-art logic gate diagram for the sum of products form of an equation. Use the following notation to represent gates: AND ...
10
votes
20answers
1k views

Every 2^n times

Let n be the number of times your program has been executed. If n is a power of 2, then print ...
40
votes
50answers
11k views

Most creative way to reverse a positive integer [closed]

Provided an input as an unsigned integer: 13457 Your function/subroutine should return: 75431 Since this is a popularity ...
9
votes
15answers
1k views

Random without Time-Basis [closed]

Computers do not out-of-nowhere create random numbers without basis, as most likely, time is the universal basis of randomness. I want you to create a code that creates random numbers with these ...
9
votes
5answers
994 views

Program that prints mirror images of it's own self

Write a program that produces mirror images of itself. An example, would be the fantastic camel code that reads it's own code and produces two smaller 2x2 versions. Given the input: ...
7
votes
19answers
3k views

Approximate a Bell Curve

Create a program to display some approximation of a bell curve. You are free to use whatever method you wish for generating the data, but the data must be displayed vertically, as in oriented like so: ...
12
votes
7answers
948 views

Acronym to phrase

Task: Create a program that will take an acronym as input, for example dftba, and generate some possible phrases that the acronym could stand for. You can use ...
66
votes
55answers
67k views

Weirdest obfuscated “Hello World!” [closed]

Task: Create an obfuscated program that prints Hello World! (exactly like that). Your program may not have any strings in it. Rules: You can use any programming ...
14
votes
18answers
2k views

Break some standards! [closed]

Everyone knows the phrase "Rules are made to be broken!", so here is your task: Write some code in any language that breaks a standard. This can be anything, from putting 240 volts down a USB cable, ...
77
votes
78answers
13k views

Call a method without calling it [closed]

Inspired by a now deleted StackOverflow question. Can you come up with a way to get a particular method executed, without explicitly calling it? The more indirect it is, the better. Here's what I ...
19
votes
10answers
3k views

Create a programming language interpreter [closed]

Task: You must create an interpreter that can parse snippets of a programming language. The language does not need to be complex, but it must include the following syntactical elements: Ability to ...
20
votes
6answers
3k views

Parallel projected voxel terrain generator

Your job is to generate a heightmap and show it as a parallel projected, voxel landscape. The rules are the following: The (heightmap of the) landscape has to be randomly generated You also have to ...
16
votes
10answers
6k views

Crash (i.e. cause the interpreter to stop working and force close) Python [closed]

I would like to see who can make Python have a fatal crash with the most creative code. This means that when the program runs, Windows for example, will take over and pop up with something like “IDLE ...
51
votes
69answers
19k views

“Creative” ways to determine if an array is sorted

Given an integer array, write a program that determines if it is sorted in ascending order. Remember that this is a code trolling question. I am looking for most interesting ways that people come up ...
1
vote
4answers
3k views

More coding expressions like while(!(succeed = try()))? [duplicate]

I am looking for either suggestions or examples of more famous sayings written in code! If you have a website or database of them, please link that below your favorite one! Examples: ...
432
votes
47answers
146k views

Images with all colors

Similar to the images on allrgb.com, make images where each pixel is a unique color (no color is used twice and no color is missing). Give a program that generates such an image, along with a ...
13
votes
5answers
1k views

Hide a Brainf*** greeting in other code

The goal is to write a program (anything except explicit brainfuck) which prints Barney Stinson's best rule: New is always better. when interpreted normally, but Legen... wait for it... dary! ...
7
votes
4answers
967 views

Turing-Complete polyglot [closed]

Write a polyglot (code that works in two or more languages) that has a "mid-section" that can be modified to do any computational task. This question is similar to https://stackoverflow.com/questions/...
3
votes
2answers
196 views

Reverse Regular expressions [closed]

The idea here is to write a little segment that will spit out regular expression patterns when given a string that matches them. As you might have guessed, this will be a popularity contest, and I'll ...
386
votes
110answers
81k views

Most creative way to display 42

Douglas Adams was born on March 11, 1952, and died when he was just 49. In honor of this wonderful writer, I challenge you to display 42 in the most creative way possible. You could print it in the ...
7
votes
4answers
525 views

Create a flaky test [closed]

Create a piece of code and a genuinely-looking test for it. However, the test must be flaky: when run multiple times, it must sometimes fail, sometimes succeed. Be creative and try to hide the ...
-7
votes
10answers
644 views

Code to display a string without calling any methods or functions [closed]

Write a code to display "I Love You". Without using any built-in tools or functions like echo, System.out.println, ...
1
vote
13answers
956 views

Strange ways to keep an endless high CPU usage [closed]

There are some ways which cause an endless high CPU usage such as catching recursion exception. e.g. the following script in Python causes that problem: ...
2
votes
1answer
1k views

Hidden easter egg [closed]

Here's a fun idea: Write a simple game (tic-tac-toe, guess the number, etc) that has an easter egg in it, that can be triggered by a specific, special input from the user and does something cool, but ...