flajos blogja

Be careful with generics!

flajos képe

In my previous post, I’ve dealt with the risk of primitives. In this post I will show a similar theme, the risk of applying generics repeatedly in too much depth.

In the following example, we have a software system which deals with the products of different companies, where the products are grouped into product families. One functionallity of the system is to give a purchase report, which has to be presented on the user interface in the following form:

Company1                 Average Sells By Day   Average Age Of Customer
-- Product Family A

Be careful with primitives!

flajos képe

Several times a development team has relatively short time to implement certain functionality. In these cases, the major goal is to implement the desired functionality before the strict deadline, and because of that, the source code is not or poorly documented. Furthermore, developers are apt to code the required functionality as fast as possible, which causes decreased understandability of the code. In this post, I’ll show simple and easily applicable tips to make the code more understandable by introducing classes.

Tartalom átvétel