Reflection on citibank-statement-to-sheets

A little while ago I finished the next version of my statement parser to push the data into Google Sheets. The following is my reflection on the project.

Ditching the jQuery habit

When I started building this application I took the approach of starting simple and only adding things as they were required, but I didn’t apply this line of thought to jQuery. For whatever reason, despite seeing web development without jQuery being promoted around the web, I didn’t think to start without it. The changes to this version of the application added some complexity so I decided to use Knockout to abstract all the UI interaction. In the process of changing the application I realised jQuery could be removed completely.

Maybe the use of jQuery was too ingrained, because using Knockout and a view model is definitely simpler and I should have taken that approach from the start. Next time I will. I also should have used templates and created multiple view models for the different application states to break it up and remove all the state flag properties from it.

Disappointment with Google’s APIs

At work we are pulling data from APIs and I get to see a lot of poorly designed ones. The worst I have had to experience so far has been ADP’s where their online documentation is almost completely out of date and they distribute the updated information by emailing a PDF! Coming from that I had high hopes for Google’s API for working with Drive and Sheets, but unfortunately reality did not live up to expectation.

I found the API difficult to work with and in the end regretted trying to use the JavaScript version. I think it would have been easier to just have sent AJAX requests directly. The documentation for the API is not clear on the expected structure of the parameters for many requests and there were several points where I had to repeatedly call a function and look at the error returned to determine how to build the required parameter. This was an underwhelming experience and having to wrestle with this was a point of demotivation in the project.

If I was using the a strongly typed language this wouldn’t have been a problem, but for JavaScript it was. I believe all the different libraries and the online documentation is generated from a single source, but there needs to be more online documentation (at least for JavaScript). They could also provide TypeScript definitions. I did start to create some, but decided that I wasn’t going to be able to commit to finishing them.

Reflection on citibank-statement-to-sheets