top of page

Lessons I've Learnt

This was a major project for me, because I didn't know how to code before at all. Here are the major skills and best practices I've picked up over the course of developing this app. I'll start with the technical skills and then go on to the best practices.

Private API Requests

Googles "Vision" API is the API that this app uses for the OCR functionality. ​The advantage of having this be done by an API is that I can delegate out the machine learning required to Google, instead of trying to create it myself. In this future this will allow me to build applications that have features far beyond what I myself could create.

 

​Implementing it involved setting up a cloud service account with Google, and then creating a private key corresponding to that account that authorizes calls, saving the key into a JSON file, and then writing a python file that, when ran, makes a request to the API with an image file as an input. when the user presses the "analyse" button, this file runs, and analyses the image using the API, and then saves the results to a text file, showing the user the result.​

 

It took a while to figure out the authorization part: I got stuck on a "bad image data" error for quite some time before I realised how to use an authorization key. But now that I have done this I am confident I can integrate API calls into applications in a wide range of contexts in the future.

​

My plan for an update of the app is to use OAuth 2.0 to be able to allow users to create an account with the app, and have each API request be connected to the users specific account. This is necessary because otherwise, my account would be handling all the requests which could potentially bankrupt me from the fees. Once I get this feature coded in I will have the skills to make distributable applications using publicly available APIs for many different uses.

Linux Deployment

Possibly the most challenging aspect of this project was the deployment process. ​I used Kivy/Buildozer to make, and build the app respectively, for which I had to install WSL on to my windows system. This already was a big jump for me working in two different OSs. ​There are two main reasons why Linux is more difficult than windows. One is that it is very command line based. The entire deployment process was done through commandline-esque scripting in WSL. The other is that error messages tend to be very cryptic: the number of times I got a "SAXparseException"/"JavaClassNotFoundException" error when it was just a syntax error in my buildozer.spec file is higher than I would like to admit publicly.

 

  ​Despite these challenges, I managed to make it work through a combination of downloading different packages, consulting message boards and chatgpt, experimenting with different settings and evironment variables, re-reading documentation, and retrying things in different directorys.

​

I can now safely say I can make my way around the linux file system, can change environment variables, and keep track of virtual environments in Linux.

​

My future plans for Linux centre around machine learning. I've done some research and found that Linux is better for certain cutting edge machine learning tasks, so I would like to do a machine learning project entirely in linux.

Python Concepts

This app taught me a lot about python.

bottom of page