Coding an expense calculator with golang - Thomas Langhorst

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello and welcome to my very first video here on youtube my name is thomas and i like to code let's get started did you ever ask yourself where did all my money go why am i always broke how much did i spend on clothes this month was it really okay to eat out so often am i ever going to be rich and beautiful [Music] well i can simply check my expenses but as a coder i like to automate things so let's do this instead and it's way more fun for the coding part i prepared an example csv file it looks exactly like the real csv file with all my expenses but it only has one row so it's way easier to check if my code actually works or not if you look at all the different columns you can see that i'm only interested in three first it's column three the date second it's column six the shop and column nine the amount of money that are paid the very first thing we need to do is to read in the csv file and extract all the relevant information like the amount of money that we spend or the date when we spend it after that we are going to put it into some sort of list so that we can operate on it later on [Music] okay we are done with the first part now let's give it a try and as you can see we are reading in this file and we get the data that we want works great according to the example csv file we only went shopping once and only in one store but in the real world you spend money like all the time so we need to figure out a way to categorize all our different payments like gas or groceries or even amazon payments i created this json file which will contain all the categories that i want to know my expenses for each category has a name as well as a list of shops that belong to this category now that we have this structure of categories it's time to read in the file let's get coding [Music] as you can see reading in the categories file works but i don't like that i have to go into the categories of the categories so i'm going to change my categories file [Music] i think this is going to be a better structure [Music] now that we are able to read in the csv file on the one hand and our categories on the other hand it's time to marry them together mm-hmm [Music] okay let's see if this actually works so for our groceries we paid 40 euro and 70 cents which is exactly the same amount as here so it seems to work so i updated my categories file and put in all the categories that i am interested in as well as the shops where i do my shopping and i downloaded my real expenses for the last month now i want to try it out if this actually works here we go looks good besides this but this is an easy fix it should only add the expenses that have a category there we go so we have all the expenses that i'm interested in and it looks good i hope you enjoyed watching this video if you did please give it a thumbs up it would really mean the world to me until next time keep on coding [Music]
Info
Channel: Thomas Langhorst
Views: 110
Rating: undefined out of 5
Keywords:
Id: pzAcgSI06Fs
Channel Id: undefined
Length: 5min 5sec (305 seconds)
Published: Sun Oct 10 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.