When you can see the source code, you can fix the problem. Sometimes
There are many reasons for liking Open Source Software. Not necessarily having to pay for it* is probably the biggest but for curious types (such as myself) it is a great way of learning how software works and maybe even fixing problems.
I had a go at this the other day while reviewing some software, BestPractice to be precise. It has a tool to get the name of music tracks from the internet that didn't seem to be working. Being easily distracted at night, I thought I'd have a go at fixing it. Sadly it didn't quite all work out and suggests that if you are going to create an open source project then it might be helpful for the whole process to be open source. Read on to find out why.
The first thing I looked for when trying to fix the CD track name problem was to check the address that BestPractice was using to get the track information.
The Messages pane said "Querying wwww.freedb.org", which is one too many w's. I also went over to freedb.org to check on the address to use. This says that you should actually use freedb.freedb.org so that was another problem.
I hoped that this information might be stored in a settings file. These are often used because they can be kept in plain text and so are easy to read and edit. The excellent FTP software Filezilla does this for example. Sadly this was not to be.
Without a settings file, it looked like the only way to check and maybe correct this address would be to look at the source code of the program. A bit like getting hold of the Word document used to print a document rather than looking at the printout itself.
As BestPractice is open source, this information is freely available. Even better it is hosted over at Sourceforge.net so it was easy to find.
Once downloaded I checked the programming language to find that it was C++. For speed and convenience, I downloaded Microsoft Visual C++ 2010 Express and imported the project.
If you ever do this yourself, you can't just click on File and then Open. To open the full project with all the files and links between them intact, click on File, New and then Project from Existing Code. A wizard will appear. Click on Next and browse to the folder containing the source code. Give the Project a name and click on Finish
The starting place for the program is a file called main.cpp. I opened this and did a quick search for wwww and there was the problem code. There was the snippet of code below.
It turned out that the wwww was just a message and didn't show the address used by BestPractice but the www is still there rather than freedb.freedb.org. Simple enough I thought, changed the code and pressed F5 to have a quick look at whether the change would work.
Slightly disappointed, I checked thr list of errors to find one in line 3 where a file called vcl.h is requested. This isn't supplied with the BestPractice code and it turned out that it is part of a different programming tool that was used to create BestPractice.
So the bad news is that I didn't have bragging rights of fixing a problem. But that doesn't take away the fact that I've got a pretty good idea of what the problem is and can create a detailed bug ticket that will hopefully be fixed quickly.
*It's occasionally a source (pun intended) of confusion that open source software may sometimes have a price tag. Sometimes it all depends on how much work you're willing to put into running the software. VirtualBox used to have a price tag if you wanted to use the ready to install version for work. The (legal) way round this was to download and build the software yourself. Thankfully it's now distributed under the GPL making life easier all round.
A new home for the Caps Lock Alert program
Hosting the files for the Caps Lock Alert program on Dropbox wasn't really working. Not least because...
Gmail users: The dot in your email address is irrelevant
For the last few months I've been getting someone else's emails. Recently I received an invitation to...
Minecraft comes to the Raspberry Pi
Great news for all Raspberry Pi owners, especially those hoping to keep their children interesting in...
The broken promise of smart TVs
Smart TVs, or internet-connected TVs as they should really be called, were supposed to make watching...
Updating your subscription status