Tuesday, June 30, 2009

How To Create A Random Message Generator Using PHP

Objective: User gets a new message every time; he refreshes the page.

Requirements: Adobe Dreamweaver or any Open Source Editor like Amaya, Aptana Studio etc.

Code:

php

$thoughts = "WORK IS WORSHIP

AS YOU SOW, SO YOU REAP

BARKING DOG SELDOM BITE

KNOWLEDGE IS POWER

SHOOT FOR THE MOON, YOU WILL REACH THE STARS

AN APPLE A DAY KEEPS THE DOCTOR AWAY

I AM WHAT, I AM

TO ERR IS HUMAN, TO FORGIVE IS DIVINE

WHEN THE NIGHT IS DARKEST, THE DAWN IS NEAREST

THEY CONQUER WHO BELIEVE THEY CAN

NOTHING IS IMPOSSIBLE

TIME & TIDE WAITS FOR NONE

THINK BEFORE YOU LEAP";

$thoughts = explode("\n", $thoughts);

$chosen = $thoughts[mt_rand(0, count($thoughts)-1)];

print $chosen;

?>

Software Requirements Specification (SRS) Template

Article taken from SachinKRaj's Blog

What is SRS?
Software Requirements Specification(SRS) is basically an organization’s understanding (in writing) of a customer or potential client’s system requirements and dependencies at a particular point of time (usually) prior to any actual design or development work. It’s a two-way insurance policy that assures that both the client and the organization understand each other’s requirements from every perspective at a given point of time.

Benefits of a Good SRS

  • Establish the basis for agreement between the customers and the suppliers on what the software product is to do.
  • Reduce the development effort.
  • Provide a basis for estimating costs and schedules.
  • Provide a baseline for validation and verification.
  • Serve as a basis for enhancement.

What should the SRS address to?

  1. Functionality: What is the software supposed to do?
  2. External Interfaces: How does the software interact with people, the system’s hardware, other hardware, and other software?
  3. Performance: What is the speed, availability, response time, recovery time of various software functions, etc.?
  4. Attributes: What are the portability, correctness, maintainability, security, etc. considerations?
  5. Design constraints imposed on an implementation. Are there any required standards in effect, implementation language, policies for database integrity, resource limits, operating environment(s) etc.?

What are the characteristics of a good SRS?

A SRS should be:

a) Correct
b) Unambiguous
c) Complete
d) Consistent
e) Ranked for importance and/or stability
f) Verifiable
g) Modifiable
h) Traceable

Difference between System Specification and Software Specification:

Very often we find that companies don't understand the difference between System Specification and Software Specification. Important issues are not defined up front and Mechanical, Electronic and Software designers do not really know what their requirements are.

The following is a high level list of requirements that should be addressed in a System Specification:

  • Define the functions of the system
  • Define the Hardware/Software Functional Partitioning
  • Define the Performance Specification
  • Define the Hardware/Software Performance Partitioning
  • Define Safety Requirements
  • Define the User Interface (A good user’s manual is often an overlooked part of the System specification. Many of our customers haven’t even considered that this is the right time to write the user’s manual)
  • Provide Installation Drawings/Instructions
  • Provide Interface Control Drawings (ICD’s, External I/O)

Here is the SRS Template by Karl Weigers

Download SRS Template (Source - www.processimpact.com)

Update: