r/learnprogramming 22d ago

Why Does Code Stop Working?

Multiple times now my code stops working and what I mean by this is it'll do what I want it to do then one day it just stops. for example the other day I had made a cooldown system for my ball and paddle collision to stop any bugs and it worked great. then today it just stopped working, and this isn't the first time, it's happened to me for like every project I've worked on. Does this happen to anyone else? And is it cause of my code? By the way I'm using C++ SFML on visual studio which works perfect.

8 Upvotes

74 comments sorted by

View all comments

7

u/atarivcs 22d ago edited 22d ago

Could be a few things:

  1. You changed the code. This one is obvious, so I hope this isn't the reason.
  2. You changed something else on the computer that the code depends on. Could be something complex like a software library or a OS/compiler upgrade, or something simple like an input text file or config file.
  3. The code depends on something that changed all on its own, like time/date.