Skip to main content

Posts

Showing posts with the label design patterns

How tendencies are established and how they work during software development

This has been boiling in the back of my mind for a while now. A lot of developers talk about antipatterns, patterns, good practices and bad practices. But I rarely hear about how did a bad practice get established during the development process. Or in general, how do various tendencies work during software development. Firstly I will start about features in general, in applications. Not all features are equal in an application, some of them are core part of the applications functionality. And usually these features are known by all the developers in the team, because the application can't work without them. Now imagine that a developer needs to do a new feature in the application similar a bit to a core functionality. Where will he look for ideas and inspiration about how to code the new feature? Of course in a similar core feature known by everyone. So these core features are used as reference a lot of times. Now his can be a good thing or a bad thing depending on how those fe...

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...