Wednesday, October 23, 2013

Software engineering in the context of production economics



Software engineering in the context of production economics

                        I.            Introduction
The information technology industry driven mainly by software engineering has quickly gained grounds around the world in the recent years, imposing incontestably itself as one of the fastest growing industries and an essential economical growth catalyst to reckon with in the future. In an attempt to better comprehend the concept of software engineering in the context of production economics, it is crucial to define and deduce the relationship between the following key terms: production, economics, software engineering and its sub disciplines, and finally to provide an overview of economic analysis techniques and their applicability to software engineering and management mainly in the field of software quality, software cost estimation, business process reengineering, software architecture, software requirement, software marketing and project management.
                     II.            Definitions
Production:  In economics, production is the act of creating output, a goods or service which has value and contributes to the utility of individuals [1].  At the same time any effort directed toward the realization of a desired product or service is a "productive" effort and the performance of such act is production. The relation between the amount of inputs used in production and the resulting amount of output is called the production function. In general the production can be divided into three stages:
§   Primary producers directly extract natural resources.
§  Secondary producers process resources to turn them into intermediate goods.
§  Tertiary producers provide final goods or services to the consumer.
Economics:  the study of how people make decisions in resource-limited situations. This definition of economics fits the major branches of classical economics very well.
Macroeconomics: the study of how people make decisions in resource-limited situations on a national or global scale. It deals with the effects of decisions that national leaders make on such issues as tax rates, interest rates, and foreign and trade policy.
Microeconomics:  the study of how people make decisions in resource-limited situations on a more personal scale. It deals with the decisions that individuals and organizations make on such issues as how much insurance to buy, which word processor to buy, or what prices to charge for their products or services [2]. 
Economic principles: usually mentioning the term economy strikes some fears and complexities in the mind of common people but when broken into small ideas or principles it becomes easy and simple. Here are the nine principles of economics:
§  People choose: economics is about choosing from alternative ways to use scarce resources to accomplish goals.
§  Every choice/action has a cost:  “There is no such thing as a free lunch” to an economist, it is really not the economic way of thinking.
§  Benefit/cost analysis is useful:  Every choice we make involves benefit/cost analysis either implicitly or explicitly; it is the primary tool of economic reasoning.
§  Incentives matter: Incentives motivate people to action.
§  Exchange benefits the traders: The Principle of Exchange states that two parties with equal information will voluntarily exchange only if they gain more than they give.
§  Markets work with competition, information, incentives, and property rights: “Market failures” usually occur when one of the four conditions does not exist. When they do exist, markets are efficient.
§  Skills and knowledge influence income: Applying the Principle of Exchange, employers will hire workers if the employers expect to gain more than they give.
§  Monetary and fiscal policies affect people’s choices.
§  Government policies have benefits and costs.
Software engineering: is concerned with developing and maintaining software systems that behave reliably and efficiently, are affordable to develop and maintain, and satisfy all the requirements that customers have defined for them. It can be divided into 10 sub disciplines as follow:
§  Software requirements
§  Software configuration management
§  Software design
§  Software engineering management
§  Software construction
§  Software engineering process
§  Software testing
§  Software engineering tools and methods
§  Software maintenance
§  Software quality
                 III.            Software engineering economics
From what precede, we see that the microeconomics branch of economics deals more with the types of decisions we need to make as software engineers or managers at each step of those sub-disciplines of software engineering in order to obtain an economically viable output or product. Clearly, we deal with limited resources. There is never enough time or money to cover all the good features we would like to put into our software products. Throughout the software life cycle, there are many decision situations involving limited resources in which software engineering economics techniques provide useful assistance. Taking the example of the following five (05) parameters of software production processes: t1= time spent in producing, t2=time spent in learning, t3=time spent in waiting, t4=time spent in getting instruction and t5= time spent in fixing produced materials or previous works. If in a firm we hire programmers with complementary capabilities, t1 will decrease sharply however hiring programmers with duplicate capabilities suddenly increases t3, t4 and t5. Therefore taking into account the effect of each action taken on these five parameters may allow a software firm to avoid the diseconomy of scale.
       Fig 1: Economy/Diseconomy of scale
  Fig 2: Basic production economy
                    As shown in [2], the opportunity to improve software project management decision making through improved software cost estimation, planning, data collection, and control brings us back full circle to the original objectives of software engineering economics: to provide a better quantitative understanding of how software people make decisions in resource-limited situations.
          Finally we can say the a  judicious use production economics techniques and principles in software engineering may improve the software development productivity, optimize decisions making and make informed tradeoffs of our investments in this ever growing and challenging field.
References:
[1] Kotler, P., Armstrong, G., Brown, L., and Adam, S. (2006) Marketing, 7th Ed. Pearson Education Australia/Prentice Hall.
[2] Barry W. Boehm. Software Engineering Economics. Prentice-Hall, Englewood Cliffs, NJ, 1981.

Tuesday, October 22, 2013

Activating flashback feature in Oracle 10g

Here are steps used to activate the flashback feature in oracle 10g.

1.Enable archivelog mode
2.Configure the flash recovery area
3. > shutdown immedaite;
4. > startup mount;
5. > alter database flashback on;
6. > alter database open;
7. > select flashback_on from v$database;
8. > alter database flashback off;

ORA-19804 and ORA-19809: Tricked

ORA-19804 and ORA-19809:  are the common errors encountered backing oracle database using RMAN.
The main cause is db_recovery_file_dest_size being exceeded. So we have to free up the db_recovery_file_dest.
We can increase the size of db_recovery_file_dest_size :

sql> ALTER SYSTEM SET DB_RECOVERY_FILE_DEST_SIZE = 4G SCOPE=BOTH SID='*';
otherwise we keep it as it is, and just free it.

Here are some steps to work around:

  1. sql> show parameter db_recovery;
  2. sql> select SPACE_USED,SPACE_LIMIT from  v$recovery_file_dest;
  3. rman> RMAN CROSSCHECK ARCHIVELOG ALL;
  4. rman> change CHANGE ARCHIVELOG ALL VALIDATE;
  5. rman> DELETE EXPIRED ARCHIVELOG ALL;
  6.  However if after running the previous you receive and unsatisfactory result stating that specification does not match any archived log in the repository. Then you have to blow it away with your following Russian made Anti-patriot Missile command.
  7.  rman> delete force archivelog until time 'sysdate -1'; 
  8. YES  Enter !
  9. Boooooooooommmmmmmmm
So that is it, just the summary to give you few hints. If you still have some problems don't hesitate to throw some comments.


Tuesday, October 8, 2013

ORA-12519: Solved

You are reading this post because you have come across  this error : ORA-12519, TNS:no appropriate service handler found.
 This problem is often due to the maximum number of  processes being exceeded. 
 In my case I had an excel file of around 1500 records that I wanted to read and insert into oracle using JDBC. 
Check your processes statistics:

show parameter processes;
        you may also run the followings for additional informations.
select count(*) from v$session;
select count(*) from v$process;
select * from v$resource_limit where resource_name='processes';
 Now lets us increase the max number of processes  to say 300;
alter system set processes=300 scope=spfile;
 Then shutdown now database
shutdown immediate;
Restart it
startup mount;
alter database archivelog;
alter database open;
Finally recheck
show paramter processes;
You may now run your program hopefully it will work.
This may not be the exact solution but at least, it is a way arounds.
Feel free to drop your comments;


 

Monday, October 7, 2013

So what is the version of your Oracle database ?

Oh yes, silly question but worth being asked. Maybe now your sqlplus is opened but you are trying to search through the oracle directory. Do you really need to look for this answer around ? No here is a small query to just type:

sql> select * from v$version;
 
simple isn't it.
 

Friday, October 4, 2013

Oracle backup and recovery : What you need to know

After a few years working as an Oracle DBA I feel excited today to share one of the most important fruit of my DBA experience with you : The Backup and Recovery.
Ask any oracle DBA about his daily life.
Ask him what are must critical things about DBA.
Ask him what is must common task he used to do.

A daily life of a DBA is all about fun, when the database is stable and running smoothly.

About the critical task of a DBA, installing the database form scratch to be used for production.  If you have setup one you will certainly feel what I mean...fun!!!

About the must important and common task done by a DBA: Backup and recovery. 
Luckily Oracle offer you many backup and recovery techniques to choose from.The head ache common first from choosing the right techniques that will not let you down when problems will come out. Boss Phone Call ... fun !!!
Here are a brief summary of some backup techniques:

  •     Export/Import - Exports are "logical" database backups in that they extract logical definitions and data from the database to a file. See the Import/ Export FAQ for more details.
  •     Cold or Off-line Backups - shut the database down and backup up ALL data, log, and control files.
  •     Hot or On-line Backups - If the database is available and in ARCHIVELOG mode, set the tablespaces into backup mode and backup their files. Also remember to backup the control files and archived redo log files.
  •    RMAN Backups - while the database is off-line or on-line, use the "rman" utility to backup the database. 
Among them the RMAN backup appears incontestably as the best option, it is the lastest and also highly recommended by Oracle.

Why should you consider RMAN instead of others ?

Some advantages of using RMAN:
  1.  Supports incremental backup strategies
  2. Keeps invenotory of taken backups
  3. RMAN automatically track database structure changes
  4. Provides easy, automated backup, restore and recovery operations
  5. RMAN can detect corrupted blocks
  6. RMAN on-line backups are not so heavy for the system as manual on-line backups
  7. Can seamlessly work with third party media managers:
  •  EMC NetWorker
  •  Tivoli Storage Manager
  •  Veritas NetBackup
Some disadvantages of using RMAN:
  1.    RMAN concepts and command syntax sometimes are not intuitive
  2.   Something new to learn
  3.  Fears of using a new tool...
I am stopping here for today, but on my next post I will try to discuss on how to easily perform the backup/recovery in few steps.