Wednesday, 1 July 2015

What is Agile Development approach.

What is Agile Development approach.

If I say in short. it's a Cheap,best and effective. mechanism,

Explanation.
70% we use scrum approach for Agile development which one of the popular way. rest are few.

Now question is what is
Scrum:-

Scrum is a way to restart the game after an interruption, where the forwards of each side come together in a tight formation and struggle to gain possession of the ball when it is tossed in among them
or

Scrum is just one of the many iterative and incremental agile software development method. You can find here a very detailed description of the process.

ref:-
http://stackoverflow.com/questions/11469358/what-is-the-difference-between-scrum-and-agile-development

in brief this is the way of developing the project. 

few terminology we used in scrum.


  1. Scrum master
  2. Scrum
  3. Sprint
  4. Backlogs
  5. these are the popular one.


functionality of scrum:-







1:-Scrum master:-
Represents management to the project
Typically filled by a Project Manager or Team Leader
Responsible for enacting scrum values and practices

Main job is to remove impediments

2-Scrum Team:-
Typically 5-10 people
Cross-functional (QA, Programmers, UI Designers, etc.)
Members should be full-time
Team is self-organizing

Membership can change only between sprints

3:-sprint:-
in product development, a sprint is a set period of time during which specific work has to be completed and made ready for review.
ref:-
or
A month-long iteration, during which is incremented a product functionality
NO outside influence can interference with the Scrum team during the Sprint

Each Sprint begins with the Daily Scrum Meeting

Daily scrum:-
Is a short (15 minutes long) meeting, which is held every day before the Team starts working
Participants: Scrum Master (which is the chairman), Scrum Team
“Chickens” and “Pigs”

Every Team member should answer on 3 questions

-----------------
Scrum Artifacts:-

Product Backlog
Sprint Backlog

Burn down Charts

Backlogs:-
  1. backlog is a list of features or technical tasks which the team maintains and which, at a given moment, are known to be necessary and sufficient to complete a project or a release: if an item on the backlog does not contribute to the project's goal, it should be removed;

product backlogs:
Requirements for a system, expressed as a prioritized list of Backlog Items
Is managed and owned by a Product Owner
Spreadsheet (typically)
Usually is created during the Sprint Planning Meeting
Can be changed and re-prioritized before each PM

note:-
Estimation of Product Backlog Items:
Establishes team’s velocity (how much Effort a Team can handle in one Sprint)
Determining units of complexity. 
Size-category (“T-Shirt size”)
Story points
Work days/work hours
Methods of estimation:
Expert Review
Creating a Work Breakdown Structure (WBS)


sprint backlogs:-
  1. The sprint backlog is a list of tasks identified by the Scrum team to be completed during the Scrum sprint. During the sprint planning meeting, the team selects some number of product backlog items, usually in the form of user stories, and identifies the tasks necessary to complete each user story.
  2. or
A subset of Product Backlog Items, which define the work for a Sprint
Is created ONLY by Team members
Each Item has it’s own status
Should be updated every day
No more then 300 tasks in the list
If a task requires more than 16 hours, it should be broken down
Team can add or subtract items from the list. Product Owner is not allowed to do it

Burn down chart:-
Are used to represent “work done”.
Are wonderful Information Radiators
3 Types:
Sprint Burn down Chart (progress of the Sprint)
Release Burn down Chart (progress of release)
Product Burn down chart (progress of the Product)
---------------------------------------------------------------------------

pros/cons
Advantages
Completely developed and tested features in short iterations 
Simplicity of the process
Clearly defined rules
Increasing productivity
Self-organizing
each team member carries a lot of responsibility
Improved communication
Combination with Extreme Programming

cons:-
“Undisciplined hacking” (no written documentation)
Violation of responsibility 
Current mainly carried by the inventors
-------------------------------------------------
ref:-
https://en.wikipedia.org/wiki/Scrum_(software_development)



















Thursday, 11 June 2015

What is the Real Time Use Of Reflection in Java

Java: What scenarios call for the use of reflection?  

Perfect Explanation from stackoverflow:-
http://stackoverflow.com/questions/9222621/java-what-scenarios-call-for-the-use-of-reflection?rq=1

http://stackoverflow.com/questions/25906480/how-does-reflection-in-java-affects-the-applications-performance-and-what-are-t
----------------------------------------------------------------------------------------------------------------

Real time Example Based on application..

here we are sending let consider 10 parameter to the action layer. now we need to get all 10 parmeter and set to any VO. the best solution is here is reflection see below.

Field[] fields=configureFieldsVO.getClass().getDeclaredFields();
        String param = null;
        String[] value = null;
       
        if (fields != null &&CommonConstants.SHOW_DIV.equalsIgnoreCase(applyVTO.getBrandingInfoVO().getPrefellFlag())) {
            notification.notify(new NotifyVO(NotificationConstants.INFO,"### Prefill Flag is enabled",this,Thread.currentThread().getStackTrace()[1].getMethodName() +
                                     NotificationConstants.LINE +Thread.currentThread().getStackTrace()[1].getLineNumber()));

            for (int i = 0; i < fields.length; i++) {
                param = fields[i].getName();
                if (param != null) {
                    try {
                        if (requestMap.get(param) != null && prefillData.contains(param)) {
                            value = (String[])requestMap.get(param);
                            setPrefillValue(applyVTO, param, value[0]);
                        }
                    }catch (Exception e) {
                        notification.notify(new NotifyVO(NotificationConstants.ERROR, NotificationConstants.EXCEPTION_ASSIGNING_VALUES,this,
                                                Thread.currentThread().getStackTrace()[1].getMethodName()+NotificationConstants.LINE+Thread.currentThread().getStackTrace()[1].getLineNumber()));
                     
                    }
                }
            }
            notification.notify(new NotifyVO(NotificationConstants.INFO, NotificationConstants.CONSUMER_DATA_RECEIVED,this,
                                    Thread.currentThread().getStackTrace()[1].getMethodName()+NotificationConstants.LINE+Thread.currentThread().getStackTrace()[1].getLineNumber()));          
         
        }
---------------------------------
   private void setPrefillValue(ApplyVTO applyVTO, String param,
                                 String reqVal) throws ApplicationException {
        Field field = null;
        try {
            field =
                    applyVTO.getApplicantVO().getClass().getDeclaredField(param);
            if (field != null) {
                field.setAccessible(true);
                if (reqVal != null) {
                    field.set(applyVTO.getApplicantVO(), reqVal.trim());
                }
            }
        } catch (NoSuchFieldException e) {
            notification.notify(new NotifyVO(NotificationConstants.DEBUG, NotificationConstants.FIELD_NOT_AVAILABLE,this,
                                    Thread.currentThread().getStackTrace()[1].getMethodName()+NotificationConstants.LINE+Thread.currentThread().getStackTrace()[1].getLineNumber()));
        } catch (IllegalAccessException e) {
            notification.notify(new NotifyVO(NotificationConstants.DEBUG, NotificationConstants.FIELD_HAS_NO_PUBLIC_ACCESS,this,
                                    Thread.currentThread().getStackTrace()[1].getMethodName()+NotificationConstants.LINE+Thread.currentThread().getStackTrace()[1].getLineNumber()));
        }
    }

Monday, 8 June 2015

More new features coming to Java 9

Java is very wide. single word.  Ocean..
Now it's depends how much you want for your comfortable zone.

It's very excited. we gonna soon see.

Java 1.9:

http://www.javaworld.com/article/2852123/java-platform/more-new-features-coming-to-java-9.html 

Thursday, 9 April 2015

What is LoadFactor and Importance of Load factor in java

As per java we should maintain it as .75 and initial capacity is 16.however we can increase it.
but this is the best because let we give it to Initial=100 and load factor=1
now total size to fill is 100*1=100;
two problem
1-it will take time to create 100 bucket size
2-there may be chance of waist of memory
now 16*.75=12
so advantage
1-it will take less time to crate 12
2-if at all chance of waist of memory then it would be less
again we need to increase the bucket size ,since it is create less bucket so we can bear it.not big size

more link:-
http://www.coderanch.com/t/261961/java-programmer-SCJP/certification/Default-load-factor

Saturday, 4 April 2015

java 1.5 vs 1.6 vs 1.7 vs 1.8

try with resource
http://javapapers.com/core-java/try-with-resources/
http://www.theserverside.com/tutorial/Use-try-with-resources-Language-Enhancements-for-the-Java-7-OCPJP-Exam
http://javarevisited.blogspot.in/2014/04/10-jdk-7-features-to-revisit-before-you.html
http://javarevisited.blogspot.sg/2013/04/what-is-maximum-heap-size-for-32-bit-64-JVM-Java-memory.html
---------------------
2) Java 6 Features
A feature or an enhancement in Java is encapsulated in the form of a JSR. JSR, which stands for Java Specification Request is nothing but a formal proposal which details the need for a specific functionality to be available in the JavaPlatform that can be used by Applications. These JSR’s will be reviewed and released by a committee called JavaExpert Groups (JEG). This article covers the following list of features (or JSRs') that comes along with the Java 6 Platform.
Pluggable Annotation Processing API (JSR 269)
------------------------
Common Annotations (JSR 250)
Java API for XML Based Web Services - 2.0 (JSR 224)
JAXB 2.0 (JSR 222)
Web Services Metadata (JSR 181)
Streaming API for XML (JSR 173)
XML Digital Signature (JSR 105)
Java Class File Specification Update (JSR 202)
Java Compiler API (JSR 199)
JDBC 4.0 (JSR 221)
Scripting in the Java Platform (JSR 223)
-------------------------------------------------
J2SE 5 Features

The important features of J2SE 5 are generics and assertions. Others are auto-boxing, enum, var-args, static import, for-each loop (enhanced for loop etc.

For-each loop (Java 5)
Varargs (Java 5)
Static Import (Java 5)
Autoboxing and Unboxing (Java 5)
Enum (Java 5)
Covariant Return Type (Java 5)
Annotation (Java 5)
Generics (Java 5)
---------------------------------------------------------
JavaSE 7 Features

The important features of JavaSE 7 are try with resource, catching multiple exceptions etc.

String in switch statement (Java 7)
Binary Literals (Java 7)
The try-with-resources (Java 7)
Caching Multiple Exceptions by single catch (Java 7)
Underscores in Numeric Literals (Java 7)
---------------------------------------------------------------------
java 1.8:-
http://way2java.com/java-versions-2/jdk-1-8-features/

Sunday, 29 March 2015

Why can't I define a static method in a Java interface?

There are two questions here:
  1. Why can't interfaces contain static methods?
  2. Why can't static methods be overridden?