An example of mutual recursion using C


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: even INPUT: n – a natural number. OUTPUT: true if n is even; false otherwise...

Contributing on Arora browser: QuickView mode


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


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


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


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


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


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


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

About Author


Dr. Daniel Graziotin is a senior researcher (Akademischer Rat) at the University of Stuttgart, Germany. His research interests include human, behavioral, and psychological aspects of empirical software engineering, studies of science, and open science. He is associate editor at the Journal of Open Research Software and academic editor at the Research Ideas and Outcomes (RIO) journal. Daniel was awarded an Alexander von Humboldt Fellowship for postdoctoral researchers in 2017, the European Design Award (bronze) in 2016, and the Data Journalism Award in 2015. He received his Ph.D. in computer science at the Free University of Bozen-Bolzano, Italy.