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.