The 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: firstname.lastname@example.org
Your algorithm must:
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. 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