Latest articles posted on www.ramraje.com

Debugging Oracle PL/SQL code from java call using SQL Developer

This is small write up on how to debug the pl/sql code when actually call the Oracle PL/SQL code from java code. This is very useful when you want to see what’s happening underneath the pl/sql code, and figure out potential problems if any. For this setup to work, users must have Oracle SQL developer [...]

How to create a Git patch from a commit

Generally, we create a software patch to capture source code changes or diffs in a file. And send this patch file to other team members to apply the source code changes on the main code base or to do code reviews.  To create a patch out of Git commit, we can use Git format-patch command.

How to switch branches in Git

What is the use of switching branches in Git repository Suppose you are working on dev branch for some feature development, and there is a bug in the production which you want to fix. Then you basically, create a hotfix branch from master branch and switch to that newly created hotfix branch and starting working [...]

Git: Stashing your local changes

What is the use of Git Stash command When you want to switch to another branch in the git repository to work on something else, and you don’t want to commit the half done changes to your current branch. This is where exactly Git Stash comes to rescue. What Stash does is, it will hide your local [...]

OOP Design Best Practices: Law of Demeter

http://en.wikipedia.org/wiki/Law_of_Demeter http://blog.kriskemper.com/2008/05/10/the-law-of-demeter/ http://haacked.com/archive/2009/07/14/law-of-demeter-dot-counting.aspx http://www.dan-manges.com/blog/37 http://googletesting.blogspot.in/2008/07/breaking-law-of-demeter-is-like-looking.html http://stackoverflow.com/questions/67561/do-fluent-interfaces-violate-the-law-of-demeter http://ablogaboutcode.com/2012/02/27/understanding-the-law-of-demeter/

OOP Best Practices: Command Query separation principle

http://www.martinfowler.com/bliki/CommandQuerySeparation.html http://blog.kriskemper.com/category/best-practices/ lack of collective code ownership http://en.wikipedia.org/wiki/Command-query_separation http://codebetter.com/gregyoung/2009/08/13/command-query-separation/ http://devlicio.us/blogs/casey/archive/2009/02/13/ddd-command-query-separation-as-an-architectural-concept.aspx http://programmers.stackexchange.com/questions/142721/command-query-separation-and-multithreading-safe-interfaces http://stackoverflow.com/questions/1295686/how-is-command-query-separation-cqs-implemented-when-using-an-orm

Java debugger tools

Java debugger, memory analyzer tools

How to find size of java object

Wondering how to find a size of java object in memory, here is how you can figure out the java object size