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.

Filter by
Sorted by
Tagged with
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 ...
10
votes
4answers
936 views

Christmas quine!

In the language of your choice, write a program that is arranged in the shape of a Christmas tree that prints itself in the same shape. What is not allowed: Printing out the source file Code that is ...
10
votes
3answers
922 views

Reflective evolutionary algorithm

You have to write a program, implementing a function digitsum(int i). The program has to modify its own code (for languages, where this is not possible with f.e. ...
23
votes
6answers
5k views

Detect what programming language a snippet is

Your challenge is to take some source code as input, and output which programming language it is written in. For example, you could have the input ...
5
votes
2answers
1k views

2D javascript table graphics

The challenge Make a JavaScript program that can use a HTML table as a canvas, having each cell a pixel. You can either input the position and color values in a form or by using the console. Score ...
6
votes
8answers
751 views

Loophole for other challenge [closed]

You are to post an answer you posted that exploited a loophole in the challengers question. Bonus points if it caused them to rewrite the question. For example, one challenge was to write a program ...
22
votes
6answers
1k views

Bloatware contest: producing 100+ MiB executable [closed]

Create short source code in your favourite compiled language that compiles into a big (not less than 104857600 bytes) executable file. The program must be runnable (assuming 1GB of free memory) and ...
39
votes
20answers
10k views

Love calculation

As a kid my sister showed me this little love calculation to see how much chance you have of getting in a successful relationship with your crush. All you need is 2 names and a piece of paper. John ...
6
votes
4answers
557 views

Create a simple math calculator +-/* accepting only Chinese characters

The task: Build a calculator that takes a simple math equation in Chinese and outputs the correct answer(To the equation from the users input) in Chinese. Scope: Any programming language can be used....
11
votes
2answers
1k views

Underhanded launcher [closed]

Your goal is to write a super-secret program which launches another (independent) program. You don't have to provide the payload in your answer, it can be any program name your program will launch. ...
1
vote
1answer
286 views

Write a program that can draw 2-D shapes using ASCII or any other method [closed]

Rules (not too restrictive; flexible): 1.Must be able to draw shapes on command (e.g., I type in "square" and a square is drawn). Minimum completed shapes that can be drawn on command: Square, ...
1
vote
0answers
265 views

Write a program that outputs color graphics for the PSX system [closed]

This challenge calls for one to write a working program that is executable to the PSX microprocessor and platform. The program must execute on a PSX emulator. The best demonstration of graphics ...
13
votes
38answers
3k views

Count occurrences of an integer [closed]

Based on the question How many positive integers < 1,000,000 contain the digit 2?. I'm looking for the most creative solution to count all the Integers from X to ...
10
votes
7answers
4k views

How do I convert a word document to a pdf?

Help guys my assignment says it needs to be in .pdf format but I did it in Word. I'm really stuck. How do I take a word document in .docx format and make a .pdf that contains all the text from it? ...
3
votes
7answers
742 views

Creating a quine in as many characters as possible [closed]

A code-bowling is not the same as a code-golf, in a Code-Bowling, you should solve the challenge in as many characters as possible. The goal of this Code-Bowling is to create a quine in as many ...
0
votes
7answers
1k views

Acrostic Poem - Programming [closed]

TASK: Make an acrostic poem in the lines. e.g. BATCH break attrib -h acrostic.txt type acrostic.txt cls help The output CAN also be an acrostic poem. ...
14
votes
7answers
946 views

Avoid duplicate entries using a sign change

This anecdote contains the following intriguing exchange: "Fine, Fred," Avi interrupted. "Then how would you change this to avoid duplicate entries?" "Oh, just change that one there to a ...
1
vote
1answer
266 views

Computer Generated Olympic Theme Song [duplicate]

Try to regenerate the olympic theme song, "Bugler's Dream" using the programming language of your choice. The language/platform used must be able to emit the physical sound. Only playing the main ...
7
votes
2answers
313 views

Create a sophisticated livelock

The point of the puzzle is to learn about livelocks: Create a multi-threaded (or a multi-process) program, whose threads (processes) indefinitely try to wait for each other and never finish. Unlike a ...
2
votes
5answers
312 views

Let's learn geometry

Today our lesson is about rectangles and triangles. you will be given as an input an n x n grid that is based on two characters ...
12
votes
6answers
1k views

Down the drain it goes

I once encountered this (mini) game where you had 4 or more vertical pipes that were connected by a number of horizontal pipes and you have to drop a ball or water into the vertical pipes. There are 2 ...
7
votes
7answers
1k views

Find the largest prime under a number… but only for the test cases [closed]

The Code Your program should take an input of n > 2 and output the largest prime less than or equal to n. You can choose how the number is input (standard input, read from a file, etc). For example: ...
19
votes
3answers
1k views

Freehand red circles

Over on http://meta.stackoverflow.com, we have a few memes of our own. One of them is Freehand Red Circles. See this post: So, the challenge is, can you draw freehand red circles... with code? ...
19
votes
15answers
2k views

Write a function that tells you which TWO of its lines has been removed

In my previous code challenge, I asked you to write a function that tells you which of its lines has been removed. The instructions were: Write a function that contains five lines. If you run ...
11
votes
3answers
1k views

Play a valid chess move, given a board on stdin

The program plays white. Example stdin: ...
2
votes
1answer
289 views

Write a program that says how many times it was ran [duplicate]

Write a program that after running will show how many times it was ran before. You are only allowed to modify the executable itself (the code itself, or compiled version of your code), you cannot ...
-2
votes
1answer
172 views

Password Generator [duplicate]

Task: Make a program that generate a 24-digit password. Rule: None of the character can be repeated more than once Must include at least one upcase, one locase, one number, five special ...
2
votes
0answers
250 views

palindrome detection palindrome [duplicate]

Write a function with a single string parameter and a boolean return value. The function should return true iff the string is a palindrome character-wise. Alternatively, write a program that reads a ...
0
votes
1answer
801 views

Six degrees of web separation [closed]

Six degrees of separation is the theory that everyone and everything is six or fewer steps away, by way of introduction, from any other person in the world. Your challenge here is to write a program ...
-2
votes
3answers
1k views

Generate the characters of “Hello, world!” mathematically, without strings or arrays, like generating the digits of π [duplicate]

The challenge is to come up with a mathematical way to generate each character of the exact string: Hello, world! (Capital letter, comma, exclamation mark.) But you can't use any strings, arrays, ...
12
votes
1answer
1k views

Find number of rectangles in a 2D byte array

...
19
votes
6answers
2k views

An unintentional-looking but crash-causing bug [closed]

There are a range of questions revolving around this concept, but these all seem to just involve causing a crash, resulting in many answers which are very obviously designed to cause a crash. So the ...
16
votes
8answers
1k views

Thinking outside the box

You are trying to fit a sphere into a 5-sided box, but sometimes it does not fit completely. Write a function to calculate how much of the sphere is outside (above the rim of) the box. There are 3 ...
-1
votes
3answers
747 views

1+2+3+4+…+n = -1/12? [duplicate]

Today, Numberphile posted this video where it's stated that 1+2+3+4+...+n = -1/12. While this isn't really new (several ways to prove that have been found, you can ...
0
votes
4answers
322 views

The most pointless shell command you can concoct, based upon a often used shell command [closed]

Let's waste some time coming up with stupid ideas which are close cousins of good ideas. Your useless command doesn't have to fit any minimum or maximum length. Do, however, try to turn it into a one-...
13
votes
17answers
2k views

Create a Y2K disaster [closed]

Your program can do anything you want. The only condition is that it perform as expected if the date is before 2000, and fails spectacularly afterward. Define spectacularly however you'd like. For ...
4
votes
1answer
459 views

write an “operating system” that dims Num Lock

I want to write x86 assembler code that can be used to boot your computer from and dims NumLock. This means you cannot rely on glibc or any other of these "comfi" libraries you cannot rely on the ...
10
votes
3answers
1k views

Let's simulate a random snowflake

I saw this question on https://mathematica.stackexchange.com/ and I think it's pretty cool. Let's make the snowflake with other programming languages. This is a quote from the original question: '...
6
votes
6answers
1k views

Build a snowman! [closed]

It's getting to be that time of year, and I figured I might as well post the first winter-themed question :) Your challenge is to build a snowman. How, you ask? Well, you decide! You can do ASCII ...
7
votes
3answers
1k views

Tic Tac Tae Toe

(Better known as 3D Tic Tac Toe; I just made up a name that sounded catchy ;-) ) Let two people play this game against each other. Specifications: Output the easiest way of explaining this will be ...
4
votes
13answers
1k views

Same code shape and output shape [closed]

I am not sure if this is possible. I have tried it and couldn't make it work at all, but I am being hopeful. If this is not possible please flag this question and I will promptly delete it. ...
11
votes
2answers
692 views

Just one note - musical instrument synthesizing [closed]

Statement The task is to synthesize sound (one note played) of some musical instrument (of your choice) using function in some general purpose programming language (of your choice). There are two ...
4
votes
0answers
332 views

Program which tells two different storys [closed]

this code looks like a story but does nothing useful. My challenge for you guys is to write piece of code which sounds like another story but it must generate output - another story. So the point of ...
21
votes
4answers
2k views

Make Me a Sandwich

Challenge: Write a makefile, which would lead to this behavior: % make me a sandwich What? Make it yourself % sudo make me a sandwich Okay Rules: Should work on ...