Skip to content

Form-Employers
Form Employees - by value

Suppose you have to archive some documents in a public bureau, one for every person you serve.
You fill all data, assign an identifier, and collect papers together; all is ready to be filed.
Every time you need to see these documents, the identifier shall make you find them quickly.

We know archive can be a computer file: indeed the paper scheme is well represented by bureaucratic organizer softwares, among which the most important are database managers.

Independently by the way you adopt, this matter always belongs to data's and memory's representation and management.

Talking about programming we have now a basic but enough knowledge to realize a simple manager.
What we're going to realize is a collection of records, describing hypothetical employees with just three features: name, surname and ID number.
Only records to be archived: so array is perfect.
Let's see how to deal with it and its items: in this article data will be passed by value. ...continue reading "Array management by value"

Memory Representation Pointer
Memory Representation with Pointer

You're in troubles visiting an unknown city, having just discovered how unclear your map is.
Ask somebody the direction from where you're now, the Y position, to your X destination.
That's what you basically need.
More paths exist between Y and X, which can be fast but ugly, or long but panoramic: generally the way you reach X is not so important... and this is of worth for us too in our talk.
Indeed you only want to sign X and Y on your map.

Are you recognizing the web links surface behavior?
By starting from a web site you go to another one with a click, completely ignoring the path.
Classical example: from search engine results to a possible point of interest.

Yes, the point: you point your attention to it; the amount of solutions to get it is classifiable as pointer. ...continue reading "Pointers. Parents of web links"

Memory-representation
Memory representation with record

We commonly think to a record like something to be registered or annotated; musical, medical and data recording, and so on.
But structurally... what is a record?

Definition is so simple to result boring: a record is a structure (collection) of different nature data.

In the previous article we saw an important structure called array: a collection of homogeneous data.
An array can host only one kind of data per time: integer numbers or characters or arrays again...

Records offer one more degree of liberty: they can contain integers and chars and arrays... and records as well!

So a sport record is a possible collection of: first and last name (chars or strings), kind of sport (chars or strings) and the performance (typically a number).

Performance is what we commonly intend with sport record, but this is an example of metonymy (yes, we are poets too :)). ...continue reading "By coding a Record"

Memory-Representation
RAM Memory Representation

In prolog of the previous article we talked about the possibility to create more abstact levels of information once we're sure about simpler ones.
We'll touch with hands how to group variables into structures containing them.
To make things easier please refer to picture, where RAM memory scheme is represented in the simplest logical view.

Every colored box is a location where to put data and as well it has a label assigned by operating system on its startup: progressive numeration is enough for our goals.
It doesn't matter if first box matches the effective first memory location: here we just need to think these boxes contiguous.

What happens when a compiler meets a variable declaration? ...continue reading "Variables looping and grouping"

0-and-1
0 and 1 communicating

In a world of 0 and 1 bits the necessity to create a convention for communications rises up immediately.
They are the logical minimum set to create information (and the best one, as having been demonstrated), through possible variations between them. In absolute they're pure data.

Is it enough? certainly it isn't; we need at least a convention thanks to which creating an amount of interchangeable informations.

By basing on these last ones, we create again other more abstract new informations, and so on.

We're trying to summarize in few words a process that took many decades of years to assume a definitive common physiognomy, in the effort to bring computer science closer to human vision and vice versa: in a way you don't have to worry about what is happening under the hood... if you don't want!
But if you did? ...continue reading "Strange Types Circulating (in code)"