TGIMBA – Traveling Sales and Permutation Algorithm – Part 1

Source Code –

Ever since starting The Globe In My Bucket Application (TGIMBA), I have been anxious to explore algorithms and other cool software widgets.  Well, with this blog entry, I am starting the first of what I hope will be many algorithm releases.  This will be one in a series of blog posts on a TGIMBA Traveling Salesman and Permutation algorithm implementation. I did a POC on these two earlier (

This first phase is to update the website to be backwards compatible. With commit ‘dca070801c57e129e6c7b563a3491b9fcf9f4dd8’, I updated the existing SQL script(s) to only insert existing columns columns. I did this because I noticed that nothing worked when I did a quick trial and added Latitude and Longitude columns to the bucket list item table in production. When I tested, I got an error.  The number of columns didn’t match what existed (i.e. the two new columns). The ‘fix’ for this was to use named columns.

I then added the two fields to the website(s). This was done with commit ‘7ef11fc5941ba1725581b10ea7dce58d54bfbb49’. I ran into some issues since my original code is a little spaghetti-sh (we all learn by doing right? :)). When I do the next major re-write, I am definitely going to create HTML templates for each view and not dynamically generate them like I am now. I will also probably reduce my reliance on Jquery and use more native JavaScript. Anyways, this commit only got me 80% of the way there. I left the original WCF and API service calls so existing applications won’t break. I intend to complete all modifications to the website before updating the mobile applications.

The last step of this phase was to complete modifying the existing Jquery code to handle the two new fields. I will admit, my original implementation is not as good as I once thought it was.  My code is hard to follow. Something I will remedy (at some point). This step is represented by commits ‘b74d205489d9724767403536cadca655da25d06d’ and ’32c89685e070409909da7fc9eb20ea25de21e0f3′.

This will probably take a month or two to complete with my full time job.  It will also take a while since I am going to re-write the C# POC’s in Node Js. We have a lot of Node Js projects at work and I think this is a logical step and will work nicely with the partial TGIMBA Node Js API I have been working on. My long term goal is to have the website rewritten with a .NET core harness, Node JS API separate from the website, an Angular or other popular front end JavaScript technology and the existing mobile applications (updated of course).


Stay tuned!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s