Why Linklist?

July 17, 2010

Linked lists are used to store collections of data. A collection of data can be stored in array. However, an array is a sequential structure meaning that it is a group of memory elements located in contiguous locations (located next to one another in a group). You need to know how many elements there will be and you need to allocate a block of memory for them.

When you don’t know how many elements there will be, and if elements need to be inserted and deleted frequently, it is better to use a linked list. This is because each element for a linked list is created as needed and can be stored anywhere in the free memory space – the elements in the list do not have to be stored in contiguous locations.

Each element in a linked list is referred to as a node. In a simple singly linked list, each element has two fields:

Data member – contains the data (in our implementation, this is called datum)
Link member – contains the pointer to the next node (in our implementation, this is called next)


Bitwise Operator

June 18, 2010

Real world example using bitwise operator

IP Address. . . . . . . . . . . . ..: 192.168.3.2
Subnet Mask . . . . . . . . . . . : 255.255.254.0

192.168.3.2 == 11000000 10101000 00000011 00000010
255.255.254 == 11111111 11111111 11111110 00000000

Network ID = IP Address & Subnet Mask
= 11000000 10101000 00000010 00000000
= 192.168.2.0


iof-edit

June 4, 2010

variable presentation of function iof_edit

click on image


Pointer

June 1, 2010

A pointer is a variable which contains the address in memory of another variable. We can have a pointer to any variable type.

When a pointer is declared it does not point anywhere. You must set it to point somewhere before you use it.


SVN vs VSS

May 19, 2010

I have worked with used Microsoft Visual Sourcesafe and now in my Project. One thing i noticed though is that teammates really have to communicate. Although we are just two in the team, in order to prevent the tedious conflict resolutions, we needed to tell the other which part are we revising/coding.

Unlike in VSS, a user checking out a file is warned when others have it checked out (VSS has allow multiple checkouts configuration which is off by default), so if one’s changes is not a priority, he can wait for the other user to finish his changes before applying his own. I couldn’t find this feature on our current setup which i think is a very useful notification.

As i’ve said, if you have multiple checkouts allowed, you can ignore the warning and proceed with your changes. The last man to check in will do the conflict resolution (although i admit, vss conflict resolver sucks).