My Sites


Thursday, October 29, 2015

Java SE 8 - Oracle Certified Associate - 1Z0-808

Register : http://www.pearsonvue.com/oracle/

Guide Book (OCA: Oracle Certified Associate Java SE 8 Programmer I Study Guide: Exam 1Z0-808) : (Free Download :-) ) http://miageprojet2.unice.fr/@api/deki/files/2477/=LivreJava.pdf 

Duration: 150  Number of Questions:  77   Passing Score:     65%
Exam Topics :

Java Basics 
  • Define the scope of variables 
  • Define the structure of a Java class
  • Create executable Java applications with a main method; run a Java program from the command line; including console output.
  • Import other Java packages to make them accessible in your code
  • Compare and contrast the features and components of Java such as: platform independence, object orientation, encapsulation, etc.
Working With Java Data Types 
  • Declare and initialize variables (including casting of primitive data types)
  • Differentiate between object reference variables and primitive variables
  • Know how to read or write to object fields
  • Explain an Object's Lifecycle (creation, "dereference by reassignment" and garbage collection)
  • Develop code that uses wrapper classes such as Boolean, Double, and Integer.  
Using Operators and Decision Constructs 
  • Use Java operators; including parentheses to override operator precedence
  • Test equality between Strings and other objects using == and equals ()
  • Create if and if/else and ternary constructs 
  • Use a switch statement 
Creating and Using Arrays 
  • Declare, instantiate, initialize and use a one-dimensional array
  • Declare, instantiate, initialize and use multi-dimensional array
Using Loop Constructs 
  • Create and use while loops
  • Create and use for loops including the enhanced for loop
  • Create and use do/while loops
  • Compare loop constructs
  • Use break and continue  
Working with Methods and Encapsulation 
  • Create methods with arguments and return values; including overloaded methods
  • Apply the static keyword  to methods and fields  
  • Create and overload constructors; including impact on default constructors
  • Apply access modifiers
  • Apply encapsulation principles to a class
  • Determine the effect upon object references and primitive values when they are passed  into methods that change the values
Working with Inheritance 
  • Describe inheritance and its benefits
  • Develop code that demonstrates the use of polymorphism; including overriding and object type versus reference type
  • Determine when casting is necessary
  • Use super and this to access objects and constructors
  • Use abstract classes and interfaces
Handling Exceptions 
  • Differentiate among checked exceptions, unchecked exceptions, and Errors
  • Create a try-catch block and determine how exceptions alter normal program flow
  • Describe the advantages of Exception handling 
  • Create and invoke a method that throws an exception
  • "Recognize common exception classes (such as NullPointerException, ArithmeticExcpetion, ArrayIndexOutOfBoundsException, ClassCastException)"
Working with Selected classes from the Java API 
  • Manipulate data using the StringBuilder class and its methods
  • Creating and manipulating Strings
  • Create and manipulate calendar data using classes from java.time.LocalDateTime,  java.time.LocalDate, java.time.LocalTime, java.time.format.DateTimeFormatter, java.time.Period 
  • Declare and use an ArrayList of a given type 
  • Write a simple Lambda expression that consumes a Lambda Predicate expression

What should be your goal ? A Full Stack developer


  1. Server, Network, and Hosting Environment.
    1. This involves understanding what can break and why, taking no resource for granted.
    2. Appropriate use of the file system, cloud storage, network resources, and an understanding of data redundancy and availability is necessary.
    3. How does the application scale given the hardware constraints?
    4. What about multi-threading and race conditions? Guess what, you won’t see those on your development machine, but they can and do happen in the real world.
    5. Full stack developers can work side by side with DevOps. The system should provide useful error messages and logging capabilities. DevOps will see the messages before you will, so make them count.
  2. Data Modeling
    1. If the data model is flawed, the business logic and higher layers start to need strange (ugly) code to compensate for corner cases the data model doesn’t cover.
    2. Full stack developers know how to create a reasonably normalized relational model, complete with foreign keys, indexes, views, lookup tables, etc.
    3. Full stack developers are familiar with the concept of non-relational data stores and understand where they shine over relational data stores.
  3. Business Logic
    1. The heart of the value the application provides.
    2. Solid object oriented skills are needed here.
    3. Frameworks might be needed here as well.
  4. API layer / Action Layer / MVC
    1. How the outside world operates against the business logic and data model.
    2. Frameworks at this level should be used heavily.
    3. Full stack developers have the ability to write clear, consistent, simple to use interfaces. The heights to which some APIs are convoluted repel me.
  5. User Interface
    1. Full stack developers: a) understand how to create a readable layout, or b) acknowledge they need help from artists and graphic designers. Either way, implementing a good visual design is key.
    2. Can include mastery of HTML5 / CSS.
    3. JavaScript is the up and coming language of the future and lots of exciting work is being done in the JavaScript world (node, backbone, knockout…)
  6. User Experience
    1. Full stack developers appreciate that users just want things to work.
    2. A good system doesn’t give its users carpal tunnel syndrome or sore eyes. A full stack developer can step back and look at a process that needs 8 clicks and 3 steps, and get it down to one click.
    3. Full stack developers write useful error messages. If something breaks, be apologetic about it. Sometimes programmers inadvertently write error messages that can make people feel stupid.
  7. Understanding what the customer and the business need.
    1. Now we are blurring into the line of architect, but that is too much of a hands off role.
    2. Full stack developers have a grasp of what is going on in the field when the customer uses the software. They also have a grasp of the business.
    Reference : http://www.laurencegellert.com/2012/08/what-is-a-full-stack-developer/

Tuesday, October 13, 2015

Sonar Integraion for Node.js and Java

Node.js
https://www.npmjs.com/package/grunt-sonar-runner
grunt  sonarRunner:analysis

Java (Maven)
<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>sonar-maven-plugin</artifactId>
  <version>2.3</version>
</plugin>
maven command
sonar:sonar

Monday, October 5, 2015

DEVOPS TOOLS - Essentials

http://nemo.sonarqube.org/api/resources?resource=9917336&depth=0&metrics=coverage&includetrends=true

http://10.52.133.533:8080/job/Admin_Toooool_Staging_BVT/10/testReport/api/json?pretty=true

https://jira..com/jira/rest/api/2/project/key

https://jira..com/jira/rest/api/2/project/key/versions


https://jira..com/jira/rest/greenhopper/1.0/rapidview

https://jira..com/jira/rest/greenhopper/1.0/sprintquery/3139?includeFutureSprints=true

https://jira..com/jira/rest/greenhopper/1.0/rapid/charts/sprintreport?rapidViewId=3139&sprintId=40366

https://jira..com/jira/rest/api/2/project

https://jira..com/jira/rest/greenhopper/1.0/rapid/charts/scopechangeburndownchart

https://jira..com/jira/rest/greenhopper/1.0/rapid/charts/scopechangeburndownchart?rapidViewId=3139&sprintId=40366

https://jira..com/jira/rest/greenhopper/1.0/rapid/charts/releaseburndownchart?rapidViewId=3139&versionId=21232


http://fisheye..com/rest-service-fe/revisionData-v1/changeset/
http://fisheye..com/rest-service-fe/revisionData-v1/changesetList/MLP_Restexpress-portello

http://fisheye..com/rest-service-fe/revisionData-v1/changeset/MLP_Restexpress-portello/c90a6a553a890b8744ac1beb92546e852d80d5f2

http://fisheye..com/rest-service-fe/revisionData-v1/revisionInfo/MLP_Restexpress-portello?rev="c90a6a553a890b8744ac1beb92546e852d80d5f2"&path="src/main/java/com/pearson/portello/utill/SubPubSubcriptionUtils.java"

http://fisheye..com/rest-service-fecru/recently-visited-v1/reviews

https://jira..com/jira/rest/greenhopper/1.0/rapid/charts/releaseburndownchart?rapidViewId=1999&versionId=26802

https://jira..com/jira/rest/api/2/version/26802/relatedIssueCounts
https://jira..com/jira/rest/api/2/version/26802/unresolvedIssueCount
https://jira..com/jira/rest/greenhopper/1.0/rapid/charts/sprintreport?rapidViewId=1999&sprintId=40689

https://jira..com/jira/rest/greenhopper/1.0/rapid/charts/sprintreport?rapidViewId=19805&sprintId=40689

https://jira..com/jira/rest/greenhopper/1.0/rapid/charts/releaseburndownchart?rapidViewId=19805&versionId=26802

Encoding URL query parameters

  • java.net.URLEncoder.encode(String s, String encoding) can help too. It follows the HTML form encoding application/x-www-form-urlencoded. URLEncoder.encode(query, "UTF-8");
  • URI uri = new URIBuilder(termsUrl).addParameter("X-Authorization",
                        "token " + token).build();
  •  URI uri = new URI(https://jira.pearsoncmg.com/jira/rest/greenhopper/1.0/rapid/charts/releaseburndownchart?rapidViewId=14141&versionId=1515");
  •  String q = "random word £500 bank $";
     String url = "http://example.com/query?q=" + URLEncoder.encode(q, "UTF-8");
    

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://YYY. (Reason: CORS header 'Access-Control-Allow-Origin' missing).


Browser security prevents making an ajax call from a page hosted on one domain to a page hosted on a different domain; this is called the "same-origin policy".

  • We can not get the data from third party website without jsonp.
  • JSONP or "JSON with padding" is a communication technique used in JavaScript programs running in web browsers to request data from a server in a different domain, something prohibited by typical web browsers because of the same-origin policy.
  • JSONP takes advantage of the fact that browsers do not enforce the same-origin policy on script tags.
  • Note that for JSONP to work, a server must know how to reply with JSONP-formatted results.
  • JSONP does not work with JSON-formatted results.


jqXHR → The jQuery XMLHttpRequest

JSONP is JSON with padding, that is, you put a string at the beginning and a pair of parenthesis around it. For example:
//JSON
    {"name":"stackoverflow","id":5}
//JSONP
    func({"name":"stackoverflow","id":5});


Use Server Level : Node.js