My Weekly DZone's Digest #1
This is my first post that offers a digest from a selection of DZone’s articles. I will pick DZone’s article based on my interests.
This week the subjects are : BDD Testing, Bad code, Database Connection Pooling, Kotlin, Enterprise Architecture
A few benefits you get by doing BDD : This article is an introduction to the Behaviour Driven Development practice. It’s interesting because we are regularly meeting teams, developers, architectures (pick your favorite one) that are confusing technical details and functionalities. As a result, the design, the tests and the architecture hides the user behaviour (the use cases ?) under a pile of technical stones. This article is a nice introduction. I recommend to go further these articles :
Gumption Traps: Bad Code : an article about the bad code and how to deal with it.
The first step to avoid the bad code trap is to stop producing such code yourself. When faced with existing bad code,one must work smart to maintain motivation.
This is a good introduction sentence. This week, I had a meeting with a skilled and amazing team. The meeting’s goal was to find a way to find the technical debt. The very technical debt that is ruining the application and undermining the team’s motivation. What I found interesting and refreshing in this article, is the pragmatic tone and the advice.
To avoid bad code, try to minimize the amount of newly produced bad code.
How to avoid the depress linked to the bad code ? First of all, I want to say that developers are not receiving enough training on how to improve the code. Usually university / college courses are dedicated about How to use a framework. Therefore, few of them are able to qualify what is a bad code, what are its characteristics and de facto the ways to improve it. To avoid bad code, I try to demonstrate the personal benefits for the developers to improve their skills. Quality is not only a question of money (how much the customer is paying) but rather how much your company is paying attention to your training and personal development.
A lot of developers are overwhelmed under the technical debts without the appropriate tools (mind, technics, theory) to handle it. I try to give them gumptions about the benefits to be a better developer and how to handle the weakness of a sick application. To save a software rather than practicing euthanasia :)
When we are discussing about Database connection pooling, most of my colleagues are relying on the good old Tomcat dbcp. However there is a niche, really funny and interesting, the guys that a competing for the best DBCP. And HikariCP is clearly a step ahead of everyone.
The article Database Connection Pooling in Java With HikariCP is presenting how to use a custom DBCP in your software.
I think it would have been great to present the differences with the standard DBCP and further debate on the advantages/disadvantages of the solutions. A good idea for a newt article :-)
Java Futures and Kotlin Coroutines
An interesting article about how Java Futures and Kotlin co-routines can coexists. Honestly I am a little bit disappointed and thought that Kotlin would make things easier like in Node.JS
Another article about Code Quality and we could be dubious whether exists an answer to that question : Are Code Rules Meant to Be Broken.
I won’t enter too much in the details, the author’s point of view seems to be Code Rules are good if they are respected. If they are broken, it implies that the Code rules need to evolve :-) What do you think about it ?
This article is interesting since it presents a feedback session on using Kotlin in a Android project.
The following big PLUS to use Kotlin are :
- Null safety through nullable and non-nullable types, safe calls, and safe casts.
- Extension functions.
- Higher-order functions / lambda expressions.
- Data classes.
- Coroutines (added on Kotlin 1.1).
- Type aliases (added on Kotlin 1.1).
This article is explaining one of the most dangerous side of coding : Coupling. Must to read article despite the lack of schemas.
This article is a great introduction on code assessment. These five habits are indeed things to track in your software code as a sign of decay and code sickness.
The habits are :
- Write (Useful) Unit Tests
- Keep Coupling to a Minimum
- Be Mindful of the Principle of Least Astonishment
- Minimize Cyclomatic Complexity
- Get Names Right
This article is really useful in the context of Digital Transformation to assess which softwares you should keep and throw.
Example of excuses :
- I didn’t know that code existed.
- I don’t know what that code does.
- I don’t know how to use that code.
- That code is not packaged in a reusable manner.
An interesting article and example on how to improve your own code using different skills. I really recommend to read this article and the next future ones : Test proven design.