One thing that annoyed me to no end at my job at VIP Traders was the large stack of paperwork with apparently no corresponding folder to put it into. Then I discovered that hidden away in everyone’s desk is a pile of folders that have slipped through the cracks and do not get filed away in the normal filing system. Because these random stacks of folders lacked any sort of organization, checking every piece of paperwork against every folder in everyone’s desk would be a massive undertaking. For a human anyway.

So I decided to make a computer do it for me.

I immediately started work on a simple database client which I called “Whose Desk Is It Anyway?” which would keep a list of all ID’s of the paperwork in the stack of paperwork I couldn’t find, and of all of the ID’s of the folders in peoples desks, and let me know which papers need to go to whose desk.

For the sake of simplicity, I used SQLite (Xerial) and stored the .db file on a network drive so my coworker and I could use the program simultaneously.

As we began using it, I began to flesh out the UX by adding convenience features.

I integrated the program with the companies old Lotus Approach database so we could verify information about the paperwork while we added it to our program.
I added import and export features so that a list of stock numbers generated in one of the other programs I wrote could be added or deleted from a location in this programs database easily.

This is by far one of the most personally useful projects I’ve ever done, making what I do at my job so much easier. It has been instrumental in finding a home for all the orphaned paperwork.

The SQL database uses a simple two column table, relating location (TABLE_NAME) to paperwork ID (VIN).
The program finds matches using a simple SQL query:


The results from the query are loaded into a HashMap<String, ArrayList<String>> and fed into my favorite snippet of code from this project.

I needed to sort the result set by first sorting each Array in the HashMap, and then sorting the HashMap based on the first element in each sorted Array. Thanks to Java 8, I managed to do it in 4 lines.

ArrayList<map.entry<string, arraylist="">&gt; results = new ArrayList&lt;&gt;(resultsMap.entrySet());
results.sort(Comparator.comparing(o -&gt; {
return o.getValue().get(0);

This code first converts the HashMap to an ArrayList of entries and uses the built in sort method with a generated Comparator which is configured to sort the inner Array (using the built in sort method, and a default Comparator from String) and return its first element for comparison. The performance impact from repeatedly sorting the Array was not noticeable, since the HashMap I am dealing with here usually only contains ~20 strings with about 2 to 4 elements in each Array.

Source Code

When I started working at VIP Traders my job was to organize paperwork into folders. I would eventually transition into writing software to automate large portions of mine and others jobs, and the first step in that transition was an Android app.

I noticed that my coworkers were having to walk around our parking lot writing down the VIN numbers of the cars on a piece of paper, and then typing them into a spreadsheet. If that isn’t a prime candidate for automation, then I don’t know what is. So I wrote a demo project at home, and presented it to the CEO. They agreed that it would be an improvement, and I was reassigned from filing to software development. As per their requested specs, the app scans a VIN barcode, and allows the user to submit all the scanned VINs to a new Google Sheets spreadsheet. Pretty nifty.

Point the camera at a bar code

The code is scanned and data is entered by the user

Data is submitted to a spreadsheet

While I was working on the app, I noticed another coworker importing photos from a camera, and renaming the files after the VIN, which he was typing in manually for each vehicle. So I extended the app to run on the companies Samsung Galaxy Cam 2’s and added a feature for capturing and storing photos.
Once a VIN has been scanned in, a button becomes available that leads to a page that prompts the user to take the photos they are supposed to take. The photos are saved to the camera and are named with a naming convention based off of the VIN.

This was a very fun project for me to develop as it really pushed the boundaries of abilities. I learned a ton about Android app development, and “invented” what I would later learn are called asynchronous callbacks. At the time, I called them “Post Execution Runnables”.

final CreateSpreadsheetTask task = new CreateSpreadsheetTask(sheetName.getText().toString(), context);
task.setPostExecuteRunnable(new Runnable() {
public void run() {
if (task.suceeded()) {
//Do stuff
} else {
Toast.makeText(context, "Could not create spreadsheet", Toast.LENGTH_LONG).show();

I thought this solution was very cool and was not at all surprised to find that its a not a new idea in the slightest.

Special thanks to bees4honey for providing the open source VIN scanning C library needed to scan in VIN barcodes.
Unfortunately, I cannot share a link to the GitHub repository for the project, as it contains sensitive information for the company.