0
votes
1answer
5 views

How to separate the logic of my application into a dependency when it is coupled to the structure of the data?

I am about to start prototyping a 'quiz'-like web application that tests test-scoring methodologies, and I have an interesting architectural question. Each quiz given to a user needs to use a set ...
0
votes
0answers
9 views

How to setup dependency injection framework in JavaScript

I'm creating a web page and would like to keep the UI and the JavaScript separate. To accomplish that I'd like to add event listeners after the UI elements have been created. I don't know if this is ...
1
vote
2answers
29 views

Continuous Integration and a Massive Refactor

I'm currently re-factoring a part of our application at work. I'm normalising a data structure from a flat list of fields to a parent/child relationship. This has an impact on all layers in the ...
-1
votes
0answers
8 views

Read subset of rows from a data table and post it in json and render it on a browser in table format

I have a data table that contains large number of records returned from the database, Currently browser gets all the records and are rendered on browser using client side pagination. Is there a way to ...
-1
votes
1answer
20 views

What data should I encrypt on a personal finance app?

I'm trying to create an app like mint.com and moneylover.me and I'm currently designing the database, I'm wondering what data should I encrypt beside password? since it is related to personal finance ...
2
votes
1answer
29 views

When are hooks the right design choice?

I've worked on a large Rails app where the use of ActiveRecord callbacks was rampant and harrowing. Saving a record often had unexpected side-effects and it was a challenge to reason about the system. ...
0
votes
1answer
12 views

What is the proper way of editing/updating many-to-many items in DB?

I have film's storage (3 tables in database): films{id:int, film:string} genres{id:int, genre:string}, films_genres{film_id:int, genre_id:int, probability:int(%)} (film_id, genre_id) is UNIQUE. ...
-2
votes
0answers
25 views

Do .pyc files in Python contain mnemonics

I'm interested for some time in CPython implementation of Python. I understand that .pyc files contain serialized bytecode, including opcodes. However do these files contain mnemonics? I think that ...
0
votes
0answers
19 views

REST API design: distinction between searching and getting all instances of a resource

At the moment, my (pretty standard) REST interface looks like this: POST /foo # creates a new foo PUT /foo/{id} # updates a specific foo GET /foo/{id} # returns a specific foo GET /...
-5
votes
0answers
19 views

MVC EntityFramework project

I have installed NopCommerce shopping cart eCommerce open source application. I am trying to learn real world programming architecture that is used in that application. I think it used Entity ...
-2
votes
0answers
8 views

Using The Apached Math Libraries with BigDecimal [on hold]

I need some working java code that uses that combines the apache math libraires to solve a 2 variable system of equations. An Example would be something like this Contraints x not equal to 0 x < ...
0
votes
0answers
18 views

Hybrid sql / nosql

I have a problem that doesn't seem to have an immediate fix and it confuses me. My main application stores data in mysql: Users Websites (metadata) Pages (metadata) The actual pages ...
-3
votes
0answers
13 views

SQL- get start and end date With a specific event

I have a database with with event dates and events. I need the start date and end date for a specific event. I am able to do this while specifying the event in a where statement, but I need the ...
1
vote
2answers
54 views

Nested functions: should I explicitly pass arguments or rely on scope?

Suppose I have a function f that uses two helper functions h and g to get the job done. There are two possible ways of dealing with this situation. (1) take explicit arguments and returns new objects ...
0
votes
0answers
13 views

Algorithm to generate all paths between two vertices of a graph in F#

Following a functional programming approach (no mutable data structures, recursion, etc) I have written a script in F# to generate all paths between two vertices of an undirected, unweighted graph. I ...
0
votes
0answers
18 views

Microservices in the Large (specifically: foreign refs)

There are lots of good resources on μServices that focus on concepts like Single Purpose, REST, Implementation and Deployment, CI/CD, Encapsulation and Isolation, Separating UI from API, etc. However,...
-4
votes
0answers
31 views

How to find and deal with errors while writing a file system library?

I need to know what is the best strategy while developing a public facing API that handles manipulating files. What error conditions I may need to handle? Reference: https://github.com/vivekimsit/...
0
votes
3answers
93 views

Is it bad practice to ignore some parameters while implementing a method of a interface?

Should an interface method implemented by a class always use all parameters? By interface I do not necessarily mean actual interfaces, these could be other (abstract) classes which are extended, too. ...
-2
votes
0answers
41 views

Practicing Thought driven development [on hold]

How to proceed programming in new language and in a completely different paradigm, how to understand the underlying architecture? one thought process would be to completely avoid it and on the other ...
3
votes
0answers
33 views

How do you model has-a (aggregation) relationships in functional programming languages

Just to be on the same terms: Aggregation is a has-a relationship, where the owned components can exist independently of the owning component.E.g. a pond and some ducks swimming in it. A duck leaving ...
0
votes
2answers
86 views

Why do programming language authors choose not to implement UFloat?

I realized I haven't seen this type in Objective C or Swift. But we have UInt. Is there some more Computer Science specific reason we do not have an Unsigned Float? Afaik it's not in c# too.
1
vote
1answer
27 views

Microservice architecture shared domain models

Lets assume that we have a Spring Boot application that uses microservices architecture. Each of the services has its own domain models, but each service must reference a User domain object. What ...
0
votes
2answers
62 views

Store and access my objects using an int id

I have created a class HidDevice to form objects which concatenates input from each HIDDevice separately until a special key (ENTER) is pressed. So each instance of HidDevice have fields like int ...
0
votes
0answers
47 views

Pass the parser to the sorter, or pass the sorter to the parser?

I have 2 objects that I'm not very certain what is the proper (or better) way I should use. I have a query builder object that constructs an SQL statement like $qb = new SelectQuery('users'); $qb-&...
1
vote
1answer
21 views

Consistency for disk write in a model object graph

You're writing an app where the model (as in MVC) is an object graph. Occasionally, you want to save this object graph to disk. What are some best practices to ensure that the write is consistent? (...
-2
votes
0answers
16 views

Minimum value of a node in a binary search tree

I am making a program that returns the minimum value of a binary search tree recursively and I don't know how to implement it. I am stucked here, please help def bst_min(t): if t.is_leaf == True: ...
9
votes
7answers
1k views

Is a while loop intrinsically a recursion?

I wondered whether a while loop is intrinsically a recursion? I think it is because a while loop can be seen as a function that calls itself at the end. If it is not recursion, then what is the ...
-2
votes
0answers
31 views

Difference Between `int static array[]` and `int array[]`?

I was to program a code for which i have to make a array to store more than million elements . But when i did it , it cannot store more than 120 thousand element so i read somewhere that if i instead ...
-2
votes
0answers
25 views

how to find each point of arc that i can draw the arc manualy in visual basic [on hold]

[![iwant acod that when enter the start point value and end point value and center point value in ther textboxes in the programe and hit button1 the programe will give me in msgbox coordinate of each ...
0
votes
2answers
50 views

What's the difference between writing to the memory address of a declared int and writing directly to an int*?

I'm writing a program in which I fscanf a file and write to the same memory address repeatedly. I tried the following: FILE *f = fopen(fname, "r"); int* num; while(fscanf(f, "%d,", num) != EOF) { ...
-2
votes
0answers
18 views

Name for “1:1” sourcefile - testfile convention

A classic convention for organizing test files is to maintain a 1:1 mapping between source files and test files. One common scheme is to simply append "-test" or "-spec" to the source filename and ...
-2
votes
1answer
86 views

What is a good OS for getting maximum performance out of a C++ program? [on hold]

I am looking to run a C++ program without any interference (context switching) from other processes. Is there a small operating system that will allow me to stop all other processes? Is there a bare ...
0
votes
0answers
16 views

Convention for writing the software details over the command line

What are the standard or more elegant ways of writing information about the software package? I have developed a package for one of machine learning methods in C++. I wish to provide information ...
0
votes
0answers
20 views

Using list of actions in language implementation

I'm implementing a small programming language as a hobbyist. My first idea was to compile the language to some kind of a intermediate language and then interpret it. However wouldn't it be a good ...
0
votes
0answers
7 views

How to properly test if a m3u8 video-stream is online and working properly?

I'm trying to define a method to properly define if an m3u8 video-stream is online and working correctly. What methods could I use? I want to make a cronjob that daily or hourly checks the validity of ...
1
vote
1answer
37 views

Should commit messages be explicit by themselves, without requiring a diff?

I have noticed that I recently wrote the following commit message: Since HTML changed, getting the index would always result in zero, since the element is now enclosed in a parent block. For ...
0
votes
0answers
18 views

File folder contents versioning system

I'm sort of inspired from Amazon S3 and looking forward to advise on building my own versioning system on the server using plain nodejs/javascript with files provided by the client. Would also ...
0
votes
1answer
73 views

Best way to encrypt passwords?

I've switched to PHP 7.0 very recently and I was wondering that if password_hash was better than making your own salt and using the crypt function. I have three examples of code and I don't know which ...
0
votes
0answers
35 views

Is it worth working on Google Closure now

I'm evaluating to whether to include this in my workflows. My workflow for JavaScript tools include and they offer me following. WebStorm (Excellent Code hinting, JSDocs comments, Refactoring etc.) ...
-1
votes
3answers
55 views

When should we use MongoDB?

MongoDB is a NoSQL database which I've found quite easy to use. Recently I had to develop a simple application which needed to collect some data using HTTP requests and store some results after ...
0
votes
1answer
28 views

Optimal load distribution with maximum workload

I need to find an optimal distribution of some matching tasks on multiple jobs; each job is limited by a maximum workload and the grouped tasks should maximize the workload within the same job. ...
-2
votes
1answer
45 views

Is Angular 2 ready for production use or should I use AngularJS 1? [on hold]

I want to learn AngularJS but on the website I see a button with the text Try the new Angular 2. Is Angular 2 ready for production use or should I learn and use AngularJS 1?
-1
votes
0answers
24 views

GIT, Docker and CI - How to do it effectively

Here is my current workflow... Note: This is all about the workflow. I use AppVeyor as a build server but it could be Jenkins or Teamcity or whatever. I am using Azure for the Cloud but it could be ...
-1
votes
1answer
30 views

Time complexity Computation

What will be the result of the time complexity of this piece of code i.e. int sum(int A[], int n) { int sum = 0, i; for(i = 0; i < n; i++) { sum = sum + A[i]; } ...
2
votes
2answers
29 views

How can I track down a dependency that is causing an X509TrustManager error without having the source?

I am maintaining and Android app that now suffers from an unsafe X509 TrustManager implementation. Since the app doesn't make any HTTPS calls except through dependencies, one of the dependencies is ...
1
vote
0answers
40 views

Is there a cross-platform way to open a TCP connection, send a HTTP post request and keep the connection open?

I'm searching for a way to open a TCP connection, send a HTTP post request and keep the connection open. It would be great if I can achieve this without administrator/root rights, from a command-line ...
1
vote
2answers
50 views

Refactoring to an inheritance hierarchy early on

I am building a management tool for recipes. Recipes have a bunch of data, including very generic stuff like an ID, tags, ratings and trivia. I currently only manage recipes, but i want to add support ...
-1
votes
0answers
33 views

Big web application on python [on hold]

I am experienced PHP developer. I am pretty familiar with tools in this language. I know, that for big complex application I'd use symfony or zend framework. On the other hand, for some kind of REST-...
3
votes
2answers
276 views

Is accessing lower tier members of an aggregate to perform an operation bad practice?

I am currently building a small project that is supposed to keep track of recipes. Each recipe has a bunch of information, including a rating for said recipe. Since the rating has some additional ...
-4
votes
0answers
26 views

C# and ASP .net [on hold]

I can work with C# .net (Windows based applications) PL, does that mean I now ASP .NET as well ? What are the additional things in asp.net apart from the programming part (C#) I have to understand\...

15 30 50 per page