Popular Posts

Tuesday, July 21, 2009

Project Management-The Product

  • Before a project can be planned,product objectives and scope sholu be established,alternative solutions should be considered and technical and management constraints sholud be identified.
  • Without this information ,it is impossible to define reasonable estimates of the cost,an effective assessment of risk, a realistic breakdown of project tasks, or a manageable project schedule that provides a meaningful indication of progress.
  • The S/W(software) developer and customer must meet to define product objectives and scope. In many cases, this activity begins as part of the system engineering or business process engineering and continues as the first step in s/w requirements engineering.
  • Objectives identify the overall goals for the product without considering how there goals will be achieved.Scope identifies the primary data,functions and behaviors that characterize the product and attempt to bound there characteristics in a quantitative manner.

Monday, July 20, 2009

Project Management-People

  • The people factor is so important that the s/w (software) engineering institute has developed a people management capability materity model (PM-CMM),"to enhance the readiness of s/w organizations to undertake increasingly complex applications by helping to attract,grow,motivate,deploy and retain the talent needed to improve their s/w development capability.
  • The people management maternity model defines the following key practice area for management,training,selection,performance development,organization and work design, and team/culture development.
  • Organizations that achieve high levels of maturity in the people management area have a higher likehood of implementing effective s/w engineering practise.
  • The PM-CMM is a model that guides organization in the creation of a mature s/w process.

Sunday, July 19, 2009

Project Management

  • The Management spectrum
the effective s/w(software) project management focuses on the four P's : people,project,product,process.The order is not arbitary.


Friday, July 17, 2009

programme. to display decimal , octal and hexa decimal values

void main()
{
int x=6,y=13;
clrscr();
printf("\n Decimal : x=%d y=%d",x,y);
printf("\t hexadecimal : x=%x y=%X",x,y);

printf("\n octal : x=%o y=%o",x,y);
getch();
}

first programme in C

#include
#include <conio.h>

void main()
{
clrscr();
printf("HI! am learning C - language");
printf("\n");
getch();
}

Thursday, July 16, 2009

Common Binary Data Operations with C..

Common Binary Data Operations with C

Now that you know how to compile and link your programs, let's dive into the magic world of bitwise operations. At first these might seem really confusing, but you will notice that you have in fact seen all of them during Computer Engineering.

Shift Operations

It might seem a bit more cryptic than the first example, but don't be frightened. What you see is the usual stdio.h which is included at the beginning and then a function called getbinarystring. Skip it over and move on to the main function, which introduces two consecutive loops right after a block that handles command line processing.

The binary shift operator in C is a double-less-than or a double-greater-than character. Less-than means shifting to the left and greater-than the opposite. In effect, binary shifting is actually multiplying or dividing by powers of two. So, if you wish to divide a value by four, you shift the bits to the right by two:

value = value >> 2;

... Or if you want to multiply by 8:

value = value <<>

Of course, you need to know that overflows are not prohibited and you might send your MSB:s to bit heaven!

Bitwise AND

You can use two notations to perform bitwise and-operations:

result = op1 & op2;

.. or ..

result &= op;

which is equal to

result = result & op;

Experiment with the code in file and.c.

Bitwise OR


The notation of OR is similar to AND in C, but the operator character is a pipe character:

result = op1 | op2;

Again, there is a code snippet in file or.c that should clarify the usage of OR operator.

Bitwise XOR


Have a look at file xor.c and see that the XOR operation is nothing special, except for the operator character in C, a caret: ^.

Structures in C

Structure

You may recall the object oriented approach to programming. Forget data concealing, protection, member functions and inheritance and you end up with C structures.

No, seriously, C structures are a nifty way to avoid redundance in data structures. Consider the example in file structs.c. The source introduces two structures:

Plain structure definition:

struct cat {
int age;
char *name;
} mycat;

This is the way to introduce a single structure reference, in this case it is called mycat. You can reference this structure via the mycat-variable from anywhare within this source file.

Structure type definition:

typedef struct {
int age;
char *kind;
} alldogs;

In this case alldogs refers to a type definition, which can be used to declare variables later on. It works just like a normal variable declaration:

alldogs mydogs[3];

To access the variables within structures, there are two ways, depending on the type of variable which is used to refer to the structure data:

Immediate reference:

alldogs mydogs;
mydogs.age = 15;
mydogs.kind = "keeshond";

The simplest way to use structures is to reference them directly and you have access to the member variables with the '.'-operator. You can create arrays of structure variables, but using the pointer arithmetic method to access array elements should be avoided. There is a substantial amount of hidden magic behind memory allocation and data alignment, and the best way to avoid trouble is to not do anything exotic with structure arrays.

Pointer to a structure:

alldogs *mydogs;
/* allocate memory for the mydogs-structure before doing the following! Use
* malloc()!
*/
mydogs->age = 15;
mydogs->kind = "rottweiler";

The mydogs-variable is a pointer and we have to use the "arrow" style notation to reference the structure members. You could also use this kind of style: (* mydogs).age = 15;

Arrays in C

Arrays

Arrays in C are a very powerful way to access data, because they are contiguous memory sequences and they allow random access to their contents. What's more, array variables are actually pointers to the beginning of the contiguous memory block. There are two ways to access an array depicted in file arrays.c:

Indexed reference with brackets: a[cnt] = 'a' + cnt;

This is the common way to access an array, and it is by far the most intuitive way. The variable cnt simply denotes the index of an array element in array a.

Pointer arithmetics: *(a + cnt) = 'b' + cnt;

Because the arrays in C are always contiguous, it is possible to access their elements by incrementing the array pointer by the index value and referring to the element.

You can define an array with a constant size using the bracket notation: int a[15];. Some C compilers are also happy with the following notation: int *a = {1, 2, 3, 0};. Strings in C are char arrays and practically all compilers can deal with the following type of declaration: char *name = "Copernicus";, which creates a char array of length 11, last element being a NULL character. ALL STRINGS IN C MUST END IN A NULL CHARACTER!

You can use multi-dimensional arrays in C. Arrays are indexed in row-major style and you have to be careful about how your program walks through the indexes.

int a[20][4];

That code block defines an 20-row array of four-number arrays. Using pointer arithmetic, you can access row 3, column 2 like this:

int row = 3;
int col = 2;
int val = *(a + ((row * 4) + col));

In some programs the command line is processed by looking at the parameters defined in the main function. First parameter contains the number of arguments that have been passed to the program and as we take two values from the command line, it should be equal or higher than two. The second parameter seems a bit complicated, but it really isn't. As you should already know, one can access data arrays in C in many ways. The double asterisk ('**') tells you and the compiler that the variable in question must be a pointer to another pointer. Simple, huh? :) So, when it is later referred to with brackets or double brackets, the compiler knows that it is legal to do so.

Pointer

Pointers



A pointer is a variable that contains the address of another variable (either numeric or string, or a function) instead of a directly accessible value.

When declaring a pointer, you must include the type of the variable whose address this pointer will contain, so that the compiler knows how many bytes to read/write when it will access the value that this variable contains. To differentiate pointers from other variable types, a pointer is declared using an asterisk (*).

As an example, int *ptr declares a pointer to an integer. That is, ptr will hold the address of a variable of type integer. Since the compiler was told that the variable whose address ptr holds is an integer, it knows that it should read/write 4 bytes (the size of an integer is platform dependent, but it's usually 4 bytes.)

Knowing the length of the actual value this variable uses also allows you to move back and forth through a multi-byte value such as a string using the ++ and -- quantifiers:

char *mystr="My string";

printf("First character: %c\n",*mystr); //Alternatively, you can use *mystr++ to combine two lines in one
mystr++;
printf("Second character: %c\n",*mystr);

To initialize a pointer, you need to extract the address of a variable, using the & sign:

int *ptr=NULL; //It's a good habit to use the NULL macro to initialize a pointer right away
int someint;
ptr = &someint; //Now, ptr contains the address where someint lives in RAM, not its actual value

To access the value that the variable points to, you must dereference the pointer, that is, tell the compiler that you wish to go to the address that the pointer holds, and read/write the value that this memory cell holds. Here's an example:

someint = 16;
printf("Reading the value of someint directly: %d\n",someint);
printf("Reading the value of someint by dereferencing ptr: %d\n",*ptr);

Now, let's change the content of the variable by dereferencing ptr:

*ptr = 32; //Equivalent to someint=32;
printf("Reading the value of someint directly: %d\n",someint);
printf("Reading the value of someint by dereferenceing ptr: %d\n",*ptr);

The name of an array is actually the address of the first element:

int myarray[]={1,2,3};
int *arrptr;
arrptr = myarray; //You can also use &myarray[0];

printf("First element: %d\n",*arrptr);
printf("First element: %d\n",arrptr[0]);

A string is actually an array of characters that ends with a NUL character, ie. ASCII 0, is a pointer to the first character, and when a string is passed to a function, the function will work on the actual string since it receives the address of the array instead of a copy made when calling the function:

void myfunc(char arr[])
{
arr[0]='X';
}

int main(void)
{
char myarr[]="This is a string"; //could also use char *myarr="This is a string";
printf("Original string:%s\n",myarr);

myfunc(myarr);

printf("After myfunc: %s\n",myarr);
return 0;
}

Important: when using a char pointer to create a string, the string is read-only, ie. if you need to change the contents of the string, you should use char [] instead:

int main(void)
{
//BAD---------
char *myarr="This is a string";
//GPF because the string is immutable
*myarr='X';

//Good----------
char myarr[]="This is a string";
myarr[0]='X';
return 0;
}

Since a string created with the "char *" format is immutable, you could add the "const" prefix to get a compile-time error in case you changed the contents of this string:

//Without "const", the compiler may not say anything
const char *mystr="Before";

//no run-time crash, since compiler chocked on this
*mystr='X';

Note that it's OK to reuse the pointer to set it to a new string, though, since it's the memory space used to store the string itself that is immutable, not the pointer:

const char *mystr="Before";

mystr="After";
puts(mystr);

I read that GCC accepts the "-fwritable-strings" switch to allow a pointed string to be writable, but this is likely to be non-portable across compilers. A better alternative is to use malloc() and free() to allocate memory dynamically:

#define STR "This is a string"

void myfunc(char *arr)
{
//alternative: arr[0]='X';
*arr='X';
}

int main(void)
{
//Add 1 for terminating \0; calloc() sets string to \0, while malloc() doesn't
char *str = (char*) calloc(strlen(STR) + 1,sizeof(char));

strncpy(str,STR,strlen(STR));

printf("Original string:%s\n",str);
myfunc(str);
printf("After myfunc: %s\n",str);
free(str);
str = NULL; //Good practice

return 0;
}

why should we learn C?

You should learn C because:

* C is simple.
* There are only 32 keywords so C is very easy to master. Keywords are words that have special meaning in C language.
* C programs run faster than programs written in most other languages.
* C enables easy communication with computer hardware making it easy to write system programs such as compilers and interpreters.



Getting equipped to write C programs

The tools required for C programming are simple. All you need are:

1. A text editor: A text editor allows you to type in, modify, and save your program. Notepad in Windows, Edit in DOS, and vi and Emacs in Unix/Linux are some popular text editors.

2. A C compiler: A compiler is a program that converts the high-level language (HLL) program (referred to as source code) into machine language (object code). Borland C, GCC, and Microsoft C are some of the popular compilers.

Where C is useful?

C’s ability to communicate directly with hardware makes it a powerful choice for system programmers. In fact, popular operating systems such as Unix and Linux are written entirely in C. Additionally, even compilers and interpreters for other languages such as FORTRAN, Pascal, and BASIC are written in C. However, C’s scope is not just limited to developing system programs. It is also used to develop any kind of application, including complex business ones. The following is a partial list of areas where C language is used:

  • Embedded Systems
  • Systems Programming
  • Artificial Intelligence
  • Industrial Automation
  • Computer Graphics
  • Space Research
  • Image Processing
  • Game Programming

Introduction to turbo C

The C (Beginners All Purpose Symbolic Instruction Code) language has been around since early days of computing and its principles are familiar to most of the people with programming experience. C language was used by programmers more than in the history of computing. C was also the most popular language because of its simplicity in understanding the code. However, the advent of the windows environment provided a new challenge to C programmers.

Turbo C, as a language, is a powerful development environment. A wide range of application ,ranging from simple stand-done application to powerful internet based applications ,can be developed in turbo C.



Monday, April 13, 2009

ASP


ASP:-ACTIVE SERVER PAGE

  1. In the begining,there was HTML,HTML admirably serves the purpose of displaying information as long as you aren't too picky about exactly how that information looks.
  2. ASP is an attempt to merge the advantage of HTML with the need to provide up-to-date,individualized information & to make users active participants in the web rather than passive viewers.ASP takes the web which is a relatively passive medium like T.V. & provides the capability to make it an active medium like other computer application.
  3. At the same time,ASP gives developers a way to deliver such application in a centralized manner.Rather than installing a program on each user's machine,ASP lets people run program on a remote server.
  4. Finally there's a huge difference between providing content to users & obtaining information from users.HTML lets users send data to the server using forms.
HOW TO USE ASP:-


  • Simple Text Processing
  1. User ASP script for simple text processing.This is ASP's strong point,as it usually involve a series of simple decisions about how to format response.Avoid using ASP script for complex string manipulations.
  • Complex Decision Making
  1. Use ASP for complex decision making computers are extremely fast at making simple decision & ASP scripts although they are not the fastest language around are more than adequate for making such decisions.when you combine decision-making with text processing , you have the buiding blocks to create personalised interactive applications.
  • Intermediary Between Browser & COM compnents
  1. As your decision-making & data processing requirements grow,you can purchase or build COM components.AS you increase your use of server based COM component ASP becomes the intermediary between the browser & there back end components.
How Not to Use ASP :-
  • ASP is an interpreted ,not a compiled language therefore it's inherently slower than other, complied solution.
  • ASP doesn't have strong variable typing.All variables are variant are convenient but are also larger & slower than typed variables.
  • ASP must insert includes files each time they're used.
  • ASP to eats all objets variables as late bound objects.It must appear information about the objects for each property or method access, which slows down the response.
ASP Provides:-
  • A way to save individualized data for each user.
  • Access to file system.
  • Access to database.
  • A means to launch & control any component object model.
  • ASP address all of there concerns & that's one of the reason why the topic is so large HTML authors can use ASP as a decision maker.
Benefits of ASP:-
  • ASP is Language-Independent:-
  1. The ASP engine doesnt depend on a single language.In fact, the ASP engine doesn't actually execute the code you write.ASP is actually execute the code you write .ASP is a language-Independent scripting host.
  • ASP is For Non-Programmers:-
  1. Programmers used machine language ,fliping switches to manipulate bits & bytes assembly language changed all that assembler was the glue that let non-programmers manipulate the bits & bytes easily....

AJAX

AJAX :- Asynchronous JavaScript & XML.

  1. AJAX is not programing language,but a technique for creating better, faster & more interaction web application.
  2. with AJAX, your Java script can communicate directly with the server , using the java script XML HTTP request object.With this object, your javascript can trade data with a web server without reloading the page.
  3. The AJAX techniques makes internet application smaller, faster, & more user friendly.
  4. AJAX is a browser technology independent of web server software.
  5. AJAX is based on the following web standards:-
  • Java script
  • XML
  • HTML
  • CSS

AJAX- The HTTP Request object:-( The on ready state change property)
  • After a request to the server, we need a function that can receive the data that is returned by the server.
  • The on ready state change property stores your function that will process the response from a server.This is not a method the function is stored in the property to be called automatically.
The ready state property:-
  • The ready state property holds the status of the server's response.Each time the ready state change the on ready state change function will be executed.
Web application have many benefits over desktop applications;they can reach a larger audience, easier to developer.
With AJAX internet application can be made richer & more user friendly..