Questions tagged [stateful]

Challenges involving behaviour that depends on previous invocations of the solution.

Filter by
Sorted by
Tagged with
223
votes
75answers
75k views

Code that will only execute once

Goal The goal of this challenge is to write code that will execute once and only once. This means basically that it damages the program, script, or environment in some way. If rebooting the system ...
47
votes
30answers
5k views

3… 2… 1… Crash off!

Your task is to write a full program that will continue to count down from 10 every time it is run. The first time you run the program, it should print 10. The ...
14
votes
13answers
2k views

Permanently self-modifying code

Now, we all know most languages have very simple ways to "self-modify" code. However, what if you were to actually modify the code and edit parts of it...on disk? Your goal is to make code that ...
14
votes
6answers
1k views

Save my secrets!

I have so many secrets and nowhere to keep them! The goal is simple: write a program that lets you save a string and have it be protected by a password. The program will take an alias, password and (...
11
votes
5answers
1k views

Monkey Island: The Head of the Navigator

Warning: This challenge contains some mild spoilers for The Secret of Monkey Island. Towards the end of the game, you're being led through the catacombs by a magically preserved head of a navigator: ...
4
votes
6answers
686 views

Write a program to perform set operations.

Your task is to write a program to perform set operations. The operations and arguments are taken from command line in the format program operation [argument]. ...