« October 2007 | Main | January 2008 »

November 2007

22 November 2007

Use Tab, Please

If you want to export a database table as a plain text file you have some options. One approach is to use a fixed width format.  This format tends to be favoured by databases like Oracle or DB2 where the text fields in the table index have a fixed width defined. The trouble with this representation is that it is larger than necessary and to import the data you need to define the field widths.  This can sometimes be inferred from the location of spaces but if the fields are fully filled, as with numeric fields, the location of the field breaks must be known.

Another approach is the popular CSV format.  In its simple form this uses a comma between each field. But comma is a common character so then text qualifiers, using quotes are added.  However, quotes can also occur in the text, so then escape characters are introduced, sometimes slash, sometimes double quote. I'm not making this up! An escape for a qualifier for a badly chosen separator.

A third approach is to use the tab character. This is the character which the clever folks who drew up the ASCII character set thought to set aside for... creating tabulated data. Using tab means that there is no need for qualifiers, escapes or figuring out where fields end in a fixed width format.  If tab does happen to occur in your field data it can in almost all cases be safely replaced by a space character.

This may very well be the most trivial thing you've ever read. But since you are still here, please, next time you see this screen just choose tab separators with no text qualifiers. Just as soon as everyone does that I won't mention is again, I promise.

Delimiters_2

20 November 2007

Ebook Readers

Amazon is releasing an ebook reader called Kindle in few days time. I don't think it will have any success.  Why do many people print out documents before they read them? Why do many people like browsing books in great shops like Borders? You can curl up with a good book, will it be possible to curl up with a good ebook reader? I think not.

Others are more positive, Dylan Fuller writes: "I am optimistic that the new devices will help drive a good user experience".

19 November 2007

Seam Carving

Seam Carving is a new technique for resizing images, where pixels with the least information are removed.  Seams run from one side of the image to the other, either horizontally or virtically - so removing one seam reduces one of the dimensions by 1 pixel.  This could be really great for displaying images on mobile devices.

18 November 2007

Document Management with Subversion

Version control systems like CVS, Subversion or MS Visual Source Safe are essential tools for managing source code.  However, they can also be used to manage standard company documents, like financial spreadsheets, marketing literature, logos, etc.. I've found this a successful approach for managing shared documents and non-technical staff are soon happy using the system.

The general concept is to have a central document repository. The users work on their own local copies of the repository. You have to explicitly fetch updated documents, and explicitly check-in your changes.  This may seem like effort - but retaining explicit control over these basic actions is what makes the system work.

I recommend using Subversion (SVN) which allows version of directories and renaming of files.  Together with Tortoise SVN client, which integrates into Windows Explorer.  There are several options for the SVN networking, we use the svnserve approach.  (If you are installing SVN on a remote unix server you can tunnel your connections over ssh to get a secure connection.)

One thing to take care over is delete operations.  Once you've marked a file for deletion, undoing this operation is difficult because the file has been removed. It would be better if tortoiseSVN kept the local file with a mark against it - so it could be used as a target to undo the delete.

05 November 2007

Company Formation Tips

In the course of my work as a custom software developer I sometimes encounter clients who need to setup a company to hold the intellectual property rights to the software.  So I thought I would put together a set of useful links for doing this.  Rather than providing lists of options for you to wade through I just include links to companies myself or my contacts have used in the past.

  • Jordans - Company Formatation - Creating your limited company and registering it at Company House. You will need a minimum of one director and one company secretary. £141 (£120+VAT). See Companies House guidance on New Companies.
  • Tax Assist - Accountancy. You'll need an accountant to assist with end-of-year returns to companies house, personal tax returns to HMRC (which you are required to submit as a company director) and PAYE/NI if you have staff.
  • The Logo Company - Design of logo and stationery with unlimited revisions. £99.5 ($199). See also Companies House guidance on information to display on stationery.
  • Inky Little Fingers - Stationery Printing. 500 letterhead and 500 compliments slips £116.3 (£99+VAT)

If your new company will be commissioning software, make sure that one of the deliverables in the source code.  For non-techies, the source code is what the developers will actually write when implementing your system.  Often, I've come across companies who have bought both development and hosting of a web service - with no access to the source code they can't switch suppliers. If you are commissioning native (desktop rather than web) software, then you also need the source code, not just the compiled binaries.

The best way to get the source code is to link into your service providers CVS system and get regular updates. This also provides an additional backup of the source code.

04 November 2007

Web APIs

With the advent of widespread broadband and good browser support for javascript, web browsers have now made the leap from static rendering of pages to hosting interactive applications. Applications like Salesforce (35000 users) or gmail now enjoy widespread usage.

Web browsers are becoming increasingly mature as a platform with the availability of development APIs.  Here are links to tutorials for some of the main APIs:

  • Amazon Web Services (from Java) - Scalable storage, queuing and backend compute via SOAP or REST, callable from multiple languages. Amazon provides not just the API, but also the scalable hardware to run the services.
  • Google APIs (javascript) - Strong focus on javascript, important features are website search and mapping. The javascript code is embedded in your pages and access the Google servers.
  • Facebook API (php) - Provides access to the facebook platform and data to allow creation of facebook apps.  The app itself is written in php and resides on your own servers.
  • Ebay APIs (from Java) - Ecommerce tools including shopping cart and search facilities implemented with SOAP, so available from multiple languages. Ebay Usage Stats 2005


01 November 2007

Old Blog

Thought I'd add a link to my old blog. I stopped using it because of comment spam and strange rating clicks.