Following content in the blog are for personal reference. Gathered information from different resources in internet.
Tuesday, April 26, 2011
You can, if you think you can
Tuesday, January 5, 2010
The Right Way To Sell Yourself At Work
Like it or not, self-promotion is part of responsible career management.
Actions don't always speak louder than words.
Building a strong personal brand isn't about telling people how great you are. It's about showing people how great you are.
Create a Word document to keep track of your achievements. Every time you accomplish something, jot down an entry. Include what you did and why it was important. When possible, show how that achievement helped your company. Include positive comments that other people have made about your work. Review your "brag bag" before sitting down for your performance review. In doing so, you may actually be helping your boss. "At this time of absolute chaos in the workforce, bosses are often doing two or three jobs instead of one," says Peggy Klaus. "They don't have the bandwidth to remember what you do every day." Plus, bosses like good news. Klaus says that when you have a great success at work, you should send your boss a short, enthusiastic e-mail with the news.
If you work hard, you need to make sure that people notice. Be proud of yourself, even if you don't look like Tom Cruise.
Tuesday, December 1, 2009
it's YOU
You are the only person who can revolutionize your life. You are the only person who can influence your happiness, your realization and your success. You are the only person who can help yourself.
Your life does not change when your boss changes, when your friends change, when your parents change, when your partner changes, when your company changes. Your life changes when YOU change, when you go beyond your limiting beliefs, when you realize that you are the only one responsible for your life.
"The most important relationship you can have is the one you have with yourself"
Examine yourself, watch yourself. Don't be afraid of difficulties, impossibilities and losses: be a winner, build yourself and your reality.
The world is like a mirror: it gives back to anyone the reflection of the thoughts in which one has strongly believed.
The world and your reality are like mirrors lying in a coffin, which show to any individual the death of his divine capability to imagine and create his happiness and his success.
It's the way you face Life that makes the difference
Friday, June 13, 2008
J2EE Design Patterns
Some of the well known Design Patterns.
- Session Facade
- Mesage Facade
Solution: - Use a session bean as a facade to encapsulate the complexity of interactions between the business objects participating in a workflow. The Session Facade manages the business objects, and provides a uniform coarse-grained service access layer to clients. The Session Facade abstracts the underlying business object interactions and provides a service layer that exposes only the required interfaces. The Session Facade manages the interactions between the business data and business service objects that participate in the workflow, and it encapsulates the business logic associated with the requirements.
- When implementing the Session Facade, you must first decide whether the facade session bean is a stateful or a stateless session bean. Base this decision on the business process that the Session Facade is modeling.
- A business process that needs only one method call to complete the service is a nonconversational business process. Such processes are suitably implemented using a stateless session bean.
- A business process that needs multiple method calls to complete the service is a conversational business process. The conversational state must be saved between each client method invocation. In this scenario, a stateful session bean may be a more suitable approach for implementing the Session Facade.
Problem:- Session bean and entity bean methods execute synchronously that means the method caller has to wait till a value is returned. In some situations like sending hundred's of mails or firing a batch process or updating processes, the client does not have to bother about return value. If you use synchronous session and entity beans in such situations, they take a long time to process methods and clients have to wait till the method returns a value.
Solution: - To avoid blocking of a client, use asynchronous message driven beans, so that client does not have to wait for a return value. If a client uses asynchronous messaging then the client need not wait for a return value but can continue its flow of execution after sending the message.
Here the client sends a message to JMS server, gets acknowledgement from the JMS server immediately in two step process and continues it's flow of execution. Whereas JMS server delivers the messages to Message driven bean (Message Facade) without blocking client's execution and Message driven bean executes messages. You can use normal JMS consumers instead of Message driven beans. This process improves performance by reducing the client's blocking time considerably.
Thursday, May 29, 2008
Collection FrameWork
- HashMap :- Hash table based implementation of the Map interface.
- Permits null values and the null key.
- It is unsynchronized.
- This class makes no guarantees as to the order of the map.
- Since it is unsynchronized to make synchronized use following
Map m = Collections.synchronizedMap(new HashMap(...));
- HashTable :
- Null vaule and Key not allowed.
- To successfully store and retrieve objects from a hashtable, the objects used as keys must implement the
hashCodemethod and theequalsmethod. - Hashtable is synchronized.
- Comparable and Comparator :- An implementation of the Comparable interface allows the user to create a specific strategy to compare with another object(which should be mutually comparable).The Comparator on the other hand doesn't tie you with a single comparison strategy.
- Comparable interface has “compareTo” method which is normally used for natural ordering but Comparator interface has “compare” method which takes two arguments. It can be used where you want to sort objects based of more then one parameter.
- The java.util.Collections class has an overloaded sort method(i.e. other than sort(List) that accepts a List and a Comparator as an argument.
- Sample Code :-
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18public class Employee implements Comparable
{
private String name;
private int age;
public Employee(String name, int age)
{
this.name = name;
this.age = age;
}
public int compareTo(Employee e)
{
//Write the code for sort.
}
}1
2
3
4
5
6
7
8
9
10
11
12
13public class Main
{
public static void main(String[] args)
{
ListemployeeList = new ArrayList ();
employeeList.add( new Employee("Ranga", 10) );
employeeList.add( new Employee("Madhu", 11) );
employeeList.add( new Employee("Babu", 12) );
Collections.sort(employeeList);
}
Vector and ArrayList
- Arraylist is not synchronized while vector is.
- Arraylist has no default size while vector has a default size of 10.
- Arraylist don't define any increment size while vector does.
- Arraylist can be seen directly without any iterator while vector requires an iterator to display all it's content. (not very sure).
- Sometimes
Vectoris better; sometimesArrayListis better. Chose based on your requirement. If u don't need thread-safe collection, then use theArrayList. - A
Vectordefaults to doubling the size of its array, while theArrayListincreases its array size by 50 percent. Depending on how you use these classes, you could end up taking a large performance hit while adding new elements.Vectordoes possess a slight advantage since you can set the increment value. - Traversing an
ArrayListis since you can simply use an index instead of having to create an iterator.
Wednesday, May 28, 2008
10 Commandments for Java Developers
- Add comments to your code.
- Do not complicate things
- Keep in Mind – "Less is more" is not always better.
- No hard coding please.
- Do not invent your own frameworks.
- Say no to Print lines and String Concatenations.
- Pay attention to the GUI.
- Always Prepare Document Requirements.
- Unit-test. Unit-test. Unit-test.
- Remember – quality, not quantity.
Pls go through complete details from the bellow link for detailed description given by the Aleksey Shevchenko (Author) .I hope these rules will help all of us become better programmers and professionals.
Link : http://www.developer.com/java/data/article.php/10932_3612756_1
Tuesday, May 27, 2008
Core Java Rare Questions.
By default SOP(System.out.println) prints out put on console. It is possible to redirect out put to some other file. See following sample code.
package jobset_qa.jobs;
import java.io.FileNotFoundException;
import java.io.PrintStream;
public class PrintToFile
{
public PrintToFile() { }
public static void main(String argv[]) throws FileNotFoundException
{
System.out.println("This will be printed in console..");
PrintStream fileout=new PrintStream("systemoutput.txt");
System.setOut(fileout);
System.out.println("From now.. the messages would be systemoutput.txt");
System.out.println("You ust be seeing this message in systemoutput.txt file");
}
}
Polymorphism :-Means one name, many forms.This can be achived in following two ways.
- Method overloading : overload differs in the number or type of its arguments. Differences in argument names are not significant. A different return type is permitted, but is not sufficient by itself to distinguish an overloading method.
- Method Overriding : override has identical argument types and order, identical return type, and is not less accessible than the original method. The overriding method must not throw any checked exceptions that were not declared for the original method."
There are two farm of polymorphism
- Compile-time polymorphism
- Runtime polymorphism
Compile-Time Polymorphism :- Method overloading as a form of compile-time polymorphism. Compiler determines which method (from a group of overloaded methods) will be executed, and this decision is made when the program is compiled.
Runtime Polymorphism : - This is based on method overriding. The decision as to which version of a method will be executed is based on the actual type of object whose reference is stored in the reference variable, and not on the type of the reference variable on which the method is invoked.This is sometimes referred to as late binding.
Sample Code :-
class A extends Object{ //Super Class
public void m(){
System.out.println("m in class A");
}//end method m()
}//end class A
class B extends A{ // Sub Class
public void m(){
System.out.println("m in class B");
}//end method m()
}//end class B
public class Poly03{
public static void main( String[] args){
Object var = new B();
((A)var).m(); }}
The Method Output is : m in class B
This confirms that even though the type of the reference was converted to type A, (rather than type Object or type B), the overridden version of the method defined in class B was actually executed.
Monday, May 26, 2008
JSP - Concepts
JSP Lifecycle:
Translation Phase: JSP Page will be converted to Servlet.
Compilation Phase: The resulting servlet is compiled.
Instantiate and loading Phase: Instance will be created for the servlet ands it will be loaded to memory.
Call jspinit():Perform Initialization process.
Call _jspService(): this will be called upon each request.
Call jspDestroy(): the instance will be destroyed when not needed any more.
Friday, May 23, 2008
Simplified Struts concepts
- A request comes in from a Java Server Page into the ActionServlet.
- The ActionServlet having already read the struts-config.xml file, knows which form bean
relates to this JSP, and delegates work to the validate method of that form bean. - The form bean performs the validate method to determine if all required fields have been
entered, and performs whatever other types of field validations that need to be performed. - If any required field has not been entered, or any field does not pass validation, the form bean generates ActionErrors, and after checking all fields returns back to the ActionServlet.
- The ActionServlet checks the ActionErrors that were returned from the form bean’s validate method to determine if any errors have occurred. If errors have occurred, it returns to the originating JSP displaying the appropriate errors.
- If no errors occurred in the validate method of the form bean, the ActionServlet passes
control to the appropriate Action class. - The Action class performs any necessary business logic, and then forwards to the next
appropriate action (probably another JSP).
Wednesday, May 7, 2008
Software Tester Skills
- Testing skill
- Domain knowledge
- Technical expertise.
Any tester should have the basic testing skills like Manual testing and Automation testing. Tester having the common sense can even find most of the obvious bugs in the software.While testing any application tester should think like a end-user.
When tester know the functional domain better , then he/she can better write and execute more test cases and can effectively simulate the end user actions which is distinctly a big advantage.
Here is the big list of the required testing knowledge:
- Testing skill
- Bug hunting skill
- Technical skill
- Domain knowledge
- Communication skill
- Automation skill
- Some programming skill
- Quick grasping
- Ability to Work under pressure …
If tester don’t have enough domain knowledge of that project they need to quickly grasp as many concepts .Try to understand the product as if you are the customer and what customer will do with application. Visit the customer site if possible know how they work with the product, Read online resources about the domain you want to test the application, participate in events addressing on such domain, meet the domain experts. Or either company will provide all this in-house training before assigning any domain specific task to testers.
Friday, May 2, 2008
Team leader roles
- As a team leader you are responsible for project planning, scheduling, communicating your project status to your manager and most important task of assigning and monitoring the project work.
- Your main responsibility is to build a team to achieve your project goals.
- You need to focus on handling the challenges in your project so that your team and project will grow and perform well.
- Ensuring project plan changes are incorporated in test plan. You might write a test plan and test strategy (In some cases it might be written by senior test team member or even by project test manager) Ensure the work is going according to this test plan. Identify the risks and try to mitigate them. At the end of project testing life cycle ensure that all test objectives are accomplished and acceptance criteria is met.
- More TL responsibilities includes: Test Case Review, Requirements Validation, Monitoring the execution of manual and automated test cases, Prepare test summary report and Communicate test status to seniors and prepare corresponding documents.