Sometimes Deleting Code Is All We Need & F# Resources


Last week, I was so excited to share my thoughts about F# that I forgot to include a few resources on how to get started. šŸ¤¦šŸ»ā€ā™‚ļø

If you are interested in F#, I assume you have found resources that helped you get started.

Otherwise, I recommendĀ F# for fun and profitĀ by Scott Wlaschin.

Unfortunately, the site seems to be offline at the time of writing these lines. Yesterday, I was still reading a few articles.

Until the issues are fixed, I highly recommend theĀ Functional Design PatternsĀ talk on the YouTube channel of the NDC Conference.

Another great starting point is the website of theĀ F# Sharp Software Foundation.

16,000 YouTube Subscribers šŸŽ‰šŸ„³

Today, we reachedĀ 16,000 subscribers on my .NET development YouTube channel.

I don’t want to miss the opportunity to thank you for your ongoing support throughout all those years. šŸ™

If you haven’t already subscribed, I’d love to welcome you on board today. šŸ˜‰

Sometimes Deleting Code Is All We Need

Last week, I fixed a crucial bug, which has been in the software for a couple of years. šŸ’”

I run a small software as a service product, which had an issue with daylight savings time.

To be more precise, whenever the time was changed, the scheduled calendar items were wrong.

It took me a lot of time to think about what was wrong with the code. Even an extended debugging session didn’t help.

In the end, I remembered that five years ago, I made the software aware of the client’s time zone and added or subtracted the time difference between the client and the server.

You might ask yourself why someone would do that - and you are right - I should not have done that. 😬

I didn’t know any better, and it was my best guess to fix the problem of my server not being in the same time zone as the users.

Meanwhile, Azure added a region in Switzerland, where my users are also. Therefore, the client and the server are in the same time zone.

It turned out that I didn’t need this faulty ā€œfeatureā€ anymore andĀ removed all the time zone-specific codeĀ through the whole code base.

I deleted about 200 lines of code and essentially resolved the bug by removing code.

Sometimes, removing instead of altering or adding code is all we need to improve our code.