Select Page
A common question from students and faculty when they begin working with programming assignments is “what is a helper?” This is an important question, especially for those who do not work with programming often or have a background in it.

Programming assignments often contain multiple functions which interact in some way. This interaction occurs through a series of instructions which are sent by the computer to the instruction program or “dispatcher” program, which in turn executes the instructions. The “helpers” are data structures which are used to organize the execution of this type of information.

Each programming assignment will typically include several different types of data structures, such as one to one data, shared data, pointers, and iterators. The helper helps to “sniff out” the problem, while also building a base for the different pieces of information that will be passed to the handler.

The following description of what is a helper is not meant to be complete. It is merely an attempt to describe this software structure in its simplest form. At the end of this description there will be another question to ask.

When programmers define a piece of information to be represented as a pointer, what is a helper is needed to determine what pointer to pass it to. A pointer is a “coalescing” reference. This means that once the pointer is encountered, it will return that information. The only purpose of the pointer is to transfer the data, which it points to.

What is a helper then is needed to “sniff out” this information and to provide the handler with the location of the information within the interpreter. There is no reason to make assumptions about where the information resides, since it can be located anywhere. In the memory it may not be available, but the handler can search for it, based on some rules, as it is created by the programmer.

For example, let’s say that the programmer has defined a pointer called, “foo”. There is a function, called “setfoo”, defined, which creates this pointer and passes it to the handler. The handler will then call the function and will be able to alter this pointer, until it has deleted it from memory.

The function, “setfoo”, can be constructed using some simple code and will not use any additional information. If this pointer was not defined, the memory access function, “deletefoo”, would have to look at the details of the pointer, which is inside the compiler. The compiler is one of the “helper” structures.

A compiler uses information from the compiler and other sources to construct the final output. This information is stored in a “compiler dependency graph”. The result of a function being compiled into the output of the compiler is one of the “helper” structures.

An example of a memory access helper is the iterator. An iterator is simply a pointer which can be used to look up another pointer.

The memory access helper can be thought of as an interface for a data structure. In this case the data structure is an array, which is written as a pointer, so that it can be searched for.

So, the next time you need to ask yourself, “what is a helper” remember that this type of helper can be found in a variety of structures, such as the compiler dependency graph. It is this graph, that allow the compiler to build the final code, and it is this final code, which you will eventually be executing.

Share This