Category: Quickies
-
How to Handle AttributeError: ‘NoneType’ Object Has No Attribute X’ Like a Pro

The AttributeError: ‘NoneType’ object error in Python indicates an attempt to access a non-existent attribute. Instead of applying quick fixes, it’s essential to address the root cause, ensuring data integrity. Enforcing data rules prevents errors, while clear communication about optional attributes assists in handling them appropriately across the application.
-
Optional vs Null

The article discusses the limitations and proper use of Optional in Java to prevent NullPointerExceptions. While Optional offers a way to avoid nulls, it doesn’t eliminate the need for thoughtful design. It emphasizes functional programming techniques to handle empty values effectively without excessive null checks, advocating for clearer code over mere null avoidance.
-
How to Create a Singleton with Java Enums

The Singleton Design Pattern ensures a class has only one instance, facilitating global access. Traditional implementation can lead to issues in multi-threaded environments. A more efficient approach using enums guarantees thread-safety, with built-in properties resembling a Singleton. While useful, overusing this pattern complicates testing and should be approached cautiously.
-
Estimate a Task in Points or Time

In this post, I dive into the age-old debate of task estimation: should you estimate in time or complexity points? I explore the pros and cons of each approach, from the product owner’s need for clear timelines to the unpredictability of time-based estimates when different developers are involved. We also look at how complexity points…
-
5 Tips to Maintain a Code Clean

In this article, I list 5 of the main points to keep a code clean. Organize the imports, use short methods, don’t use utility methods or classes, use a naming convention and use a code quality checker tool.
-
Code Review Tips

In the following post, I’ve written an extended list of all the items I check when I read a Merge Request.
-
Where To Write Documentation

I can use Word file, a private Wiki or write the documentation into comments inside the code base. Which one is the best? What are the advantages and disadvantages of each documentation? In this post, I explain 3 types of documentation, with their advantages and disadvantages.
-
When It’s Time To Refactor

Refactoring the code means review the existing code, extract duplicated code and remove unused features. This operation is never accepted by product owners, as it doesn’t produce any new feature. But refactoring the code base allows the developers to add more features faster. In the following post, I’m listing 3 metrics that must trigger a…
-
7 Habits of Great Developers

In this article I talk about the 7 habits that differentiate a simple developer from great developers. The difference is not in the intelligence or the age but in the habits.
-
3 Steps to Get a Job as a Junior With No Experience

Times are difficult to find a job. I’ve interviewed a lot of Junior developers. And here are the 3 main points that make me decide to hire the developer or not.
