Friday, August 29, 2008

Estimation Techniques for Software Projects

Software projects are typically controlled by four major variables; time, requirements, resources (people, infrastructure/materials, and money), and risks. Unexpected changes in any of these variables will have an impact on a project. Hence, making good estimates of time and resources required for a project is crucial. Underestimating project needs can cause major problems because there may not be enough time, money, infrastructure/materials, or people to complete the project. Overestimating needs can be very expensive for the organization because a decision may be made to defer the project because it is too expensive or the project is approved but other projects are "starved" because there is less to go around.

In my experience, making estimates of time and resources required for a project is usually a challenge for most project teams and project managers. It could be because they do not have experience doing estimates, they are unfamiliar with the technology being used or the business domain, requirements are unclear, there are dependencies on work being done by others, and so on. These can result in a situation akin to analysis paralysis as the team delays providing any estimates while they try to get a good handle on the requirements, dependencies, and issues. Alternatively, we will produce estimates that are usually highly optimistic as we have ignored items that need to be dealt with. How does one handle situations such as these?

Useful Estimation Techniques :

Before we begin, we need to understand what types of estimates we can provide. Estimates can be roughly divided into three types:

1. Ballpark or order of magnitude: Here the estimate is probably an order of magnitude from the final figure. Ideally, it would fall within two or three times the actual value.

2. Rough estimates: Here the estimate is closer to the actual value. Ideally it will be about 50% to 100% off the actual value.

3. Fair estimates: This is a very good estimate. Ideally it will be about 25% to 50% off the actual value.

Deciding which of these three different estimates you can provide is crucial. Fair estimates are possible when you are very familiar with what needs to be done and you have done it many times before. This sort of estimate is possible when doing maintenance type work where the fixes are known, or one is adding well-understood functionality that has been done before. Rough estimates are possible when working with well-understood needs and one is familiar with domain and technology issues. In all other cases, the best we can hope for before we begin is order of magnitude estimates. Some may quibble than order of magnitude estimates are close to no estimate at all! However, they are very valuable because they give the organization and project team some idea of what the project is going to need in terms of time, resources, and money. It is better to know that something is going to take between two and six months to do rather than have no idea how much time it will take. In many cases, we may be able to give more detailed estimates for some items rather than others. For example, we may be able to provide a rough estimate of the infrastructure we need but only an order of magnitude estimate of the people and time needed.

Thursday, August 28, 2008

Automatically rename Foreign Keys on a DB

Introduction

This article explains how to rename automatically every relation in your database.It could be useful if your database was upgraded from a different DBMS and the relation names are meaningless (like the Access upgrade does) or if those names have been created in years from different developers using different standards or if you renamed one or more table in your database and you need to fix foreign keys' names also.

Background :

The idea (and the underlying algorithm) is simple:

Take all the relations in the database, look at the tables involved in the relation and give each one the name "FK_ParentTable_ForeignTable[Counter]".
With previous versions of SQL Server it was easier because the user could directly update (with a single statement) system catalogues but in SQL Server 2005 this feature was disabled for consistency reasons.

In SQL Server 2005 there are a lot of useful views lying over the system catalogues that let the user know about everything in every database. The code uses those views to accomplish the task.

Using the code:

The code is just a T-SQL block of code so you can Paste it in a "Management Studio" window and run it from there.Put it as a Stored Procedure body to call when needed.
Run from within a "database update" script...do whatever you would do to run a sql batch.

Points of Interest

This code makes use of some new SQL Server 2005 features.

To make the code simpler it was divided logically using Common table expressions (CTE).Moreover to count properly the foreign keys a ranking function is used.
So if you are new to these you can learn something :)

In depth look

The logic is simple: obtain a list of actual foreign keys on a DB and rename them using the sp_rename extended procedure. So the code is basically a query wrapped around a procedure code that loops on the result set and do the rename work. There's nothing important/special/difficult to point on the procedure.. the interesting part is the query that is explained in detail below.

First of all we need to obtain every foreign key present in our database.
The view sys.foreign_key_columns has the information on "what column is linked to what other column". We use this view to have the list of every distinct relation (a relation could take more than one column). The first CTE has this information.

Next we should translate object IDs into object names.This can be done joining the first CTE with the sys.objects view Additionally we can count how many times a parent is related to a referenced table.This CTE stores: the actual relation name, the parent table, the referenced table and the counter.

The third step is to translate the informations obtained in the second step to a more useful thing: Old relation name and New relation name.
The CASE is used to put or omit the counter if there are more than one relation or one only (you can easily modify it if you want different renaming scheme).

The fourth step is used to take in consideration (for the rename process) only the relation names that don't already exist (because maybe someone has already fixed some them manually or they were created with the right name)

Download Source Code

Content From : CodeProject

Introduction - FAST Taxonomy

The FAST Taxonomy Explorer contains Categorization, based on advanced Linguistic technologies that let you control the flow of information into your organization and order, access, and retrieve that data; as well as information created within your organization.

The Categorizer classifies documents and organizes information into a hierarchical or a flat set of categories.Categorization is the process of concisely defining the information within a particular doc-ument; in other words, the major topic or subject of the document. In the context of text-
based document searches, categorization is an automated process that classifies numerous text documents, placing them into a taxonomy. A taxonomy is an organized classification structure that facilitates information retrieval.The categorization process inserts category tags into the documents prior to indexing.

When the documents in an index have been categorized, end users can restrict a query to a specific category in that index. Categorizing documents increases the likelihood that your end users will obtain the meaningful results they seek for two reasons:

1. Metadata: Documents are organized and stored by category, according to
their metadata tags.

2. Filter: Queries can be filtered using the categories that you created as
part of your taxonomy.

You can also choose to categorize the end-user documents from among several languages.FAST have Taxonomy Explorer to create & test a catagory.

DOJO - Ajax Technology

Dojo is an Open Source DHTML toolkit written in JavaScript. It builds on several contributed code bases (nWidgets, Burstlib, f(m)), which is why we refer to it sometimes as a "unified" toolkit. Dojo aims to solve some long-standing historical problems with DHTML which prevented mass adoption of dynamic web application development.

Dojo allows you to easily build dynamic capabilities into web pages and any other environment that supports JavaScript sanely. You can use the components that Dojo provides to make your web sites more usable, responsive, and functional. With Dojo you can build degradable user interfaces more easily, prototype interactive widgets quickly, and animate transitions. You can use the lower-level APIs and compatibility layers from Dojo to write portable JavaScript and simplify complex scripts. Dojo's event system, I/O APIs, and generic language enhancement form the basis of a powerful programming environment. You can use the Dojo build tools to write command-line unit-tests for your JavaScript code. The Dojo build process helps you optimize your JavaScript for deployment by grouping sets of files together and reuse those groups through "profiles".

Dojo does all of these things by layering capabilities onto a very small core which provides the package system and little else. When you write scripts with Dojo, you can include as little or as much of the available APIs as you need to suit your needs. Dojo provides multiple points of entry, interpreter independence, forward looking APIs, and focuses on reducing barriers to adoption.

Download Dojo Tool Kit 1.1.1

Integrate With Code :

1. First add the Dojo script file before body tag
script type="text/javascript" src="js/dojo1.0/dojo/dojo.js"
djConfig="parseOnLoad:true, isDebug:true"


Dojo has a mechanism for setting various configuration options at runtime. The two most common are parseOnLoad, which toggles page-load parsing of widgets and in-markup code, and isDebug, which enables or disables certain debugging messages.

We can set these configuration in another way also.

script type="text/javascript"
var djConfig = {
isDebug:true, parseOnLoad:true
};
/script
script type="text/javascript" src="js/dojo1.0/dojo/dojo.js"

Open a Command Prompt Window From Within Windows Explorer

Follow these steps to enable this option in the right-click drop down menu in

Windows Explorer:

1. Open "Windows Explorer"
2. Tools menu / Folder Options
3. Select File Types tab
4. Find and highlight "Folder" in File Types
5. Click Advanced
6. Click New to add new action
7. Type action name: Command Prompt
8. Type in "Application used to perform the action": cmd /k cd

(It may be necessary to type in the full path to cmd such as C:\WINNT\system32\cmd.exe)

Wednesday, August 27, 2008

Oracle - ORA-12535 error

Issue :
I have two databases. One local (in domain ad.xyz.com) and a remote database (domain us.oracle.com). I am logging in to these from a client machine and I do not have DBA access.

I am able to TNSPING and connect using SQL*Plus to both of these databases. I have created a private DBlink in my local DB pointing to the remote DB. However, when I try to refer any object in the remote DB using this DBlink, I get the "ORA-12535: TNS:operation timed out " error. Since I am able to TNSPING and connect to the DBs, the .ora files are correct.

I have referred to all of the articles I could find on the Internet but these did not help in solving the issues. Can you please let me know what I may have missed out?

Solution : (Given By Brian Peasland)

The only thing TNSPING tells you is that the database listener is up and is configured for the SID defined in your tns string. It does not indicate whether or not you can actually connect to the Oracle instance. The most common reason why you are receiving the ORA-12535 error is due to a firewall configuration issue. While the Listener is listening on port 1521, the connection will use a different port. The firewall could be blocking this other port. You may need to work with your network administrators to resolve this issue.

Weblogic Portlet 3.2.1 With FAST ESP

FAST ESP gives pre defined BEA Weblogic 8.1,Oracle,IBM Websphere 5.0 search portlets.The Search Portlet for BEA WebLogic 8.1 allows a WebLogic web application to query and process search results from FAST Data Search. You can use the portlet as provided or modify the user interface to comply with your company preferences and policies.


Supported Features


1. Simple installation for use in Weblogic Workshop and Weblogic Portal
Administration.

2. Configurable preferences to customize the portlet.

3. Access to many search features in FAST Data Search.

4. Java Server Pages (JSPs) that can be customized for the application.

Supported Versions :

BEA Weblogic Platform 8.1
FAST Data Search 3.2

Portlet Samples :





No need to write a single line .... If you want,You can customize the code based on your requirement.

Tuesday, August 26, 2008

DbXplorer - Oracle Weblogic 10.3 g

We can connect database schema using DbXplorer.
in this article we will learn how to explore databases using the DbXplorer™, a view that provides an intuitive interface for database access through the ORM Workbench. Using the DbXplorer, you can setup a database connection, add and edit data, review the database artifacts, query the data in an existing table or column, and generate object relational mappings.

Create a New Database Connection :

1. Click on the DbXplorer view tab, if it is visible. If not, open the DbXplorer
view by clicking Window > Show View > DbXplorer.
2. Right-click anywhere within the DbXplorer view and select New Connection.



3. In the Add Database Connection wizard, enter a database connection name. The database connection name can be arbitrary and does not have to match the actual name of the database server. Click Next to proceed.


4. In the Add Database Connection dialog, click Add and select the Hypersonic JDBC driver file, \workshop-jpa-tutorial\web\WEB-INF\lib\hsqldb.jar.


5. Click Next

6. In the JDBC Driver Class field click Browse and select org.hsqldb.jdbcDriver.

7. Workshop provides sample Database URL's for some standard databases, which can be accessed from the Populate from database defaults pull down menu. Select HypersonicSQL In-Memory.


8. For database URL jdbc:hsqldb:{db filename}, specify the Hypersonic database script file location for {db filename}: \workshop-jpa-tutorial\web\hsqlDB\SalesDB .

9. For User, enter sa.



10. Click the Test Connection button to verify the connection information.


11. Click Finish. The new database connection displays in the DbXplorer view.


After we can navigate trough all the tables which is avialable in database.

DBXaminar helps you to see the ralationship between the table.
Ex:

Oracle Workshop for WebLogic 10g R3

Oracle Introduced Weblogic 10.3g with lot of additional features.And Workshop version 10.3 is supported by Windows Vista also.

Added Features :

1. Support for Java Enterprise Edition 5
Workshop support for Java EE5 includes support for the following technologies:

Servlet 2.5
JSP 2.1
JSF 1.2
JSTL 1.2
EJB 3.0
JAX-WS
JAXB 2.0

2. Built on Eclipse 3.3.2 and Web Tools Platform 2.0.3
3. Supported by Windows Vista
4. XMLBeans 2.3
5. WorkSpace Studio launcher has been discontinued.
6. Provide a tool to Upgrade from 8,9.2 to 10.3g
7. DbXplorer and DBXaminer for working with databases and etc..

If you want more information ,check here:

Oracle Workshop for WebLogic™10.3
Download Weblogic Server 10.3g
Download Free Oracle Weblogic Worksho 10.3g
Upgarding Tutorial from 8.1 to 10.3g
Oracle 10.3g Tutorial

Oracle gives this software for free of cost now .........

Convert a Java Application to .NET

Yes.We can convert class files,jars files in to .Net Executable file format (dll) using the ikvmc tool.

IKVM.NET includes ikvmc, a utility that converts Java .jar files to .NET .dll libraries and .exe applications. In this section, we'll convert a Java application to a .NET .exe.

Navigate to IKVMROOT\samples\hello and enter the following:

ikvmc hello.jar

After the command completes, you should find a hello.exe file in the current directory. To execute it:

Windows / .NET Framework:
Try running hello.exe. If you get a FileNotFound exception when the .NET runtime attempts to load the referenced IKVM.OpenJDK.ClassLibrary.dll, remember that the .NET Framework expects to find referenced dll's in the application directory or in the Global Assembly Cache. Either install the dll's in the Global Assembly Cache, or copy them to the application directory.

Linux / Mono:

Run it using the following command:

mono hello.exe


For more details find the following links :

IKVMC.NET Tutorial
Download IKVMC.NET