All Questions

0
votes
1answer
45 views

How to identify additional space complexity

I just started leaning about algorithm design and I am now having trouble identifying the additional space used in an algorithm. For dynamic program, as far as the examples I've learnt, such as ...
-1
votes
0answers
22 views

Request for Feedback: multi-step API Authentication using multiple endpoints

I am building an API that will authenticate using the following flow. Endpoints: WWW:/login - this is the HTML5 frontend using JS ajax calls API:/check_password - checks email/password combo. API:/...
-2
votes
0answers
25 views

best practice for intercalate with the database from desktop app [closed]

I'm writing some desktop app with local SQLite DB. what's the best practice for intercalate with the database? I mean directly? or should I use some layer between?
-3
votes
0answers
41 views

Bytes Per Empty Directory MacOS [closed]

How many bytes is a standard empty directory on MacOS without any files or sub-directories inside it? I think I have read somewhere that it is like 32 bytes, but I have also seen it being zero bytes.
-3
votes
0answers
53 views

Is there a better way of eliminating options in a set by heads up voting?

My mission is to decide a winner in a set of options by 1-on-1 voting. Basically a king of the hill type of game where the loser gets eliminated. I've come up with a solution that works but I want ...
2
votes
2answers
126 views

User Stories and Epics

As you know, epics consist of user stories. The user stories are short descriptions which specify the requests of the user. They can be perfect instance of the questions listed below: Who, What, why ...
4
votes
3answers
187 views

Making pull requests easier to review while practicing XP and refactoring

I practice TDD and refactor aggressively. Recently some colleagues have complained that the resulting pull requests are difficult to review, or would require a lot of regression testing. When I ...
0
votes
4answers
123 views

In API design, if I request a list of objects by ID, and one of those IDs is invalid/deleted, should the request fail?

Let's say I'm requesting a list of IDs for which I'd like to receive relevant DB entities (e.g., my-restaurant-api.com?restaurants=1,2,3). In this example, let's say ID 3 has been deleted and should ...
3
votes
1answer
71 views

Git “dynamic merge” of multiple branches

I work with a feature branch model where the branches get merged into master when they are ready. Before a larger test (specific to my field of work, involving a lot of heavy hardware), several ...
2
votes
0answers
70 views

Designing classes with information hiding [closed]

John Ousterhout (the inventor of Tcl/Tk among other things) has this interesting list of software design advice, from which I'll quote the first one: Design classes around information, not ...
-3
votes
2answers
102 views

Develop desktop apps with communication between

My boss asked me to develop for him a price quotes desktop software (he doesn't want a website), he wants to give the price list and the users of this software would write the prices according to the ...
0
votes
1answer
175 views

C++ immutable struct

I would like to be able to implement immutable data in C++. In short, given a C++ object in which I would like to modify a member variable, instead of modifying that member in place I would like to ...
7
votes
6answers
515 views

Is duplicating files to avoid programming branching a good or anti pattern?

for example, suppose I need to play different sounds according to "grade": file list: fairSound.mp3 goodSound.mp3 excellentSound.mp3 code: showResult(grade){ if(grade==0 || grade==1){ ...
3
votes
1answer
116 views

Best practice for REST result payload when field may have single or multiple values

I Have a REST API endpoint where the caller can supply some optional filters for the results. GET api/inventory For example, an object member of a GET request may look like the following { "...
-1
votes
1answer
96 views

What options are for a GUI for a Java application? [closed]

This might be a bit of a wide question. I have a couple of classes in Java that take input a String which is a mathematical expression and evaluates it. I want to implement a desktop GUI for this. ...
1
vote
0answers
32 views

Single users database for many apps

I'm designing a database that holds the information for users of three diferentes apps that share the access to the data trough an API. For every user i'm storing credentials, profile and roles. What ...
1
vote
0answers
13 views

mod_rewrite should I define a url prefix for assets?

I am working on a little framework where I have this directory tree: project/ |--- ... (directories unrelated to the question) |--- public/ | |--- index.php .htaccess The .htaccess sends every ...
0
votes
3answers
163 views

Is using overly specific names for variable/class/component names a good or bad practice?

Let assume that we have a system in which the users can chat with each other and we are working on the backend. We can name the service which fetches the chats in one of the following ways: ...
1
vote
3answers
410 views

Convincing a development team to use a better design pattern [closed]

I recently joined a company where I was tasked with building a system for one of their clients. The work I've done is so far working well, but the most senior developer on the team who's been with the ...
2
votes
1answer
87 views

How to think about queries in NoSQL

I'm writing a project for school - Tinder-like app. I thought of implementing database entirely in RDBMS (PostgreSQL). But now I think it's a good opportunity to get to know NoSQL systems a bit. I'm ...
1
vote
1answer
102 views

Can i change apache license owner to our company name?

Our previous developer set his name in the license of our open source project. Thats how license header looks: Copyright (c) 2018 (his name), Stichting (our company name) <(his email)> Can we ...
0
votes
1answer
78 views

Parameters vs Specialized functions

Trying to figure out which structure is cleaner between using a specialized function or using parameters to accomplish the same thing (see code example below). Essentially, I can reduce the number of ...
16
votes
2answers
528 views

.NET Self Reference

I am evaluating an open source CMS called Piranha (http://piranhacms.org/) for use in one of my projects. I found the following code interesting and a bit confusing, at least to me. Can some help me ...
0
votes
0answers
25 views

Send Messages in Spark Streaming

Except Kafka which offers asynchronous communication among nodes in a cluster, how is achieved synchronous communication in Spark-Streaming? For example can I call HTTP request/response somehow?
-1
votes
0answers
17 views

Layer Bridging in iOS SDK?

I'm trying to analyze iOS sdk's architecture for a college assignment. I'm unable to find any information about layer bridging in the architecture i.e. for example can the Cocoa Layer directly ...
-3
votes
0answers
26 views

Design Pattern for Material Feasibility Check service as described below

We have MaterialTemplate, Material as below MaterialTemplate{ MaterialType materialType, int length, int width, int complexity } Material{ MaterialType materialType, int ...
1
vote
2answers
79 views

Security Issues with RESTful Authentication & Session Management

I'm trying to implement authentication and session management for a microservice. In order to do the process RESTfully, I understand that I'll need to use some kind of token-based authentication to ...
9
votes
1answer
182 views

Why is it called Software Configuration Management (SCM)?

When I think of software configuration, I think of a file that is read by runtime - said file would contain things like the port a server might use, whether to use encryption, and paths of various ...
0
votes
2answers
97 views

Dealing with data download which could take days to download

I have a situation on the front end where a user clicks on “Download” button and the query behind the scenes is going to take over a day. I have a Spring boot web app running as far as web services ...
1
vote
1answer
63 views

How to version control common libraries? [duplicate]

For example, I have multiple projects which shares some common libraries: ProjectA CommonLib1 CommonLib2 ProjectB CommonLib1 CommonLib2 At the moment, they are all in one big repository: ...
-1
votes
0answers
28 views

Tracing what caused the web browser to issue a request?

With dev tools for all major browsers I can see list of http requests being issued and their responses and their http codes 200, 500 , 404 etc. My question is : I there a way in any browser or tool , ...
2
votes
1answer
67 views

How should I define hardcoded strings with some variable parts? Reuse more characters? Or keep the whole sentence?

for example, sometimes I need to define a hardcoded string with some variable parts, I often have trouble to choose the style: style 1 : reuse every characters when possible showMessage(num){ let ...
2
votes
1answer
167 views

How do I use polymorphism instead of instanceof?

I'm trying to make an abstract board game. In the game, a player can choose to make multiple actions within one turn such as placing, moving, or rotating a piece. I'm not sure if whether or not my ...
1
vote
1answer
64 views

OpenGL and global state

It is generally understood in software engineering that global state is bad. However, OpenGL has been designed very much embracing the concept of global state. many of the things you modify will ...
0
votes
1answer
36 views

Pattern for sequencing steps in a job to run sequentially against external system

I am trying to understand how I can make the code for this easy to understand and debug too. The reason I'm asking is that it feels like the kind of scenario which has probably been tackled before ...
0
votes
1answer
20 views

Cross-domain data binding

I've been developing several front-end web-applications recently that bind against a database using a RESTful CRUD api. I've noticed a massive amount of boilerplate code going into defining the API. ...
-2
votes
0answers
28 views

Best way to implement an optional class parameter in a large inheritance hierarchy in python?

I have a large hierarchy of classes -- 4 levels deep at the moment, includes over a dozen classes, and may be expanded in the future. All instances of these classes should be able to somehow accept an ...
1
vote
3answers
59 views

What methods exist to decompose documents in order to move keys/values to a database application?

I am working for a company which has an abundance of Word and Excel files festering away in the depths of their file server, probably like most other companies. The problem is that each of these files ...
0
votes
0answers
49 views

How UUID is generated in Objective C or Swift

I understand that UUID is generated based on bits given by timestamp. For instance, if two iOS devices at the exact same time executes the following statement then what possibility is there that it ...
0
votes
1answer
53 views

User, Customer, Company Relationship

Is there anyone who can explain the relationship between customer, users, and the company ? As far as I understand, the product is used by the users, and before that product is designed, the users ...
0
votes
0answers
62 views

For a responsive app, do frequent conditionals checking device size indicate a code smell or antipattern?

I have joined a team working on a large and mature responsive website (using a javascript MVC framework), and one thing I frequently see in the codebase is branching code in controllers or components ...
4
votes
1answer
134 views

How to document multithreaded applications

I'm working as a support engineer, having access to the source code, and I'd like to use this opportunity to document the source code, but I stumble on a first question: how do I even start? For ...
1
vote
1answer
30 views

NUnit specify TestCaseAttribute on implementation or create a test method

Based on this question about the correct usage of nUnit's TestCaseAttribute, I was wondering whether to specify the test case directly on the implementation or create test methods (as when using ...
1
vote
3answers
186 views

Normalizing story points across teams, is there a big problem?

We have been thinking about comparing product size/effort at least roughly and this is what some suggested: There are multiple products, each with one scrum team All the scrum teams estimate their ...
4
votes
1answer
113 views

How to deal with redundant requirements when using Scrum

Changeability is a quality attribute of requirements that is emphasized in some classic literature. To get changeability of requirements, they must not be redundant. However, when dealing with ...
0
votes
1answer
56 views

Multiple classes working on an object

This might be a bit of a wide question but I want to understand if it's the correct way to do it. Assume I have a couple of classes all doing operations on an object. First class takes the object, ...
1
vote
2answers
54 views

Structural problem related to Dependecy Injection and Asynchronous Operations

I'm implementing the onion architecture with webapi, service layer, repository, unit of work and the domain classes. I use also DI, using simple injector. But my issue, is how can I implement a ...
1
vote
3answers
161 views

How can I represent something like “latest news” in REST api?

Can't figure out how. 1) Resource identification. How do I identify the resource? Something like this? /latest_news/<id> That doesn't seem right. 2) Now suppose you have a URL for the ...
1
vote
2answers
104 views

Can nested loop have linear time complexity

I was going through the traditional quick sort algorithm. I had a look on the partition algorithm in a couple of places and the implementation difference was very subtle. Here are the 2 approaches: ...
1
vote
3answers
160 views

Implementing Heartbeat using REST API

I have a server which is exposing API through REST. I need to implement a simple Heartbeat service to monitor this server status and availability of API. The interval of Heartbeat check will be every ...

15 30 50 per page