Warning: The following post may only interest my fellow nerds.Â And even that is debatable.Â 🙂
I have dabbled in C/C++ over the many, manyÂ years of my programming tenure.Â Almost 20 years ago, at the age of 16,Â I tried my hand at Turbo C++ 3.0 by Borland.Â Â The low level nature of the language, and need for meticulous memory management, were a barrier to my fledgling skills and as a result I got frustrated.Â I continued programming with QBasic for DOS instead.
About a decade ago I tried in earnest to learn C++Â again along with DirectX.Â Self instruction did not last long.Â Soon after that IÂ then took a certificate program at a local university for Object-Oriented Programming in C++.Â By then I was understanding the syntax and the commands.Â Yet still, it didn’t really stick with me.Â I just didn’t enjoy the language very much and I couldn’t “just write code” whenever I felt like it.Â Each line was a tentative save & compile session, ending withÂ a review of whatever compiler warnings or errors I had just produced.Â Not fun.
I found Darkbasic Professional a few years later and I loved it.Â It had everything I needed, such as a simple BASIC syntax with an API geared towards making 3D games.Â I often wonder, if I had stuck with C/C++ would I have grown to enjoy it along with my expertise?Â I’ll never know the answer to that because I quickly abandoned any C/C++ efforts and stuck with DBPro.
As the previous post stated, over the last few years I have had a heck of a time with random crashes and other suchÂ anomalies that seemed to be out of my control.Â Over the past year that ended when I decided to stop playing victim, get the source of the Newton physics wrapper DLL, and start looking into updating it to a later version of Newton that had lots of bug fixes in it.Â I wasn’t sure if any of them would fix my random crashes but it was worth a try.
After a month or two of fighting with Visual C++ 6.0 (a very dated version) and learning about compiling DLLs I got the Newton physics wrapper updated just enough so it was functional.Â I didn’t include some new commands, nor did I update the documentation or demos for the wrapper.Â This was a custom version just for me to use with in my big project.Â It still crashed once in a while, but not as often.
A few months ago I decided that enough time had passed and I should finish up all the new commands for the wrapper, update the documentation and demos, and ship out the new Newton physics wrapper for my fellow DBPro users.Â I dove back into C++ and worked out the changes necessary.Â While updating and testing the demos I noticed that I could repeat the crash I encountered all these years in one of them.Â After debugging the DBPro code, and the wrapper source itself, I was able to spot the bug and fix it!
It felt really good taking care of a bug that has plagued me for years, and caused untold amounts of grief and frustration.Â Â I still don’t enjoy C/C++ but I can’t say any longer that it has never given me any joy.
With the spectres of failure cast into the abyss, I can now forge ahead in my long journeyÂ to completeÂ the marble game.