Ramblings of Daniel Graziotin

Tagc

An example of mutual recursion using C

A

The first lecture of DSA was already interesting for me, I learned something about “Mutual Recursion” (when two recursive procedures call each other). The pseudo-code example was about checking if a number is either even or odd. Given that 0 is even N is even if n-1 is odd N is odd if n-1 is even And the algorithm: Shell even INPUT: n – a natural number. OUTPUT: true if n is even; false otherwise...

Contributing on Arora browser: QuickView mode

C

As I announced in the previous post, for the Software Process Management course we have to choose a medium/large opensource project, add a feature and enhance another feature. I decided to perform this project alone and to enforce my C++ knowledge by choosing the Arora project. Arora is a lightweight cross-platform web browser that runs on Linux, embedded Linux, FreeBSD, Mac OS X, Windows, Haiku...

Convert a QIcon (or just a QImage) to base64 and QString

C

I found difficult to find somewhere a method to convert a QIcon object to a QString to be displayed in base64. I needed it for implementing a nice feature for QuickView mode in Arora. I wanted to display in the HTML template the icon (logo.icon) of each domain. Therefore, I needed the QIcon to be converted to a QString containing the base64 encoding of the image. Moreover, the distribution of the...

A Generic Quicksort Implementation in C

A

As assignment for Data Structures and Algorithms course, we had to work with a modified version of the quicksort algorithm. It came obvious that for modifying a qsort you need to implement it It is difficult to find a clear quicksort algorithm implemented, so I wrote it. Here is the generic C implementation of the Quicksort Algorithm, which sorts an array in place, following the Divide And...

Object Oriented Memory Management

O

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...

Reference vs. Pointer

R

In Software Engineering Project course we need to learn some C++ to develop the project. A question that some programmers have when passing from Java to C++ (like me) is “Which are the differences between pointers and references?“. You can find a lot of answers around developers forum, but I summarized them in the following table. Glad if you found it useful! Reference Pointer is an object...

A simple, tiny, Unix Shell written in C language, opensource

A

BD-shell is a project I started about a month ago, which aims to implement a tiny, simple, clean unix shell written in C language. It’s an academic project. The Operating Systems Course at my University requires this project as part of the assesment.I decided to publish the source code and to release it under the GPL, for two reasons: Free software is better! Others can learn something from what...

Hash Maps with linear probing and separate chaining

H

Time for two new C programs! At the DSA course I learned something about Hash Tables and collision resolutions. I just implemented insert/search/print operations. The first source code is an implementation of a Hash Map with open addressing (linear probing) as collision resolution method. The following are the interesting functions of the program. As always, take a look at the source code for...

Ramblings of Daniel Graziotin

About Author

dgraziotin

Dr. Daniel Graziotin received his PhD in computer science, software engineering at the Free University of Bozen-Bolzano, Italy. His research interests include human aspects in empirical software engineering with psychological measurements, Web engineering, and open science. He researches, publishes, and reviews for venues in software engineering, human-computer interaction, and psychology. Daniel is the founder of the psychoempirical software engineering discipline and guidelines. He is associate editor at the Journal of Open Research Software, academic editor at the Research Ideas and Outcomes (RIO) journal, and academic editor at the Open Communications in Computer Science journal. He is the local coordinator of the Italian Open science local group for the Open Knowledge Foundation. He is a member of ACM, SIGSOFT, and IEEE.

News