Shaaf's blog

A technical blog about Java, Kubernetes and things that matter

Get on Jekyll with Jekyll bootstrap

Jekyll-Bootstrap makes it easy to get started with Jekyll, if you are looking for a static site generator then you are at the right place

number of lines of code in a directory

I just wanted to find the number of lines of java code in a directory i.e. recursively..

find . -type f -name '*java' -print0 | wc -l --files0-from=-

Output:
.
.
56 ./App.java
550 total

Getting started with JBehave in 8 steps.

This post is about JBehave and how to quickly get started with it. If you would like to know about BDD please use the following link. What is Behavioral Driven Development?

Today I have used JBehave for the first time. It does have some convincing factors for instance diving requirements into scenarios which map pretty nicely to the tests that are written with in the Steps. Thus it seems like it would be easier for Stakeholder/s to use it as a good guideline for the initial requirements. Its always quite usual to come up to some disagreements about the development however the tool does help to bring forth the ease for stake holders who really dont have to get into writing code but will have a technical jargon to communicate through to the developers in shape of scenarios.


Logging with log4J isDebugEnabled

Excerpt: Alot of times I have seen the questions popping up whether to use isDebugEnabled property or not. Arguably most of the times or rather always about performance. Some of the stuff that I feel important about using it follows.

Alot of times I have seen the questions popping up whether to use isDebugEnabled property or not. Arguably most of the times or rather always about performance. Some of the stuff that I feel important about using it follows.


Keep it simple, short and stupid (KISS)

everything should be made as simple as possible, but no simpler - Albert Einstein

I am sitting in a design room today designing a simple requirement for a client. He wants me to enhance the transfer money from one account to another. Just that it happens that I have my best friend Yuky sitting right next to me. He is damn good in Maths and extra ordinarily knows all the calculations on his tips. I am sure if I had asked him what was the angle of sight to the light on the wall he could just tell me in a few seconds looking with 10 eyes at his 12 fingers, trust me it will be correct.