Monday, September 17, 2018

Team - Multiple Branches Management Strategy | Flexibility | Productivity

Oops…! It's an era of Agile-Scrum-Sprint.
This is still okay but What about Monthly Releases and delivering various features using Jenkins as continuous integration (CI) tool?

Nowadays single team is working on different modules and various stories around them.
Working as a Technical Leader/Development Manager one may face difficulties in delivering various features in the same release.

This may be due to below considerable points:
  • All features and issues are getting fixed on a single branch.
  • Late identification of Technical Feasibility.
  • Third Party dependency (UI/UX/Core Team).
  • DEV/QA Team runtime bandwidth.
  • Last moment urgent Production Bugs.

As a general practice and to avoid branch management, traditional teams have only one branch per release.
Changes done in that branch are targeting:
  • New Feature/Story
  • Bug Fixes
  • Performance Fixes.

If any of the story/performance fixes can cause a delay that will lead to impacting timelines for other stories.

  • This has to consider the overall effort to put in the last moment to roll back those changes.
  • Again this leads to compromising the quality of the deliverable.
  • Dev team gets less time to analyze the impact-areas.
  • QA Team will get less time to verify the changes done.
  • Marginally less/no time for regression.
  • *Most importantly Handling pressure from upper management and criticism.


Below diagram gives pictorial representation of Teams' changes in Single Branch:


Let's try to analyze the scenario – Time for WH Questions!
·         What Team is doing?
o   Creating a Single branch from the Production/Stable branch for a release.
o   Making changes for Bug fixes, Performance issue fixes, and Story Development in a Single Branch.
·         Why Team is doing changes in the Single Branch?
o   Avoid extra branch management.
o   Availability of QA Environments.
o   Avoid Migration/Regression efforts on every branch.
·         How is it impacting?
o   Anything gets delayed entire feature suit is getting delayed for a release.
o   Timelines are getting missed.
o   Last moment extra efforts without deeper analysis.
o   Compromising Quality of deliverables due to lesser Testing Time.

It's time to change the way changes are getting pushed in Single Branch and come up with multiple branching strategies.

Let's summarize what needs to be achieved & HOW?
  •  Need to have Feature-Shelf so that based on decision any time any Merge-Ready Feature can be released in production with good quality.
  • Want to have no pressure from management for technical items.
·       No impact of any Story development/release plan decision on other Story.
o   How? à Separate Branch for each Story and Performance Fixes.
·         Every Story branch should have the latest issues fixed in this release.
o   How? à Separate Branch for Bug Fixes name it : team_fixes.
§  Create Story Branch from team_fixes branch and keep merging on regular basis.
·         Where to push a fix for Story Defects?
o   Every fix for Story Defect must be pushed in the respective team_story_x branch only.
·         Single Environment for QA to validate all these changes.
o   How? à Create team_story branch where all story (team_fixes, team_story_1…. team_story_N) and performance(team_perf) branches are merged on daily basis if those are stable. J
o   Migration and Regression will be done on single environment. (Same Target as using Single Branch Previously)
·         Jenkins/CI:
o   Run Compile & Test Execution job on individual branch.
o   If Selenium tests written have single Job for team_story branch.
Please refer below diagram for suggested Branching Strategy.


Please feel free to comment to this article for any suggestion and queries.

Team - On Track Concept Using JIRA and Confluence

If you are using JIRA and used its Search Feature to look for particular issue or list of issues, it's very cumbersome to do that every time.
One may find lots of Drop-downs for various fields for creating JIRA Filter Criteria using BASIC Query.
To do advance querying, one may require Knowledge about JQL – JIRA Query Language and fields used in JIRA.

Considering overall efforts to look-up and get stats every time one can store such queries as a JIRA Filter.
For a Scrum Master or Development Manager keeping track of various Features, Story-defects and Product issues is not an easy task for every day.
One have to think, Dev Manager generally takes care of multiple modules and different teams.
To do this task more productively, we can use Confluence along with JIRA to have customize Dashboard.

This article will help to know more about what your daily-dynamic Dashboard should have and how to prepare the one using Confluence-JIRA-Filters.
As I have pure technical background and love to follow coding principles, I am trying to avoid repeating the items each time and each place.

Before we dive into knowing what are the things to be done for Tracking the Team Stats, we should be knowing which items we should look for.

On day-to-day basis, every team generally works on Sprint tasks, so it may be Stories, Story Defects, Bugs, Testing or Miscellaneous Items.
All these things can be tracked in JIRA against different issue types by creating tasks and sub-tasks for EPIC, Story, Story Defect, Bug, Sub-Tasks, etc.
There is a good article about Agile-Sprint Planning, refer this link:requirements-epic-feature-user-story-task-size-and-estimation-in-agile-and-scrum.

Considering all the things are followed and are available in JIRA, now we have below items with us to track:
·         Product Backlog/Roadmap.
·         Bugs/Issues in released Product.
·         Current Sprint:
o   Stories, Defects, Sub-Tasks, Testing, Bugs etc.
·         Miscellaneous:
o   Quality Stats.
o   Performance stats.

I want to limit this article about Which things to be tracked in a Sprint using JIRA.
This who knows about JIRA Issue creation and its workflow usage, can move to next part of this article.

Please refer below diagram about creation of different issues and using JIRA attributes.
Every JIRA tasks has workflow associated with it. It is good to have information about respective workflow statuses.
Please refer below for EPIC/Story and can be customized based on your organizational strategy.


Thursday, May 25, 2017

STS : Spring Roo Project Creation Gives Error mojo codehaus

Those who started working with Spring-Roo for faster development but facing difficult to set up STS Spring Roo Project Environment.
It may turn to roadblock if below problems cannot be resolved:
  • Code is not compilable.
  • Maven Dependencies are not shown in project configurations.
This is having 3 fixes & you can start your development:
  • Update POM file for correct aspect version : 1.9 for JDK 1.8 onwards
    • <aspectj.plugin.version>1.9</aspectj.plugin.version>

  • Configure correct location for maven settings.xml 
    • By default it will search in %USER_PROFILE%\.me\settings.xml
    • So set to MVN 3.5+ : %MAVEN_HOME%\conf\settings.xml

  • Maven Profile must be "development"
    • Follow Below instructions for Maven profile update:

accepted

You can activate the maven profile at the Eclipse by using the following step: -

  1. Right click at your project and select properties .
  2. At the Properties windows select Maven.
  3. At the right hand panel you will see Active Maven Profiles text box.
  4. Please enter your profile name, e.g. development or production.

--
----
Thanks & Regards,
Abhijeet
​.

Monday, March 6, 2017

[Performance] java Map.containsKey() redundant when using map.get()


In most of our code, we generally use HashMap.

 

Most of the operation we do:

·         Prepare HashMap to process.

·         Process the HashMap.

·         Retrieve data from Map.

 

Following use-case needs to be avoided:

Most of the time to avoid NPE (NullPointerException) code is getting handled in below way:

 

 

 

          dataMap.contains(key) ? dataMap.get(key) : someObject;

 

 

Avoid using above as it may impact performance because both below APIs do same operation:

·         containsKey()

·         get(key)

 

SO optimized code for avoiding redundant Map processing:

 

 

  Object  mappedValue = dataMap.get(key);       // fetch only once

 (mappedValue == null) ? someObject: mappedValue;

 

 

 

This is definitely useful for dealing bigger DataSet.

 

Also don't forget to use collection.clear(); if data is no more required.

 

 

III

Best Regards,

Abhjeet.

 

Tuesday, November 22, 2016

JavaScript - Why to use "var that = this;"

Now a days most of JavaScript files are following Object Oriented Approach.

In simple words, it means it is possible to call super methods using child classes.
So not to lose a reference of function which is calling other one, that is smartly getting used.

Below are good examples explaining about that to refer this:



Keep sharing….!

III
Best Regards,
Abhijeet Rathod.
------------------------------
When 'I' is replaced by 'We',
Even illness becomes wellness.
------------------------------

Tuesday, May 10, 2016

WebLogic 10.3.x Error : NoSuchMethodError for javax.persistence.spi.PersistenceUnitInfo.getSharedCacheMode()Ljavax/persistence/SharedCacheMode

As of now mostly trend is using newer frameworks or migrating from older framework to newer one.
One of the classic situation we started facing with Application Deployment once we have done migration.

Technology Stack we are using in our Applications is as below:
·         Java 7
·         JPA 2.0
·         Spring 3.0
·         Hibernate 3.0
·         EJB 3.0
·         Oracle 11g

While deploying we are getting below exception:
Caused By: java.lang.NoSuchMethodError: javax.persistence.spi.PersistenceUnitInfo.getSharedCacheMode()Ljavax/persistence/SharedCacheMode;
at org.hibernate.ejb.util.LogHelper.logPersistenceUnitInfo(LogHelper.java:39)
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:516)
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73)
at weblogic.deployment.PersistenceUnitInfoImpl.createEntityManagerFactory(PersistenceUnitInfoImpl.java:352)
at weblogic.deployment.PersistenceUnitInfoImpl.createEntityManagerFactory(PersistenceUnitInfoImpl.java:332)


In development environment we are using below for deployment:
·         WebLogic 12
·         Oracle 11g

So what is cause for this?
·         Pre-Production and Production environment having:
o   WebLogic 10.3.5
o   Oracle 11g

As database point of view there is no issue.
So it's mostly application server compatibility issue.
JPA Jars which WebLogic 10.3.5 is having are of different versions than application requires.

So as to resolve this issues, following are 2 possible solutions:
·         Application Level Changes:
o   Adding ANTLR specific changes to be done in weblogic-application.xml file located under META-INF.
<?xml version="1.0" encoding="UTF-8"?>


       <!--  This is needed since WL has a different version of antlr jar-->
    <prefer-application-packages>
        <package-name>antlr.*</package-name>
    </prefer-application-packages>
   
</weblogic-application>

o   Adding JPA specific JARs to application WAR/EAR only.
§  Hibernate-jpa-api.jar
§  Weblogic-fullclient.jar

·         WebLogic Level – Configuration changes:



--
III  Best Regards,
III  Abhijeet.

Sunday, September 22, 2013

Keyboard Shorcuts (Microsoft Windows)

1. CTRL+C (Copy)
2. CTRL+X (Cut)
3. CTRL+V (Paste)
4. CTRL+Z (Undo)
5. DELETE (Delete)
6. SHIFT+DELETE (Delete the selected item permanently without placing the item in the Recycle Bin)
7. CTRL while dragging an item (Copy the selected item)
8. CTRL+SHIFT while dragging an item (Create a shortcut to the selected item)
9. F2 key (Rename the selected item)
10. CTRL+RIGHT ARROW (Move the insertion point to the beginning of the next word)
11. CTRL+LEFT ARROW (Move the insertion point to the beginning of the previous word)
12. CTRL+DOWN ARROW (Move the insertion point to the beginning of the next paragraph)
13. CTRL+UP ARROW (Move the insertion point to the beginning of the previous paragraph)
14. CTRL+SHIFT with any of the arrow keys (Highlight a block of text) SHIFT with any of the arrow keys (Select more than one item in a window or on the desktop, or select text in a document)
15. CTRL+A (Select all)
16. F3 key (Search for a file or a folder)
17. ALT+ENTER (View the properties for the selected item)
18. ALT+F4 (Close the active item, or quit the active program)
19. ALT+ENTER (Display the properties of the selected object)
20. ALT+SPACEBAR (Open the shortcut menu for the active window)
21. CTRL+F4 (Close the active document in programs that enable you to have multiple documents opensimultaneou sly)
22. ALT+TAB (Switch between the open items)
23. ALT+ESC (Cycle through items in the order that they had been opened)
24. F6 key (Cycle through the screen elements in a window or on the desktop)
25. F4 key (Display the Address bar list in My Computer or Windows Explorer)
26. SHIFT+F10 (Display the shortcut menu for the selected item) 27. ALT+SPACEBAR (Display the System menu for the active window)
28. CTRL+ESC (Display the Start menu)
29. ALT+Underlined letter in a menu name (Display the corresponding menu) Underlined letter in a command name on an open menu (Perform the corresponding command)
30. F10 key (Activate the menu bar in the active program)
31. RIGHT ARROW (Open the next menu to the right, or open a submenu)
32. LEFT ARROW (Open the next menu to the left, or close a submenu)
33. F5 key (Update the active window)
34. BACKSPACE (View the folder onelevel up in My Computer or Windows Explorer)
35. ESC (Cancel the current task)
36. SHIFT when you insert a CD- ROMinto the CD-ROM drive (Prevent the CD-ROM from automatically playing)

Dialog Box - Keyboard Shortcuts

1. CTRL+TAB (Move forward through the tabs)
2. CTRL+SHIFT+TAB (Move backward through the tabs)
3. TAB (Move forward through the options)
4. SHIFT+TAB (Move backward through the options)
5. ALT+Underlined letter (Perform the corresponding command or select the corresponding option)
6. ENTER (Perform the command for the active option or button)
7. SPACEBAR (Select or clear the check box if the active option is a check box)
8. Arrow keys (Select a button if the active option is a group of option buttons)
9. F1 key (Display Help)
10. F4 key (Display the items in the active list)
11. BACKSPACE (Open a folder one level up if a folder is selected in the Save As or Open dialog box)

Microsoft Natural Keyboard Shortcuts
1. Windows Logo (Display or hide the Start menu)
2. Windows Logo+BREAK (Display the System Properties dialog box)
3. Windows Logo+D (Display the desktop)
4. Windows Logo+M (Minimize all of the windows)
5. Windows Logo+SHIFT+M (Restorethe minimized windows)
6. Windows Logo+E (Open My Computer)
7. Windows Logo+F (Search for a file or a folder)
8. CTRL+Windows Logo+F (Search for computers)
9. Windows Logo+F1 (Display Windows Help)
10. Windows Logo+ L (Lock the keyboard)
11. Windows Logo+R (Open the Run dialog box)
12. Windows Logo+U (Open Utility Manager)
13. Accessibility Keyboard Shortcuts
14. Right SHIFT for eight seconds (Switch FilterKeys either on or off)
15. Left ALT+left SHIFT+PRINT SCREEN (Switch High Contrast either on or off)
16. Left ALT+left SHIFT+NUM LOCK (Switch the MouseKeys either on or off)
17. SHIFT five times (Switch the StickyKeys either on or off)
18. NUM LOCK for five seconds (Switch the ToggleKeys either on or off)
19. Windows Logo +U (Open Utility Manager)
20. Windows Explorer Keyboard Shortcuts
21. END (Display the bottom of the active window)
22. HOME (Display the top of the active window)
23. NUM LOCK+Asterisk sign (*) (Display all of the subfolders that are under the selected folder)
24. NUM LOCK+Plus sign (+) (Display the contents of the selected folder)

MMC COnsole Windows Shortcut keys
1. SHIFT+F10 (Display the Action shortcut menu for the selected item)
2. F1 key (Open the Help topic, if any, for the selected item)
3. F5 key (Update the content of all console windows)
4. CTRL+F10 (Maximize the active console window)
5. CTRL+F5 (Restore the active console window)
6. ALT+ENTER (Display the Properties dialog box, if any, for theselected item)
7. F2 key (Rename the selected item)
8. CTRL+F4 (Close the active console window. When a console has only one console window, this shortcut closes the console)

Remote Desktop Connection Navigation
1. CTRL+ALT+END (Open the Microsoft Windows NT Security dialog box)
2. ALT+PAGE UP (Switch between programs from left to right)
3. ALT+PAGE DOWN (Switch between programs from right to left) 4. ALT+INSERT (Cycle through the programs in most recently used order)
5. ALT+HOME (Display the Start menu)
6. CTRL+ALT+BREAK (Switch the client computer between a window and a full screen)
7. ALT+DELETE (Display the Windows menu)
8. CTRL+ALT+Minus sign (-) (Place a snapshot of the active window in the client on the Terminal server clipboard and provide the same functionality as pressing PRINT SCREEN on a local computer.)
9. CTRL+ALT+Plus sign (+) (Place asnapshot of the entire client window area on the Terminal server clipboardand provide the same functionality aspressing ALT+PRINT SCREEN on a local computer.)

Microsoft Internet Explorer Keyboard Shortcuts
1. CTRL+B (Open the Organize Favorites dialog box)
2. CTRL+E (Open the Search bar)
3. CTRL+F (Start the Find utility)
4. CTRL+H (Open the History bar)
5. CTRL+I (Open the Favorites bar)
6. CTRL+L (Open the Open dialog box)
7. CTRL+N (Start another instance of the browser with the same Web address)
8. CTRL+O (Open the Open dialog box,the same as CTRL+L)
9. CTRL+P (Open the Print dialog box)
10. CTRL+R (Update the current Web )