The state tag has no wiki summary.
0
votes
1answer
155 views
State design pattern: best implementation for my case?
Me and a mate have a discussion about what would be the best way to implement the pattern state for managing several screens for an application we are developing.
We have a ScreenManager (I guess the ...
1
vote
3answers
207 views
“state” or “status”? When should a variable name contain the word “state”, and when should a variable name instead contain the word “status”? [closed]
Reading code and discussions pertaining to code, I often see the words "state" and "status" used interchangeably, but the following tendencies seem to exist:
When a variable holds a value intended ...
14
votes
2answers
326 views
Side effect-free interface on top of a stateful library
In an interview with John Hughes where he talks about Erlang and Haskell, he has the following to say about using stateful libraries in Erlang:
If I want to use a stateful library, I usually build ...
1
vote
1answer
140 views
How to test issues in a local development environment that can only be introduced by clustering in production?
We recently clustered an application, and it came to light that because of how we're doing SSL offloading via the load balancer in production it didn't work right. I had to mimic this functionality on ...
3
votes
3answers
134 views
Throwing exception from a property when my object state is invalid [duplicate]
I am aware that for the general case, the answer to "should I throw an exception from a property" is "generally don't, but in some special circumstances it is OK to do so". There is a Microsoft ...
7
votes
2answers
558 views
Can *any* program task be expressed without state?
This is a theoretical question, but after many years of programming in what I now realize is "normal" imperative technique, using C++ mainly, I've discovered this other world of functional ...
2
votes
1answer
113 views
State pattern long state class names
I am using state pattern on 28 states in my application. The states are for membership cards that has 7 major states, there are 4 boolean attributes for the membership card that actually affects the ...
0
votes
0answers
33 views
How to replicate state update to all the nodes in middle-ware cluster?
I am developing a middle-ware components that receives a stream of self-contained events. If event corresponds to a business rule a notification is generated. A system outgrew vertical scaling and it ...
0
votes
2answers
126 views
Memento with optional state?
EDIT:
As pointed out by Steve Evers and pdr, I am not correctly implementing the Memento pattern, my design is actually State pattern.
Menu Program
I built a console-based menu program with multiple ...
0
votes
1answer
321 views
Java: How to manage UDP client-server state
I am trying to write a Java application that works similar to MapReduce. There is a server and several workers. Workers may come and go as they please and the membership to the group has a soft-state. ...
6
votes
4answers
709 views
Functional Programming: right ideas about concurrency and state?
FP proponents have claimed that concurrency is easy because their paradigm avoids mutable state. I don't get it.
Imagine we're creating a multiplayer dungeon crawl (a roguelike) using FP where we ...
0
votes
1answer
251 views
How to implement session state in a backend web application?
When using a non-MVC service-oriented/Interactor pattern approach to decoupled system architecture, how is session state implemented?
I've been thinking of building the frontend of an application ...
3
votes
4answers
174 views
In Scheme, what is formally a program's state?
I think i've understood more or less what a parsed Scheme program looks like (a binary tree with atomic values on the leaves, if i have understood correctly). Can anybody please define to me, or give ...
4
votes
2answers
266 views
What is the preferred way of communicating between applications on the same system?
I'm designing a system that is built on several small applications written in python, some of these will be services and others will be programs that only run during special situations. What I need to ...
3
votes
1answer
348 views
script engine with no global environment (java)
I am curious about how global variables are handled by script engines. I am looking for a script engine that does not preserve the state of global variables upon invocation. Are there such engines out ...
2
votes
1answer
184 views
Validation and Error Generation when using the Data Mapper Pattern
I am working on saving state of an object to a database using the data mapper pattern, but I am looking for suggestions/guidance on the validation and error message generation step (step 4 below). ...
8
votes
7answers
219 views
How does a “Variables introduce state”?
I was reading the "C++ Coding Standards" and this line was there:
Variables introduce state, and you should have to deal with as little state as possible, with lifetimes as short as possible.
...
2
votes
2answers
276 views
I don't understand the definition of side effects [duplicate]
Possible Duplicate:
What is a “side effect?”
I don't understand the wikipedia article on Side Effects:
In computer science, a function or expression is said to have a side effect if, in ...
-5
votes
2answers
429 views
Is it possible to implement a completely-stateless multiplayer game?
I'm facing a challenge understanding how to program a web version of a card game that is completely stateless.
I create my object graph when the game begins and distribute cards to PlayerA and ...
4
votes
3answers
396 views
Clojure state and persistence
I'm learning Clojure to see if it's something I can leverage at my current job, and more importantly, how I can convince my bosses that Clojure has a 'killer feature' over java that makes it worth the ...
-1
votes
1answer
123 views
Are there any valid ways of eliminating/reducing state?
For definitions and examples of "state", see: http://en.wikipedia.org/wiki/Program_state , http://en.wikipedia.org/wiki/Finite_state_machine , http://en.wikipedia.org/wiki/State_diagram
A diagram ...
0
votes
1answer
267 views
Implementing a “state-machine” logic for methods required by an object in C++
What I have: 1 hypothetical object/class + other classes and related methods that gives me functionality.
What I want:
linking this object to 0 to N methods in realtime on request when an event is ...
7
votes
4answers
319 views
Definition of “state”
What is a good way to define "state", as in state variable or state machine, to a new (previously non) programmer? What are some good ways to explain why this concept is useful for writing software? ...
4
votes
2answers
231 views
Good ways to jump to a particular state in a yielding stateful function?
I'm working on some embedded code using C. Various pieces of functionality need non-blocking stateful functions, which are mostly implemented using a switch on various states. For example, a modem ...
10
votes
1answer
665 views
UI patterns in functional languages
I would like to start fiddling with ClojureScript, but I am puzzled about some points. My problem is what is a good way to deal with state changes coming from user interaction, when you trying to work ...