-2
votes
0answers
19 views

External authentication in Django [closed]

I am making a django based forum app using Spirit. I study in a university which uses kerberos authentication to login students and faculty. What I want to accomplish is to use those same credentials ...
0
votes
2answers
121 views

Naming when having to inherit classes [closed]

I am always a huge fan of standards and think I finally decided on one of the many C++ naming standards. However, it almost seems moot because working with a couple of libraries where the standard use ...
2
votes
1answer
156 views

Is it impossible to write proper, const correct callbacks in C?

In C, a non const object implicitly converts, without warning, to its const counterpart, so you can write a function, and call it as: void foo( const char *p ); char bar[] = "bar"; foo( bar ); ...
-2
votes
0answers
42 views

Java calculate variance for hypergeometric distribution [closed]

I have problem in creating a program on statistics, with a "sub-program" on hypergeometric distribution to calculate sample mean, standard deviation & probability. Algorithm on hypergeometric ...
5
votes
6answers
308 views

Breaking the contract: throw exception or do nothing?

Let's say we have a list of players in our Event class. And we have a dictionary with the score of each player. We can add a score to a player using the addScore method: public class Event { ...
0
votes
1answer
97 views

CreateFileMapping() - parameters of size

I want to make a program, which will put some sentence in shared memory so another program will receive this massage. I made that, but I do not understand the 4th and 5th parameters of ...
0
votes
3answers
131 views

Should I check for nulls in setters and similar methods?

I have plenty of setters in my classes, as well as many methods to add an item or a set of items to lists or maps. Should I check for nulls for each one of them, or should I allow ...
-2
votes
0answers
45 views

Specific design patterns for the backend and database of a mobile application [closed]

I'm writing a social networking app. Here are the features it will have: user accounts/profiles (so I will need to store profile pictures) following other users posting content that will be seen by ...
7
votes
1answer
165 views

Why does FSharpLint suggest, “In F# code, use 'e1 || e2' instead of 'e1 or e2'”

If I write the expression, if not (expr1 or expr2) then value I get the following warning from FSharpLint, In F# code, use 'e1 || e2' instead of 'e1 or e2'. Why is using || preferred over using ...
-2
votes
0answers
64 views

How do I capitalize this method? [closed]

I had a bit of a debate with my co-worker about whether this method header is correctly-capitalized: - (CGFloat)cgFloatValue; My co-worker would prefer it this way: - (CGFloat)CGFloatValue; Of ...
2
votes
2answers
83 views

How the time of Agile Sprint is calculated?

have a query in my mind that how the time estimation is made in sprint meeting for agile work flow? Lets say for example: In a team there are 4 developers and the first sprint is designed for about ...
0
votes
1answer
16 views

Correct Pass along in Service oriented architecture

I'm not entirely sure how to phrase my question, so I'm going to give an example. Say you work on payment processing software. You implemented Service Oriented architecture and you have 3 main phases ...
6
votes
1answer
86 views

Fuzzy algorithm for grouping data

I have data that indicates which topics each student has got right/wrong in an assessment.: | Student | Topic 1 | Topic 2 | Topic 3 | Topic 4 | Topic 5 | ... (perhaps 30 topics) | 1 | T | ...
2
votes
0answers
92 views

Is there a language agnostic term for statement parameters? [closed]

Is there a general term for the code that sets the parameters of statements require some kind of initialization or bounds? Examples: C: for (x=0; x<y; ++i) switch (controlling_variable) ...
-2
votes
0answers
35 views

How to use statement functions with arrays in Fortran 90 [migrated]

I am translating a Matlab code into Fortran 90 and am trying to translate the following piece of code: func= inline('x+ y+ z', 'x', 'y', 'z') x(1)= 1, y(1)= 1, z(1)= 1 for n= 1:5 output= 5+ ...
0
votes
0answers
27 views

Develop an API within ESB to access a database

I am working with a service provider where I need to get data from their service. The service provider wants to give me access to their database to get the data I need. My question is should I ...
1
vote
1answer
143 views

Improving a try/catch

I'm a python programmer trying to get to grips with Java's inflexibility; I'm trying to parse a date from a string into a Calendar object private Calendar parsedDate ( String dateString ) throws ...
2
votes
0answers
53 views

Default move assignment and destruction order of members versus the rule-of-zero

Members must frequently be destroyed in the correct order. As member creation is in forward order and destruction is in reverse order this will usually work fine. However, when assignment operators ...
0
votes
1answer
54 views

Abstract Factories Nesting and DI - Is this acceptable?

I am still trying to get some experience with DI. Let me illustrate my situation and you can give me advice on whether I am using DI and Abstract Factory correctly. I need to create IModels at ...
-1
votes
2answers
94 views

Do you say “this” on protected members? [closed]

Background I have never had a formal class in OOP/OOD although I understand how the protected members work. Being accessible by any instance/derived class, they are thereby less private (more ...
13
votes
4answers
1k views

How specific should the Single Responsibility pattern be for classes?

For example, suppose you have a console game program, which has all kinds of input/output methods to and from the console. Would it be smart to keep them all in a single inputOutput class or break ...
0
votes
0answers
12 views

Regional test-of-concept environment, whose database must be merged back to the main server afterwards

My client wishes to launch a specific version of the Rails platform I am developing that will be restricted to a particular group of users (some sort of test-of-concept). I will have another server ...
-4
votes
0answers
62 views

How much is it correct to adopt on a static variable to store data that must always be a “live” in the memory [closed]

I'm working on a middleware that will solve a latency issue, So it requests the data from the original server and store it in a database. There is two types of data the new data and the old data, the ...
2
votes
1answer
77 views

What is MISRA 8-0-1 rule on init-declarator-list and member-declarator-list about?

I am reading company's coding guidelines, and I encountered the MISRA 8-0-1 rule, which states: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or ...
0
votes
4answers
202 views

When Agile becomes a bit slugish [closed]

So, we have started trying to work to Agile/scrum in our business to run the software dev team and it's not (in my eyes as a humble dev) working very well. Its getting to the point now where the team ...
1
vote
1answer
35 views

How to model the database tables for calculating on peak and off peak usage data

I am using MS Sql Server and my system contains power usage data in one table as timestamp and values for KW(two columns). This data is collected at 1 hour interval. At the end of the month I need to ...
-4
votes
0answers
67 views

What is plug and play in programming?

I recent met a term plug and play. As I understand that it means we add the dependencies needed and remove dependencies we don't need from the project. But I am still confused. So what does plug and ...
1
vote
2answers
125 views

Binary Search O(log(n)) or O(n)

I see where most readings online derive that the Big-Oh notation of a Binary Search is O(log(n)), but doesn't this assume a balanced tree? What if the tree is completely unbalanced (i.e. similar to a ...
-4
votes
0answers
105 views

What is the purpose of using Spring beans? [closed]

Instead of declaring object the normal way, why do we use bean/bean factory to declare objects? Can someone explain the advatange and disadvantage of it in layman's term?
2
votes
3answers
63 views

GPLv2 code as a separate process in a closed-source iOS app?

I'd like my (currently) closed-source iOS app to use some GPLv2 licensed code. The code I want to use is simply a converter from one file format to another — nothing too complex or proprietary. Given ...
4
votes
2answers
150 views

How to design an iterable but immutable (read-only) collection

My program models a sport tournament which has one or many events or categories. The class Event has members like players or courts as a List, as well as some dictionaries using the class Map. So far ...
1
vote
0answers
18 views

Multi-page app using passive-view MVP with multiple presenters - what is the most appropriate way to handle page changes?

I am implementing a multi-page application (think installation wizard) where each page is a separate view, and each view has its own presenter. The model and each of the views is ignorant of ...
1
vote
0answers
82 views
+50

Logging RestTemplate's responses

I want to log responses using Spring's RestTemplate. At first I thought I should do it using a ClientHttpRequestInterceptor, but since every set of requests should be logged to a different file, I ...
2
votes
2answers
312 views

Could someone write an opensource version of the Windows API?

I am wondering if it is both possible and how one would write an opensource version of the Windows API. What I mean by this is, say you #include <Windows.h> in your C++ application. Then you ...
3
votes
4answers
355 views

Why does the type go after the variable name in modern programming languages?

Why is it that in nearly all modern programming languages (Go, Rust, Kotlin, Swift, Scala, Nim, even Python last version) types always come after the variable name in the variable declaration, and not ...
-4
votes
1answer
94 views

How to go about solving a take home programming interview? [closed]

I've been given a take home programming interview in which the problem consists of a bunch of classes and objects. I guess the question I am asking is: what is the best way to understand the code. ...
1
vote
1answer
79 views

why exposing service instead of repository in onion architecture

I'm digging on how to structure projects and so I stumble into Onion Architecture. As to how I understand it, its more on a domain-centered-focus architecture instead of a database-driven type. I'm ...
6
votes
1answer
670 views

What is priming the pump? Sometimes called a priming read

I was taught this expression and pattern way back in the day. Sure, the name comes from old pumps that needed to be filled with water before they could pump water, but who cares? We're talking about ...
13
votes
3answers
447 views

HTTP Status Code for “Still Processing”

I'm building a RESTful API that supports queuing long-running tasks for eventual handling. The typical workflow for this API would be: User fills in form Client posts data to API API returns 202 ...
0
votes
1answer
90 views

How to make interfaces usable for special classes only?

Is there a way to make Java interfaces only implementable by classes of a special type? So for instance, I have a class Foo and an interface Bar. Only subclasses of Foo should be able to implement ...
0
votes
0answers
33 views

Looking for pros/cons on using OWIN vs. a simple hand-rolled token based auth

We are wanting to implement an API to be used internally and externally and add it to our solutions. Some environment notes: We are currently using VS2013, .Net 4.5, EF5, SQL2008, MVC4, C#, and ...
2
votes
2answers
197 views

Is it a bad practice to use JSON strings as keys of objects?

On languages such as Haskell, most datatypes have instances which allow their values to be used as keys of structures such as Maps. JavaScript has reasonably fast maps, there called objects, but those ...
0
votes
1answer
85 views

Differences between the terms Modules, Plugins, Extensions

While developing software, certain parts of my applications are not planned to be necessarily deployed with the main software. And they need to be named correctly. Now I understand apparently there ...
5
votes
3answers
155 views

Should unit tests always overlap

This is a test design question. I have a class 'handler' that accepts a 'validator' that checks some business logic on what's passed to the handler. I made the unit tests for the validator and now ...
1
vote
1answer
31 views

Pyinstaller EXEs license

I'd like to know about licenses in Python program distributions. This is the scenario: let's say one would distribute a Python program for Windows, created with PyInstaller as a single executable ...
2
votes
2answers
81 views

How to handle when only certain derived classes need to be disposed?

I am trying to build a framework of objects where the main actors can be interchanged freely. At the moment I've done this by creating an abstract base class that all of my actors can be derived from. ...
0
votes
1answer
67 views

Recommended approach to initialize Command

I've two commands in my View Model and one of them is initialized using lazy loading and other using eager loading. Which approach is good to go? Should I use lazy loading or eager for both? View ...
2
votes
2answers
110 views

Method to validate an object - should I have one method encapsulating all validation logic

I have a class, Customer which has some basic properties on it such as firstname, surname, email, dateofbirth. I have written another class called CustomerValidation which currently has one public ...
-3
votes
1answer
116 views

Returning a variable or a return code from a function

Let assume that we have a main() function in which we call a createDirectory() function. In Python for instance, the code would be: def main(): # Do some stuff createDirectory(myPath) # ...
1
vote
1answer
20 views

Rate-Limiting in an OAuth REST API: per token or per consumer?

I am building a REST API and intent to use rate limiting (using the leaky bucket algorithm) as a way to protect against crawling and enumeration. The API will be consumed by a Mobile/Tablet App ...

15 30 50 per page