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
30
votes
20answers
6k views

Olympic Games Logo - Free Style Edition [closed]

In a similar spirit as this question, your mission is to create the best-looking logo in at most 1K of code. Rules: At most 1K of code (inclusive), no external data. The answer with the most upvotes ...
43
votes
23answers
9k views

The answer to life, the universe, and everything [closed]

Introduction: Deep Thought calculated The answer to life the universe and everything in a period of 7.5 million years, the solution was 42. Write a program in any ...
44
votes
26answers
6k views

Crash your favorite compiler [closed]

Write a perfectly legal code in a decent language of your choice whose compiling will either crash the compiler or send it into an infinite loop (infinite compile time). Restrictions: Use a standard ...
7
votes
3answers
577 views

HRNG - Human Random Number Generator [closed]

You know it: keyboard or mouse input is just too mainstream to create Random Numbers through human behavior. Create the most unique (Pseudo)Random Number Generator that create its numbers through ...
51
votes
19answers
7k views

Improvise a Hardware Random-Number Generator

Your task is to improvise a hardware random-number generator with whatever hardware you have lieing around. Challenge Write a program with the following properties: It prints either ...
19
votes
27answers
2k views

8 ought to become Infinity [closed]

Let's take a look on a typical loop, which usually performs 8 iterations: for (int x=0; x<8; ++x); You have to make it infinite! It's a popularity-contest ...
18
votes
17answers
2k views

Build interpreter for non-existent language

Build an interpreter for a fake, stack-based language that gets an input, interprets it, and outputs the result as an array of numbers. It should iterate through each byte and perform a different ...
0
votes
4answers
336 views

A boring version of yourself [duplicate]

A boring version of yourself Have you ever dreamed of a boring version of you which types the text you just typed ? No ? Because that's exactly what I'm challenging you to do ! The program needs to ...
60
votes
37answers
9k views

Factorial in haiku!

Task Create a program that calculates the factorial of a number using no built-in factorial functions. Easy? The catch is that you must write your entire program (including testing it) in haiku form. ...
29
votes
53answers
8k views

The Smart Person's Mirage

Once upon a time, I was reading this question/answer on Quora Are there really programmers with computer science degrees who cannot pass the FizzBuzz test This code is given as the obvious answer <...
4
votes
0answers
323 views

Unpixellate an image [closed]

When you resize an image down to a very small size, it looks very blocky when you scale the pixels back up individually. In extreme cases, as above, you can no longer reconstruct the original image, ...
3
votes
6answers
2k views

print “Hello, world!” without using literals [closed]

Write a program that prints "Hello, world!" without using any kinds of literals. Don't use string literals, numeric literals, byte literals, char literals, etc. Default values are allowed in ...
27
votes
9answers
5k views

Convert English to a number [closed]

Short and sweet description of the challenge: Based off the ideas of several other questions on this site, your challenge is to write the most creative code in any program that takes as input a ...
28
votes
17answers
9k views

Transform number into 7-segment display pattern

Given two arbitrary numbers A,B. Print number B as a Digital LED Pattern where A is the scale. input: 1 2320451640799518 ouput: ...
5
votes
6answers
2k views

RPN calculator without pointers

Me and some other students were at a bar discussing programming languages, in particular the C programming language. At some point a first year student said he didn't need no damn pointers. Another ...
-4
votes
4answers
423 views

Help Me Count to Ten! [closed]

You will write a simple program that prints exactly 1 2 3 4 5 6 7 8 9 10 to STDOUT, Console, or your language's closest output method. No other visible output ...
5
votes
3answers
676 views

Compiled quine variant

Thinking about various quine puzzles here, I got an idea for another one: Compose a program that outputs its own compiled code to a file (or multiple files, if the compiled code is). (This means that ...
7
votes
14answers
934 views

400th Question Celebration/Challenge [closed]

I just looked and saw that there are 399 questions on this wondrous "Programming Puzzles & Code Golf" site!!! That means that...THIS IS THE 400th question!!! To celebrate this momentous occasion,...
5
votes
7answers
936 views

Generating Binary shapes [closed]

How could we generate shapes or images using binary? I got to messing around trying to create something that looked matrix like and got to thinking, wouldn't a great CodeGolf be to see who can make ...
168
votes
36answers
23k views

Write program in your favorite language in another language [closed]

The determined Real Programmer can write Fortran programs in any language. from Real Programmers Don't Use Pascal Your task is to write program in your programming language of choice, but you are ...
-4
votes
1answer
335 views

ULTIMATE CODEGOLF!!! (Codegolf a turing-complete system) [closed]

The goal: write a program that implements a turing-complete system. It could be cellular automata, a tag system, a turing machine, an interpreter for a language of your own design... the type of ...
1
vote
0answers
220 views

Generate groups for in-class work [closed]

In a smallish class, some lectures are set aside for working in groups. The instructors don't want people to group themselves together with the same people every time; instead, they create the groups ...
3
votes
3answers
170 views

Correlation Coefficient of Words [closed]

This is going to be relatively quick... Challenge Given a lower-case word as input, calculate the Pearson's Correlation Coefficient between the letter position of the word (nth letter within the ...
15
votes
26answers
4k views

“Hello world!”, repeating each character n times [closed]

In your language of choice, write a program that outputs exactly Hello world!. Each character in your program must be repeated n times - you choose n. For example, ...
11
votes
2answers
510 views

Animations with all colours

Last year, there was a very popular challenge to create an image containing every 24-bit RGB colour. My challenge is to create a smooth animation (24 frames/s say), where the colour of every pixel of ...
66
votes
8answers
6k views

Draw random black-and-white forest

Your task is to write program which will draw 800x600 black-and-white image with something resembling a forest. Like this (it is dithered photo): Rules You are disallowed to use any existing images ...
34
votes
12answers
6k views

Code Golf of Death [closed]

Write some code that causes a BSOD or kernel panic! Rules: On Windows, you must cause a BugCheck (Blue Screen of Death), on Linux (or other *nix systems) you must cause a kernel panic. Must not ...
78
votes
78answers
14k 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 ...
36
votes
3answers
2k views

Paint a still life (or a moving one) - draw an image in the Game of Life

You are given as input a greyscale image. Your task is to find a static or looping pattern in Conway's Game of Life that resembles the input image as closely as possible. Your output can be either a ...
4
votes
3answers
3k views

Generate unique non-sequential string of length n without memory of previously generated strings

Scenario: Imagine a situation where you wish to share a unique alphanumeric code. Perhaps it is a one-time-use coupon code you hand write on business cards, or some other scenario where it is ...
10
votes
7answers
2k views

Non-idempotent Python [closed]

Write a few lines of Python code, X, that does not reference any global variables, such that ...
26
votes
4answers
2k views

Miniature Faking

As any amateur photographer can tell you, extreme post-processing is always good. One such technique is called "miniature-faking". The object is to make an image look like a photograph of a ...
24
votes
6answers
3k views

Write the prettiest bytebeat composition

Bytebeat is a style of music one can compose by writing a simple C program that's output is piped to aplay or /dev/dsp. ...
31
votes
22answers
3k views

Create an object whose state changes on assignment

I find it deeply weird that this is possible in Ruby (I won't immediately say how): ...
66
votes
55answers
70k 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 ...
85
votes
132answers
44k views

Loop without 'looping' [closed]

A question similar to this has been asked a couple of years ago, but this one is even trickier. The challenge is simple. Write a program (in your language of choice) that repeatedly executes code ...
1
vote
1answer
268 views

Meta Obfuscate a String [closed]

There are numerous reasons for trying to obfuscate input. These include preventing decompiling, and being a nuiscance. With this in mind your challenge should your choose to accept it is to write a ...
7
votes
2answers
871 views

How many languages can you use simultaneously in ONE functioning program in under 500 bytes [closed]

Intro In Objective-C (a superset of C and an object-oriented language), I can create an object called a ...
48
votes
3answers
4k views

Computer Generated Textured Wall Paint

The paint on the walls in my room has a random, almost fractal-like, 3-dimensional texture: In this challenge you will write a program that generates random images that look like they could be part ...
12
votes
1answer
525 views

Write a panic script to remote secure a Mac Pro from an untrustworthy local user [closed]

The Situation Suppose I allow "Shady Sam" admin access on my workstation to perform an important administrative task on my Mac Pro for me by giving them a temporary root login password. (Assume they ...
38
votes
0answers
5k views

Deep learning Fizzbuzz [closed]

Inspired by the job-interview with Joel Grus, the goal of this challenge is to write a tensorflow (or other deep/machine learning) program that learns Fizzbuzz and correctly prints out the answers to ...
29
votes
9answers
2k views

Anti-golfscript anti-golf: create a task where GolfScript or J is outgolfed by your (conventional) lang [closed]

You need to make three things: Statement of a task, T. Solution of the task in language not typically used for golfing, A. Solution of the task in language typically used for golfing, B. Don't try to ...
24
votes
32answers
8k 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 ...
-4
votes
24answers
456 views

Generate 0 or 1 [closed]

Is this Q too easy to ask, or has it just never been thought of? Generate a random number, either 0 or 1 using a program You may use a pre-defined function. The code must be executable. (It can't ...
90
votes
109answers
24k 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 ...
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 ...
13
votes
19answers
2k views

Goodbye, world! [closed]

Write a program that erases itself. While the exact behavior may be implementation-defined, it should at minimum attempt to remove the file the program was stored in before execution on a best-effort ...
146
votes
116answers
48k views

Weirdest way to produce a stack overflow [closed]

As a programmer you certainly know the error of a stack overflow due to an obvious recursion. But there are certainly many weird and unusual ways to get your favourite language to spit that error out. ...
29
votes
7answers
4k views

Underhanded contest: The OS war [closed]

We all know how the discussion about which is the best operating system caused a lot of flame-wars. Your goal is now, to provide decisive "proof" that your favorite operating system is better... ah, ...
42
votes
47answers
7k views

Produce an unexpected word [closed]

The goal is to write program that will produce a word unexpectedly (program doesn't look like it is going to produce a word). Example (JavaScript): ...