Archive for January, 2010

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.

Enhancements

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.

Links

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]);

   5:  

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

   7:     int nResult = 0;

   8:  

   9:     if(p != NULL)

  10:     {

  11:         nResult = p - str1 + 1;

  12:     }

  13:  

  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.

Enhancements

None

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.