21 October 2014

Affects version vs Fix vestion in JIRA

Affects version = where the defect/new feature has been identified.

Fix version = where the defect/new feature is planned to be fixed.

Affects version is not heavily used - it's very useful for what it does, but there's not a huge amount of useful reporting you can do on it beyond the basic "where did it break" or "how many bugs did this version contain" questions.
Fix versions however, is for planning, releases, tracking velocity, monitoring progress, as well as it's core "it was fixed in" intent, and others, so it's used in a lot more of the widgets and reports. Try Greenhopper/Agile on a project where it's disabled, and you'll find 90% of it doesn't do much!
Difference between fix version and affects version
In Affects Versions you would enter the version where the problem exists and in Fix Version you would enter the version where the problem was (or will be) fixed.
Jira How to add issues to a version

21 August 2014

Notepad++ Regular Expression

To find all matching cases before =

such as

tool.firstName=First Name
tool.lastName=Last Name

use the following for regular expression: .*\=

26 June 2014

Eclipse not able to resolve Maven dependencies?

Are you relying on your workspace for those dependencies? And if you are using m2e plugin, you might want to try this: Project -> Properties -> Maven -> Disable Workspace Resolution Any time you want to go back to internal resolution and not relying on Maven repository, you can switch back to Enable Workspace Resolution.

27 March 2014

How to shut down your PC automatically

If you need to leave your Windows PC running all night and don't have time to turn it off in the morning, you can utilize Windows services to shut down your PC automatically. It isn't easy to reverse and turn on your machine though. Also, you need to pay attention to the fact that this is going to be a daily / weekly / monthly task in your system. So don't forget to delete it if you don't want it any more. 

For windows 7:
1. Go to Start > Control Panel > System and Security > Administrative Tools and click on the Task Scheduler.

2. From the Action menu in Task Scheduler, click "Create Basic Task..."

3. In the "Create Basic Task Wizard" windows that pops up, Type in a title and a description. Something basic like "PC Shutdown."

4. Click "Next."

5. On the "Task Trigger" screen, choose the frequency with which you want the Shutdown PC to run. For nightly shutdown, click on "daily" and click the Next" button.

6.On the "Daily" screen, enter the date and time you want your PC to shutdown. Click "Next."

7. On the "Action" screen, choose "Start a program" and click "Next."

8. On the "Start a Program" screen, type C:\Windows\System32\shutdown.exe in the "Program/script" text field.

9. In the Add arguments text field type /s.

10. Click "Next."

11. Confirm your settings on the Summary screen and click "Finish."

26 March 2014

An effective way to rename files in Windows

You need to run the command below in the PowerShell. PowerShell can be thought of an imitation of command lines in *nix based operating systems.

Dir will feed all the files in a folder to rename-item command, and it replaces BEFORE to AFTER for all files in that folder.

Dir | Rename-Item –NewName { $_.name –replace “BEFORE“,”AFTER” }


18 March 2014

The easiest way to change mouse orientation in Windows

Have you ever tried finding the easiest way to change your mouse orientation and you wanted to use a short-cut for it? I am sorry but it is not that easy to achieve it with one click, the best solution I found was to create a short-cut that gets you to the mouse setting and change it from there.

You can download the short-cut from here.


26 February 2014

An effective way of overriding hashCode() in Java

This class enables a good hashCode method to be built for any class. It follows the rules laid out in the book Effective Java by Joshua Bloch. 
Shall I say any more? This is from Apache Commons. It is using the Builder Design Pattern.

Comparison between Apache Commons and Guava implementation of HashCodeBuilder can be a good follow up reading material.

7 February 2014

Find your Voicemail number on your iPhone

If you ever wonder how you can find your voicemail number on your iPhone, there is an easy way of doing it. Just go to the dialler and typ*#5005*86# and hit call. I am not sure if it applies to all handsets out there, it won't hurt if you give it a try on your non Apple handset though!

31 January 2014

Hibernate Caching

First level cache
Second level cache
Query Cache
Note that the query cache does not cache the state of the actual entities in the result set; it caches only identifier values and results of value type. So the query cache should always be used in conjunction with the second-level cache.
Let me reiterate that Hibernate is *not* holding on to actual instances of the objects. Why is this important? Two reasons. One, Hibernate doesn't have to worry that client code (i.e. your code) will manipulate the objects in a way that will disrupt the cache, and two, the relationships and associations do not become 'stale', and are easy to keep up to date as they are simply identifiers. The cache is not a tree of objects, and can instead just be a conceptual map of arrays.