Sunday, May 31, 2009

The Real Purpose of CMMI for Development

Junior Dev: What does CMMI stand for ?
CMMI Fans: CMMI stands for "Capability Maturity Model Integration"

Junior Dev: What does it mean and what is the relationship with software development?
CMMI Fans: It's a model that describes characteristics of effective processes to deliver software that is needed, on time, and on budget.

Senior Dev: Actually, it will bloat the software construction process and totally against agile methodologies. It is only useful for marketing purposes.
CMMI Fans: CMMI is meant to help engineering development organizations improve on their capability to consistently and predictably deliver the products their customers want, when they want them and at a price they're willing to pay.

Senior Dev: Why do I feel the opposite way? I think it's a burden and useless.
CMMI Fans: The Software Engineering Institute was funded by US Department of Defense to identify what the successful projects had in common, and the result is CMM. The SEI defined a "successful project" in terms of a project's ability to meet cost, schedule and quality objectives.

Senior Dev: Ok, it's enough. You have repeat that 3 times.
CMMI Fans
: Yeah, that's the real purpose of CMMI. If you feel the other way, than there should be something wrong. CMMI also can be applied with agile methodology by mapping correctly the CMMI specific goals with suitable agile practices, i.e: "Manage Requirement" goal could be mapped with "Product and Sprint backlogs", "Establish Estimates" goal could be mapped with "Sprint Planning".

Senior Dev:Ok, I agree that CMMI is made to be a useful guide for software development. But I still think that it's to bloated and we can be more effective by following some part of CMMI and not the whole of it. Every project is unique and we can not easily repeat previous success project using magic recipes called CMMI.
CMMI Fans:Who said that CMMI is magic recipes? CMMI is collection of best practice found in many successful software projects. We can not say that it's useless. Use it wisely as a guidance to deliver successful projects, not as a bunch of mandatory documents which burden the software construction process. Never thought that CMMI just for marketing tools, it supposed to be used to improve process for developing software.

Senior Dev:I think I need to learn more about CMMI. I want to know more about marrying CMMI with agile methodology. Can you give me some resource about that?
CMMI Fans: Have you ever heard about google?

Source:
http://www.entinex.com/WhatIsCMMI_page1.cfm
http://www.cmmifaq.info/
http://www.agilecmmi.com/2006/08/keys-to-enabling-cmmi.html

Saturday, May 30, 2009

Oracle Database Recycle Bin

Do you know that Oracle Database 10g or later have recycle bin?
Dropped table will go to recycle bin, but deleted record will NOT go to recycle bin.

Here is the sample for dropping table:
create table coba(fieldcoba varchar(100));
insert into coba values('aaaaa');
drop table coba;
and then we restoring the table from recyclebin:
flashback table coba to before drop;
To empty recycle bin, we can use this command:
purge recyclebin;
For dropping the table and skip the recycle bin, use this command:
drop table coba purge;

Oracle Application Server Cache Setting

We can add header setting in Oracle Application Server to force javascript / image being cached in browser. We can determine the expired date of this cached files. When the cached is not expired yet, the browser will never check for newer version in server. So this setting will speed up time for delivering response page to user.

We can configure this setting in file c:\product\10.1.3.1\OracleAS_1\Apache\Apache\conf\httpd.conf. We could add these lines to httpd.conf to cache gif, jpg, js, and css files:
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/gif "access plus 10 years"
ExpiresByType image/jpg "access plus 10 years"
ExpiresByType text/js "access plus 10 years"
ExpiresByType text/css "access plus 10 years"
</IfModule>

Some another examples for configure expired period are:
ExpiresByType image/gif "access plus 3 months"
ExpiresByType image/gif "access plus 3 weeks"
ExpiresByType image/gif "access plus 3 days"
ExpiresByType image/gif "access plus 3 hours"
ExpiresByType image/gif "access plus 3 minutes"
ExpiresByType image/gif "access plus 3 seconds"

Important Note: if we already set the expired header for a long period, than we have to change the filename when we modify file content. Because if we still using the same filename and the cache is not expired yet, than browser always pick the file from cache, and not trying to get a newer version from server.

Tuesday, May 26, 2009

Configure Oracle Application Server Logs

To configure Oracle App Server logs, we can use this attributes:
1. stdstream.filesize=max_file_size
log maximum file size. The log will rotate automatically when maximum size reached
2. stdstream.filenumber=max_files
maximum file count. The oldest file automatically deleted when this number reached
3. stdstream.rotatetime=HH:mm
time for daily rotation of log file

Usage sample:
* To rotate stdout/stderr log when log file has reached 12 MB and place the log file to folder d:\logs
java -Dstdstream.filesize=12 -jar oc4j.jar -out d:\logs\oc4j.out -err d:\logs\oc4j.err

* To rotate stdout everyday at 14.30 and limit the log file for 30 days
java -Dstdstream.rotatetime=14:30 -Dstdstream.filenumber=30 -jar oc4j.jar -out d:\logs\oc4j.out


The above configuration should be put in opmn.xml which is by default located in C:\product\10.1.3.1\OracleAS_1\opmn\conf\opmn.xml

Example:
<category id="start-parameters">
<data id="java-options" value="-server -Djava.security.policy=$ORACLE_HOME/j2ee/home/config/java2.policy -Djava.awt.headless=true -Dstdstream.filesize=12 -Dstdstream.filenumber=5"/>
<data id="oc4j-options" value="-out std.out -err std.err"/>
</category>
With the above example, log of stdout and stderr will show up in $ORACLE_HOME/j2ee/home/home_default_group_1.
The name of logs file will look like.
std_2006_02_22_14_01_17.out
std_2006_02_22_14_16_25.out

Source:
http://download.oracle.com/docs/cd/B31017_01/web.1013/b28950/sysprops.htm#CHDDCCJI
http://kaukovuo.blogspot.com/2006/02/oc4j-904-1012-and-1013-log-file.html

Oracle Application Server Default Log

By default, important logs of Oracle Application Server are located in this directory:
a. Apache Web Server log:
C:\product\10.1.3.1\OracleAS_1\Apache\Apache\logs


b. Stack Trace log(i.e.: System.out.println(), ex.printStackTrace() ):
C:\product\10.1.3.1\OracleAS_1\opmn\logs\default_group~home~default_group~1.log

Oracle Application Server Won't Start

One of the reasons that Oracle App. Server can not start is the port being used by another application. It could be port HTTP Port(default to 80) or SSL Port(default to 443).

Let's assume we are using Windows Operating System:
To find out that the port (i.e: SSL Port - 443) is being used by another application, type this in Command Prompt:
telnet localhost 443

If the port not used, then "Connection Refused" will be displayed, otherwise the system will display "Connected".

If "Connected" is displayed, it means an application already listening that port. To find out which application use that port, we can follow this steps:
a. In command prompt, type:
netstat -ano
The system will display list of ports on which the computer is listening and display the Process ID (PID) number.
b. Look for appropriate port and notice the PID number
c. To find out what application have that PID, type this in command prompt:
tasklist
d. To kill that application from command prompt, you can use this command:
taskkill /PID  /F

After terminating another application using that Oracle Application Server port, you can try to restart the Application Server.