a challenge to build objects (e.g. code, representation of real world objects) according to pre-defined rules and/or input (also often randomised).

learn more… | top users | synonyms

15
votes
15answers
2k views

Generate a random program in your favorite language

We all heard of testing compilers using randomly generated inputs. Your task is to write a program to generate a valid program (including no undefined behavior) in your favorite language. The ...
8
votes
2answers
492 views

Compile Regexes

In this task you have to write a program that reads a regular expression and generates another program that outputs whether an input string is accepted by that regular expression. The output must be a ...
16
votes
62answers
7k views

How to write a single-line password generator

Is there a way of writing a password generator in only one line? The password should consist of 8 random chars out of a-z, A-Z and 0-9. Example: This is one attempt I made in PHP! echo ...
8
votes
14answers
682 views

Generate a grid of sums

Challenge Generate a 7 by 7 grid, filled with random numbers. However, every other row and column, you must use the sum of the surrounding cells. Here's a small example with a 3 by 3 grid: 2 2 2 2 ...