Skip to main content

Posts

Showing posts from 2019

A list of commonly used roles and functionalities in object oriented programming

Lately I started working on a new project at work. We just started laying the foundation for everything and I ran into the problem of how to assign general responsibilities to various components in the code so that we establish some sorts of patterns and standards used everywhere in the code. Some roles and functionalities were already defined, I found this really useful so I decided to write this post. I still have a lot of things to learn. Having an uniform code with a similar structure everywhere makes it really easy to understand. Also having clearly assigned roles to objects makes it easier to understand. 1. "Calculator" functionality If you have a class in which you do some kind of mathematical calculations and comparisons then you should add this in the class name. In general it encompasses some kind of mathematical formula. For example at one point I had to calculate how much fluid I had to allocate for some tubes. In general when you deal with numbers, you will

Protected variations in software engineering explained and extended beyond the common usages

While digging through some standard programming principles like low coupling and high cohesion I stumbled upon the fact that they are part of a larger series of principles called "GRASP" principles. After reading a bit about them, they seem just as important if not more important than the "SOLID" principles And one particular principle from that series stuck with me: protected variations. According to this principle, variations and changes in parts of the application should be contained only in them and not trigger further changes in the application. In general terms points of inflection should be established between the parts that change and the rest of the application which act like a boundary and stop additional changes from propagating to the rest of the application. For example, one of the most common parts that might change in an application, is the data access and storage methods. For example instead of using direct sql to read and write to a database, an

My Facebook interview experience, from start to rejection

Over the last couple of months I had the opportunity to interview for one of the most revered companies for any software developer in the world which is Facebook as you have guessed from the title. It was a really unique experience and surprisingly I learned a lot about myself too. It turns out that after all these years building small and maybe some smaller medium sized applications, I have become quite passionate about those kinds of applications. Building these kind of applications allow me to have fun using things that I love the most: object oriented programming, designing functionalities and splitting them into components and using various interesting programming principles or software design principles. It turns out I am very passionate about algorithmic stuff and high performance stuff. I mean I do enjoy them from time to time, but they don't really seem that creative to me. With object oriented programming and various software design principles, you can come up with an

Success doesn't always breed more success, sometimes it causes more harm later on and a small bit of skepticism is always welcome

This has been baking in the back of my head for quite a while now and it happened to me and the team that I am part of, at work, in the last couple of months. I think it is worth analyzing what actually happened and worth keeping the lessons learned in the back of your head all the time, especially during estimations. Now on with the story. Initially when I joined the company I currently work at, we started slowly doing work and getting to know the application with its business logic. We had a lot of doubts in the beginning. So during the estimation meetings at the beginning of a sprint, we were constantly unsure of the tasks that we had to estimate. At first glance this seems like something bad but it actually had a silver linning. That doubt kept us analyzing the tasks that we had to do more in depth. We also looked into existing code more often which helped us too. And quite often we would discover hidden issues that at first glance were not so obvious, issues like hidden depend

Pointers, loose coupling, indirectness and the interesting link between them with some surprising hidden pitfalls

Lately I was working at work with various services, maybe one or two microservices. I also worked a bit on an open source project, entity framework core. And then I remembered about pointers which I learned in the first year at university. Now you ask me, what do these things have in common? Lets start firstly with pointers. Usually in programming you can access a resource directly from the code. This resource can be a number, an integer or just about anything else. But by using pointers you don't access the resource directly. The pointer is pretty much a number that has a deeper meaning in a context. Now to access that resource, you need  to do a bit  of translation. You don't access it directly anymore in the code. You have to figure out where it points to and then see what was the last value that was assigned in the place its pointing to. Then you  know the actual value it points to.  So there is kind of jump in the normal workflow  when accessing a resource. And that  r