Published by Kenneth on 28 Feb 2010

Trade Profiteer – 1.1.528

It’s time for a new version of the Trade Profiteer. This release includes only one enhancement:

TP-15 – Add commodity buy/sell summary

This feature was showcased in part in an earlier blog post, and now it’s available for everyone to play with. It’s nothing more than just a display of what has been imported for a particular island and could use some enhancements.

Java Access Bridge

There is a new caveat regarding the installer for the Java Access Bridge — it will try to obtain administrator privileges before installing, and Windows may ask you if you want to continue. This is normal, and you need to allow the script to run with administrator privileges.

Mac and Linux versions

Since the Trade Profiteer was initially released, there has been a few posts to the forum asking whether this program will be ported to other platforms. The only answer I’ve been able to give is "eventually".

I do intend to port the application to a framework that allows for easy cross-platform builds. The one I’m eyeing at the moment is wxWidgets. It’s been around for almost 20 years, has a huge community and is well-supported on all platforms I intend to target and then some.

There is one minor caveat. Like the previous version was locked to Windows because of the OCR code, this version is unfortunately tied to Windows because of the Java Access Bridge. There is a version of the Java Access Bridge for Linux and GNOME that I’ve seen around the web, but I’ve not yet found one for Mac OS X — if anyone finds one, please post a comment with the link or send it to me through the forum’s PM.

I’m also considering just porting the library over to wxWidgets — I’m not entirely sure at the moment how feasible that would be.

But once the 1.2 version of the Trade Profiteer has been released — meaning when all features have been finalized and the "insane profit bug" handled in some fashion, among other issues that may crop up — then development will transition over to developing the Trade Profiteer using wxWidgets.

Fair winds.

Published by Kenneth on 19 Feb 2010

Feature preview for the Trade Profiteer

I’ve been working recently on a new feature for the Trade Profiteer. As I haven’t posted anything of real substance in a while, I thought I’d post a screenshot so you all can see what I’m working on.

Island Review

Now as you can see, this feature will allow you to see what is being offered at a particular island. Right now this will be purely a summary feature, meaning you’ll pretty much see here what you can otherwise see on the commodity market screen — just with a little added organization options.

This feature will be expanded in the future based on ideas in my head and feedback from users. Let me know what you think.

Fair winds.

Published by Kenneth on 12 Feb 2010

Trade Profiteer – 1.1.512

Well it’s that time again — time for a new release of the Trade Profiteer.

New version: 1.1.512 (beta)


TP-12 – Filtering enhancements

The enhancement originally provided has been completely removed from the program. Instead it has been replaced with a far more granular shoppe filter that will be enhanced further. You will also find that when you click on the filter button on the "Island to Island" tab, there is small menu that comes up with three options:

  • Filter out commodities
  • Filter out shoppes
  • Reset all filters

The first option is the commodity filter that everyone is used to. The second option is the new granular shoppe filter. "Reset all filters" does just that.

Right now that is only enabled when there is a route loaded and only those islands will be available. What you will notice is that the new window it brings up has two radio buttons: Start Island and Destination Island. What this allows you to do is exclude shoppes from the profit calculation as either a starting shoppe or a destination shoppe, or both.

Like the commodity filters, these persist only through the instance you are running and are not stored off.

Bug fixes

No bug slips have been handled, but any minor bugs that may have been discovered have been fixed.

Java Access Bridge

I know there are users still reporting issues with the Java Access Bridge and getting everything up and running. I have written an article on my web site regarding this, so I invite you to read it first. An issue with installing the Java Access Bridge on Windows 7 has been discovered and is under investigation.

As always, feedback is certainly welcome. Fair winds.

Published by Kenneth on 30 Jan 2010

Trade Profiteer – 1.1.430

Finally, the Trade Profiteer reaches beta. Here are the details of the new release. There isn’t much that needs to be added to the product to finish it. There are currently two enhancements left to add if you look at the bug tracker. One slip on the tracker is listed as “Postponed” because currently it is not known if it is necessary.


TP-10 – Appears to be removing more data than it should

This enhancement basically called for overhauling the data cleanup feature. It needed it.

TP-13 – Add “Select/Unselect all” to commodity filter

TP-12 – Filtering enhancements

Added an enhancement to create a list of shoppes to exclude from the “Island to Island” profit calculations.

Bugs fixed

TP-14 – Commodities not displayed in proper sort order

TP-4 – The Island to Island tab will occasionally show ‘insane’ profit availability

This is the “insane profit bug” mentioned on the forums. Currently there is a temporary addition to the code to display a message box if the commodity data displayed in Puzzle Pirates changes while the data is being imported. This is to test a hypothesis as to the cause of this bug.

Published by Kenneth on 23 Jan 2010

Ethics in software engineering

On the Code Project forums, user GuyThiebaut posted a thread asking a simple question: "What do you do when someone passes your code off as theirs?" Obviously this presents a question about a simple concept: plagiarism.

Plagiarism is merely taking someone’s creative work and passing it off as your own. So what was going on? Well you can read the forum thread I’ve linked above to find out, but here’s basically what occurred.

On the web site C-Sharp Corner, an engineer by the name of Nikhil Kumar posted code to a project called TeboScreen, a simple screen capture program. The content has since been removed "due to copyright violations", but the comment trail is still visible. He also posted the same content to his blog, and it has also been removed.

Plagiarism is a very serious allegation anywhere. In the academic arena, it will get you expelled from school and you will find it nearly impossible to get into another school. If you are a professor, it will get you fired in a heartbeat and your academic reputation will be forever tarnished.

In the professional arena, you might as well change careers to something that won’t require you to produce anything of a creative nature, like flipping hamburgers.

A lot of people seem to think that "business ethics" is an oxymoron, especially if you listen to some of the rhetoric coming from the United States government and the media. But having a firm foundation of ethics in business is what keeps people honest and employed.

And in this day of the Internet, where much of your professional reputation is available to anyone with access to a web browser and Google, if you do anything considered unethical, it could be just a click away for your next potential employer.

This is especially true with software engineering. Many involved in developing software have an Internet profile somewhere, on some web site devoted to developing software. And if anything is removed from these web sites for copyright violations, your reputation can be tarnished in a heartbeat.

It doesn’t matter if you pass off one small 10-line function as your own. If you didn’t write it, you shouldn’t be passing it off as your own, and if you do and you are caught, the rest of your work can be called into question, along with your reputation. Many workplaces have a zero-tolerance policy on unethical behavior and they will terminate employees nearly on the spot if it is discovered.

As Guy posted in the comment trail to the C-Sharp Corner article:

Passing off code as your own is unethical and you will be found out by your peers.

And when you are found out by your peers, you’d better hope you are given the option to resign instead of being outright fired. If you are outright fired, the reason you were fired will come back to haunt you. Contrary to popular belief, a previous employer can disclose why you were fired, and likely will if it was for any kind of ethics violation, especially if said termination arose from an ethical conflict discovered on the Internet.

Many seem to think that a previous employer cannot say anything other than "name, rank and serial number", to borrow the words of the HR manager for a company in whose employ I was previously, otherwise they risk a lawsuit. But this is not true.

Unless barred by contract or company rules (and possibly the law in some jurisdictions) from disclosing such information, a previous employer can disclose anything about you, including why you were fired, so long as they are telling the truth. Truth is an absolute defense in any case of defamation. And if you try suing a previous employer for defamation, and they can show that what they disclosed is the truth, well… case dismissed.

In short, plagiarism is not worth your reputation.

If you use someone else’s code, make sure you properly attribute it. Say where you got it and you’re covered. But don’t try to pass it off as your own as you will be discovered.


TeboScreen – [homepage] [CodeProject]

Published by Kenneth on 20 Jan 2010

Add the MySQL instr() function to SQLite

Before you can add a new function to use in your SQL statements with SQLite, you must first create an SQLite extension library. This is relatively easy to do, and the SQLite web site provides a straightforward wiki article explaining what to do.

To actually add an instr() function to SQLite, use the following code segment:

   1: void sqlite3_instr(sqlite3_context* pContext, int argc, sqlite3_value** argv)

   2: {

   3:     const char *str1 = (const char *) sqlite3_value_text(argv[0]);

   4:     const char *str2 = (const char *) sqlite3_value_text(argv[1]);


   6:     char *p = strstr(str1, str2);

   7:     int nResult = 0;


   9:     if(p != NULL)

  10:     {

  11:         nResult = p - str1 + 1;

  12:     }


  14:     sqlite3_result_int(pContext, nResult);

  15: }

And that’s really all you need.

Published by Kenneth on 14 Jan 2010

Trade Profiteer – 1.1.414 (alpha)

A new version of the Trade Profiteer has been released.



Bugs fixed

TP-10 – Appears to be removing more data than it should

Along with this bug being fixed, a change to the UI was made. In the Island to Island tab, instead of showing each shoppe from which you should buy, it will show the quantity to buy and the prices at which to buy the commodity. You will find that it can generate a report much faster as a result of this change.

Fair winds.

Published by Kenneth on 12 Jan 2010

Follow up: Movable Type and 1&1 Internet

After a couple more e-mails and some more finagling on the back-end server, I have Movable Type installed and running. Now comes the difficult part of actually administering it.

One thing that is definitely evident with playing with it thus far is that Movable Type is intended to run a web site. It’s a lot more than just a blogging platform, and in case the thought has crossed your mind, I may consider switching to using it to run the Colony West web site, assuming I can find plugins for everything else I will be needing, along with getting it stable…

Actually, if anything, I’ll be more likely to switch my personal web site over to Movable Type before I change the Colony West web site over. At least with my personal site, I won’t have a lot to move – just some existing blog posts to migrate for now. Right now it’s powered by Wordpress, the same engine powering this blog.

Now I will say that there are still some quirks – I’m not entirely free of HTTP 500 errors, but they’re happening quick enough that I know script timing is not the issue, so I’ve still got some troubleshooting to do.

Published by Kenneth on 11 Jan 2010

Movable Type and 1&1 Internet

Yesterday I tried to install Movable Type to my web server, and it failed miserably. In trying to get MT installed, I kept running into HTTP 500 errors even trying to run the installation, so getting beyond that was likely not going to happen.

It was only after a few hours of searching that I discovered the reason: 1&1 Internet (the company that hosts the web site for Colony West Software Company) restricts execution times on scripts to 10 seconds. I’m not entirely sure how accurate this is, however, because uploading files to the web site for distribution goes through a script.

At first I didn’t consider this to be an issue as I was able to install other content systems successfully without issue: Joomla, Wordpress, Xoops, and Serendipity to name a few. But when I saw the issue listed on Movable Type’s wiki, it made perfect sense. I considered an alternative – installing it to a Linux server I have in my home and then transferring the installation to the remote server – but I decided this would only provide a temporary gain given what I was reading on MTs web site.

I would like to switch to using Movable Type as it is more featured and has a better installation base than Wordpress – for example, Movable Type is the system that powers The Huffington Post. But unfortunately with this script execution time limit in place, that can’t happen.

Well that is if there is such a limit in place for my hosting package.

I’ve sent an e-mail to 1&1, so we’ll see what they say. I’ll be sure to post their feedback.

Published by Kenneth on 26 Dec 2009

Trade Profiteer – 1.1.326

I hope everyone has so far had happy and safe holiday season, whatever your faith (if any). And even during this holiday season, I managed to get a new release of the Trade Profiteer put together. This one is still considered an alpha release, but I think we’re approaching beta testing for what will be version 1.2 of the Trade Profiteer.

Download: Trade Profiteer version 1.1.326


TP-3 – Export imported data to comma-delimited file

This feature was requested by RedSeaWitch when she sent me a PM asking for the ability to export the imported data to an external file.

Go to Data->“Export shoppe data” to access the feature. You will select an island, one or more (or all) commodities, and the export file. The data is exported in CSV format, which is compatible with virtually every spreadsheet application available.

This new feature could probably be enhanced further, so I welcome feedback on this.

Bug fixes

TP-6 – Does not work with multiple Y!PP windows

TP-7 – Change so it doesn’t close when pressing Esc

TP-8 – Ctrl-I key combination not working

Next »