I've been trying to get a grip on the difference between operational and conceptual variables in my programming journey. From what I gather, operational variables are the ones actually stored and changed in memory by the program, while conceptual variables are more abstract. The problem I face is figuring out which ones to use when I'm coding. I often end up defining the wrong ones or adding unnecessary variables. Do you have any tips or rules of thumb that help you identify which variables should be stored in memory? I'd really appreciate any guidance you have!
1 Answer
It sounds like you're dealing with some confusion around those terms, which is understandable. Generally, in programming, variables are indeed all about the data you use and manipulate. Perhaps think of your conceptual variables as those that don't need to be stored long-term, like flags that determine state. Operational variables, on the other hand, should be ones that affect the state of your application and need to be tracked. I’d suggest focusing on your program’s needs first and then decide from there. A bit of intuition comes with experience, so don't be discouraged!

That's a great way to break it down! It's definitely a process figuring out what needs to stay in memory versus what doesn't.