0

How to make a software developer happy ?

Leave your comfort zone

To be or not to be (happy), that’s the question. In this article, I expose some thoughts about what could make a software developer happy in his work. I wrote this article with several targeted audience in mind : Junior developers, Senior Techleads and H&R resources.

Continue Reading

0

Parallell issues with Java software : useful links to troubleshoot

Java 8 Threads/Promises/CompletableFuture/ForkNodePool

I am writing a new release of my Spring CQRS Module(link1, link2), including a parallel execution feature.

However I am encountering several issues with the Java 8 promises aka CompletableFutures.

My issues are :

  • I am using a dedicated ForkNodePool but some promises are stilled created outside my pool
  • Some threads are slow to die (WAITING state is too long)
  • Completable.allOf is creating promises in the common ForkNodePool
  • I had an exceeded waiting thread exception

Here is two links that are helping me a lot to solve these problems :

  • Java Parallel Calamity : link
  • The Java Fork/Join Framework : link2

These two articles are well documented and explain into the details how Java/Threads/Java/JVM/Promises and parallel streams works.

0

CompletableFuture and Java 8 Reactive

java completablefuture

I have bene using recently Java 8 new features CompletableFuture.

It works the same way as javascript promises but with a crazy hard to remember syntax and plethora of methods.

I found this great webpage to guide me through the API :

Guide To CompletableFuture

The result is this new version of the CQRS Module :

https://github.com/sleroy/spring-cqrs-arch

Fore more informations about that module, check there :

 

An example of code is here.

0

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

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 : * Your boss won’t appreciate tdd, try BDD * BDD Programming Frameworks * Java Framework JBehave.

Gumption Traps: Bad Code

Bad code, how my code...

Bad code, how my code…

Gumption Traps: Bad Code : an article about the bad code and how to deal with it.

{% blockquote Grzegorz Ziemoński%} 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. {% endblockquote %}

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.

{% blockquote Grzegorz Ziemoński%} To avoid bad code, try to minimize the amount of newly produced bad code. {% endblockquote %}

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 🙂

Database Connection Pooling in Java With HikariCP

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.

Hikari Performance

Hikari Performance

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 🙂

Concurrency: Java Futures and Kotlin Coroutines

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

Are Code Rules Meant to Be Broken?

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 ?

Java vs. Kotlin: First Impressions Using Kotlin for a Commercial Android Project

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.
  • Immutability.
  • Coroutines (added on Kotlin 1.1).
  • Type aliases (added on Kotlin 1.1).

  Quality Code Is Loosely Coupled

Quality Code Is Loosely Coupled

This article is explaining one of the most dangerous side of coding : Coupling. Must to read article despite the lack of schemas.

Five Habits That Help Code Quality

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

10 Good Excuses for Not Reusing Enterprise Code

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.

Test proven design

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.

1

I have tried Vue.js and I love it

Vue.js Framework

I have tried Vue.js and just love it.

Some weeks ago, I started a new project for which, I have to build an internet website.

Context

After spending really long hours on internet, browsing, collecting every possible testimonials and advices and comparing them to my first impressions, I decided to start with an hybrid / multiple page site.

(if you are interested by the reasons, it will be the subject of another post).

An hybrid /multiple page site is a website where the content is rendered both from server side and client side at the opposition of single page application (SPA) full client side and a classical server side site(PHP..) Since I want to use the power of modern Js Frameworks as double binding, refreshing, Ajax widgets, Es2016, reactive programming and somewhat control which pages needs to be reloaded, I had to make a choice.

The list of choice is somewhat limited if keep only the 5 most popular ones. (yes I am resolutely not a pioneer of the JavaScript Jungle)

The framework selection

I made the following list :

  • Angular 2+ (they are increasing the major version number for each patch 😅)
  • React.js
  • AngularJS
  • Ember. Js
  • Vue.js
  • JQuery (it is a joke)

Selection criteria

I defined some selection criteria besides the popularity :

No code bloat : specifically to JavaScript, the syntax and the missing OOP native programming have been producing many frameworks with dumb syntax without any semantical and often syntaxical meaning. To overcome the limitations, many frameworks are using syntax sugar, making them a nightmare to memorize. The most ridiculous is the attempt to stick on these syntaxical blobs, some pseudo theorical terms.

A good framework should offer different levels of usages from the straightforward approach to build quickly and easily a website with the common use cases to the low-level approach where the experimented developer is able to tune the required details. What has been done in Laravel, Spring framework or Symphony are good samples.

Symphony framework is known as a huge galaxy. Many components, industry quality grade, but an overwhelming complexity if you start head on.

Therefore they have created a micro — framework called Silex to bootstrap an PHP application without the nasty details and it is deadly simple. If you want more complex things, the components behind Silex are the Symphony ones.

For a web framework, always study how do they handle forms. Especially a basic post form. It takes five minutes in plain HTML to build an (unsecured) form. How long does it take with this framework?

The same thing works for **Spring* and Spring boot.

The framework must have a business friendly licence. No doubt, no legal restriction for the future company. (by the way do you know you cannot build weapons software in Java, please stick to the line…)

An extensible / plug-ins architecture. I believe the success of a framework resides in the possibility to enable the necessary functionalities (aka feature toggling) during your project. Authentication, reactive programming, lazy loading, modularity.

The evaluation (aka trolling section)

Based on these selection criteria, here is my evaluation.

Disclaimer: I have a highly respect for the guys who wrote these frameworks and I do not doubt of their outstanding skills. AngularJS

I have experienced projects with AngularJS and I renounced since it is a deprecated technology. Too much code bloat, slow (I should rather say hard-to-tune) and all efforts are concentrated on the new Angular framework. Also, I think I could have a problem with my use case and disabling the AngularJS router.

Angular 2

Angular 2: I have received a training in January and wrote several prototypes since. I have been a huge fan of typescript, angular-cli. I was happy and thinking, they took the best ideas from the other frameworks and build a big melting pot.

Angular : melting pot

In Angular, you will find web components, uses template a la React.js, you have opt-in double binding, directives, modular architecture, lazy loading and so on and so on. But I progressively hate Angular for many details, slowing me down in my developments.

I really dislike their API and concepts to build forms. You have two choices, a template form design and programmatic form design. The first one is almost useless and the second one is deadly cumbersome.

In Angular, they decided to kill HTML and recreate it. How? Case-sensitive attributes and non HTML attributes. You cannot use your normal code editor on it. Beautifier tools not works or partially works. And worse of all, they conceive this awful syntax based on brackets, parens, Well, I think their are huge practitioners of the Brainfuck language.

Brainfuck language

Brainfuck language

The last issue I encountered is with their wish to produce an industrial, scalable (in the sense if I put more developers on my project, I maintain a stable learning and complexity curve). Yes, they provide dependency injection, IOC. But it really increases the learning curve.

 React.js

I really wanted to start with React.js. As far I have studied it, the framework seems full of promises, with some nice pluggable functionalities.

However at the time I began to use it, I received a lot of news. The concern is about the React.js license, the Facebook license (link1, link2, link3).

Since there is a threat for the future business (everything can be considered as a social network after all), I have rejected it.

 Ember.js

I have never tried Ember.js. Based in my readings, the framework is definitely worth of attention to build SPA applications but not for my use case. Note : during the writing of this post, I felt on that link, confirming that maybe I was wrong about ember.js

Vue.js

On Twitter, I am receiving a lot of feedback from happy users of Vue.js and I decided to give a try.

The syntax seems deadly simple.

Here is the brief of my experience :

I did not use vue-cli, I had to create my own packaging to adapt Vue.js to multipage architecture.

Code bloat: the Vue.js framework is really simple and the documentation quite good. The documentation for the plug-in vue-loader is quite good but I really hate the webpack syntax to enable it (rant..)

Learning curve: I did not try the most hard-core functionalities of Vue.js, though I am using vue-loader, a different template renderer (pug), transitions, a little bit components and lazy loading.

My biggest difficulty have been to maintain my js bundle as low as possible by producing chunks.

The second issue has been to understand why creating a view was creating an App and my component below using the render() function. However I think that Vue.js is easier than Angular. 2.

As in the previous example, the syntax is quite straightforward, no need to learn complex concepts to begin with.

The framework is also compatible with Typescript and the logic behind is quite simple.

Vue.js can be extended with several plug-ins and functionalities. I did not try all of them and the fact you are enabling them manually is comforting me in my approach.

Vue.js is not enforcing a particular programming paradigm(IOC, interfaces, Reactive programming, or. RxJS).

The only reproach I could formulate is a little fear about the Vue.js ecosystem. Please integrate existing libraries rather trying to recreate or mimic ReactJS libraries.

In conclusion, both of these frameworks are legitimate and have their lot of practitioners, and I don’t blame it. Vue.js has been my choice and I do not regret it, yet, since it has made my project easy, fun and effective.

I will try to provide more feedback in the following weeks especially on form editing, unkt testing and E2E testing.

Thanks for your attention

0

Disruption in Software Quality Assessment ?

As many other markets, the SQA/ALM Market soon will meet #disruption. Domains like machine learning, deep learning and cloud computing will force it to evolve in the next few years. This article is presenting some predictions about the future of the quality tools.

Disruption in Software Quality Assessment

Disclaimer I am not a native english speaker and I am perfecting my english skills by writing these articles. If this topic interests you, please comment below or share the article to your friends. And every syntax, grammar mistakes will be fixed under your wise comments.

A new generation of Software quality tools is going to emerge. Machine Learning, Deep Learning, DevOps, Continuous Delivery, Continuous Integration, Cloud Computing, all these movements are influencing the SQA/ALM Software Editors. It has never before been so easy and cheap to produce a new static analysis tool to measure some aspects of a software. The Opensource movement and the market evolution are the direct contributors to this state. Made famous under the name of “linters”, well-known and unknown developers are creating the tools required to their activities. And the Software editors are faced to the dilemma : “Should I continue to build my own tools ? What should be my behaviour confronted with this plethoria of scanners ?”.

Until recently, Software developers were depending of the highly-specialized skills from the Quality Software Editors to detect, analyze and fix the bugs inside their softwares. And it is a big source of frustration. From both sides. Developers are usually complaining that the rules do not reflect their real needs or the complexity of their softwares. “Quality tools do not detect real problems or too late or under a trillion of false positives”. Software Editors are providing to the hungry population rule sets, standards to satisfy the crowd. A crowd much much bigger than their own forces.

I am predicting that the disruption may be coming from these directions :

  • From the open-source : soon or later, the basic needs of developers will be fulfilled by the open-source offer. Tools like PMD, Findbugs, and so on have inspired a whole generation of developers. The young developers through the Angular 2, ReactJS, Go are already educated to the benefits of Quality tools. And they are heavily relying on linters well-integrated in their CI or in their IDE (Atom, Code). Twitter, Facebook are continuously producing and releasing in opensource new tools to help the developer community. The recent examples of Flow or PrePack are helping a lot developers to increase the quality of their products.
  • From the digital technologies. The increasing level of maturity of the machine learning and deep-learning technologies should bring us shortly new kind of tools to predict bugs, predict code defects and usual developer decisions. I believe that the scientific researches from Microsoft and Google will contribute indirectly to the Software Quality tool market. This topic is unsurprisingly very discussed (here).
  • From the software development process transformation : Movements like Agile, DevOps, Continuous Integration and Deployment, ChatBots are deeply changing the way developers are collaborating. Several aspects are changing : communication (Slack, Hipchat), software building (Jenkins, Travis CI, Microsoft TSF & Azure), software deployment (containers, PAAS, Amazon AWS)… The way a product is conceived, built and deployed requires to track and measure several quality aspects. The integration effort to produce these metrics and KPI’s is tremendous and have to be adapted to each organization. Would the developers be enough satisfied with code quality or will they require higher levels metrics extracted from their development process.

Conclusion

Who will be the future leaders in the ALM market ? Who will be the fastest to adapt to the current technology and data disruption ? Do you have some tools that could match these descriptions ?

If that article has been useful or interesting, stay connected, I will produce new articles on that subject.

One of my future article will present Codacy, an emerging code quality platform. This platform offer to ease the quality control as soon as possible in your development process to detect the bugs early and surely. I will compare this solution with the famous market leader SonarQube.