Logo

Craig 'n' Dave

Ministry of silly algorithms

When creating programs, it is good practice to make algorithms that are useful and execute in the most efficient way, while ensuring they are still maintainable. That means making them easy to read by using procedures, sensible identifier names, comments, and white space. Using functions to create reusable program components to avoid code duplication aids testing, reduces bugs and reduces memory usage. Why not have a bit of fun and make a memorable learning experience by doing the complete opposite!

Join the ministry and receive an exclusive mug!

Teachers and students of all ages can submit an entry to our Ministry of Silly Algorithms by sending us a .py file to: admin@craigndave.co.uk


Entry conditions

Your algorithm must:

  • be written in Python 3.x
  • achieve something
  • be relatively short
  • be error free, although input validation is not required
  • be written in a way that ignores good programming practices
  • have a more efficient solution
  • not have been submitted before

Note by sending us your algorithm you give your consent for us to show and distribute your code to others. It becomes open source and public domain.

What happens when you submit an algorithm

We will acknowledge your submission by email. Every so often we will choose an algorithm to feature on our "Craig'n'Dave Unscripted" series on YouTube. If your algorithm is chosen to feature, we will write to you again to ask for your postal address and consent to send you a mug. You will then be added to our scroll of honour! We may also invite you to appear on video with us, but like receiving the mug, this is entirely optional.

Submit your entry!

Submit your Entry


The scroll of honour

Members of the Ministry of Silly Algorithms

Kirsty Clarke - Arkwright's.py

A tool for checking what hardware items are in stock at your local store. Hopefully you’ll get what you need, but probably not!


Nick Lilleker - CraigorDave.py

Is your name similar to Craig or Dave?


Charlie Jacobs - Spelling.py

Do you ever forget how to organise the letters in a word?


Alfie Giffen - Biggest.py

A silly way to return which of three numbers is the largest.


Oliver Martin - OddsciiEvenscii.py

Calculating if a number is odd or even in the worst way possible!

Jacob Smith - Asciiname.py

Is the ASCII of your name greater or less than Craig and Dave?

Harry Bird - HelloWorld108.py

Hello world in 108 languages, just because you can.

Emma Wiggins - Nerdornot.py

Are you a good nerd or not?

Examples of silly algorithms

The bogosort and bozosort are examples of sorting algorithms that work, but they are inefficient and would never be used in a real application. Just because it is possible, doesn't mean it should be done! Perfect examples of silly algorithms.

The smallest of two numbers can be calculated by decreasing the value of each number by one. The first number to reach zero must be the smallest. It works, but really?!

Get some inspiration


Registered in England and Wales: 10442992

VAT Number: 290 9845 58

Telephone: 020 4519 3010

Email: admin@craigndave.co.uk

Bett Awards Finalist 2024
TS Winner 2023
ERA Awards Finalist 2023
TS Finalist 2022
Bett Awards Finalist 2022