Void Pointers

The concept of pointers in C Programming is one of the most powerful and very error prone concept. In C Programming a pointer is said to be a special type of variable which points to a particular address in memory. Memory address is actually a particular byte in memory. 0th address refers to 0th byte.

The programming languages provides for a concept of Data Type. there are types like Integers, Characters, Floating Point Numbers, Arrays and lot more. In C language the data types differ in way the data is stored. character type store data in 1 byte. Integers store data in 2 bytes. So if a pointer pointing to character type can accurately determine value of character type data only. If by some error this character pointer is made to point to different type of data(for example integers), it will read the data incorrectly.

The validity of pointer is based on where it is pointing and type of data it is pointing to. So while declaring pointers, its referencing types was supposed to be mentioned. i.e. a pointer pointing character type must be declared as character pointer, pointer to integer as integer point and so on. But this strict scheme of declaring type of pointer is okay if the programs which used pointers behaved properly with addresses allocated. But there were special cases of memory being requested from OS for program’s secret purposes. Such special cases required a generic pointer type. A generic pointer which can point to any thing, also meaning the pointer which can write to and read from its address any data type. This concept is akin to purchasing a piece of land without stating purpose and using it for our own ends. This generic pointer is called as “Void Pointer”.

Learning

The learning process of Humans and Machines depend on filling up some data in some section of memory, and that data being read, interpreted and processed by central computer i.e. brain. All the data we learn are normally tagged with its higher level concept. Ex:- If I learn that behavior of people is based on belief they have, I remember this learning as something pertaining to human behavior and attach a mental tag of “human behavior” to this. This concept of tagging helps us to retrieve things from our memory with much ease. Google also uses similar concept to display the SERPs.

But the data we get from environment or others do not come with the requisite tags. A manipulative person can attach wrong tag to data so that any actions based on it are misled. We can correct the mistakes of wrong tagging only when we know that particular thing is wrong. But the primary question is “how to determine particular thing is Right or Wrong?”

  1. is the right wrong decision based on credibility of person/data source giving me the info?
  2. is it based on gut feeling I am having regarding it?
  3. is it based on exclusive info which I only have?
  4. is it based on wide public opinion?

This quest for data credibility brings us to world which would give a lot of practical insight into “How Google works”. The above questions are from similar set of questions determine how Google differentiates between credible knowledge and spam.  The underlying technology which Google uses to scan the web and we use to understand the world can be called as learning / crawling. In these processes our brain declares a void pointer to empty section of brain and stores the content it gets. If there is pre existing data with similar tag the both old and new data are compared and either one of them is stored.

Having a void pointer mean the person first accepts everything and then evaluates it. We call such people as open minded,  as they accept everyone for their words, but If such people cannot come in contact with more people then their head is filled mostly with lies given to them by outsiders. In case of void pointers the data is tagged based on whatever tag is given. But with alerted mind the data is also given an extra tag called “may be biased”. This extra tag makes that person to seek the unbiased truth. At the end of the day they key takeaway from learning process is “Truth”. In order to find it, one has to search a wast ocean of data, developing knowledge continuously and applying the knowledge in searching. If knowledge doesn’t expand then truth is always “Mission Impossible”.

You are reading an Article by Harsha Ankola, originally posted on Harsha’s Tech Space. If you have enjoyed this post, be sure to follow Harsha on Twitter, Facebook and Google+.