I saw a lot of code during my career. Some of it was useful, a lot was crappy, very little was brilliant. And after a while, I started to collect the bad stuff to have a laugh at it.
So please enjoy my worst-code-ever collection:
A boolean with exceptions:
How shall we deal with it, when there is not file?
I am still remembering this one!
An unoptimized array
When I started to work on C++ with dynamic allocations I needed a way to add new items to my “array”. So my solutions looked like …
As a developer, there are a lot of things you can try to do. New languages, new technologies, new ideas for your famous new side-project and so on. And special creative people have a lot of ideas every day and are motivated to work on them.
And so it happens really often that some developers ( for instance: me ) are starting a lot of side-projects … which is good … but none of these projects will get finished … this is not so good.
So what is the trick to get things done? If you are searching in Google…
I am working on the Asset-Importer-Lib since 2006. At first, we were three guys who wanted to share their file-loaders in one library with others. If you have ever tried to import any kind of 3Dfile–format you know how much work, frustration, and pain this will cause. A lot of hacks and special implementations for special use-cases are part of most of the formats I worked with. A lot of great developers helped us by writing importers, their knowledge, and bugfixes. So the code-base has grown over the years. So did the tech-debt’s. …
My first C++-code I wrote was a finite-element-solver ( in short FE ) for my master-thesis. The task was complex: implement a non-linear algorithm to calculate the maximum possible load for user-defined 2D-steal structures by using the plastical capacity of steal-beams. You can use this algorithm to design much more filigree steel-structures than using only the elastic capacity. This helps a lot to save steel and money.
The task in short:
If you are working as a professional software-developer you will have to deal with a lot of code. Normally this code was not written by you, it was written by someone else. Even if you wrote the code some months ago: reading you old code can be the same as reading code from a different person. And mostly you have to work with old code likefix bugs or improve some older feature. And it can be a painful experience for you.
When I started my career as a professional software developer in 2003 my first task was to improve a…
In this blog-post I want to explain a simple strategy how to optimize your performance when you want to render a 3d-model imported by the Asset-Importer-Lib ( see https://assimp.org/ ).
When you have imported your asset by using the Asset-Importer-Lib the data-structure stored in the plain c-struct aiScene contains different data:
Have you ever used the assert macro in c or c++? If not, you should try it out!
It is an easy tool for debugging: You can add checks in your code if your application is in a dedicated state. When this is not the case it will stop your application but only when you build it in debug mode. In release-mode the tests will be ignored.
Depending on your platform this can vary a little bit. …
Imagine the following situation: you are starting a new job, you are looking forward for a bright future in this new company. Of course you are planning to use the newest technologies and frameworks, you will invent new way how to design the world etc. . Because you know development, you know how to build things, you know what users wants.