I had a project I wanted to do (home budget analysis), and I thought it would be a good project to tackle with Gemini as my coding partner. I'd done the project previously but it was never polished so I wanted to finish it up right.
The project requires pulling data from three different visa bills as well as a table containing bank bill payments.
The first thing I did with Gemini was get it's assistance in extracting the data. It was able to extract the transactions from the PFDs that I downloaded from the bank. It was also helpful at normalizing the data so that the three different Visa statements could all end up in CSV files that had the same format (particularly an issue with the date field as one of them used a different format and all of them used a format that was not the prefered mysql database format of YYYY-MM-DD. Ultimately, it would be nice to see if it could code all of this extraction and normalization in php but in my past experience, the library I use for reading PDFs doesn't work with PDFs created by my bank. So, that will be a project for another day.
There were some problems with getting the cleaned data from Gemini (I think there are limits on how many lines it will produce in output) but it eventually found a method to output all of the data so that I could use it. Once I had CSVs of the data, I was ready to start coding with Gemini. I'm using the Joomla framework which is an MVC architecture and really the only Web platform I've ever developed for. It's not nearly as popular as Wordpress so I thought it would be an extra test to see how Gemini did with a less well known (and therefore less public code) plataform.
In general, the approach I followed was to tell Gemini what I wanted created. I was using my background knowledge of the platform to tell it what I wanted in a step by step approach which allowed me to verify the validity of the code as I went along. This is essentially the same approach I would use if I was coding everything from scratch by hand. I'd implement a new feature then check to see if it worked.
The first prompt I started with was:
We're Working in the Joomla 5 framework.
A component has been created named filelister.
The component has a view created named vendors and a default.php file has been created.
There are three tables in the Mysql database which are available for this view.
The three tables have the same field structure which includes the 4 fields: id, Date, Vendor, Expense.
The table names are bect_2024_rbc_visa, bect_2024_scotia_visa, bect_2024_td_visa.
Go through each of the tables.
Get the Vendor field for each entry in the table.
Select the last word in the Vendor field.
If the last word is "Ottawa" or the last two words are "Ottawa ON" delete those words and update the field with those words removed. Ignore case when making this evaluation.
If the last word is not Ottawa or the last two words are not "Ottawa ON", create a prompt for the user which displays the last word from the field and ask if it should be deleted or not. The user will press "y" if it is to be deleted or "n" if not to be deleted.
After the user responds, the program will continue on to the next entry in the table.
Write the code which can be put into the vendors default.php file that provides the described functionality.
After
When I used Gemini to extract the data from the PDFs, it sometimes missed entries but it also sometimes created entries that didn't exist but that it might have seen in another file.