Saturday, May 3, 2014

What are the 3 Goals of Software Development ?

3 Primary Goals of Software Development-

During Software development of new project or extending existing project , 3 primary goals to be considered are -to make the software faster, better, cheaper.
These 3 goals viz faster, better, cheaper  correspond to Time, Features and Money respectively.

Faster - The software has to meet a market window. Competitive organizations set that time
Better - The software has to serve the requirements of the process it supports.
Cheaper - The software has to be less expensive to produce and maintain

Interestingly, All three of these goals, compete against each other.

Understanding how these three goals compete against each other -
The three goals create a negative perpetual cycle. More features means the project takes more time. More time means the project costs more money. More money means that the client wants more features. The cycle has now come full circle and repeats itself.

How to break the negative perpetual cycle  due to Faster,Better, Cheaper goals-

1) Scoping the project 

First Simple Solution to the above problem is Scoping the project. The project can be delivered on time and with lower cost by limiting the entire set of features to three main features.Now this might seem like a scary idea at first but consider this-Most software projects throw every idea possible into the mix because "it must have this feature". Of course this results in a huge feature set and the project is doomed before it has even begun. A wiser way to determine the features required is to only pick the ones that will help achieve the primary purpose of the software. This should be no more than three main features.
Benefits of Scoping the project or lowering expectations (by limiting feature set) -
By reducing your feature set and shipping on time you won't have wasted years developing a product then finding out you got it wrong or all those "must have features" are not even used. This will save you money, time and your sanity.You will also know exactly what you must do next for version 2 of your product. Again you pick the 2-3 most important features and ship them. Then you will receive more information and a positive feedback cycle is starting to occur.

2) Software Reuse

Software reuse can cut software development time and costs.
Software reuse is defined as the process of creating software systems from predefined software components.
Software specifications, designs, tests cases, data, prototypes, plans, documentation, frameworks, and templates are all candidates for reuse.

The major advantages for software reuse are to:

  1. Increase software productivity.
  2. Shorten software development time.
  3. Improve software system interoperability.
  4. Develop software with fewer people.
  5. Move personnel more easily from project to project.
  6. Reduce software development and maintenance costs.
  7. Produce more standardized software.
  8. Produce better quality software and provide a powerful competitive advantage.

Friday, October 25, 2013

Windows 7 - How to always permanently run application as administrator ?

If you do not want to have to continually choose run as administrator every time you want to use an application (say eclipse) then can set this option as permanent.
You must follow these steps to make this work. 
  1. Go to the directory where executable which runs the application is located.
  2. Right click on the executable which is used  to launch the application. e.g.  eclipse.exe
  3. Choose Properties from the menu.
  4. Go to the Compatibility tab.
  5. In the Privilege Level check the check box indicating Run this program as an administrator
          

Tuesday, August 20, 2013

What is 'java.lang.OutOfMemoryError: GC overhead limit exceeded'

The Garbage Collector in JVM throws this exception when too much time is spent in garbage collection for too little return. e.g. 98% of CPU time is spent on GC and less than 2% of heap is recovered.


This effectively means that your program stops doing any progress and is busy running only the garbage collection at all time.
To prevent your application from consuming up CPU time without getting anything done, the JVM throws thisError so that you have a chance of diagnosing the problem.

Solution
  1. Increase the heap size using -Xmx option, for example -Xmx1g.
  2. Enable the concurrent low pause collector -XX:+UseConcMarkSweepGC.
  3. Reuse existing objects when possible to save some memory.
If necessary, the limit check can be disabled by adding the option -XX:-UseGCOverheadLimit to the command line although this is not advised.
For more details please check this article

Wednesday, February 20, 2013

"Not enough storage is available to process this command" while using jmap or jstack


Issue :
Sometimes while using a tools like jmap,jstack on a running java process, we are not able to connect to the java process and below error is observed.

Not enough storage is available to process this command 
[Note : Here PID  is the process id of java process whose dump is to be captured.]


Error Message

Solution :

Scenario 1)
If the service is running as a specific user, you need connect by logging into the same session and then try to run jmap or jstack etc.

Scenario 2)
If you are using Remote Desktop, you need to connect using "mstsc /admin" (used to be /console) and try to run jmap or jstack again

Scenario 3) 
Target Java process is running as System Process (in case of Windows)
In case if the target java process is running as System Process, we need to use PsExec utility.
Steps to use PsExec utility :
1) Download the PsTools from here.
2) Unzip the PsTools and copy the PsExec.exe
3) Execute the original command using PsExec utility with -s
    Syntax :
  PsExec -s {original_command}

    Example :
    PsExec -s jmap -dump:format=b,file=c:/heapdump.bin 4708    
Example - Executing  jmap using psexec.

Friday, October 14, 2011

HP-UX -How to find out the Processor Architecture( RISC or IA)

If you want to make out whether the HP-UX OS is running on PA(i.e. PA-RISC) or IA h/w without bothering about the specifics of the model of the processor, you can find that from the kernel itself :
file /stand/vmunix

e.g. :

bash-3.2# file /stand/vmunix

/stand/vmunix: ELF-64 executable object file - PA-RISC 2.0 (LP64)

Note:
Recent versions support the HP 9000 series of computer systems, based on the PA-RISC processor architecture, and HP Integrity systems, based on Intel's Itanium architecture

Saturday, April 2, 2011

Elephant Thinking


My grandmother had a green parrot.
This parrot used to speak like humans whatever was taught to him.
My grandmother had taught him to speak words like vithal,vithal.
Humans have this unique mechanism of sound box
and vocal chords which allows them to speak.Every time a person speaks, air enters and makes the vocal
chords to vibrate which produces a sound and this gives the ability to speak.
Now if someone would have told this parrot "Humans can speak because they have this inbuilt mechanism,
and there is no such mechanism in parrots and hence the parrot cannot speak", the parrot would have not been
able to speak.
The very thought to immitate human voice was the motivating force for the parrot.
Simmilarly an elephant when it is young is tied to a tree with a very strong chain.
The elephant tries lot to break the chain but is not successful and finally gives up.
When the elephant grows old and is tied to the tree with a chain, the elephant does not attempt to break
the chain since it knows that when it was small, it was not able to break the chain.But the elephant does not realize
that the chain which seemes to be really strong when it was young is not as much strong now when it has grown old
and can be easily broken. This is known as elephant thinking.The elephant is constrained by preconcived notions that
it had developed when it was young.
Conditions do differ with space and time.System undergoes changes with space and time.

Friday, October 22, 2010

How to generate a threaddump for java based process

Windows
Can be captured in following ways

1) Using Ctrl-Break :
The Java application that you want to produce a thread dump for must be running / started in a command console. When you want to produce a thread dump press Ctrl-Break.

2) Using jstack :
step 1) Use jps command to find out the process id (pid) of the java process for which the thread dump is to be generated.
eg output for jps
C:\>jps
3316 Deadlock
3476 Jps
step 2) Use jstack command to along with the process id to generate the threaddump.
syntax : jstack
eg: c:/>jstack 3316

Linux or Solaris

1)Using Ctrl-\:
If the JVM is running in a console then simply press Ctrl-\.

2)Sending QUIT signal:
If the JVM is running in the background then send it the QUIT signal:

kill -QUIT process_id

There process_id is the process number of the running Java process. The thread dump will be sent to wherever standard out is redirected too.

You can generally get the process numbers of of all running Java processes with the command:

ps axf | grep java

3) Using jstack:
Steps as mentioned above in the Windows Section