GUIDO BERTOLOTTI
  • Home
  • My résumé / CV
  • Electronics
  • Computer science
  • Telecommunications
  • Other interests
  • Contact me

Computer science

Here are some works of mine about Computer science and programming:


Contribution to the open source FidoCadJ project



FidoCadJ is an open source vector graphic editor for electronic schematics, PCB layouts, mechanical and generic drawings. It is written in Java and runs on MacOSX, Linux, Windows and Android.
It is the official drawing tool of ElectroYou and Matematicamente, the Italian social networks for electronics and mathematics.

I wrote instructions (on FidoCadJ's GitHub wiki and in my blog, in English and Italian) on how to manually trace and convert raster images (electronic schemes but not only) into FidoCadJ vector format. This method was appreciated by users which had been long waiting for a solution to this conversion problem of theirs.

Manually created vector format images are generally smaller than raster format ones, and can be easily modified and scaled to any dimension without losing resolution.

The articles with the instructions (in English and Italian) can be downloaded via the links below:
How_to_trace_images_with_FidoCadJ.pdf
File Size: 277 kb
File Type: pdf
Download File

Come_ricalcare_immagini_con_FidoCadJ.pdf
File Size: 278 kb
File Type: pdf
Download File

Raster picture and vectorized picture of scissors

Monkey problem solution (C++ multi-process coding example)

Monkey on rope
Clip art by DownloadCliparts.org
I recently wrote as an exercise a solution to a starvation-solving variant of Tanembaum's "African baboons" process concurrency and deadlock avoidance problem:

"A student majoring in anthropology and minoring in computer science has embarked on a research project to see if African baboons can be taught about deadlocks. He locates a deep canyon and fastens a rope across it, so the baboons can cross hand-over-hand. Several baboons can cross at the same time, provided that they are all going in the same direction. If eastward moving and westward moving baboons ever get onto the rope at the same time, a deadlock will result (the baboons will get stuck in the middle) because it is impossible for one baboon to climb over another one while suspended over the canyon. If a baboon wants to cross the canyon, it must check to see that no other baboon is currently crossing in the opposite direction. Write a program using semaphores that avoids deadlock. [...]"

I inserted the detailed problem variant description, my C++ code and a run example in this GitHub repository.

Some computer science related answers on the ElectroYou.it forum

   - Software trimmer to get long-term timer high accuracy
   - Proposal of an improvement of the "extended handlers" patterns for event-driven programming
   - Stack memory taken by recursive functions

   - XML payload ratio and alternative formats   
   - Suggestion of a hash table to implement a faster algorithm, and its complexity estimation
   - Hints on using (or not) malloc() and realloc() in C

   - PC backup & recovery hints

Visual C++ beta review

Microsoft Visual C++ 1.0 Integrated Development Environment Beta release review.

The article was published on year 1, n. 1 of "Micro&Soft" magazine (publisher: Tecniche Nuove) in April, 1993.
Visual C++ 1.0 screenshots
The expandable preview is available on the right.
The article's PDF is downloadable via the link below.
Recensione_Visual_C++.pdf
File Size: 1410 kb
File Type: pdf
Download File


Solar system orbits calculation and animation, numbers spelling utility

The first program calculates solar system orbits according to user-supplied data, then shows an animation of the celestial object orbiting around the Sun. It is mostly written in Basic, with some graphical parts in Z80 machine code.
Kepler's laws and orbit calculation
Kepler's laws and orbit calculation

The second program spells the input numbers in Italian and is entirely written in Basic.

Both programs run on a Sinclair ZX81 home computer, based on a 3.25 MHz Z80A microprocessor and equipped with a 16 kB RAM expansion.

The articles were published on year 2, n. 4 of "SuperSinc" magazine (publisher: J.soft, Gruppo Editoriale Jackson) in April, 1985.
Orbite_sistema_solare_e_Scrittura_numeri_in_italiano.pdf
File Size: 3046 kb
File Type: pdf
Download File


Numbers base conversion utility, 1 kB Bingo game

Picture
The first program converts numbers representations between any bases from 2 to 36. It requires a 16 kB RAM expansion.
The second program is the classical Bingo game. At each press of a button it extracts a number between 1 and 90 in random order. It shows the already extracted ones in an on-screen table. It can run with just 1 kilobyte of RAM, which is the computer base configuration.
Picture
Running program simulation
Both programs are written in Basic and run on a Sinclair ZX81 home computer.

The articles were published on year 2, n. 7 of "SuperSinc" magazine (publisher: J.soft, Gruppo Editoriale Jackson) in July/August, 1985.
Conversione_basi_numeriche_e_Tombola_1kB.pdf
File Size: 1808 kb
File Type: pdf
Download File

Powered by Create your own unique website with customizable templates.
  • Home
  • My résumé / CV
  • Electronics
  • Computer science
  • Telecommunications
  • Other interests
  • Contact me