Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [concepts]

Concept programming is a programming paradigm focusing on how concepts, that live in the programmer's head, translate into representations that are found in the code space.

1
vote
2answers
47 views

Help me with concept - rolling time window

I am designing some software for transportation companies (air, ground, water, etc). In these industries, you have rest rules where you need to get a certain amount of rest in between activities. So ...
3
votes
2answers
114 views

Non-precise Input/Using Probability in File Compression

I'm a high school student interested in topics of computer programming. Recently I became interested in file compression, and in my head I tried to combine this with a completely different part of ...
1
vote
1answer
123 views

How to understand and design functions with enumeration arguments that work in tandem with bitwise operators in C++ and Qt?

In the C++, there are 6 bitwise operators: Symbol Operator & bitwise AND | bitwise inclusive OR ^ bitwise XOR (eXclusive OR) << left shift >> right shift ~...
-3
votes
4answers
261 views

Might there be two types of a “callback” in programming? [closed]

I know two definitions for a "Callback": A function that is being called-after ("called-back when") a certain event is triggered. A function that is passed to another function as a parameter. An ...
0
votes
0answers
40 views

Are REST Resources and GraphQL Object Types conceptually equal?

I'm in the process of outlining the intended business logic of a web service. At this point, I'm not too concerned with implementation details. On the contrary, I'm looking for ways to abstract them ...
-2
votes
1answer
64 views

Could you suggest mutually exclusive groups for String Extension methods or give a name for this one?

I am separating one of my method extension classes (i.e., StringExtensions) into regions, as has become confusing and it's difficult to see the wood for the trees. I have grouped the methods into four ...
3
votes
4answers
284 views

Using Observer Pattern to selectively act on events

I'm currently in the process of architecting a small RPG-style dungeon crawl (in Unity), and am a little stuck on how to update various objects when things change, while not updating unrelated objects....
7
votes
2answers
3k views

boolean size not defined in java: why?

I see size of boolean is not defined. Below are two statements I see at java primitive data size not precisely defined Further explanation says boolean represents one bit of information, but ...
3
votes
1answer
774 views

Alternative to Actor model

My main experience working with multithread environment was using Scala, so if I had an object that was concurrently updated by multiple threads I always used Akka. Now working in Java environment I ...
-1
votes
1answer
32 views

concept name(s): container of different types which can be used like a type

I am looking for the name(s) of a concept I heard of. I know that it does not exist in many programming languages, but I think it exists at least in C++. Let me try to explain the concept. Assume I ...
1
vote
1answer
300 views

What is an indexer?

The C# docs have a page on indexers, which appears to use "indexer" to refer to the construct required to enable instances of a class to be accessed via square bracket notation. Indexers allow ...
0
votes
2answers
193 views

Multilayer security concept

I'm working on a security concept of a bigger project. It will be done with Spring,but that's actually not relevant right now. The whole system is a hierarchical tree of computer nodes that run a ...
-1
votes
1answer
70 views

When would you ever use a range not in the context of an array

I'm constantly trying to acquaint myself with different programming concepts, and I recently looked deeper into ranges. In Haskell a range is basically a literal that expand to some kind of array. ...
3
votes
2answers
401 views

Using actor model, how can one program concurrent portion (critical section) of code as self contained nuggets?

Von neumann architecture allows sequential processing of instructions. So, a single core within a CPU executes instructions sequentially. Consider, OS providing 1-1 threading model(here) in a multi-...
0
votes
1answer
126 views

What is the meaning of sharing state between processes?

The author here states that: Share state between processes. Run a long running batch job in one Python interpreter (say loading a few million lines of CSV in to a Redis key/value lookup table) and ...
8
votes
6answers
727 views

Demonstrate Object Oriented Principles to non-programmers using physical props [closed]

We're about to embark on helping with a new-to-coding boot camp at my work, where people from other departments can come learn how to code from the IT folks. While this is great and all, I'm in a ...
2
votes
2answers
243 views

Why don't audio engines already process audio more realistically?

Generally game audio engines use a rather simple system for rendering audio: 1. position an audio source in space 2. apply effects on the audio clip depending on the area the object is in 3. shift ...
22
votes
9answers
3k views

Is it normal/acceptable to write down notes, thoughts, algorithms, decisions during coding and maintenance? [closed]

Some people have this problem that they cannot think without words. And writing down their thoughts and decisions is the most effective way to proceed. So - is it normal and acceptable that I write ...
1
vote
0answers
2k views

Sockets (SignalR) vs Push notifications

I'm developing a Xamarin.Forms app with a .Net Web API backend. I definitely don't want to do long polls on my app to the server, but I need the app to remain updated with the server information. I ...
0
votes
1answer
31 views

Find whether or not current location is near other locations with given radii

tl;dr: "Am I, with any given location, inside of any number of circles with varying radii" Assume you have a database full of locations (coordinates) with arbitrary radii. Now the user enters and ...
8
votes
4answers
1k views

Role and importance of static method in OOP

Background Thinking about OOP I feel that it binds data and behavior together, taking the real world example we already have array data type which is a collection of homogeneous type and in Java we ...
0
votes
3answers
127 views

Can the Linux kernel be described as a Server?

I am developping an Android application that is using NDK in order to access to data from the Linux kernel. As you may know, this is done using IPC (Inter Process Communication) through Android's ...
1
vote
3answers
1k views

Operation excution in terms of clock cycles

Typically for a single instrcution, 6 machine cycles are needed: FETCH instruction DECODE instruction EVALUATE ADDRESS fetch OPERANDS EXECUTE oepration STORE result My concern is regarding the fifth ...
0
votes
1answer
123 views

VMs are not created on the same physical server to balance load?

When load reaches a certain level in IaaS environemnt, new VM instances are created to reduce load (scalability). My Questions that these VMs are not created on the same physical server, right? I ...
0
votes
1answer
111 views

What is the importance of WS-Addressing in SOAP?

I'm learning Web Services Addressing and SOAP, but I can't get the importance of WS-Addressing in SOAP. This is quoted from Wikipedia "standardized way of including message routing data within SOAP ...
2
votes
2answers
165 views

Why do we need namespaces when making XML serialization?

I know this might be a very basic question, but I'm new to XML serialization and spent hours trying to read different pages. PS: this is a programming language independent question.
1
vote
2answers
869 views

Efficient Repeating Alarm Clock in Low Level Language like C

I was thinking about it and I was curious as to how one would code an efficient repeating alarm clock in C? Would you set an alarm time and then offset the time with the ms time equivalent of a day (...
0
votes
1answer
137 views

When to use “is a” or “has a”? [closed]

In my node.js application, I have a queue class which has push and pop methods and a data property. I have an Event class which handles an event and pushes it on to the queue. If I think object ...
-4
votes
2answers
103 views

Rationale for modern languages implement changeable global variables [closed]

Common sense seems to be that usage of global variables is bad, in particular if they are used as real variables (i.e. changing state; e.g. Why is Global State so Evil?). How does it come then, that ...
3
votes
1answer
125 views

“Untriggered events” in Reactive Programming

The premise is that you have a Stream - a source of events spread over time. You can connect to Stream and create a logical chain that will fire when a new event is emitted: var button = document....
3
votes
3answers
203 views

Streams: what has happened after instantiation but before reading?

I'm trying to grok streams - my world is C# but I suspect the principles are general. I understand the general principle of reading/writing bytes from/to a store. However, what I don't understand, ...
3
votes
5answers
5k views

OOP Principles in Customer and Account classes of a Bank

I am designing a Bank Application which deals with Customers having FD Accounts. There are two approaches to this : Approach 1 In this the customer has a list of accounts. The bank application ...
4
votes
1answer
1k views

What would happen if two different commits in one git repo had the same hash?

I know this has been said to be pretty much statistically impossible but that's a different question. What would be the consequences if against all odds, this did occur?
1
vote
0answers
119 views

Simulating fluid transfer in a pipe [closed]

I know this is a fairly large/broad category, but I've been racking my brain over the last few weeks on how to simulate fluid flowing through pipes. In the environment I'm working, I can have a single ...
2
votes
2answers
2k views

Reading using non-blocking IO on a fd asynchronously in C++ (moving from Node.js)

I'm trying to switch my brain from Node.js/Objective-C iOS programming to C++ programming, and it's a little bit taxing. Node.js and Objective-C with iOS do not have a run loop that I am supposed to ...
7
votes
2answers
2k views

Is “Unit testing” a form of formal method?

After some research, I understand that: Formal method contribute to the reliability and robustness of a design. (ref : Wikipedia - Formal method) Unit testing ensures us of the absence of errors ...
0
votes
0answers
712 views

Writing Z80 table based assembler/disassembler

I have a long-term project: DIY computer with various processors. One of my wishes not only make hardware, but software too. So I started from assembler/disassembler for Linux, though there is a lot ...
3
votes
2answers
764 views

Are single method interface and function type definition the same?

In a language where it is possible to define interfaces and typedefs (using Dart here): abstract class Receiver { void receive(int quantity); } typedef void Receive(int quantity); abstract class ...
2
votes
1answer
281 views

GUI concept for a reactive, asynchronous graphical editor

I think I could describe this problem in an abstract way, but I suppose it will be easier to understand when I describe it in a real world environment. The Problem Imagine a graphical editor where ...
1
vote
2answers
111 views

When, if ever, are basic concurrency optimizations generally made?

Lets say I need to preform the following computationally intensive task For i in range(100000000): doComplexCalculationWithNoSideEffects(i) Most people I talk to tell me that basically any ...
3
votes
1answer
1k views

Structure of stack of a function call

I've been reading Aleph One's paper on Smashing the Stack for Fun and Profit. I wrote down example1.c from his paper, modified it a bit to see what the stack looks like on my system. I'm running ...
5
votes
4answers
974 views

Dependency Inversion & Decoupling

I'm wondering if someone might explain the last paragraph written in this example on Dependency Inversion & Decoupling. http://www.springbyexample.org/examples/core-concepts.html Following the ...
6
votes
2answers
636 views

Why does Git's stash commit need two parents?

Why does Git's stash commit need two parents? In the Hacker's Guide to Git, I see this mental model for stashes: The guide tells me that stash@{0} needs both A and B as parents. Why? Why doesn't ...
1
vote
1answer
63 views

Locking on data vs locking on functions

In concurrent code, what is the difference between, and the pros and cons of each: Locking on data Locking on functions My understanding is that locking on data is better, and I think I'm doing it, ...
3
votes
3answers
6k views

What is a Database Environment?

I am going through Relational Database Design by JLM. I have come across words like database, data model, DBMS etc. which I am able to understand. But, I get confused when the author tries to use ...
1
vote
1answer
88 views

Exception class for each exception or for all framework

I am developing a framework and it can generate various types of exceptions. Initially I'm working with a single exception class that indicates that something went wrong inside the framework. However, ...
1
vote
0answers
180 views

Access public property of object on view

When we are working with some MVC FW on PHP, generally we have a view loading function like load(string viewName, optional array viewVariables). My doubt here is: if we are working with some object, ...
1
vote
4answers
336 views

What would you call the concept of CofeeScript or Sass to be? [duplicate]

There is this rising trend with web development of making new pseudo languages to extend the functionality of JavaScript, CSS and HTML given that those are static and their metamorphosis or evolution ...
2
votes
1answer
1k views

When does a Monad become a hammer?

I realize my precursory understanding on Monads is severely lacking in detail considering my knowledge comes mostly from Douglas Crockford's Monads and Gonads talk and complicated with my sevear ...
4
votes
3answers
1k views

MVC and the business rule

I need to know where in the MVC should I apply the business rule. Imagine the situation: I have a school and I need to generate a calendar of classes for teachers. Each teacher has a school subject ...