{"id":3733,"date":"2022-04-17T12:37:58","date_gmt":"2022-04-17T16:37:58","guid":{"rendered":"https:\/\/shiningrocksoftware.com\/?p=3733"},"modified":"2022-04-17T12:37:58","modified_gmt":"2022-04-17T16:37:58","slug":"code-rot","status":"publish","type":"post","link":"https:\/\/shiningrocksoftware.com\/2022-04-17-code-rot\/","title":{"rendered":"Code Rot"},"content":{"rendered":"

Code rot is really a thing. If you've got some source code and you leave it along for too long, it stops working properly. It doesn't matter that the source hasn't actually changed. Really!<\/p>\n

Maybe you've made major changes to some parts of your code, not realizing that other parts were dependent on it. Maybe you're calling that code in a new way or with new parameters. Maybe you changed a compiler option that causes problems. It could be almost anything. Either way when you start using that code again, it takes some work to get it running properly again.<\/p>\n

It happened to me this week. I'm on the cusp of changing how some things are rendered in game, and so I need to add a few features to the graphics part of my engine. At the moment I've got two ways to output graphics. I like coding with DirectX, but I also support OpenGL for multi-platform purposes. So when I make changes to the really low level rendering code, I have to write it for each API.<\/p>\n

I haven't actually used the OpenGL output in a while. And why would I? The graphics code has been stable for a long time, what I expect to get rendered is what I see, and there's so many other things to work on that how pixels end up on the screen is far and away. There's pretty much no reason for me to go into settings and change it. But I switched to the OpenGL output to start work on my new features and... ugh, the output is ugly.<\/p>\n

So I start fixing things. And fixing one thing shows another problem, and so on, and so on... This is how the latter part of my week went.<\/p>\n