Archive

Posts Tagged ‘Unibz’

Regolare il minimo del computer

April 17th, 2008 bodom_lx 7 comments

Conversazione su msn tra me e un’amica che usa il pc solo per scrivere documenti e archiviare foto (parole sue :D ). Assolutamente fantastica!

15:27:18 Valeria: DANIEL AIUTO
15:27:18 Daniel: (Risposta automatica)Ciao, sono in pomodoro, scrivi pure, entro massimo 25 minuti risponderò. Se non sai cosa voglia dire, visita il sito http://www.tecnicadelpomodoro.it e informati, magari torna utile anche a te!
15:27:24 Valeria: NN MI SCARICA AZERUS
15:27:32 Valeria: *AZUREUS
15:27:34 Valeria: xk?!?!?!?!?!

15:27:57 Daniel: non ti scarica AUNUS oppure ACENTUM?
15:28:13 Daniel: proprio AZERUS scarica?
15:28:31 Valeria: sto cercando di installarlo
15:28:35 Valeria: ma nn me lo installa
15:28:45 Valeria: THE BUNDLED JRE IS CORRUPTED
15:28:48 Valeria: K CAZZO E’!?!?!?

15:29:20 Daniel: ti dice che la tua connessione ha dei problemi di criptatura,e molto probabilmente è perchè la telecom ti tiene sotto controllo :S
15:29:39 Valeria: COSA!??!?!?!
15:29:40 Daniel: dovresti regolare il minimo dalla centralina di carburazione del router.o del modem
15:29:43 Valeria: O GESU CRISTO
15:29:46 Valeria: STAI SKERZANDO?
15:29:50 Valeria: cmq io ho infostrada
15:29:59 Valeria: come faccio a regolarlo?
15:30:00 Valeria: oddio

15:30:47 Daniel: va beh,il tuo provider insomma..beh di solito,almeno nei computer vecchi,la centralina di carburazione è sotto la sedia,prova ad alzarti e guardare se puoi infilarci un cacciavite
15:31:06 Valeria: ho un portatile..
15:31:09 Valeria: asus…
15:31:11 Valeria: nuovo…
15:31:20 Valeria: da 3 giorni
15:31:31 Valeria: nn quello k hai visto in unibiblio

15:31:32 Daniel: allora è sotto al portatile!alzalo subito
15:31:40 Valeria: cosa devo fare?!!?
15:31:50 Daniel: alzarlo,il portatile.abbassarlo,il minimo
15:32:38 Valeria: ??????? EEEEH
15:32:44 Valeria: MA DOVE?

15:32:50 Daniel: ALZA IL PORTATILE
15:32:53 Daniel: sotto cosa c’è?
15:32:57 Valeria: la batteria
15:33:05 Daniel: ma come,ce l’hai staccata dal portatile???
15:33:17 Valeria: NO è SOTTO OVVIAMENTE
15:33:28 Daniel: ma sotto al portatile che cosa c’è?
15:33:38 Valeria: il tavolo!!!!!!!!!!!! k domande fai
15:33:48 Daniel: aaaah ma allora è tutto a posto,devi solo scaricarlo di nuovo
15:33:54 Valeria: AMMAZZATIIIIIIIIIII
15:33:58 Daniel: ahahahahahhaah
15:34:00 Valeria: IO K PENSAVO MALISSIMO
15:34:05 Valeria: OOOOOOOOOOOOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOOOOOOOOOOOO

15:34:09 Daniel: ahhahahahahahahahhhahahahahhahahahah
ahahhahahahhaahahahahahhahahahahahahahahaaha
15:34:12 Valeria: hahahahha
15:34:13 Valeria: hahahaha
15:34:17 Valeria: hahahaha bella cmq, bella

Grazie Valli per aver alzato di 1000 punti il troppo basso umore degli studenti di Informatica dell’Unibz per questo pomeriggio <3
Ti vogliamo come mascotte di facoltà

Related posts

Categories: Misc Tags: , , , , , , , , , ,

Object Oriented Memory Management

March 19th, 2008 bodom_lx No comments

Major Update on 10th April 2009, inclusion of C++ programming language!
Updated on 18th April 2008, a complete example on stack and heap
Updated on 15th April 2008, new contents and new layout!
Updated on 6th April 2008, new contents!

The paper you can download from here is about a model for memory management during the execution of programs written in Java and C++.

It started on March, 2008 as a summary of the lecture notes of both the “Programming Project” and
“Software Engineering Project” courses held by professors of the CASE (Center for Applied Software Engineering) of the Free University of Bolzano – Bozen.

The first versions of this publication were only about Java memory management.
Subsequent revisions added information found on other sources. Unfortunately, the author forgot to
reference the sources on the document.

On March, 2009 the author began to add the information about C++ programming language. More
information from other sources were added, including their attribution.

The biggest source of this document is still the set of presentations of CASE.
The code snippets and their corresponding stack/heap diagrams are copied in full from those of the
slides.

The next major revision will contain original images (not belonging to CASE slides), as well as other code
snippets that I could find more clear than those of CASE.

If you find that this document contains information taken from one of your publications, please
contact the author, that is willing to either delete them from this document or to add an attribution to
your work.

Download the PDF of the summary

Table of Contents:

  • The model
  • Code load and execution
  • Activation Record (AR)
  • Contents of the Activation Record
  • Abbreviations for
  • Declaration vs. Definition
  • The scope of a variable
  • Extent of a Variable
  • Blocks
  • Scope Activation Record (SAR)
  • Example on SAR
  • Role of SLs
  • Dynamic Memory Allocation And Handling
  • Dynamic Vs. Static memory allocation
  • Dynamic Memory Scope and Extent
  • Accessing dynamic memory
  • Classes
  • Objects
  • Object instantiation
  • Objects in Memory (Java)
  • Objects in Memory (C++)
  • Memory Management issues (Java)
  • Memory Management issues (C++)
  • Methods
  • Methods (Java)
  • Methods (C++)
  • Attributes
  • The null value (Java)
  • The NULL value (C++)
  • Parameter
  • Parameter Passing (Java)
  • Example of parameters passing (Java)
  • Example of parameters passing (Java), continued
  • Parameter Passing (C++)
  • Example of parameters passing by value (C++)
  • Example of parameters passing by reference (C++)
  • Pointers vs. Parameters (C++)
  • Previous example using pointers (C++)
  • Constructor
  • Inline initialization
  • A constructor’s call (Java)
  • Class attributes
  • Example of class attributes (Jav)
  • Example of class attributes (C++)
  • Class Method
  • Example of Stack/Heap Diagrams in Java
  • Code
  • Stack Diagram
  • Heap Diagram
  • Memory portions assigned to a program (code area, heap / dynamic memory area), execution stack
  • How code is loaded in Java
  • The Activation Record (AR) and function calls
  • Abbrevations (AR, RV, RA, SP, N/E, @, ??, arb)
  • Examples on method calls and activation records usage
  • Declaraion vs. Definition of a variable, the scope of a variable, blocks
  • Scope Activation Record (SAR), Static Link (SL), the role of SL
  • The extent/lifetime of a variable
  • Dynamic memory allocation and handling
  • Dynamic vs. Static memory allocation
  • Dynamic memory scope and extent
  • Accessing dynamic memory
  • Classes and Objects in detail, object instantiation
  • Memory Management issues
  • Objects vs. Variables (definitions)
  • Methods of Objects
  • Class Attributes
  • The null value
  • Parameters (formal, actual), parameters passing (by reference, by value)
  • Constructors and Inline Initialization
  • Constructor’s call
  • Class attributes (static variables)
  • Class methods (static methods)
  • Complete Example of Stack/Heap Diagrams

Everything is integrated with simple examples.

Download the PDF of the summary

Related posts

Me and a boring lecture

March 19th, 2008 bodom_lx No comments

And THIS is what happens if you try to imprison and to teach a Computer Science student:

Daniel Graziotin bored during a lecture at LUB/FUB

Yep, my happy face simply says:”Look such an idiot, professor! I’m so boooooreeeed”

Related posts

Categories: Misc, Unibz Tags: , , , , , , ,

Two IT guys and DSA assignments

March 16th, 2008 bodom_lx No comments

This is what happens if you give to two IT students a stressful assignment of “Data Structures
and Algorithms”, 48 hours of their meaningful life, the loss of a saturday night, and the 6th
floor of the most recent building of the Free University of Bolzano:

IT Guys habitat in unibz

..they begin to behave like real IT guys..and to build their ideal working habitat..

Habitat of two IT guys Data Structures and Algorithms Assignment DSA

..and to worship fake idols..

Forno Damiani Free University Bolzano

Related posts

Sorting array elements with C language

February 23rd, 2008 bodom_lx 3 comments

UPDATE 17:19: it seems that the program I implemented today uses a kind of Bubble Sort algorithm, give it a try, it’s quite interesting!

After 3 long days studying C, I think I’ve assimilated a good knowledge base for the incoming semester.
So there is a tiny C program that sorts the elements of a given integer array, using pointers:

Download the source code (well commented)

#include <stdio.h>
void sortArray(int *firstElement, int *lastElement);
void swapArrayElements(int *firstElement, int *secondElement);
void printArray(int array[], int arraySize);

void sortArray(int *firstElement, int *lastElement){
        int *currentElement = firstElement;
        while (firstElement != lastElement){
                while(currentElement != lastElement){
                        if(*currentElement < *firstElement){
                                swapArrayElements(currentElement,firstElement);
                        }
                        currentElement++;
                }
                firstElement++;
                currentElement = firstElement;
        }
}

void swapArrayElements(int *firstElement, int *secondElement){
        int tmp;
        tmp = *firstElement;
        *firstElement = *secondElement;
        *secondElement = tmp;
}

void printArray(int array[], int arraySize){
        int counter = 0;
        while(counter<arraySize){
                printf("%d\n",array[counter]);
                counter++;
        }
}

int main (int argc, char *argv[]){
        int array[] = {2929393,1,23239,-66,15,4,3,0,112,45,3,1000,19};
        int arraySize = sizeof(array)/sizeof(array[0]);
        int *firstElement = &array[0];
        int *lastElement = firstElement + arraySize;
        printf("————————————————-\n");
        printf("Elements of the array:\n");
        printf("————————————————-\n");
        printArray(array,arraySize);
        printf("————————————————-\n");
        sortArray(firstElement,lastElement);
        printf("Elements sorted:\n");
        printf("————————————————-\n");
        printArray(array,arraySize);
        printf("————————————————-\n");
}

 

A better program should ask the user to input the array elements, and a better algorithm should not scan every array element n times, where n is the number of the elements.
But I wrote it just for fun and for learning C pointers. I will learn to do better in the Data Structures and Algorithms course in the next semester ;)

Related posts

Un messaggio da quelliDiDesign?

February 10th, 2008 bodom_lx 25 comments

Farsi le passeggiate nell’habitat di quelliDiDesign può davvero trasformarsi in una piacevole sorpresa!
Quella che a prima vista sembrava una semplice mostra di bizarri aggeggi creati magari durante dei laboratori si è rivelata una vera e propria esposizione di lavori per un esame di facoltà, da DIECI crediti *_*
Qui il link al pdf che presenta l’esame.
I lavori presentati variavano dalla bicicletta – carriola a tre ruote (o quattro? non ricordo) correlata da filmato dei nostri cari colleghi photoshopposi che ci giravano in un boschetto, al cubo di vetro rivestito di alluminio che dimostra che il sole effettivamente scalda le superfici, al kit per vomitare quando si è ubriachi.
Tutte opere serissime e che evidenziano l’ormai ben recepito rapporto bellezza/utilità radicato nelle menti dei designers.
Ma il lavoro, la sublime opera titanica che ha maggiormente colpito i freddi circuiti di noi informatici è stata la tuta “Nerd”, creata per chi passa la maggior parte del suo tempo davanti a un pc (noi).
Ecco la foto:
Unibz facoltà di design progetto x-treme tuta per nerd

A dir poco fantastica, permette a noi informatici di mangiare e bere i nostri cibi tipici (secondo l’autore RedBull e orsetti gommosi) senza doverci alzare dal pc!
Ovviamente per i più ignoranti era presente una spiegazione dell’opera:

X-treme designers università bolzano tuta nerds spiegazioni

Ora la grande questione sorge spontanea..quelliDiDesign:

  • Stanno proponendo una pacifica convivenza con un dono sincero, bizzarro e ilarico
  • Si dichiarano vinti e si prostrano ai nostri piedi con un dono che, secondo loro, dovrebbe placare la nostra ira funesta
  • Ci pigliano per il culo a loro volta? :D

Related posts

Categories: Unibz Tags: , , , , , , , , , ,