···11----
22-title: 'Learnings over the past year'
33-description: 'Things I have come to realize and learn in the last 1 year.'
44-date: 'Oct 10 2024'
55-draft: true
66----
77-88-May of 2022 is when I finished my university education in the field of Computer Systems Engineering.
99-I was taught a whole bunch of things - networking, working with FPGAs, and a whole bunch more. The most interesting of those subjects was application development. The primary language was Java (not Spring Boot, just plain old Java) and well, I wasn't very fond of it.
1010-1111-As soon as I graduated, I found out about web applications and got hooked. Picked up the basics of HTML, CSS, and JS in a couple of weeks, and built a dummy website to put my newfound knowledge to use. It was OVERLOADED with animations that added nothing, but it was all so new and shiny 😆
1212-1313-Got my first full-time job at a startup based in Oman (my place of birth and residence from 2000 to 2023). Long story short, I picked up React, Next, Express, and even some AI fine-tuning in the one year that I worked there. It was a good run, but I couldn't continue working there due to a bunch of reasons.
1414-1515-## Välkommen till Sverige!
1616-1717-That translates to "Welcome to Sweden!". December 16, 2023 is when I landed in Copenhagen and headed to Malmö for my new and shiny job as a Fullstack Developer at Curamet. I already had a project waiting for me, and it was at IKEA. I was excited, but I kept thinking - "what kind of tech does IKEA have, that it needs to hire consultants?" I mean it's a retail company right?
1818-1919-Well, apart from "logistical" reasons, turns out IKEA, even though not a tech giant, has a crap ton of tech things going on across the company. My project was with the "Customer Rewards" team which, as the name suggests, is responsible for the tech behind giving rewards to customers in return for loyalty.
2020-2121-The 2 senior engineers and my manager, over the past 9 months have exposed me to a plethora of things I never even thought would exist in software engineering. All I knew up until I came to Sweden, was how to build CRUD applications. Even if I was under pressure at the startup, I was always in my comfort zone, doing the things I know and nothing else.
2222-2323-Since day 1 of my project assignment, I was exposed to things I couldn't even begin to understand. What the hell is Domain Driven Design? Why are there `fixup!` commits in open PRs and what do they mean? Why is the code composed like that? It was a lot to take in, and I was lost in the mayhem.
2424-2525-## Turn it up to 11!
2626-2727-import TurnIt from './turn-to-11.astro';
2828-2929-<TurnIt />
3030-3131-Being lost was not gonna help me. I needed to start being annoying now if I was to make good use of my time. I started with a seemigly simple task - upgrade some of our services to node v20. How hard could that be? Right?
3232-3333-Well, the upgrade itself was simple. I just whipped up a bash script to do the "steps" for me. But then I realized, I had no idea how to make sure the upgrade didn't break anything. "Well once I raise the PR, someone will verify the changes. I can get some input from them!" - thankfully I did lol.
3434-3535-Things were a little quiet over the next few weeks, with me just upgrading the services, and verifying the changes. But then my manager told us about this new application we need to build - a finance reporting system for all the rewards our system gives to customers. From a high level, it seemed pretty straight-forward since we store events for everything. But then we got into a long design discussion. It was fascinating, and it kinda scared me. I was a new joiner and knew maybe 1% of how the system worked.
3636-3737-If it wasn't for the absolutely amazing team, I think I still would have been getting onboarded.
3838-3939-This new application for finance reporting needed to interact with other parts of our system. Parts that I had never interacted with before. In the 4-5 month stretch that I was hyper-focused on to finish this new app, I feel like I learnt more about the system that if I would have directly worked on those "other" parts. Not only that, I understood why the team does certain things in a certain way. I learnt how to use Terraform (which was surprisingly SO MUCH more simpler than I imagined lol), I learnt the nuances of working with GCP's Cloud Run, Secret Manager, and all the other things and how Terraform behaved. I finally understood what CQRS meant. I realized why Domain Driven Design was important, and how it was leveraged in our complex composition of services. I understood why fixup commits are so so so much nicer than a new commit. Everything started to piece itself together.
4040-4141-Most of this work I did was very backend-heavy - I was not and still am not complaining, something about writing business logic hits _the spot_ for me. The app we built for finance reporting was called "the best tool we have used so far" by the consumers. It was an amazing feeling to say the least.
4242-4343-## 11 is where I thrive
4444-4545-Over the past year, I have come to realize that **11** is where I thrive. I haven't had a single moment since joining this team, where I have felt at ease (and I mean that in a good way). I'm constantly learning new things whether it's related to work, or just tech in general.
4646-4747-But you might be wondering - did I _really_ learn anything new? I know for a fact I did. There are so many things I would do differently at the startup if I had the knowledge I have now. Command Query Responsibility Segregation, Domain Driven Design, Event Driven Architecture, Event Modelling, nuances of the serverless ecosystem, and so much more that is simply a lot to mention here 😆
4848-4949-## The next 1 year
5050-5151-I really do not know what I will be doing a year from now, but I know for a fact that if I don't get to turn it up to 11, I will eventually just lose interest in whatever it is I will be doing. I'm not a veteran in the field, I'm a rookie that wants to find his footing, and 11 is where I will find it. Not 9, not 10, but 11.
5252-5353-Thank you for reading my first attempt at a proper blog post. I don't have comments on this site yet, but if you want to talk about what I wrote here, or just anything at all, feel free to reach out to me!
5454-5555-import Socials from '../../../components/Socials.astro';
5656-5757-<Socials />
···11----
22-title: 'Notting'
33-description: 'A note-taking app built to learn about the Ports and Adapters pattern.'
44-date: 'Sep 14 2024'
55-repoURL: 'https://github.com/safwanyp/notting'
66----
77-88-import Link from '../../../components/Link.astro';
99-1010-### What is Notting?
1111-1212-Notting is an app I am working on in my free time to learn and put into practice, my knowledge of
1313-the Ports and Adapters pattern in software engineering.
1414-1515-If I were to briefly explain what the pattern specifies, I would say this - It's a way of separating
1616-an application's core functionality (i.e. business logic) from the technologies it uses. I will try and
1717-make this clear in this post.
1818-1919-### What does Notting do?
2020-2121-Nothing complex. It allows a user to write notes, save them, edit them, and of course view them.
2222-2323-### Why build something that already exists?
2424-2525-Good question and as I said in the beginning, it's just something for me to practice the new things
2626-I'm trying to learn - but that's not all.
2727-2828-I'm reading the book Hexagonal Architecture Explained by Alistair Cockburn and Juan Manuel Garrido de Paz
2929-on the Apple Books app. I like to take notes of my inferences, questions, and other things when reading
3030-books like this. Doing this in the Books app was okay at first, but got really annoying as I kept reading.
3131-3232-Hence I decided to start putting my knowledge into actual code, and thought - why not build an app that lets
3333-me do what I want exactly, while also doing it with my newly gained knowledge?
3434-3535-And here we are.
3636-3737-### How is the Ports and Adapters pattern implemented in Notting?
3838-3939-The whole idea of the pattern is that whatever technology you use should be independent of the core
4040-logic/functionality of the application. There are times when I like to do stuff in my terminal, and other times
4141-in my code editor. But even the code editor changes from time to time. (Right now, I'm trying to move from
4242-VS Code to Zed. I like VS Code because it has everything to help me work efficiently, but has its annoyances).
4343-4444-Another thing to note is that I wnat to be able to switch between storage providers to persist my notes.
4545-Maybe AWS S3, or GCS, or even Git. I don't know what I will go with.
4646-4747-To make these "switches" as easily as possible, Ports and Adapters will come in handy.
4848-4949-The following diagram is something I whipped up to illustrate this implementation.
5050-
5151-5252-The app's core logic is defined inside the app itself. To get the app to do something for me (the user), I will
5353-need to go through one of the driver ports, which are on the left-hand side. Let's take the "For Interacting with the App"
5454-port for now.
5555-5656-This port has multiple adapters (or implementations), which allow me to use different methods to do the same thing - interact
5757-with the app. If I decide to use the CLI adapter for the port, I will have to execute commands in a CLI tool to save a note (as an example).
5858-If I use the Web App adapter, I will have to use a web app to do the same thing.
5959-6060-If it isn't clear already, the whole point is that I can use WHATEVER method I want, as long the method conforms to the constaints
6161-defined by the port. This statement is true for all the ports and adapters in the app, regardless of whether they are driver (left-hand side)
6262-or driven (right-hand side) ports.
6363-6464-Now let's take the "For Saving Notes" driven port (right-hand side) as an example. I mentioned earlier that maybe
6565-I want to store my notes in S3, or Git, or something else. To make this possible, I create a port for saving notes, that defines
6666-the constraints that the adapter (S3, Git, etc.) needs to satisfy. As long as these constraints are satisfied, I can seamlessly
6767-switch between providers.
6868-6969-I will not go into the actual code since that will require a much longer post, but the repo is linked at the top of this post
7070-for anyone interested. I have done my best to seperate the commits in the repo, so that it's easy to see how this switching
7171-is possible.
7272-7373-> 💡 As of Sept 22 2024, the app is still a work in progress. I will update this post if anything does change!
7474-7575-### Some other thoughts
7676-7777-The app is a work in progress. I aim to make the repository as easy to parse as possible, so anyone can simply clone and run it.
7878-The ultimate goal is to have a way to self-host it, so that I will no longer have to worry about my note-taking problems lol
7979-8080-If you have any questions, please feel free to reach out to me via any of the contact methods listed on my <Link href='/#contact'>home page</Link> or just a start a discussion/issue on the repo linked at the beginning of this post!