All Questions
0
votes
0answers
8 views
Scala Callback Pyramid of Doom
I would like to solicit some general design principles and best practices to avoid creating a callback pyramid of doom particularly in the Scala language.
Consider the following rudimentary and ...
-4
votes
0answers
26 views
Is .NET an acronym for what?
I am finding my way through the basics of C# and I have an understanding of what the main 3 acronyms translate too. CLI, CIL, JIT and VES. Does .NET translate to a full expression? I am only guest at ...
0
votes
1answer
24 views
Dashed line in Crow's Foot notation
I am learning about the Crow's Foot notation, and there is something that I don't understand, some tutorials shows an Identifying Relationship as having a straight line, and a Non-Identifying ...
5
votes
5answers
216 views
Aren't “deep composition hierarchies” bad too?
Apologies if "Composition Hierarchy" isn't a thing, but I'll explain what I mean by it in the question.
There isn't any OO programmer who hasn't come across a variation of "Keep inheritance ...
0
votes
1answer
38 views
If I have a case with 2 subcases should I use 1 or 2 Use Cases?
Let's say I have this example. There is a chef (actor) and a Use Case cook food. If there are 2 food options to cook (lets say pasta and pizza). Should I create 1 Use Case : CookFood and then in ...
0
votes
0answers
21 views
Model Checking and Formal Verification of Distributed Systems
We all know that distributed systems are difficult to implement correctly because they must handle both concurrency and failures: machines may crash at
arbitrary points and networks may reorder, drop, ...
0
votes
0answers
21 views
Handling OAuth callback URL
I've been reading the OAuth 1.0a RFC: https://tools.ietf.org/html/rfc5849 . Most of it is pretty clear. However, I have a few questions:
I can't understand why the oauth_callback is sent when ...
0
votes
0answers
25 views
Design for iOS app backed by API
I was wondering if anyone out there has general tips for how to structure an iOS app backed by a REST api. There are basically two approaches to this that I've thought of
API calls placed ad hoc in ...
-1
votes
1answer
43 views
Converting a large PHP codebase from mysql_ to PDO
At my workplace we're soon going to be tasked with removing SQL injection vulnerabilities from a large code base. The application was originally written around 8 years ago and after years of bolt-ons ...
0
votes
6answers
120 views
Does dependency injection belong in contructors, setters or non-setter methods?
I can write code like:
var dependency = "Hello!"
var something = new Something(dependency);
something.DoStuffWithDependency();
Or I could write it like:
var dependency = "Hello!"
var something = ...
0
votes
3answers
93 views
Comparing objects with tolerance
The following code says that c1 == c2 and c2 == c3, but c1 != c3.
TOL = 0.11
class C:
def __init__(self, x):
self.x = x
def __eq__(self, other):
return abs(self.x - other.x) ...
0
votes
0answers
9 views
What US laws exist around storing/processing personal data of US citizens outside of US? [migrated]
If a company is located in the European Union and stores all personal data in EU servers (to comply with EU regulations), will it comply with US regulations (including state laws)?
Here are few ...
1
vote
1answer
67 views
Repository Pattern with Multiple ORM
We are developing the application with MVC and Repository Pattern. Currently we are using EF as an ORM. But Later we need to change the ORM to nHibernate.
Any Idea on the architecture.
Currently I ...
-1
votes
1answer
114 views
Start ten thousands of Quartz jobs [on hold]
I'm new in Quartz and I want to start a ten thounsand of Jobs.
As I know, Quartz can be used to create simple or complex schedules for executing tens, hundreds, or even tens-of-thousands of jobs.
...
0
votes
1answer
27 views
ASP session between iframe and page
I have a situation where my ASP.NET MVC application can be loaded directly or in iframe. It uses ASP.NET Identity. When I open the site from iframe, log in and after open the site directly it keeps me ...
0
votes
0answers
68 views
What makes the Scala REPL slow intially? [on hold]
When I first launch the Scala REPL through scala, there's a noticable lag compared to that for other languages. In addition, the first expression I enter (as simple as 1) takes seconds to come back. ...
56
votes
8answers
7k views
I changed one method signature and broke 25,000 other classes. What now?
I started a new job recently where I am working on a very large application (15M loc). In my previous job we had a similarly large application but (for better or for worse) we used OSGi, which meant ...
-1
votes
0answers
24 views
std::bind, I can't make it read values for one of the arguments [on hold]
I am currently working in an already developed C++ project. The existing files are the following:
-main.cpp
-HydroModel.cpp
-ODESys.cpp
-HydroModel.hpp
-ODESys.hpp
-ODESysSol.hpp
In the main.cpp I ...
1
vote
1answer
23 views
Aggregated Notification Microservice
The Problem
We are currently architecting our new Notification Microservice but having trouble with how to handle aggregated emails. What we need to do is instead of sending one email every action ...
1
vote
1answer
34 views
Control access to objects properties
I'm a front-end web developer and currently facing a situation where I have one form with few parameters of one object and to save them I should make few requests to few different API endpoints. As I'...
0
votes
0answers
48 views
Java application - When should we use multiple threads and possible ways to schedule thread?
I write a simple Java app that plan to run once weekly. I designed it as following:
QueueA<>
QueueB<>
Thread1 :
some class
QueueA.add()
Thread2:
Check QueueA every 10 second
then, ...
5
votes
2answers
143 views
In Java 8, is it stylistically better to use method reference expressions or methods returning an implementation of the functional interface?
Java 8 added the concept of functional interfaces, as well as numerous new methods that are designed to take functional interfaces. Instances of these interfaces can be succinctly created using ...
5
votes
3answers
105 views
what is a Cloud-Native application?
I have heard this term a couple of times. What exactly does a Cloud-Native application refers to? What are the features of a Cloud-Native applications?
4
votes
0answers
57 views
Keeping a clean git history when using gitflow - unmerged commits on develop
Using gitflow, when creating a release-1.0.0 branch and merging it to both master and develop, both branches will have a missing commit:
master wont have the commit where release-1.0.0 was merge to ...
0
votes
2answers
25 views
CPOL derivative code translation and MIT licensing
I've created a Java project based on a C# sample application that was published under the Code Project Open License (CPOL) which sounds to me quite similar to MIT.
As I was the only user of this ...
5
votes
1answer
126 views
Determining the best way(s) of adding unit tests to a large project that makes good use of stored procedures
We work on a fairly large casino/gaming/wallet/lottery platform. It's a turn-key application that is currently in use by 4 clients, and soon to be much more. I've made some bullet points regarding the ...
0
votes
0answers
35 views
concurrency in hierarchical filesystem databases
I am writing a small program that is a client of some protocol. I wanted this program to have a filesystem database. the main directory would contain one directory for a server that is configured, and ...
0
votes
1answer
29 views
Is it possible to secure both web page and web API access with a JWT?
I am trying to wrap my head around having a secure WEB API and at the same time securing the client that accesses the WEB API. I am hoping someone can point me in the right direction.
Here is my ...
3
votes
5answers
133 views
Disadvantages of using a nullable foreign key instead of creating an intersection table
Say I have the following ER diagram:
Now if I represented the relationship using a foreign key of School in Student, I could have NULL values (because a Student
is not required to belong to a School),...
1
vote
0answers
19 views
Why is a monad prototype required for Douglas Crockford's monad demo code? [migrated]
Note: while the code in this question deals with functional programming/monads, etc., I'm not asking about functional programming (nor do I think this question should have tags related to functional ...
1
vote
3answers
221 views
How exactly is bytecode “parsed”?
How is Bytecode "parsed"?
It is my understand that Bytecode is a binary, intermediate representation of the syntax of a given programming language. Certain programming languages, most notably Java ...
2
votes
2answers
142 views
What is run-time support required by a language?
I read somewhere that C is preferred for drivers and firmware on embedded systems because it requires less run-time support. I could not understand the part 'run-time support'. My understanding is C ...
0
votes
0answers
16 views
How to design and store life cycle or states for a java entity bean?
In our application, we have a pojo mapped to some entity. One pojo refers to one entry in DB. There are multiple steps for it's life-cycle. It gets created freshly, it goes 'live', after some ...
0
votes
1answer
16 views
MVC List Children - Which Controller
We are currently devloping a ASP MVC Webapplication. In this Webapplication, we have a User that can have 1 or many contracts.
We currently have 2 controller:
UserController
ContractController
Now ...
2
votes
1answer
131 views
Is there any commonly accepted guidelines about how to write modern C?
I have a Strong Java/Groovy background and I've been assigned to a team that maintain quite a big C code base for an administrative software.
Some pain points, like dealing with blob in the database ...
1
vote
1answer
33 views
How to preserve parameter names when using bind to define new methods
I'm writing javascript object that wraps REST requests. For every operation on the server there is a method that accepts the parameters for the request and a callback that will receive the results. (...
0
votes
1answer
50 views
multiple php page within a main php page
Is it ok if I include many PHP file within a PHP file? What is the best practice? Or where can I learn the best basic practice of writing PHP?
Why I do this
Is because I often can change the content ...
23
votes
8answers
3k views
C# Generics - How to avoid redundant method?
Let's assume I have two classes that look like this (the first block of code and the general problem are related to C#):
class A
{
public int IntProperty { get; set; }
}
class B
{
public ...
1
vote
2answers
58 views
Java application - How to optimize database calls and space & time which is more important?
I am writing a simple Java app to run weekly. The app need call database to get data, check it and update.
The flow I need is little as following:
select configure,orgID where status=true from orgs; ...
0
votes
0answers
14 views
Multiple native android application distribution in single apk
I am working on a native android application having multiple business modules. As of date the application is tightly integrated with all the modules.
I plan to break these into separate applications ...
6
votes
2answers
260 views
Why does Java use :: for method references instead of .?
I often wonder why Java uses :: for method references instead of ., e.g. why write
System.out::println
instead of
System.out.println
Of course, one might simply answer: "because the designers ...
0
votes
2answers
150 views
Is including headers inside a namespace always a bad idea?
The replies in this post come very strongly against including headers inside a namespace and Doxygen is confused if that is done (which suggests that its team did not consider that usage either). I ...
2
votes
2answers
61 views
When would I use additional phases in the deployment pipeline of a web project?
All of my projects up to this point have been solo (I develop single page web applications). I've always used an IDE which automatically uploads changes to a test Amazon EC2 server over SFTP and I ...
0
votes
1answer
48 views
What type of architecture style does the MEAN stack most resemble?
What type of software architecture style does the MEAN stack most resemble?
I am thinking Client/ Server because of the way messages are communicated between the different modules in both.
However, ...
0
votes
1answer
32 views
Do context diagrams have cardinalities?
Can someone explain if the context diagrams(as used in requirements engineering) have cardinalities(as defined in UML diagrams)?
What I want to ask is, are cardinalities part of a context diagram's ...
0
votes
3answers
175 views
How and to apply Single responsibility principle correctly? [duplicate]
From Wikipedia on Single responsibility principle SoC
... class should have responsibility over a single part of the functionality provided by the software, and that responsibility should be ...
1
vote
2answers
122 views
How to think in Object Oriented way when it comes to passing messages?
Somewhere I have read that "Object Oriented" is a misnomer and that OO should really stand for "message-oriented programming".
What I am not clear about is ... what does it mean? For example in ...
-3
votes
0answers
64 views
Compile C with Rust? [on hold]
Is there a C compiler written in Rust or is it possible to write a C compiler in Rust? The background is that I use a small operating system in Rust, and if I understand correctly I would be able to ...
41
votes
7answers
5k views
What would be the disadvantage to defining a class as a subclass of a list of itself?
In a recent project of mine, I defined a class with the following header:
public class Node extends ArrayList<Node> {
...
}
However, after discussing with my CS professor, he stated that ...
0
votes
0answers
84 views
Is my persistent storage strategy efficient for my project's objectives?
I am trying to build a key-value store (to learn, I am a student) that would serve as a persistence layer for software applications. I have looked into the database literature and dived a little bit ...