4
votes
2answers
149 views

Distinguish different type of Comments

I would like to provide design decisions in the comments as well. I want design decision comments to be distinguishable from function contract comments, on cursory examination of source code. How to ...
-4
votes
0answers
22 views

how to call wit.ai HTTP API call with say merge and stop action using converse [on hold]

I have problem in wit.ai api call i call it successfully by python and node.js script but Not able to call it via HTTP API i used the wit.ai HTTP API doc for refrence https://wit.ai/docs/http/...
7
votes
1answer
162 views

Can the C++ template system be used to perform type safe operations of the relational algebra

Assume that the parameters of functions representing operations of the relational algebra are represented by individual types: structs or classes. An operation such as (natural) join will have ...
-7
votes
0answers
35 views

Hey want to Make Pop Up window [on hold]

I want to make a Pop Up window for my website so any one can guide me, that how to done this work professionally.
4
votes
1answer
68 views

Master-Slave Cluster - How to make sure the master is really dead for the slave to take over?

I have a in-house messaging system, similar to a message broker. We have one master message broker and one slave message broker. A message broker just receives messages and sends them to all nodes. ...
7
votes
6answers
5k views

Understanding “programming to an interface”

I have come across the term "programming to an interface instead of an implementation" a lot, and I think I kind of understand what it means. But I want to make sure I understand it's benefits and it'...
0
votes
1answer
174 views

Is it possible to run a program in C language without libraries?

I was working on a C program and i just noted that i can execute my program even if i didn't declared the required libraries, this is the code: #include <stdio.h> #include <string.h> int ...
15
votes
6answers
4k views

A language based on limiting amount of arguments passed to functions

The idea is inspired by the fact operators such as +, -,%, etc. can be seen as functions with either one or two arguments passed, and no side-effects. Assuming I, or someone else, writes a language ...
2
votes
1answer
65 views

Explicitly mark unexported functions in a DLL?

When writing an unmanaged Win32 DLL that exports functions, it's not uncommon to have some functions, variables and/or classes that aren't meant to be exported and are only for internal use within the ...
7
votes
5answers
2k views

Should I use initializer blocks in Java?

I recently came across a Java construct I have never seen before and was wondering whether I should use it. It seems to be called initializer blocks. public class Test { public Test() { /* first ...
1
vote
3answers
113 views

Euler's sum of powers conjecture. How to efficiently search counterexamples?

I tried to repeat this results: 27^5 + 84^5 + 110^5 + 133^5 = 144^5 (Lander & Parkin, 1966) and 95800^4 + 217519^4 + 414560^4 = 422481^4 (Roger Frye, 1988, 110 hours this is the only ...
12
votes
7answers
2k views

What is the “right” way to implement DI in .NET?

I'm looking to implement dependency injection in a relatively large application but have no experience in it. I studied the concept and a few implementations of IoC and dependency injectors available, ...
0
votes
2answers
119 views

Given an array of number, how to calculate to a target value

Chatting with a friend about a game we used to play, and thinking how to implement it in code. Here are the rules: Given a list of number e.g. {1,2,3,4} Try to use all the numbers from the list to ...
0
votes
1answer
32 views

Web app with a Node.js front end interefacing with a python script with sockets

Right now I have a webpage with various buttons and options that I'd like to use to send commands to a python script running on the webserver. The python script is being used to interface with devices ...
0
votes
0answers
31 views

Is passing controllers to another controller a good practice in AngularJS?

I have a register page that uses text inputs as well as an avatar input. There's another part in the website where the avatar input is also used, but it's used alone this time. So I'd like to make it ...
2
votes
0answers
233 views

How to use OAuth 2.0 roles and scopes to secure services

I have secured a REST API using OAuth 2.0 security, and I am not sure on how to configure security access using roles or scopes. There will be three types of clients: Public mobile app client used ...
-6
votes
0answers
43 views

What programs are there to use with Python? [on hold]

I know codeblocks and codelite are for C and C++ programming but what is out there for Python users? I would prefer something free at the moment since I am a newcomer to Python.
-2
votes
0answers
82 views

Why use camel case on the client if DB has snake case? [duplicate]

Why don't we all use snake case on the client if we seem to recommend snake case on the db schema side of things? It seem like everyone uses camel case on the client. This would remove the middleman ...
0
votes
0answers
39 views

Dynamic Printing Options

I believe this is the correct community to post this question in, if not please point me to the correct one. Overview: Current web app gives users the ability to print labels from specific printers. ...
0
votes
1answer
99 views

How to compare two objects for percentage of equivalence

I'm trying to create a nodeJS application. It allows users to rate a bunch of songs and it stores them in their user profiles. I use this information to compare them to other users, and try to find ...
4
votes
0answers
34 views

Qt Quick dynamic QML vs Apple's App Store rules

Imagine that I've got a piece of custom audio hardware that I'd like to be able to control in a multitude of ways via a tablet/touchscreen GUI. In particular, my goals are to have the tablet's ...
0
votes
1answer
30 views

ASP.NET - Data Encryption & Decryption framework designs

I have the following app scenario where i would need to implement the cell-level encryption. Database - MS SQL Server Web Technology - ASP.net MVC Existing app scenario:- Currently the web ...
2
votes
3answers
48 views

Shared development and CI database

I'm just about to set up CI for my web application. I'm using Bitbucket and Pipeline beta as a CI. The web application is strongly coupled to the database, nothing can be tested without data in it. ...
1
vote
1answer
137 views

python: detecting if my method is called with 0 or 1 args

I want to write a suite of methods that act as getters when passed zero arguments and as setters when passed a single argument. I have two two reasonable implementations, shown below. Is one better ...
0
votes
1answer
141 views

Business logic - Server side vs client side [duplicate]

In my current project, I have a screen which pulls data from several webservices, pulls data from database via backend API and checks that all resources have the same data or not. The other ...
2
votes
1answer
153 views

When to lock an object in a game

I'm writing a game in Java where each game object has a number of properties, but these can all be changed in one of two ways: Every second, a tick runs which may automatically cause a change. Users ...
-1
votes
0answers
12 views

E2E Test Automation Metrics?

Question: Are there any valuable metrics on E2E automated tests? (Does it make sense to gather any data around them?) Context: For example, when I wrote my unit tests, I implemented a test coverage ...
12
votes
11answers
2k views

How do I know if the compiler broke my code and what do I do if it was the compiler?

Once in a while C++ code will not work when compiled with some level of optimization. It may be compiler doing optimization that breaks the code or it may be code containing undefined behavior which ...
-1
votes
2answers
184 views

Why use using-statements when you want to reopen connections? [on hold]

In a Winforms project I've been working on recently, I've been dutifully using using-statements for objects that implement IDisposable. I want to reopen a database connection, however because the ...
0
votes
2answers
196 views

How to implement backtracking to check if all fields have been traversed

I have been learning algorithms and trying to solve problems and now I have the following problem: In a 4x4 matrix, and it contains fields with height. There is a start field with given height also ...
2
votes
1answer
25 views

Rewrite Events in EventStore

I'm thinking about whats the correct pattern to handle this case in CQRS / Event Sourcing: I created events to calculate a balance and system goes into production. By accident, this implementation ...
2
votes
3answers
112 views

Data from devices with unreliable clocks

Are there any viable approaches to dealing with data coming from devices with unreliable clocks? We have a database system running on a central server. The latest addition to the system is a bunch of ...
4
votes
3answers
475 views

Is it a good practice to use suppress warnings in your code?

I use @SuppressWarnings("unchecked") and @SuppressWarnings("null") mostly above methods to let the code compile without any warnings but I have my doubts. Found this Stackoverflow question. Jon Skeet ...
0
votes
1answer
25 views

Is there a way to control a looping Python script with Heroku?

I have a Python script that continuously makes GET and POST requests to a third-party API at about 1 request per second. It uses a while loop, so the requests all come from the same process. Currently,...
4
votes
2answers
440 views

Synchronization between two systems using MongoDB as changelog

We are developing two related system. One of them (A) will be installed in our customers' machines. The remaining (B) will be used by my organization. Each system has its own database (relational) ...
4
votes
1answer
64 views

Use Coded UI Tests for Integration

I have a couple of users who have a User Interface for an application that they must use to do their job. The UI can be cumbersome to navigate to perform some time critical tasks. This UI does not ...
5
votes
3answers
4k views

Difference between these 3 manager roles

Roles: Development Manager Program Manager Project Manager I have read a bit and independently I understand them well enough. However when you combine them, it seems to me that some ...
1
vote
1answer
47 views

Class access modifiers on tested implementations

Suppose you're writing an interface that's suppose to be your public API, let's call it Session. It's implementation is called SessionImpl and it's going to be injected by your DI framework. I'm ...
0
votes
5answers
131 views

Best approach to write on a database with two webservers

I have an architecture/performance problem. The problem: One voting based application with: 1 loadbalancer, 2 webservers and a database 10 candidates and 200k voting users. There may be more than ...
1
vote
1answer
72 views

Inner and outer class relationship: should outer class be friend of inner's?

Is this design bad? Does it break encapsulation? The structure class B is a component of class A. Therefore, class A needs access to class B's members. Let a house be class A. Let a housekeeper be a ...
-3
votes
1answer
278 views

What is disinheritance in object oriented programming? [on hold]

I am confused over Virtual Inheritance and disinheritance ? Is both are same ?
1
vote
1answer
224 views

Best way to structure many-to-one allocation of users to projects in NoSQL

I apologise if this is a bit of a stupid or broad question, but I'd like some general feedback please! Say I have this DB structure for users (in Mongo/JS, but really it's all pseudocode- and the IDs ...
1
vote
1answer
95 views

Simplifying code of a calculator (help)

This is part of the code of a calculator that works on command line. It works fine and the math is correct but it's a little redundant: switch(Operator) { case "+": result = num1 + num2; ...
1
vote
1answer
71 views

What do I have to provide under the GPL as a website developer?

I am building a site with a GNU licensed program called OpenCart. Now I am not "distributing" anything.. but people can see my website and interact with it. Generally I avoid GNU like the plague ...
1
vote
2answers
747 views

Shift bytes through a fixed sized buffer

I'm writing an InputStream that processes data streams containing "trailer" data. That is, the final n bytes of the stream is a piece of data that must be handled separately and shouldn't be returned ...
124
votes
10answers
34k views

Is Ken Thompson's compiler hack still a threat?

Ken Thompson Hack (1984) Ken Thompson outlined a method for corrupting a compiler binary (and other compiled software, like a login script on a *nix system) in 1984. I was curious to know if modern ...
38
votes
7answers
6k views

In software programming, would it be possible to have both CPU and GPU loads at 100%?

This is a general question on a subject I've found interesting as a gamer: CPU/GPU bottlenecks and programming. If I'm not mistaken, I've come to understand that both CPU and GPU calculate stuff, but ...
0
votes
0answers
89 views

A modification of singleton pattern

"Singleton" is widely considered anti-pattern ("bad" in everyday language). What about this alternative modified singleton pattern? An object constructor for our class ensures that at any given ...
0
votes
2answers
73 views

Static factory method in base class

An increasingly popular definition of factory method is: a static method of a class that returns an object of that class' type. But unlike a constructor, the actual object it returns might be an ...
1
vote
0answers
27 views

How to deal with weekly schema updates on database production server? (ASPNet MVC and Entity Framework)

I'm working with scrum methodology. thus weekly schema updates are performed to the final product. However our customer is already populating the database. How can I update the database without ...

15 30 50 per page