Mashduo 1.0 Released
After a great experience, I’m proud to release my new application, Mashduo. This was really a terrific experience. I had this idea for an app to take me and my friends iTunes library, do some fancy magic, and then tell each of us what songs the other person has that we don’t. I thought it would be really useful, so I started brainstorming UI and writing up the code that checks both libraries and finds differences.
Algorithm
Working on that algorithm was a lot of fun. I have some interesting tweaks in there to get the best results from the comparison. For instance, if you have:
Gold Digger (Feat. Jamie Foxx) by Kanye West
Or:
Gold Digger (FT Jamie Foxx) by Kanye West
They will be considered the same song. However, if you have:
Gold Digger (Remix) by Kanye West
This will be considered different since the Remix is really a different version. Same for “Live”, “Acoustic”, etc. I also had to debate a performance issue. There were two options: a single thread option and a multi-threaded approach. The single thread option would scan through Library A and find similarities. Any time a similarity was found, it would be removed from both Library A and B. Once library A was finished Library B would be traversed in the same way. The idea here is that when libraries that are very similar are compared, the loop through Library B would be much less. Some problems rose their heads. What if one library has 2 copies of the same song and the other library only has one? Then when we delete a copy from both, one library has a copy of the song and one doesn’t, so the program would say that this song is different even though its not. There are ways to get around it, but that involves a search through each library for duplicates which just raises execution time.
Instead, I went for the multi-threaded approach. On Thread 1, Library A looks for songs that Library B doesn’t have. On Thread 2, Library B looks for songs Library A doesn’t have. Since, all of our Macs have 2 core machines, this puts both to good use and results in great execution. Now, in this case we don’t get the advantage of removing similarities from the second search (because the second search is executing at the same time as the first). We could use a series of locks to do this, but the added speed benefit of reducing size of the second search might not outweigh the speed hits from locking, not to mention the ease for bugs to be introduced. So I took the multi-threaded read-only safe approach, and in my opinion it’s running fast enough. If you are a performance guru, I welcome you to hack at the code and make it even faster (it’s a fun challenge). The code is all open source and available here.
The UI
The UI was also a ton of fun. My girlfriend and I spent a lot of time mocking up designs and trying to perfect this to the best it could be. I think we have a pretty nice UI, but I’m always welcome to comments and suggestions. Here are some of the screenshots of the UI.
For this project, I used up about half a notebook just playing with designs and formats, but I think in the end it paid off.
Post-Production
After I got the code working and running functionally, I started working on the icon, which you saw at the top of this post. I am not a great graphics designer obviously, but this was by far my best icon (not that I’ve done too many). For professional projects, you have to get a good designer, but for open-source projects, there’s just really not the cash. I hope this was good enough.
And finally, we have the website. I haven’t done web design in forever, so this was a fun refresh to get back into it. The site is super simple both graphically and textually, but I think the simplicity works really well in its favor. I was originally planning on much more complexity, but once I got in Photoshop this popped out to me.
Overall
Overall, I am phenomenally pleased with how this turned out. I want to thank Erin for all her suggestions and design tips. All the guys over at iLovePhotos for beta-testing, and you the user for downloading and spreading the word. I hope you guys really enjoy this program. I put a lot of work into fine tuning it, and I had tons of fun. I have some great ideas for new features and versions, so this is far from the last release. Enjoy and I would really appreciate if you twittered, friendfeeded, or whatever this so that lots of people can try it. Lastly, if you have any comments, suggestions, or whatever, you can comment below or send me an email to the Mashduo support address. Thanks for reading.






