May 15 2013
Why Java passes objects as references passed by value
I came across a question recently on stackoverflow that was very enlightening and proves how objects are actually passed in java. It was quite an interesting discovery!
I am quoting from here
Java is always pass-by-value. The difficult thing can be to understand that Java passes objects as references passed by value.
It goes like this:
public void foo(Dog d) { d.name.equals("Max"); // true d = new Dog("Fifi"); d.name.equals("Fifi"); // true } Dog aDog = new Dog("Max"); foo(aDog); aDog.name.equals("Max"); // trueIn this example aDog.name will still be “Max”. “d” is not overwritten in the function as the object reference is passed by value.
Likewise:
public void foo(Dog d) { d.name.equals("Max"); // true d.setname("Fifi"); } Dog aDog = new Dog("Max"); foo(aDog); aDog.name.equals("Fifi"); // true



Having written a lot of PHP code for a project using Notepad++, I got tired with the limitations of not having an IDE containing a debugger, and refactoring tools.

I came across a situation where my VMs were taking too much space from my C drive. The instructions below are from the forum post
Jul 8 2013
Greesemonkey Script for filtering Stackoverflow Bounty Page
I’m a big fan of stackoverflow and many times surf the featured page that has many questions that have an additional bounty attached.
One of the things though that I want to do is quickly find the questions with zero answers that have not received attention due to one reason or another (e.g. very difficult).
For the specific URL: http://stackoverflow.com/questions?sort=featured , Below a greesemonkey script just for that!
By Menelaos Bakopoulos • Greesemonkey, Programming, Scripts, Stackoverflow 0 • Tags: Greesemonkey, Stackoverflow