Questions tagged [conceptual]

Conceptual questions involve programming problems which are not related to program code itself, but with algorithm logic and program architecture.

364 questions
1
vote
0 answers

How does regex engine deal with literals after repetion (i.e ".*")?

I am confused about how the regex engine deals with literals after repetition. I was reading this. http://www.regular-expressions.info/print.html So it talks about about matching double-quoted string. Suppose you want to match a double-quoted…
1
vote
1 answer

mutable state in collection

I'm pretty new to functional programming so this might be a question due to misconception, but I can't get my head around this - from an OOP point of view it seems so obvious... scenario: Assume you have an actor or micro-service like architecture…
MrWombat
  • 649
  • 9
  • 19
1
vote
1 answer

How to store Encryption Keys while in use

I am making a social media type website, and I store user details such as emails, names and other personal details. I will be encrypting the personal details using an Encrypt-then-MAC concept. When the user registers, a cryptographically secure…
1
vote
2 answers

Making API call before closing tab to store dashboard widgets data

There are widgets in dashboard page which be can sorted(draggable and droppable). We want the order of widgets to be preserved when user revisits our page, so we have API to dump all widgets to DB. But the problem is whether we should make an API…
1
vote
2 answers

What to save & what not to save in Flux / Redux?

So I believe there are different ways of using Redux, and I am not sure whether this is a good idea at all, or whether what I am doing right now is completely wrong. Say I have a software which manages schools (classes & pupils etc.). The way I am…
George Welder
  • 3,787
  • 11
  • 39
  • 75
1
vote
2 answers

Cannot understand getter/setter with object

It is easy to understand the concept of setter/getter for a simple data, an NSInteger for example. If we say: NSInteger a; The setter for "a" changes the value of a, and the getter only gets (returns) its value. It is then easy to understand…
user255607
  • 1,829
  • 5
  • 25
  • 28
1
vote
1 answer

Where to place objects in an generic abstract class concept?

Note: See the update below, as I altered the original concept, based on the first answer+comment I'm sorry if this is a trivial question or if it solely depends on the programmers preference. As I am not sure about real advantages or disadvantages…
Nicolas
  • 754
  • 8
  • 22
1
vote
1 answer

Asymmetrical protocols in Client/Server Architecture

I am learning about: Client/Server Architecture (more concretely the characteristics). I have a question: "Asymmetrical protocols: there is a many-to-one relationship between clients and a server. Clients always initiate a dialog by requesting a …
1
vote
1 answer

Double negative in SQL - meaning of NOT (Food != "Apple")

Having trouble with double negative meaning. Are these statements equivalent? NOT (Food <> "Apple" AND NOT (Food = "Banana")) === (Food = "Apple" AND Food = "Banana")
Paul G
  • 314
  • 3
  • 15
1
vote
0 answers

How to separate concepts within one .NET class library

I like how concepts can be separated when solution is split into multiple class libraries. For example: System.IO.csproj, Stream class System.IO.Net.csproj, NetworkStream class System.IO.Filesystem.csproj, FileStream…
Ondrej Petrzilka
  • 1,449
  • 18
  • 24
1
vote
2 answers

Lexical Analysis for import and method calls in java

How are import statements and method calls tokenized in java's lexical analysis. For example: import java.util.Scanner is this seen as import, java, util, Scanner(4 tokens) or import, java.util.Scanner(2 tokens) In the same line of thought,…
Mo H.
  • 1,788
  • 1
  • 18
  • 28
1
vote
2 answers

Why can't I define a forward declared class by aliasing it?

Trying to compile the code below fails due to a "conflicting declaration". Why can't I define a forward declared class like this? I did this to hide that the implementation uses a certain library. Although I'll admit that this does not really…
Oebele
  • 581
  • 1
  • 4
  • 17
1
vote
1 answer

Listing events in table for each day of the week

Although the code in question is PHP, I need a second look, a general algorithm, pseudocode or something similar as a solution. I have a collection of objects ($events) with properties: event_name date_from date_to I have a table with weekdays: …
TommyZG
  • 500
  • 3
  • 13
1
vote
1 answer

Why use an interface to communicate from fragment to activity?

What is the advantage of using an interface to communicate from a fragment to an activity, as described here: http://developer.android.com/training/basics/fragments/communicating.html This creates an unecessary dependency when we could have created…
Marc
  • 219
  • 1
  • 15
1
vote
1 answer

Should I double validate data exchange between server and client (mobile)?

My server send some data to the mobile app The user does some operations with those data and sends other objects back to the server, which contains the data that the server first sent (PS: of course those objects are created by the mobile app…
Edson Horacio Junior
  • 3,033
  • 2
  • 29
  • 50