r/AskProgramming • u/AssistanceClean948 • Sep 18 '26
How good software should be developed?
Hi. Fist of all I want to emphasize that my question is not related to specific tech stack or language. I am fairly new to programming world and I know that good software at some point should have some sort of automation checks that whether new pushed code breaks something in the logic I previously built. As a reference I want to link my little C game engine project:
repository: https://github.com/ElsevarAsadov/C-Raycast
This is project is just a hobby project for me to learn Raycasting technique in graphics programming. Right now my project just works and I call a day for that. But let's pretend I am seriously build a game on top of that engine. How should I architect my project and in which order? Should I write my game as soon as possible to just work then write test automation and all CI/CD pipeline or doing parallel? How to architect project in such a way it's testable? Should I test almost every piece of logic inside the game and rendering? Those are all sorts of questions just boggles my mind. I'm trying to build my blog project and I want to build that professionally because I am serious about that and will use it in long-term.
3
u/LaughingIshikawa Sep 18 '26
I am a big fan of semantic compression as a development strategy / direction.
Implement the naive thing first, then iterative add features while trying to keep the overall "mental model" of the software as simple and straight forward as possible. If you need to, occasionally rework your code to be simpler to understand.
Don't plan out our architecture or abstractions ahead of time... That just locks you into extra constraints that have nothing to do with the actual end goal. Implement abstractions as they naturally arise from the code; never impose them on the code from the outside! (This is just semantically enlarging / obfuscating the code, making it harder to understand and reason about, which is the exact opposite of what you want.)
2
u/max123246 Sep 18 '26
So not everything needs robust testing. It's typically a tradeoff. I think the best way to think about it is to test interfaces, not implementation details. This requires thinking about the conceptual boundaries between your codebase and form APIs you think are unlikely to change. Those are the things you want to test because it's less likely the tests will need to change constantly and
2
u/egonosz Sep 18 '26 edited Sep 18 '26
Well testing is good, but I tell you now most games do not do unit testing. The games tend to change fast in production period if you have tests, you need to maintain them. For all the changes you make on game logic you need to fix up your tests too.
(And never pass a float by pointer that is cursed, it can prevent optimisation and really unusual to do.)
Edit: However for scenario tests, performance benchmarks are common. You can have scripted scenarios which would run, or let a game ai play as player. However in early stages it not worth the time.
2
u/[deleted] Sep 18 '26
When you find out the way hit me up please
1
u/PenGroundbreaking160 Sep 18 '26
One piece of advice that is kind of beside tech: figure out who the software/game is for. Do research and probe for what you need to do and be creative with that to balance it with your own vision.
But overall, validating your direction is really important, if you care about success.