<instructions>Your goal is to analyze the following comment and estimate how highly it will be upvoted by the Hacker News community.</instructions><comment><author>dgb23</author><text>Maybe you simply gravitated towards sensible ways of dealing with it?&lt;p&gt;There are quite a bunch of things that are _hard_ (IMO) and related to state management a non-exclusive list of examples:&lt;p&gt;- GUIs in general, the more interactive they are, the more state you need to manage.&lt;p&gt;- Caching (at any level) is a form of state. You need to be aware of how and when data changes and who changes it and which parts of the caching are affected, when you care about it etc.&lt;p&gt;- Memory and disk allocation are state. You need to be aware of what your resources are and when to free them up. You might use locks to make sure your data doesn&amp;#x27;t get corrupted. At a higher layer you might have authorization models to restrict access.&lt;p&gt;- TCP is state. What do you do when connections fail or get interrupted? Do you store&amp;#x2F;buffer messages to be processed at a later time? What does that mean for the receiver?&lt;p&gt;- SQL databases are stateful. Do you ever need to know what happened when? How do you restore previous state? How do you make that efficient? Are backups&amp;#x2F;snapshots good enough or can you leverage something more granular?</text><parent_chain><item><author>wruza</author><text>I’ve been a programmer all my life, got first sw job around 2000 in business-oriented area (consulting + programming + “ops”). Before that were 5-7 years of toy programming as a kid. I experimented with tech a lot, got into paradigms early and never restricted myself to a single language&amp;#x2F;env&amp;#x2F;os&amp;#x2F;hw. I haven’t created nothing big, stellar or rocket science, but a couple of my projects lived for 10-17 years and counting.&lt;p&gt;Mind you, this “state management” thing and the fuss around it, which pops up for last ten years more actively, was never a concern that I found particularly useful to have a name for. 20+ years of a mediocre career and I still don’t get it, neither why, nor what the problem is. Maybe that’s why it is mediocre? Living in a bs country doesn’t help either. Otoh, I can make things work and ship mvps next week once there’s a plan and determination. (No, it’s not PHP.)&lt;p&gt;I &lt;i&gt;believe&lt;/i&gt; that the fuss part comes from the fact that software becomes more and more low-level uncontrollably, so there’s a lot of self-imposed state that business isn’t even aware of and which becomes per-LoC routine that is easy to stumble upon but hard to document or explain to a person outside. State belongs to business and is not in your control, all other state is parasite. Mapping business state 1:1 in your program keeps everything simple to do, to change, to grow. It’s usually imperative, sometimes declarative (that’s where programming emerges) and never functional. Parasitic state’s place is under a rug. Library, syntactic sugar, framework, db&amp;#x2F;service, platform, whatever.&lt;p&gt;To conclude, well, I have nothing to say really. Still confusing.</text></item></parent_chain></comment><story><title>All programming philosophies are about state</title><url>https://www.worldofbs.com/minimize-state/</url></story>
<instructions>Your goal is to analyze the following comment and estimate how highly it will be upvoted by the Hacker News community.</instructions><comment><author>mjburgess</author><text>The text of a program does not show what is in memory, or what the devices attached to the machine are doing. You hope that if you run the program, in your head, you can reliably guess -- but often, you make mistakes.&lt;p&gt;Controlling &amp;quot;state&amp;quot; amounts to trying to force the world to match the text of your program as closely as possible, so you don&amp;#x27;t go wrong.</text><parent_chain><item><author>wruza</author><text>I’ve been a programmer all my life, got first sw job around 2000 in business-oriented area (consulting + programming + “ops”). Before that were 5-7 years of toy programming as a kid. I experimented with tech a lot, got into paradigms early and never restricted myself to a single language&amp;#x2F;env&amp;#x2F;os&amp;#x2F;hw. I haven’t created nothing big, stellar or rocket science, but a couple of my projects lived for 10-17 years and counting.&lt;p&gt;Mind you, this “state management” thing and the fuss around it, which pops up for last ten years more actively, was never a concern that I found particularly useful to have a name for. 20+ years of a mediocre career and I still don’t get it, neither why, nor what the problem is. Maybe that’s why it is mediocre? Living in a bs country doesn’t help either. Otoh, I can make things work and ship mvps next week once there’s a plan and determination. (No, it’s not PHP.)&lt;p&gt;I &lt;i&gt;believe&lt;/i&gt; that the fuss part comes from the fact that software becomes more and more low-level uncontrollably, so there’s a lot of self-imposed state that business isn’t even aware of and which becomes per-LoC routine that is easy to stumble upon but hard to document or explain to a person outside. State belongs to business and is not in your control, all other state is parasite. Mapping business state 1:1 in your program keeps everything simple to do, to change, to grow. It’s usually imperative, sometimes declarative (that’s where programming emerges) and never functional. Parasitic state’s place is under a rug. Library, syntactic sugar, framework, db&amp;#x2F;service, platform, whatever.&lt;p&gt;To conclude, well, I have nothing to say really. Still confusing.</text></item></parent_chain></comment><story><title>All programming philosophies are about state</title><url>https://www.worldofbs.com/minimize-state/</url></story>