Experience Directory in Software

Real J2EE Project Experience and Tips

Java,J2EE,Oracle,Linux experience and workaround tips. If you have thought at least once like "How much should I learn technologies to be good enough developer?", Yes answer is here, just read this articles.All articles are made use at real project and making clients happy!

Monday, November 30, 2009

How to avoid being in trouble with "Analysis paralysis"

As a Web application developer, I face lots of problems at the same time.


* Some rose all of a sudden
--> which vary as a critical issue or minor issue.

* Some become severer issue in a long term.
--> before the issue was considered a minor issue, but became a critical, difficult issues.

Daily operation, Application users inquiries, enhancements, bug fixes, and above issues.

Have to have all things done but time is limited.

You have to think your responsibility when prioritize tasks you are having in hand.
if you are working in a team and each member is assigned to specific role as a primary responsibility, you decide what to do next according to it.

and then next, if you have limited time but must have some of your tasks done,
you chose what you can put off later.
and decide what you need to do, how much time you can spend on it.
these actions are planning.

Here is the article from eHow.com

1.Initial Planning(Planning)

1. Analysis paralysis

Get away from being in trouble with "Analysis paralysis".

Friday, November 21, 2008

Hidden Cost

Hidden cost of work retained onshore, internally
Hidden cost of internal, transitional headcount

Tuesday, October 28, 2008

Note About Item43.Return empty arrays or collections, not nulls


The note that I'd like to summarize here is about the method design in Java language and more particularly about the return value when they are either Array type or Collection objects.
It's sometimes argued that a null return value is preferable to an empty array because it avoids the expense of allocating the array.This argument fails on 2 counts.
It's possible to return the same zero-length array from every invocation that returns no items because zero-length arrays are immutable and immutable objects may be shared freely.

For collection, use the following appropriately.

Collections.emptySet();
Collections.emptyList();
Collections.emptyMap();

for array, use the following technique.
(the following example is the case the array type is String)

private static final String[] EMPTY_STRING_ARRAY = new String[0];

Collections.toArray(EMPTY_STRING_ARRAY);

Friday, October 24, 2008

pros and cons of Singleton, Monostate


In my SCJD assignment, I had to decide how to meet a requirement which was that the meta information of the database should be read only once and reused them on later uses.

For example,  in starting up time, the application will read the header information of the database such as the size of the database record, the number of fields,  or the length of each field.
and those header information will decide how the data is organized and should be treated when read and write operation. And those header information won't change during the run-time operation which means they are static in the single session.

In java programming language, you could achieve this by several choices explained in the following.

Singleton
pros
  • Global access point(exactly one instance exists in one JVM)
  • Cuts the starting up time and memory allocation(Singleton object is instantiated only when the instance is needed(if lazy instantiation is applied))
cons
  • can't be inherited(because the constractor of the singleton class should be private)

----memo---
1) If the lazy initialization is applied, A Singleton ojbect is initialized at the time when the getInstance method is invoked at first.
2) If the eager initialization is applied, the Singleton object is initialized by a static initializer and in other words, the Singleton object is created before any thread accesses the static Singleton object.

What's the difference b/w 2 cases??!!
--->answer is When JVM loads the singleton class into the memory, the eager initialization applied Singleton class is instantiated, but not for the lazy initialization applied one.
When JVM loads the particular class is at the time of the first occurence of any one of the following.

A class or interface type T will be initialized immediately before the first occurrence of any one of the following:

T is a class and an instance of T is created.
T is a class and a static method declared by T is invoked.
A static field declared by T is assigned.
A static field declared by T is used and the field is not a constant variable (§4.12.4).
T is a top-level class, and an assert statement (§14.10) lexically nested within T is executed.
-------------

References:

Sunday, September 14, 2008

Refactoring Java codes

This is obviously very important if you wanna make a software more maintainable and flexible.

I am currently working on SCJD exam. and made brief disciplines for refactoring the SCJD assignment application.

It's because I thought refactoring a software would take forever.
needed to set the goals in respective with the target software.

SCJD application would have to be as much simple as it can be..I felt after reading lots of forum topics on Saloon.

here is my refactoring disciplines.

1.decouple with other class
2.simple logic
3.easily understandable naming given to classes, variables, and methods.
4.follow famous object oriented disciplines (and patterns if you think you can apply without much changes, and giving more complexity.)


References:


Monday, September 08, 2008

Performance improvement of Distributed Application RMI

Our application in big picture consists of 2 java applications.
One is responsible to handle the users' request for our web system, which is a J2EE application running on Tomcat4.1 corroborated with Apache HTTP Server2.0 and 
Another is responsible to  play an interface role between AS/400 based application which manages to manipulate the back-end DB and J2EE app.


[figure]
Apache+Tomcat(J2EE)   ==>  RMI app(J2SE)  ==> AS/400 => Back-end DB(DB2)


This is the simplest view of our web system,but major components are all in it.

Why the system architecture becomes like this is due to the historical reason in our project and security as well.
DB2 stores the users' confidential data, item stock data, place order data, and shipment data which all are essential.
and the member in one department in our organization managed it, and J2EE app has been managed by the member in different department.
and things didn't go smoothly at the time of system integration of AS/400 based and J2EE app..
then as a result of that, RMI use was thought and decided to use.

and now what's happened is the performance between Tomcat and RMI is very slow and 
at the busy time at around 12am noon to 14pm or so, it responds to each request very slowly.

but we did the following for improving its performance already.

1. Made tables in Oracle indexed organized tables
2. Cached the definite/constant search inquiry results in J2EE app
3. Stored static HTML file and picture file  on HTTP server
 

Saturday, September 06, 2008

SCJD exam study


It has been passing months more than I was expecting to finish the SCJD exam up.

wow, In japan it's limited to make it up within 1 year, that means in my case it should been done by the end of Nov,2008.

I was once wondering how long other exam takers take to finish it up, and searched in google..
Of course that depends on the case of each individual lifestyle, experience, and circumstance.

some guy did in a few months and passed successfully, others didn't finish by spending 1.5 years or more..

but I feel people usually get it done about  a half an year, but the result of those are different.
some one got high score of 390/400, someone got 340/400 and so on..

There is nothing to say if you spend the time, you would get higher score...

We can't trust the time spending will make it passed.we need to believe ourselves.

We just need to read and understand the each line in the instruction document, and follow it and make sure your application behaviors are the same as what the instruction says by writing testing source code(Unit Testing) and do the Integration Testing, and user testing..

You wouldn't believe me that I won't get disappointed if I fail the exam, because I learnt a lot and gained so many experience to be a better developer/ a designer..
but I do think so...

probably I have already passed this exam as long as I get satisfied with the experience and knowledge I got haha.That's certainly the one of the primary purpose of this exam.

Now I've gotten already familiar with OO design, Design Patterns, Unit Testing, Concurrency, synchronization,Network communication,Test Driven, and finding the requirement, and decision make on specification.

wow!

The On Demand Global Workforce - oDesk