The ministry of silly algorithms

  1. |
  2. Ministry of Silly Algorithms

The best teaching includes some memorable learning experiences

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.

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. It also compares them to your shopping list. 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

Is a number odd or even?

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: 03330 164 059

Email: admin@craigndave.co.uk

BETT Finalists 2022

Submit your Entry