6
votes
2answers
117 views

Is creating a new List to modify a collection in a for each loop a design flaw?

I recently ran in to this common invalid operation Collection was modified in C#, and while I understand it fully, it seems to be such a common problem (google, about 300k results!). But it also seems ...
1
vote
1answer
47 views

When should I use static functions and when should I use non-static ones? [on hold]

Sometimes, when I'm programming, I have to decide between adding a static method to a class that accepts an instance (or more) of that class or adding a non-static method. Here's an example: Static ...
5
votes
1answer
101 views

Is there a design pattern for managing deep many-to-many relationships?

I'm having trouble defining this data pattern I've come across working on several applications. It consists of: An object type which is composed of many objects itself A second object type, where ...
-3
votes
1answer
26 views

Where can I find NodeJS's native module's source code? [on hold]

I want to see how NodeJS's native modules are made, for instance, lets take the "fs" (File-system) module. Where can I find the source code for this module? I've tried searching in NodeJS's official ...
4
votes
0answers
80 views

Forgot password and revealing whether account exists [migrated]

So when you hit that forgot password link and enter your email address, it seems that sites (and other programmers I've spoken to) are one of either two mindsets; Notify the user whether or not the ...
0
votes
1answer
61 views

How to stop someone from calling URL on server

I am very new to web development and am trying to create a website using client/server model. From what I understand, the front-end (client-side) calls URLs specified on the server to get information. ...
0
votes
0answers
27 views

Hot swapping files and metaprogramming with front-end JavaScript

I was inspired by a video on hotswapping JS files with React + Webpack for the web. I started trying it out with React + Backbone + RequireJS. Seems to work, as long as I stick to the stateless parts ...
1
vote
3answers
71 views

C#6: Should I refactor my code using Resharper for the new features? [on hold]

C# 6 is here for a while now and brings with it some syntactic sugar that Resharper is kind enough to highlight and recommend that I "migrate to". Should I apply these fixes automatically to the ...
-3
votes
0answers
21 views

Mixing then printing arrays, but they all end up the same anyways? [migrated]

I'm making a sudoku game. I have an array (puzzle[][][]) containing nine other arrays (zone1[][]-zone9[][]), which each initially contain {{1,2,3},{4,5,6},{7,8,9}} (and they're assigned those values ...
-3
votes
0answers
22 views

Nomenclature for class that holds functions arrays of a particular object type [on hold]

What are some suggested naming schemes for a class that contains functions which process arrays of objects of a particular type? For example: class InvoiceProcessor { class func totalAmount ...
1
vote
3answers
100 views

When is an object passed to a function?

Trying to clearly state the semantics of a function call. In calling a function, are the arguments passed to the function the ones the calling code initially gives or the ones the function ...
1
vote
1answer
65 views

Pass data into a constructor or instead create virtual methods?

In an object oriented module describing a database, should I pass DB description data structures to the constructor in the constructors of derived classes, or should I instead create ("virtual" that ...
-1
votes
0answers
85 views

Is there empirical evidence supporting Brook's Law (or a modification of it)? [on hold]

Brook's Law is based on a famous claim from the 1975 book The Mythical Man-Month idea that "adding manpower to a late software project makes it later" due to the onboarding time and extra complexity ...
-6
votes
0answers
21 views

VBS - Query status of service, if STOPPED, restart it in elevated mode [on hold]

Why is this script not working? I want to be able to query status of service, if the service is STOP or regardless of status, RESTART it in elevated mode. Set objNetwork = ...
-4
votes
0answers
30 views

Redistributing data loading [on hold]

I am writing a system that does a lot of http requests, and fetches a lot of json data. I have a goal to fetch a lot of data within short period of time. Just to give some measurement: one request ...
1
vote
2answers
39 views

JWT based webservice authentication

I'm currently writing a web service that will be consumed by an android app. To access user specific content, one must authenticate against the service. Since I'm not (primarily) using a ...
-4
votes
0answers
57 views

Is ClickOnce deployment tecnology widely used? [on hold]

We have a tool with a custom updater and we were thinking on changing it to use ClickOnce tecnology. This is an application with about 3K installations so I'm worried about the reliability of this ...
0
votes
2answers
108 views

whats the relationship between integration testing, TDD and Agile methodology? [on hold]

I recently attended an interview and was asked whats the relationship between integration testing, TDD and Agile methodology? I am still puzzled how to answer the question !!
-2
votes
0answers
97 views

What Classes as a “C-derived” language [on hold]

Original Post I have recently been looking into the UK EDexcel Computing Specification and the first control assessment (labled "Practical Programming") mentions this: Students must select one ...
-1
votes
0answers
23 views

Best practice to lock write to resource [on hold]

I'm writing a little Python script that do some writes on files. I want to exclude the possibilities that the execution of two instances of the same script will write on the same resource. So I'm ...
2
votes
1answer
53 views

What should be included in a source archive? [on hold]

I observe that there are some files, other than source code files, included in a software library source archive (in tar format). e.g.: README, INSTALL, CONTRIBUTE COPYING, LICENSE documentation ...
2
votes
1answer
128 views

Is it a good idea to have separate UI components make their own webservice calls?

I have few UI components in an angularjs web-application. Each display data based upon same input. One shows stats which are calculated on the basis of a time period. Other shows a chart of daily ...
2
votes
1answer
161 views

How to *detect* if open source software is used in a commercial product? [on hold]

The established procedure regarding releasing code out in the open is to accompany it with a license. Out of the many flavors that exist (BSD, MIT, GPL, LGPL, Boost ...) there are some that prohibit ...
-1
votes
0answers
39 views

How do I contribute to API documentation for open source projects [on hold]

I am a technical writer and I want to create a portfolio for API documentation. How do I approach open source projects? Where can I find them? Document for products whose API ref has not been ...
2
votes
3answers
152 views

How to explain to someone what unit tests are? [on hold]

I used to be a lot more pragmatic when trying to explain this sort of things to other programmers, but most of the time I was in situation where I could force them to just accept my will (tech lead, ...
4
votes
2answers
97 views

Rest design - Multiple calls vs returning all data in one call

I am trying to build a rest API for an android app. Suppose I have a users table with (id, name, email) and a songs table with (id, song_name, album) and a rich join association between them as ...
-3
votes
0answers
34 views

Transfer code from App to WiFi module [on hold]

The app I am working on is to control model trains. The train manufacturer has provided the code that would operate the train (for example, ring bell, move forward, etc.). The WiFi module I would ...
2
votes
1answer
133 views

Help understanding modeling in domain-driven design

I've been trying to learn domain-driven design (and similarly Onion Architecture) the last week or so. I think I've got an understanding of it, but like math, I suck at extracting all of the ...
-1
votes
3answers
112 views

How can you build an effective team in a hot desk workplace [on hold]

Best practices (IMHO) employ (several) build/status/project radiators, and other tech "bling" that is large and essentially not mobile. This implies that the team needs to have a stable location. But ...
-2
votes
0answers
51 views

How can I interactively play with browser javascript the same way iPython notebooks let me do with Python? [on hold]

I know that IPython has spun off their web notebook interface to be language-independent, and there's a nodejs backend available for it. But seeing as every web browser has javascript built in, it ...
-3
votes
0answers
54 views

How to read a file in C++? [on hold]

I wanted to know how I could read a file called box.3d in a file on my desktop called objects in C++. I've looked and couldn't find anything that works for me. Also how could I make a function where ...
16
votes
5answers
1k views

Why use an opaque “handle” that requires casting in a public API rather than a typesafe struct pointer?

I'm evaluating a library whose public API currently looks like this: libengine.h /* Handle, used for all APIs */ typedef size_t enh; /* Create new engine instance; result returned in handle */ ...
-2
votes
0answers
24 views

PHP Half-Hour Timezones Missings? [migrated]

In PHP I am using DateTimeZone::listIdentifiers() to get a list of timezones for user selection. This seems to be working fine, but missing from this list are the half hour timezones. Notably: ...
-2
votes
0answers
50 views

Reading Code Documentation [on hold]

I have been studying computer science for a year and a half, and even after 5 programming classes plus my own studies I have yet to understand how does one go about reading source code on github ...
8
votes
1answer
215 views

Why are C string literals read-only?

What advantage(s) of string literals being read-only justify(-ies/-ied) the: Yet another way to shoot yourself in the foot char *foo = "bar"; foo[0] = 'd'; /* SEGFAULT */ Inability to elegantly ...
1
vote
0answers
23 views

Architecture: mobile apps for different clients with their own dbs different servers?

My general feeling is that this is a question which must have been answered but I am struggling to find resources for it. I know little about mobile app dev but my knowledge of web services is pretty ...
-5
votes
0answers
30 views

How to play sound in C++ using android C++ compiler? [on hold]

I want to play sound (mp3) in C++ using C4droid. I searched on web, but I can't use "Window.h" library. Is there any way to play sound in C++ using a Android C++ compiler?
0
votes
0answers
41 views

What's the accepted way of communication between two model objects in MVC?

I have a model object that fetches data through an URL connection, and another model object that stores and parses it. Eventually when the data is ready, a key-value observing notification is ...
1
vote
2answers
112 views

Why do I need to use recursion on the classic employee manager database relationship?

Take the data from the Oracle scott database. I have modified it to have multiple levels of management from the original, select * from scott.emp order by mgr desc; empno ename job ...
0
votes
3answers
83 views

Are file-scope `static` variables in C as bad as `extern` global variables?

In C, you'd often/sometimes (as a matter of style) use a file-scope static variable where you'd use a private class member variable in C++. When scaling to multithreaded programs, simply adding ...
1
vote
1answer
58 views

Bower, NPM, Gulp in ASP.NET MVC, what problem am I solving? [on hold]

I work at a small web development company, and we use no dependency management whatsoever at the frontend side. External libraries are simply downloaded and pasted into the lib folder of whatever ...
3
votes
1answer
48 views

MVC Advanced Permission System Patterns

I'm familiar with role and activity based permissions, but I'm curious about patterns that go beyond the basics. In particular, I want permissions to be granted based on the user's relationship with ...
0
votes
0answers
21 views

Storing a many-to-many relationship between aggregate roots in a document store

Intro I'm currently facing a rather difficult problem. An application that we need to expand and partially overhaul, uses RavenDB as its storage backend (a NoSQL document store). The two most ...
-6
votes
0answers
12 views

CPP | std stream printing error [migrated]

I am currently programming an int matrix in cpp. I wanted to add a printing function that prints the numbers in the following way: 1 2 3 7 6 9 19 23 9 (every 2 intergers are seperated with a ...
4
votes
3answers
64 views

When to load related database data in web request?

I'm trying to determine when a web application should query a database for related data that may or may not be used in the current request. As an example, consider a database that tracks assets for a ...
0
votes
0answers
38 views

DDD and read models - where to use? [on hold]

I'm coding an application using DDD and EventSourcing (therefore CQRS) for the first time. My aggregates are stored in an event stream, so they are not good for querying. That's why I'm building a ...
-1
votes
0answers
35 views

Javascript coding convention: capitalization with requirejs [on hold]

We are having an argument, where it has been proposed (among other things) to change requirejs statements like this: define(['thing', 'xyzzyView', 'backbone'], function(thing, XyzzyView, backbone) { ...
-4
votes
0answers
17 views

__android_log_print cannot function normally sometimes [on hold]

My ide is eclipse and I can confirm that Android.mk is correctly written. But sometimes __android_log_print does not work normally in that logs does not display on logCat or modifications does not ...
1
vote
2answers
94 views

What are the differences between Event Sourcing and Service Layer pattern?

I am reading a book on architecting enterprise applications. In this book the Event Sourcing pattern is introduced which can be used as the "command" part of a Command and Query Responsibility ...
2
votes
2answers
62 views

How to handle multiple models that relate to a single model

First of, sorry for the vague title. In our website framework, we have modal classes to represent our database tables, that hold a rows data. I'm currently working on a stat style page, and I'm ...

15 30 50 per page