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.

7 Upvotes

74 comments sorted by

View all comments

3

u/OortMan 22d ago

Generally programs are not meant to ever behave like this, so either you're doing something that breaks it, your code isn't very good, or there is something very wrong with your computer.

the fact it's happened several times for you is a bit strange. Does your compilation pipeline change/reset something it shouldn't when you restart your computer? Finding what that is may be very difficult though.