The tag has no usage guidance.

learn more… | top users | synonyms

0
votes
0answers
45 views

AngularJS modal windows chain suggestion

AngularJS 1.4.x. After time I've spend creatin' my confirmation modal alon' of bunch of another modals, I've faced an issue with spaghetti code in my controllers. Problem: imagine i have methods ....
0
votes
0answers
43 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
24 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 ...
4
votes
3answers
184 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 but in Java we ...
4
votes
2answers
271 views

How to protect a peer-to-peer network from inappropriate content?

I’m developing a simple peer-to-peer app in .Net which should enable users to share specific content (text and picture files). Inappropriate content can “relatively” easily be identified / controlled ...
0
votes
3answers
106 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 ...
0
votes
3answers
98 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 ...
0
votes
1answer
93 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
43 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
117 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.
0
votes
2answers
228 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
0answers
10 views

Conceptualizing a Projector App with Mobile Remote

Before we begin, this isn't a question of "how to..?" (We already have a working implementation for this project) but more of a "what is the best way to?". Our project has very specific rules: ...
0
votes
1answer
103 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 ...
3
votes
1answer
95 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....
5
votes
2answers
1k views

Difference between trigger, handler and callback

It's current to see the terms callback, trigger and handler in some API documentations. It is just synonymous or each term correspond to a specific concept? I used to think that this terms are just ...
-4
votes
2answers
76 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
3answers
126 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
1answer
800 views

How do people develop emulators?

I hope this is right area on Stack Exchange to ask this question. People out there have built emulators for every game console but I don't understand how they do it. I consider myself (and have the ...
8
votes
3answers
2k views

What is “short-circuiting” in C like languages?

I have heard of the term "short-circuiting" being used in C, C++, C#, Java, and many others. What does this mean and in what scenario would it be used?
0
votes
0answers
335 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 ...
13
votes
3answers
6k views

How is the actor model used?

I have read a bit about the actor model, but don't really understand how to use actors in a real world situation – how to model a problem with them. Can someone please explain? A simple example or ...
4
votes
1answer
219 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?
74
votes
10answers
11k views

How to explain why multi-threading is difficult

I am a fairly good programmer, my boss is also a fairly good programmer. Though he seems to underestimate some tasks such as multi-threading and how difficult it can be (I find it very difficult for ...
1
vote
4answers
513 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 ...
1
vote
0answers
82 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
332 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 ...
3
votes
3answers
380 views

In Objective C, what English words can I conceptually associate to the symbols?

I'm learning Objective C (from a C# background) and am having difficulty understanding the unusual method signatures and am looking for a shortcut to make the learning curve less steep. When reading ...
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 ...
8
votes
3answers
4k views

Is there a difference between casting and converting types in imperative programming languages?

The question came up in a discussion at StackOverflow. Is there a clean distinction between the two concepts cast and convert (concerning the type of an object), or are these two words describing ...
2
votes
2answers
226 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 ...
1
vote
1answer
129 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
109 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
382 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
410 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 ...
3
votes
1answer
237 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
57 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,...
2
votes
3answers
3k 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
74 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
4answers
247 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 ...
1
vote
0answers
92 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, ...
3
votes
2answers
2k views

Entity-Component-System architecture: interaction between systems

I am studying the Entity-Component-System architecture philosophy. As I have read about it, a typical entity system has: 1) Entities - which are merely ID tags which have a number of components 2) ...
2
votes
4answers
520 views

How to explain the difference between a variable and a key in a key-value pair?

Variables and the keys in key-value pairs are both identifiers for values, so, on a conceptual level, these seem very similar ideas. How would you explain the difference between these two concepts? ...
1
vote
1answer
796 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
401 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 ...
3
votes
1answer
248 views

How to store the file names, start offset and length while avoiding the issue of self imposed limits (lookup table) or having to scan the entire file?

I am attempting to learn more about C and it's descendants(C++ mainly). I have decided that I would like to create a "file system" of sorts. Not a particularly advanced one mind you but something to ...
2
votes
3answers
391 views

Should POCO domain classes contain collections?

The question title is not good, but I couldn't think of a way to word it better. I am used to develop using POCO classes in my projects, that is, domain objects contain absolutely no logic, only data....
1
vote
4answers
795 views

Alternatives to null values and option-like types

Related to this question i want to know if there is a concise way to eleminate null values out of code in general or if there is not. E.g. imagine a class that represents a user with birthday as ...
11
votes
2answers
2k views

How is IETF different from W3C?

I've been following these organizations (institutes, entities, whatever) for near 3 months now, and both of them claim that they're trying to make the Internet a better place. They're creating ...
2
votes
4answers
522 views

Why do we use to talk about addresses and memory of variable in C?

Why do we use to talk about addresses and memory of variable in C, where in other languages (like in Java, .Net etc) we do not talk about variable address and memory in a program, we will directly use ...
-2
votes
1answer
188 views

Explanation of the code snippet , keyword operator in , in c++ , use of objects in classes [closed]

class Vector { public: Vector(int s) :elem{new double[s]}, sz{s} { } double& operator[](int i) { return elem[i]; } //function 2 int size() { return sz; ...