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
12
votes
7answers
3k views

Reverse the Polarity

The aim of this challenge is to write a program that satisfies the following conditions: The program is not palindromic, or essentially palindromic (meaning that it is possible to remove characters ...
12
votes
22answers
1k views

JAxH obfuscated method, not text [closed]

A JAPH is a grand tradition of making a program that prints "Just another Perl hacker,". We already have a question about JAPH on this site but they seem more concerned with hiding the text, but JAPH ...
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 ...
12
votes
7answers
1k views

C code indenter

Situation: You are a high school teacher, teaching your computing class how to write C programs. However, since it is just the beginning of the term, you haven't taught them about the importance of ...
12
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 ...
12
votes
6answers
2k views

Write a sorting program that looks erroneous but it is actually correct [closed]

Write a program that sorts a vector of numbers (or any type of element) that looks like having one or more bugs, but it is actually ok. The code must be clear. Someone looking over the code must ...
12
votes
7answers
956 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 ...
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.
12
votes
3answers
4k views

building circuit for divisibility by 3

A boolean circuit in TCS is basically a DAG consisting of And, Or, Not gates, and by what is known is "functional completeness" they can compute all possible functions. eg this is the basic principle ...
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 ...
12
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 ...
12
votes
2answers
2k views

Implement a Useless interpreter [closed]

Your task is to build an interpreter to the Useless language: Here are the functional requirements: All the described commands should be accepted by the interpreter. ...
12
votes
9answers
846 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 ...
12
votes
1answer
524 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 ...
12
votes
1answer
816 views

Make something tasty! [closed]

Your challenge is to write a Chef program that works well as a recipe and also as a program. Its utility as a recipe is strictly required (I don't want a recipe for grapeleaves in chocolate-mustard ...
12
votes
1answer
1k views

Find number of rectangles in a 2D byte array

...
11
votes
8answers
1k views

Practical Golf - US States [closed]

My family has an e-commerce business. On our own site, we force people to choose their state from a dropdown menu when they enter their address, but through some other channels we use, customers can ...
11
votes
3answers
1k views

Play a valid chess move, given a board on stdin

The program plays white. Example stdin: ...
11
votes
4answers
615 views

A Chrestomathy of Obscurity

You should complete four tasks in a language which: must return no results* when searched for on this (codegolf.se) website, for example ToffeeScript; must have a page listed at Esolang, Rosetta Code ...
11
votes
1answer
346 views

Pseudo-quine polyglot language-detection counters

Quines are fun. Polyglots are fun, too. Polyglot Quines exist, but we can raise the bar even higher. Write a file that contains a valid program for languages α, β, and γ. When the ...
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. ...
11
votes
2answers
508 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 ...
11
votes
1answer
528 views

Resize rasterized text and make it look non-pixellated

This is a screenshot of some text typed in a text editor: This is the same text at a larger size. Notice how visible the aliasing is on letters with prominent diagonal strokes like ...
11
votes
2answers
691 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 ...
10
votes
13answers
4k views

Reversed language name [closed]

You should code a piece of code that looks like it outputs the language name but actually outputs the name reversed. E.g. a Python program should look like it outputs ...
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? ...
10
votes
4answers
2k views

Produce different behaviour in all versions of your language [duplicate]

Write a program that: if a compiled language is used, compiles without errors if an interpreted language is used, runs without syntax errors for every major release of your language, and produces ...
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 ...
10
votes
23answers
10k views

Rotate An Integer Array with an O(n) algorithm [closed]

Write a function that rotates an integer array by a given number k. k elements from the end should move to the beginning of array, and all other elements should move to right to make the space. The ...
10
votes
5answers
1k views

Today (September 24) is HONDA birthday [closed]

today (24 of September) is birthday of company HONDA. Originally their company name is 本田技研工業株式会社 I want to ask to make a gift for HONDA. The task is to make ...
10
votes
4answers
920 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
5answers
1k 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: ...
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 ...
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: '...
10
votes
3answers
920 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. ...
10
votes
3answers
871 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 ...
10
votes
5answers
1k views

Cheap, Fast, Good - Common Factor (Greatest) [closed]

Inspired by Cheap, Fast, Good, we're going to implement an algorithm which has exactly two of them. The Math Given two nonzero integers a and b, the GCF d is the largest integer that divides both a ...
9
votes
31answers
3k views

Converting to Secret Language

Write some code in any language that inputs a string such as "Today is a great day" (Note that there is no punctuation) and converts it to the "Secret Language". Here are the rules for the "Secret ...
9
votes
16answers
3k views

Write a mathematical function whose result is “hello world” [closed]

Write a mathematical function that results in an integer representation of "hello world" For example "hello world" in hex is 68656c6c6f20776f726c64 so the goal ...
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
1answer
3k views

You call this optimized? [closed]

The task is simple, post 2 code snippets that perform the same task, where one seems very optimized at first glance, but actually is significantly slower than the other. Only one rule: Both ...
9
votes
1answer
513 views

Escape from the tarpit (Cops)

This is a cops-and-robbers challenge based around defining languages and proving they are Turing complete. This is the cops' thread. The robbers' thread is here. Cops As a cop, you will prepare two ...
9
votes
0answers
777 views

Emulate Rule 110 with Conway's Game of Life (or vice versa) [closed]

Can you find initial conditions for either Rule 110 or Conway's Game of Life to emulate the other? That is, produce output (in any form, not necessarily the familiar pixel grid) which corresponds ...
9
votes
0answers
2k views

Break Stack Exchange [closed]

Trick the user that StackExchange is broken: It can be done in several ways: Your program starts a browser in some certain way (with a proxy server, for example); Your program shows static picture; ...
9
votes
0answers
636 views

Create a popular penrose tiling [closed]

The recent question about Wang tiles has led me to think that creating Penrose tilings might be an interesting popularity contest. Background Wang tiles are tiles that can tile the plane, but only ...
8
votes
36answers
4k views

Calculate the square of an integer with restrictions [closed]

The Puzzle You have to write a program or function p(n) that returns the square of what is entered into it and you may assume that the input is a non-negative integer. Put in simpler terms, return n2....
8
votes
26answers
1k views

Halt with 50% non-Halting

Create a program that halts exactly 50% of the time. Be original. Highest voted question wins. By exactly I mean that on each run there is a 50% chance of it halting.
8
votes
12answers
1k views

Function/macro that returns true if one of its arguments contains a call to itself

Write a function (or macro) that returns true if and only if at least one of its arguments contains a call to the function itself and false otherwise. For example: ...
8
votes
7answers
975 views

Do the needful? [closed]

Goal Replace all comments in C, C++, or Java Code with the comment // Do the needful. Specifics This coding challenge is a simple one. Take as input the name of ...
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. ...