Dec 17, 2010

Working experience (in software engineering)

** In tasks management:

1. You should know the planned time for each task u take ... and you should estimate your needed time for the task ... compare the results ... clear your responsibility about the quality if the time is not enough.

2. Expect the worst cases, when decide your tasks time.

3. Understand the roles of each person in the project, and try to execute the correct cycles of decisions.

4. Be sure that the delivery manager knows all the problems in the produced build -if exists-

5. Don't plan a vacation depending on a project end, just define a suitable date and don't care they will behave.

6. Every period, Talk with the other members in your team to know what are tasks they took
and what are the problems they faced in them.

7. Don't ignore or postpone any task, finish it as soon as possible before time stresses on you.

8. Don't produce code in a build without testing it well .. WHATEVER the conditions and whatever your trusting in your code.

9. Divide each task to sub tasks and distribute them at days.

10. Try to participate in the estimation of your tasks in the plan.

11. When you do a task in cooperation with other teams: if you stopped because of other teams components (or servers) , if the problem take more than 15 minutes, send formal mail to this team asking solving the problem (cc project manager) to make the project manager tracking the issues times.

12. Don't work more over to finish the delayed work, more "over" working means more faults.

13. If you will document steps that you are executing for first time and one time, then document step by step while you execute them (to not forget anything).

**In Implementation :
1. Always check on null parameters for public methods.

2. When implementing with XML(or any defined message structure), Check on null for the optional elements.

3. Be sure that you are working on ONE design/SRS document only.

4. Work on the design/SRS document, exactly. And any requirements are not in the document, Send a confirmation e-mail first.

5. Take a confirmation e-mail before commit anything on the production version  path.

6. It is preferred to update your "current" workspace daily from version control.

7. Divide any problem to sub-problems, then begin to solve the simplest one.

8. When use any new technology method/API, you should read its documentation and understand it firstly, don't take it from Google examples as it is.

9.  write log statements before and after any interaction with outside component (DB, web service, Queue, File system, ... ).

** In testing:
1. Ask about character encoding.

2. Check floating numbers (Add/multiply/divide) for multi numbers.

3. write every note u got while testing.

4. When changing any small part, you "should" test all related units again carefully --> if no time, Tell the manager to clear your responsibility

5. Define all "successful criterias" -Take care with the stored DB values-

6. Define test cases with defined inputs (files/cases) and the expected results before.

7. Take care with date ranges (in future/ too old)

** In Communication skills :
 1. Don't give feedback for conversation/talking you don't understand well, however the number of times you asked the other to repeat to understand, it is better than wrong feedback.

2. Don't give information you don't ensure from it. Don't be embarrassed to say "I don't know", it is better than to be embarrassed when the other discovers that you mis-leaded them.

3. Firstly, Think if the required info from you is related with another person, redirect the requester to him. Why do you carry the responsibility instead of him ?!

4. Fight for your opinion, and discuss with higher level managers to prove that (if the company policy allows that)

5. When discussing any problem, try to divide it to sub-problems and  discuss each one separately.

6. Improve the conversation:
  • Clarify your objective
  • Structure the conversation (problem / solution, ...)
  • Manage the conversation  speed / slowness
  • Find a common background
  • Move beyond argument (story, example, explain, ...)
  • Summarize often time (check what you understand with the other person)
  • Use visuals (presentation, paper, body language, ...)

Sep 23, 2009

Generate J2SE client from WSDL using JBoss wsconsume

If you have a valid WSDL URL and need to invoke web service method(s), here is what I compiled in order to consume a WSDL in JBoss environment:

We will Use “wsconsume” utility supplied by JBoss WS (available under /bin) to generate necessary glue code and stubs/interfaces.
  1. Type-in following command on the command prompt. Make sure that you have working WSDL URL before executing following command:
    [JBOSS Path]\bin>wsconsume -k -p packageName -o targetBinDir -s TaregtSrcDir http://127.0.0.1:8080/ejbs/HelloWorld?wsdl
  2. Once you have the interfaces, you can write the client like this (you should get the classes names (service, proxy) from the generated code in targetBinDir ):
public class HelloWorldClient {
    public static void main(String[] args) {
        //Create Service
        HelloWorldService service = new HelloWorldService();

        //create proxy
        HelloWorld proxy = service.getHelloWorldPort();

        //invoke
        System.out.println(proxy.hello("hello"));
    }
   }
  • Related links:
http://myarch.com/create-jax-ws-service-in-5-minutes
http://www.mastertheboss.com/en/web-interfaces/101-jboss-web-services-part-1.html


Jun 29, 2009

Maven build without running test cases

To build a project by maven without running the test cases use command:

mvn package -Dmaven.test.skip=true

this will reduce the build time.

And to run tests only use:

mvn test

Jun 2, 2009

NoSuchMethodError

I have did modification in a large exiting project , and when i have modified a module in this project and built this module individually ... then building all the project (by Maven) ... depoly it (on Jboss) ... test ... it thorws NoSuchMethodError at run time for a function that I sure that it exist in the code ... then I know that building some module of a project (by Maven) changes the version of that module from other modules in the project, so they become incompatible with them self

I solved it by:
1. Make the build number in "buildNumber.properties" file in each module as the same
2. Clean the project
3. Build the project
4. deploy and it works fine.

Or, Take a fresh copy of the project, then build it all when u do a change in either module.

I hope this help

Feb 13, 2009

الموقف

كثيرا يعتقد الانسان انه سوف يتصرف بسلوك معين في مواقف معينة ... ولكن عند وجوده بالفعل فى تلك المواقف يكون سلوكه واحساسه غير ما توقع