Profile cover photo
Profile photo
MD Sayem Ahmed
About
Posts

Post has attachment
Replacing exceptions with error notifications during input validation in Java
In my previous article I wrote about an input validation design which replaces hard-to-maintain-and-test if-else blocks. However, as some readers pointed out, it has a drawback - if the input data has more than one validation errors, then the user will have...

Post has attachment
Clean Code from the trenches - Validation
Let's directly start with an example. Consider a simple web service which allows clients to place order to a shop. A very simplified version of the order controller could look something like below - @RestController
@RequestMapping(value = "/",
consumes ...

Post has attachment
Dealing with Java's LocalDateTime in JPA
A few days ago I ran into a problem while dealing with a LocalDateTime attribute in JPA. In this blog post I will try to create a sample problem to explain the issue, along with the solution that I used. Consider the following entity, which models an Employ...

Post has attachment
Subtyping in Java Generics
Consider the following block of Java code, which we all know as valid - We can do this because Long is a subtype of Number . However, the following will fail to compile - Allowing such assignments would have easily let programmers break the type safety guar...

Post has attachment
I have moved my personal blog from WordPress to Blogger. Both of them are excellent blogging platform, but I feel Blogger suits my purposes best. My old articles will still remain here. Thanks for reading! Hope to see you again in my new blog!!

Post has attachment
Blog Moved!
I have moved my personal blog from Wordpress to here on Blogger. Both of them are excellent blogging platform, but I feel Blogger suits my purposes best! If anyone is looking for my old articles, they are still available the old place ! Thanks for reading!

Post has attachment
A simple introduction to Generics in Java – Part 3
This is a continuation of my introductory tutorial on Generics. All posts in this series can be found here . Why should we use Generics I intended to write about this after I’ve demonstrated some generics examples so that their usefulness become apparent to...

Post has attachment
A simple introduction to Generics in Java – Part 2
This is a continuation of my simple introductory Java Generics tutorial, previous part of which can be found here. Generics Instantiation Syntax In the previous post we have learned how to declare a generic class. We have also learned its formal definition....

Post has attachment
A simple introduction to Generics in Java - Part 1
Generics play an important role in the development of Java applications. They provide stronger type checks at compile time, reduce the amount of typecasting needed and help to develop algorithms/procedures that can be reused for multiple types. In this seri...

Post has attachment
Wait while more posts are being loaded