2023 June

Last recap was a pleasure to write, so I will continue with the same format. Just writing something makes me more creative and writing more, I got to write my MacOS setup and have more ideas coming up.

Finances

June and end of june was a pretty mediocre with a small increase in the markets. I moved all the crypto I had in the Polygon network into Firi, to make it simpler to track my crypto. I have also sold all my index funds and bought “Storebrand Global Indeks Valutasikret N”. This fund is supposed to remove the risk of currency fluctations, which I think is a good idea now as the norwegian krone is very weak against the dollar and euro. Let’s say the NOK increase 10% in value. Then my index funds would have decreased by 10% because almost all of the funds are invested in foreign currency.

Spendings & cash flow

It’s tedious to track spendings every month, so I’ll probably get back to this after the summer.

Net worth

Not much has changed.

Work life

In June I had a quick trip to Ålesund to install the ScanReach ConnectPOB solution onboard Norwind Gale. Beautiful city with nice amenities.

In ScanReach we are have both a cloud solution and an onprem solution. The cloud solution is hosted in Azure and the onprem solution is hosted onboard the vessel in a Lenovo PC. One of the business goals now is to make the cloud solution as similar as possible to the onprem solution. Letting vessel managers see the same data as the crew onboard without directly connecting to the vessel. In order to do this the backends needs to have access to the same data, preferably in the same data structures.

So I have spent some time designing and building a GenericAPI where the main objective is to have the same API definition in cloud as onboard the vessel, making it easier for us and data integrators to build services that consumes our data.

I ended up designing a solution in Dotnet supporting both GraphQL and Rest API.

  • The decision of including GraphQL was partly because we wanted to experiement with it and partly because it’s a great way to let third party consumers get exactly the data they want (and it’s a nice buzzword). The end solution has a very thin GraphQL and Rest API controller layer, with all the logic in the services, making it easy and low effort to support both GraphQL and normal Rest API.

The core of the solution is a common nuget package ScanReach.Common.Generic.Api containing:

  • ReadModels
  • GraphQL Query Definition
  • Rest API controllers
  • Interfaces for services fetching data, for example IPersonService or the generic IDataFetcherService<TReadModel> which contains the function Task<IQueryable<T>?> QueryAsync(); ensuring that all services implementing this interface can be queried in the same way and returns the same data structure.

Then the GenericAPI in cloud and OnpremApi onboard the vessel reference this Nuget package and implements specific services for fetching data from the cloud databases which implements the IDataFetcherService and converts databaseModels to the appropriate readModels. After implementing and injecting the services, we can add the controllers and GraphQL Query Definition from the nuget package and everything just works!

GenericAPI Architecture

This works pretty well and I am happy with the result. I have already seen the benefits of the service making it simpler and faster to implement new features in both cloud and onboard the vessel.

Personal projects

Not much progress here sadly. In July I’ll plan on helping my older sister that studies programming to build some portofolio projects, as she will start applying for jobs next semester. Previously we have built an online background generator. Upload an image and chose month. Then the website will generate an image with a calendar on top, perfect for your phone lockscreen (GitHub) (link to online app). This was a nice and useful project learning her the basics of html and javascript. And she gets to use it every month!

Example output: Example image overlayed with july 2023 calendar

Daylio recap

Activites done in June 2023

ActivityNumber of days
Sun24
Friends22
Work22
Relaxing10
Bath in the ocean9
Beer9
Party6
Tired6
Disc Golf5
TV Series/Movies5
Family4
Cloudy4
Weight lifting3
Rain2
Good food2
Programming2
Dates1
Bouldering0
  • I have been hanging out with friends in the sun a lot which is great. Last part of june was a bit more cloudy and rainy with a small flu, but still nice.
  • Overall a good month with a lot of sun and friends.