DEV Community


Posted on


Teaching Yourself To Code (V)

Personal project updates: To those who don't already know or follow my GitHub projects, I'm making a budget program that's directly employing specific methods to determine your overall budget and possible spending increases, or decreases. Or, if you prefer buzzwords, I'm using machine learning algorithms.

Nevertheless, thanks to the existing APIs and their amazing functionality, I can perform the bulk of the actual calculations and progression outside of the program itself and have the resulting data imported for the analysis. Which, in my opinion, is much handier than performing both calculations and analysis at runtime.

From just some data in a spreadsheet,
expense test data

The information is then imported and analysed by purchase to develop a moving regression line. regression

That is, both the range and the regression update automatically with each new non-zero data point. Granted, this could probably make it interesting if you don't spend anything over the course of a few days, however, that would also mean that your spending would at least not have increased over those few days.

Beyond that, the expenditures can be grouped by category of the store visited,
merchant category
by category of the item purchased,
item category
or by the name of the store itself. name of store

Granted, none of the above reveals how much was spent at each merchant as a singular dollar value; just determining the comparison of the amounts being spent. Clearly, there are stores in existence which are not on this list. The cause of that would be because I either don't yet know about them or I have never been to these places.

However, that by no means dictates that anyone should feel neglected due to my lack of information. Simply perform a quick google search
google_search and review the top 5 results to see the website of the merchant of interest.

Thus far, all of these items have been made using the freely available APIs provided by Google via the developer console.

There are other features available, such as using GooglePlaces to load a map and locate places within a default 3.2km radius, which can be altered to anywhere between 0 and 5km, however, I've currently exceeded my quota during the testing period. I will update this post once it resets.

Returning a list of nearby restaurants
nearby restaurants

And returning a list of nearby cafes.
nearby cafes

Including duplicates for places with multiple locations.

Top comments (0)

An Animated Guide to Node.js Event Loop

Node.js doesn’t stop from running other operations because of Libuv, a C++ library responsible for the event loop and asynchronously handling tasks such as network requests, DNS resolution, file system operations, data encryption, etc.

What happens under the hood when Node.js works on tasks such as database queries? We will explore it by following this piece of code step by step.