login/register

Snip!t from collection of Alan Dix

see all channels for Alan Dix

Snip
summary

Sorting algorithms: quite boring until you add sound effects
Aug. 19, 2010 (5:55 pm) By: Matthew Humphries
Anyone who has ever done a programming course or tried t ...
The subject matter is fairly dry. Thankfully someone has ...
... via Hacker News

Sorting algorithms: quite boring until you add sound effects | Geek.com
http://www.geek.com/...rithms-quite-boring-until-you-add-sound-effects-20100819/

Categories

/Channels/algorithms

[ go to category ]

For Snip

loading snip actions ...

For Page

loading url actions ...

Sorting algorithms: quite boring until you add sound effects

Aug. 19, 2010 (5:55 pm) By: Matthew Humphries

Anyone who has ever done a programming course or tried to learn to code out of a book will have come across sorting algorithms. Bubble, heap, merge, there’s a long list of these methods of sorting data.

The subject matter is fairly dry. Thankfully someone has found a way to not only make sorting more interesting, but easier to remember and understand too.

All it took was a bit of visualization and some sound effects. The result is each type of sort having its own distinct melody. Above is a video giving examples of insert, bubble, selection, merge, and a gnome sort. If that’s not enough for you, then check out heap sort below.

The videos were created by YouTube users andrut. He explained how the sounds were generated in the video description:

On every comparison of two numbers (elements) I play (mixing) sin waves with frequencies modulated by values of these numbers. There are quite a few parameters that may drastically change resulting sound – I just chose parameters that imo felt best.

via Hacker News

HTML

<div class="konafilter"><h1>Sorting algorithms: quite boring until you add sound effects </h1> <div class="data" style="margin-bottom: 7px;"> <strong><span class="dtreviewed">Aug. 19, 2010</span></strong> (<span>5:55 pm</span>) <strong>By:</strong> <span class="reviewer vcard"><span class="fn"><a href="http://www.geek.com/users/Matthew/">Matthew Humphries</a></span></span> </div> </div> <iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.geek.com%2Farticles%2Fgeek-cetera%2Fsorting-algorithms-quite-boring-until-you-add-sound-effects-20100819%2F&amp;layout=button_count&amp;show_faces=false&amp;width=100&amp;action=like&amp;colorscheme=light" allowtransparency="true" style="border: medium none; overflow: hidden; width: 75px; height: 20px; float: right;" frameborder="0" scrolling="no"></iframe> <div class="article" style="border-top: 0px none; padding-top: 19px;"> <!-- sphereit start --><!-- begin redux related --> <p><object width="580" height="460"><param name="movie" value="http://www.youtube.com/v/t8g-iYGHpEA?fs=1&amp;hl=en_GB"><param name="allowFullScreen" value="true"><param name="allowscriptaccess" value="always"><embed src="http://www.youtube.com/v/t8g-iYGHpEA?fs=1&amp;hl=en_GB" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="580" height="460"></object></p> <p>Anyone who has ever done a programming course or tried to <a id="KonaLink0" target="undefined" class="kLink" style="text-decoration: underline ! important; position: static;" href="#"><font style="color: blue ! important; font-family: arial,sans-serif; font-weight: 400; font-size: 13px; position: static;" color="blue"><span class="kLink" style="color: blue ! important; font-family: arial,sans-serif; font-weight: 400; font-size: 13px; position: relative;">learn </span><span class="kLink" style="color: blue ! important; font-family: arial,sans-serif; font-weight: 400; font-size: 13px; position: relative;">to </span><span class="kLink" style="color: blue ! important; font-family: arial,sans-serif; font-weight: 400; font-size: 13px; position: relative;">code</span></font></a> out of a book will have come across sorting algorithms. Bubble, heap, merge, there&#x2019;s a long list of these methods of sorting data.</p> <p>The subject matter is fairly dry. Thankfully someone has found a way to not only make sorting more interesting, but easier to remember and understand too.</p> <p>All it took was a bit of visualization and some sound effects. The result is each type of sort having its own distinct melody. Above is a video giving examples of insert, bubble, selection, merge, and a gnome sort. If that&#x2019;s not enough for you, then check out heap sort below.</p> <p><object width="580" height="460"><param name="movie" value="http://www.youtube.com/v/iXAjiDQbPSw?fs=1&amp;hl=en_GB"><param name="allowFullScreen" value="true"><param name="allowscriptaccess" value="always"><embed src="http://www.youtube.com/v/iXAjiDQbPSw?fs=1&amp;hl=en_GB" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="580" height="460"></object></p> <p>The videos were created by <a id="KonaLink1" target="undefined" class="kLink" style="text-decoration: underline ! important; position: static;" href="#"><font style="color: blue ! important; font-family: arial,sans-serif; font-weight: 400; font-size: 13px; position: static;" color="blue"><span class="kLink" style="color: blue ! important; font-family: arial,sans-serif; font-weight: 400; font-size: 13px; position: relative;">YouTube</span></font></a> users andrut. He explained how the sounds were generated in the video description:</p> <blockquote><p><em>On every comparison of two numbers (elements) I play (mixing) sin waves with frequencies modulated by values of these numbers. There are quite a few parameters that may drastically change resulting sound &#x2013; I just chose parameters that imo felt best.<br> </em></p></blockquote> <p>via <a href="http://news.ycombinator.com/item?id=1616482">Hacker News</a></p></div>