Simple clear advice in plain English

Fixing problems thanks to Open Source software

When you can see the source code, you can fix the problem. Sometimes

bestpractice in the foreground with its code behind

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.

the best practice code in Microsoft Visual Cpp 2010 Express

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.

It didn't.

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.

Open Source Shopping Cart Magento

it is easy to modify, optimize and implement open source shopping carts like magento, OsCommerce and zencart. Datashire is involved with open source software development www.datashire.com.

Posted by Datashire, 27 Sep 2012

display:none  

Add your comment

Please keep comments constructive and free from abuse of any kind and swearing. If you wish to link to a product or service online, please do so in such a way that makes it clear that it is not spam. If you are connected to any such product you should make that clear.

We may use your comments in the magazine. We may edit your comments for clarity or to remove unacceptable material. We will attribute your comments but not share your email address.

We request your email address and record your Internet Address (IP address) in order to block spam from our site. We will never share this information without your permission.

All comments are reviewed by the Computeractive Team before being published. Please bear with the slight delay this causes, you don't need to post more than once.

Click here to read our Privacy Policy

Click here to read our site Terms & Conditions

Recent blog posts

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 Loading

Most popular articles

No matching document

Poll

Do you have Windows 8?

Jargon Buster

Computing terms explained in plain English

CPU

Central Processing Unit. Another term for a computer processor.

Great shopping deals from Computeractive

Information currently unavailable