The tag has no wiki summary.

learn more… | top users | synonyms

2
votes
2answers
139 views

What is State, Mutable State and Immutable State?

This is a newbie question, but I couldn't find a newbie-proof enough answer on Google. What do people mean when they say 'state' - in programming in general, and in OO programming specifically? ...
0
votes
0answers
49 views

Looking for design pattern to represent shared state in music sequencer

I like to give lots of context, but also to state the basic question up top as concisely as possible. Feel free to read a little or a lot. I'm working on a music sequencer, and have been happy so far ...
0
votes
1answer
73 views

Can we consider a clients interaction with a web server to be stateful if the web server maintains state via session variables or cookies?

A little confused with the notion of stateful/stateless architectures. Forgive me if I'm unclear. Questions: Can we consider a clients interaction with a web server to be stateful if the web server ...
2
votes
2answers
137 views

Can the Jacquard loom be considered stateless?

Can the Jacquard loom, pictured below complete with its chains of paper cards be considered stateless? As far as I can tell I can tell, each operation is not dependant on the previous. Or did it ...
1
vote
3answers
198 views

A pattern to “atomically” update a pair of objects

Is there a standard pattern in OOP to kind of "atomically" update a pair of objects, like a pair of bank accounts on a transaction? I would like to have somehow a single public method exposed that ...
0
votes
1answer
471 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
232 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 ...
15
votes
2answers
361 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
159 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
168 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
592 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
132 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
39 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
133 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
417 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. ...
11
votes
4answers
973 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 ...
1
vote
1answer
409 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
223 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
272 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
397 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
218 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
224 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
289 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
476 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
445 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
126 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
291 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
353 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
250 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
764 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 ...