Improving Your Tests: A Journey to Cleaner and More Maintainable Code

When it comes to writing tests, it’s not just about making them work; it’s also essential to ensure they are well-organized, easy to maintain, and efficient. In this post, I’ll share my journey of refactoring messy tests into a cleaner and more maintainable state. Organize Test Configuration The first step is to organize my test configuration. It’s crucial to keep my tests modular and separate the setup from the actual test cases....

November 6, 2023 · 4 min · Tobiasz Waszak

Little logic change

When I first conceived of this app, it was the summer season, and now it’s autumn, and I need to switch to a smart trainer. This transition involves different configurations since I won’t be using traditional wheels and brakes, and it also pertains to a distinct activity type. The simplest solution, which doesn’t require any code modifications, is to add components one by one and create different bike configurations. Each component would track its distance, but this wouldn’t contribute to the overall distance of the bike....

October 26, 2023 · 4 min · Tobiasz Waszak

First issue

Hey there, fellow developers! I wanted to share an exciting journey I recently undertook to enhance my MVP app. As the first and only user, I discovered some important bugs and realized that I needed a more flexible approach to manage the data in my application. One of the primary issues was related to mounting and demounting bike parts using the API. At first, I could only work with the current date, which was quite limiting....

October 24, 2023 · 2 min · Tobiasz Waszak

I have awesome GUI

But only for me. As you can see, I neglect frontend part of my app and I focus only on backend. But this is API app so I can use every possibe API client which I want to. I’m not too geeky to use curl every time. It’s fine for examples but not to every day use. But there is nice solution. Its call postman and it’s allow me to create collection of all my endpoints, with examples, enviroments, etc....

October 23, 2023 · 2 min · Tobiasz Waszak

Strava part 2

When designing an activity tracking system, it’s essential to think ahead and plan for flexibility. The system should be able to integrate with different providers, such as Strava, and adapt to new providers in the future. To achieve this flexibility, I introduce a new entity called “Activity.” This entity will serve as a central point for storing activity data, allowing us to switch providers seamlessly. To create the “Activity” entity, I start by defining its structure in the database....

October 20, 2023 · 5 min · Tobiasz Waszak