Joe Crawford
Web developer & user interface engineer
Tinkering with the web since 1996

email: · twitter: @artlung
San Diego, California, USA

Who doesn’t love code? 2015 Feb 13

Longtime blogger and longtime pal MAS mentioned me over in Make and Host Your Own Soundboard yesterday. I am glad to have contributed to more software. I dig being able to give to code that people use, even if it’s for no money. I love even more that the whole thing is up on GitHub.

It is still astonishing to me that I can read and make improvements to code. Code that at first glance is as peculiar as this:

var ar = <?php echo json_encode($mp3) ?>;
var BASE_AUDIO_PATH = '' + <?php echo json_encode($mp3directory) ?> + '/';
// sort files to be in alphabetical order by title
ar.sort(function (a, b) {
    return a.toLowerCase().localeCompare(b.toLowerCase());
// Add <audio> files and buttons to soundboard
// preload set to "none" is optional{
		var thisAudio = $('<audio/>').attr({
			src: BASE_AUDIO_PATH + url,
			preload: "none",
			onplay:"$(this).siblings('button').css('color', 'yellow');",
			onended: "$(this).siblings('button').css('color', 'white');"	
		var buttonText = url.replace(/-/g, ' ').replace('.mp3', '').replace('[Q]','?');			
		var thisButton = $('<button />').addClass('myButton').text(buttonText);			 		
		return $('<span />').addClass('track').append(thisAudio).append(thisButton);
$('#soundboard').on( 'click', 'button', function() {			

And not be driven insane looking at it.

Programming is fun!

Joe Crawford blogged this at 3:51pm in 2015 in February. The 13th was a Friday. You are reading this 3 years later. You can make a public comment. There are no comments now. Tweet me! Email me! It has hashtags→ .

Leave a Reply

Comments Open; Trackbacks Open.