Inspiration

While going through the list of things companies wanted to see, I can across the one for "The best visual display of data". This create my idea of playing musical notes in response to compilation error amounts. I personally found it would be funny in the case that the compilation error amount just continues to grow, as it does sometimes when you try to fix code. While this project isn't exactly a visual project, I still wanted to do it since I found it entertaining, fun, and interesting.

What it does

The user starts the script by notifying the program of which files to check on to see if they have compilation errors. If the specified code does have compilation errors, the program records the amount of errors that run of the compiler created. As the user continues compiling and recompiling, the compilation error amount will most likely change. When the user wants the program to stop recording, they enter "DONE", which will stop the program, but not before play musical notes that correspond to how many compilation errors were found throughout the commands. The lower the tone, the more compilation errors there were. This way, the change in amount of errors there were is played and shown in a musical way.

How I built it

I just created a PHP script that calls command line commands in the place of the terminal and writes the error amounts to a file. At the en, the file is read and each error amount relates to an element in an array of musical files.

Challenges I ran into

I ran into the problem of needing to be able to use the terminal to edit files that had compilation errors and letting the program use the terminal to take in user compilation commands.

The main problem was caused by the fact that I couldn't use the terminal normally since the terminal was reading in the compilation commands and outputting them. Because of the program's use of the terminal, vim, the default text editor I use, couldn't be used. I solved the second problem by just using another terminal.

Accomplishments that I'm proud of

I'm proud of this project since this is the first program I had written at a hackathon and its the first time I've programmed with audio files since high school.

What I learned

I refreshed my memory of PHP and learned the command needed to play audio files.

What's next for Musical Errors

Musical Errors could expand to have a website as the main user interface. This would fix the problem of needing multiple terminals/windows to edit the code and would be more user friendly.

Built With

Share this project:

Updates

Submission history