The Problem: We could solve the Prototype problem in an easy way, but we would have to write several setters and create a converter that passes all the information from getter to setter. For example: We can’t assign the object reference...
Every time we create a different String, an object is created in the pool. How many objects were created in this situation? Try to solve this challenge before seeing the answer below. Answer: 3 Strings and 1 StringBuilder are created in the...
The problem: Imagine if we always had to create new instances for expensive objects, like DatabaseConnectors or Loggers, and use them in many places in the system. Imagine all the wasted memory. You could easily have a memory leak and your system...
The Problem: Not using the right pattern for the right situation and creating difficult-to-find bugs. In day-to-day work I continually see complex objects being constructed without any patterns at all. What happens? Well, we see giant Services with...
If you use Exceptions in the wrong way, bugs will be very difficult to find. If you always use generic Exceptions, how can other developers know what error has occurred? You have to understand why we use Exceptions and avoid Exception mistakes with...
The problem: lack of knowledge causes bad quality code. You won’t be able to implement the best solution if you don’t know, for example, the language, framework, or any other technology with which you work. You will probably reinvent the wheel many...
1 – Test business rules from your methods Well, what should be tested? Business rules, for sure! Don’t implement unitary tests to cover all methods and create numbers, make a real test! Know your method and test it with meaningful flows where you...
Some programming techniques will make all the difference in your code. Developers will neglect those techniques and as a consequence will have a bad time chasing and fixing stressful bugs. To help you build easy-to-understand software and get rid of...









