Since I started learning to program, one of the most confusing topic has always been how to pass data, without having unintended side effects. Sometimes, we want the data to be immutable, sometimes we do want to modify it within a method. Eric Lippert’s Essential C# does a wonderful job of explaining this topic in depth. This entry tries to summarize my understanding and how it works in C#.
Software development is difficult. Especially if you are working on a 25-year old enterprise software that has gone through multiple platforms, technologies, and has seen multiple generations of developers. All of which makes it hard to understand and difficult to develop. What can we do as developers? Turns out, a lot.
I was really struggling with XML this week at work. Spent hours banging my head to parse a simple XML document. According to pragmatic programmers, I was programming by coincidence, without any clear plan, just hoping to get the code working somehow, and failing completely.
Sometimes, we need to find out if an element is a member of a given set or not. There are many algorithms which solve this problem. However, many are not efficient for large datasets and restricted memory. A good example is a dictionary on an iPhone. While typing, the application needs to verify if the word is in the dictionary or not. The dictionary is huge, and there is just not enough RAM to hold all words. How to find out all the typos? Luckily, there’s a way.
I have been studying Stoicism for more than 2 years now. The more I read Seneca, Marcus Aurelius and Epictetus, the more I realize how Stoic principles can be valuable when applied to programming. This post is a quick reminder to myself when I am writing software.