Principles for C programming

Reading Time: 1 minute

A very interesting article about C Programming Principles.

Even if it does not say anything new and can be considering a “yet another good article about C programming”, I found it useful and therefore I am reporting it here.

CppCon 2015: Bjarne Stroustrup “Writing Good C++14”

Reading Time: 1 minute


This is a very good talk from Stroustrup about good rules to be followed when writing modern C++ applications.

The first 25 minutes are generic about teams coding guidelines which I personally believe apply to any programming language.

The rest of the video is very valuable, in particular about different approaches to avoid typical C++ problems. In particular I liked the way they handle owners pointers and avoidance of dangling pointers.



The love and hate for shared libraries

Reading Time: 2 minutes


Since yesterday I have been playing around on the WII controller integration on my PATRIA 3D engine.

This is required in order to have a fully working accelerometer support for our games testing since it is quite an effort to perform real testings on the smartphones especially when you are still in the middle of the caos of code development.

I have been trying the libwiimote on my ubuntu 64 bit but unfortunately, for some reasons, it does not look like the best solution for me (thought the library is well done). In fact it has a lot of sleep/wait time in the implementation which cause the frame reate of the game Fantasy Racing to drop to 15/18 FPS on my laptop. It looks like that, if no input is made on the device, the wiimote_update function freezes my process.

I have then decided to go for libwiiuse and I find it fantastic though I have not yet completed the integration.


How to compile

To cut a long story short, I have compiled the library, using the well done documentation, I have done all the required configuration steps in my eclipse environment but every time I have run a compiled program using the shared object library  I used to get this error message:

error while loading shared libraries: cannot open shared object file: No such file or directory

This problem has kiled me since I spent a lot of time looking for an explanation to the root causes of it.

After I while I thought…..holy crap Maurizio, can you be such a stupid? The new library is a shared library which links other shared libraries, let’s try to refresh the dynamic linker cache by running the command ldconfig


And….it actually solved it.

Lesson learnt, whenever you have problems linking shared libraries, always remember to update the linker cache!!!

Create a static Library from your .c source file

Reading Time: 1 minute

 I am preparing the code I have to use for the Global Game Jam 2013 which will occur next week end, 25-27 of January 2013.

The idea is to use my 3D Engine, PATRIA for the development of the game but I would like to avoid to share the last 2 years efforts with everyone in the world. This considering as well that PATRIA3D is not only the results of my efforts but the result of the efforts of all the team members of the Team Novasoft.


Considering that PATRIA is a modular system where each component of the engine has its own .c and .h, the best solution is to compile the .c files of the core engine which most probably won’t be altered during the JAM is static libraries.

In this way I will use just the .a (static library) and the header file .h

In order to do this operation, the following steps are required:


1. Compile the .c file you want to create the library

2. Once the file is compiled, you have the .o, the object file compiled by the GNU C Compiler.


3. Now, to create the static library, you need to use the ar command. Remember that a static library must start with the prefix lib and must end as ".a"


4. At this point you have your library. The best choice in my humble opinion is to copy it into the OS /usr/lib so that it will be usable at system level. Copy it over there.


5. Include the library into the Eclipse project



N.B. remember to remove in the eclipse library reference the lib and the extenstion!


Now you can build your project with your libraries and the code is safe!




Lenovo Thinkpad T410 and Ubuntu 12.10

Reading Time: 2 minutes

 Hi everybody.


Today I have upgraded my laptop, a Lenovo T410 mounting integrated intel graphics, to Ubuntu 12.10.

As soon as the OS started I started getting errors on the xorg server about the drivers installed. The only option was to start the PC in low resolution. In addition to that many other problems were there like support for external monitors and so on.

Checking the ubuntu unity support utility the "Unity 3D supported"  was reported as No and the overall system performances were very bad.

I have luckily solved the problem in very long manner and therefore I want to write here what I have done to solve my problems hoping to help anyone having the same isse.

To start with, the drivers installed by UBUNTU (the gallium one) are not the right one, they doe their job but don’t cover all the aspects of the system configuration.

To solve the issue I have done the following.


1. Install the required packages for the next steps:

Run in a terminal the following command:

sudo apt-get install build-essential libtool xutils-dev bison flex libx11-dev x11proto-gl-dev x11proto-dri2-dev libxext-dev libxdamage-dev libxdamage-dev libxfixes-dev libx11-xcb-dev libxcb-glx0-dev libxcb-dri2-0-dev libudev-dev libxcb-xfixes0-dev llvm-dev

This step is required in order to prepare the environment for the actual compile of the other components.


2. Go the intel OpenSource Technology website


3. In the download page, download the packages MESA, libdrm and xf86-video-intel – 2.20.12.

4. extract the content of the 3 files into separate directories.

5. Build and install of the libdrm package

sudo ./configure

sudo make

sudo make install


6. Build and install the video intel (the 3rd package you downloaded)

sudo ./configure

sudo make

sudo make install


7. Do the same for MESA (last one), it will take a very long time

sudo ./configure

sudo make

sudo make install



8. Restart your ubuntu machine. At this point, going into the system settings/details applet of your ubuntu client you will notice that ubuntu will use a new driver (and you should notice the new look and feel too!)

If everything is OK, you should have something like that:



 And, checking with the unity support check tool you should get this result:





Might you have still problems, please do not hesitate to contact me over email at mnovasoft _at_ gmail _dot_ com

Fantasy Racing: more than 100.000 downloads!

Reading Time: 1 minute

 I am very proud of the logical threshold we have exceed Today for Fantasy Racing on the android Market.


More than 100.000 downloads (102.000) have been done for our humble product, I am very proud of this achievement.


I am mostly proud of the success of the game, the feedback received from the people which have tried it and the number of daily games people do with out baby (about 40.000 per day).



Good work guys.





Fantasy Racing Hits 50.000 downloads!

Reading Time: 1 minute


 I am extremely happy to announce that Fantasy Racing hit the 50.000 downloads this morning.

I know it is nothing compared to other productions on mobile devices but I have to admit that I am very proud of this result achieved through very heavy efforts I have done.


Once again thank you all, thanks go to my family, to my brother and my friends Fabrizio and Massimo which enjoied me in this awesome adventure. Thanks guys!




An interesting Kickstarter project

Reading Time: 1 minute


Today a development team from the Indie Vault community reported their new project on Kickstarter site.

I find the project very interesting, very funny and very well done from all the point of views.

I think this is the way to promote your idea, whatever it represents, a game, an application or any other type of ideas in the IT world.

Well done guys, I whish you all the best!


Help these guys if you can guys, they actually deserve it: