0
votes
0answers
5 views

Generic Asserts in Unit Tests

I've been dealing with a Sr Dev recently that loves unit testing. That's great! I'm not sure I agree with his testing methods though, contrived example: function foo (String $var) { switch ($var) ...
-1
votes
1answer
10 views

Should I store just foreign key ID or additional information relevant to this item?

I believe everyone encountered this example numerous times, where there is a primary/foreign key (parent/child) relation. Now, I am interested when to add just a foreign key ID instead of all/some ...
0
votes
0answers
11 views

Major or Minor Revision Change when Implementing an Interface

I am using semantic versioning 2.0.0. In my situation I have a concrete implementation of some interface A in one library. And I have the interface that's being implemented (call it B) in another ...
3
votes
1answer
37 views

Language independent logging system

I have a software which logs various events into a database (SQLite). Currently the stored datas are : Message Date Category Criticality The logs are written in the current software language. Which ...
-1
votes
0answers
12 views

Design patterns for handling patterns in object sequences

There some times appears a task when you have a sequence of object and you need perform some action when a particular pattern (subsequence?) occurs. As more concrete example we can imagine a log ...
3
votes
1answer
37 views

Adding to a finite set of options; an API breaking change?

Take an HTTP API endpoint which spits out the following response model: { "type": "Dog", "name": "Jessi", ... } The type field has been described in the documentation as being one of Dog,...
0
votes
1answer
47 views

Progressive Enhancement as a language feature

Progressive enhancement usually refers to web content, and the idea of having a page that is readable before it's fully functional. I'm suddenly preoccupied with the idea that I can't progressively ...
2
votes
0answers
25 views

Differentiate between snapshots and official releases, while deploying exactly what has been tested

Suppose the following situation: A CI server generated regular snapshot artifacts At some point, an artifact is considered "stable" and is given to QA for testing If it passes, it's deployed as an ...
-5
votes
0answers
28 views

How web-developers display items of an E-commerce site? and how can we make clients capable of using our Newly Made Website? [on hold]

I am really confused on how web developers display their items on a E-commerce site. I know I can use tag, but what about my Client? If my Client can edit or even read code. The client won't be able ...
1
vote
2answers
62 views

If no extra #include required, is “this method doesn't suppose to be changed” a good reason to define a method in .h?

Suppose I am developing mobile applications using C++, and I found some methods are not suppose to change once written, for example: class MyClass{ public: float kmHrToms(float kmHr){ ...
0
votes
2answers
78 views

How to work on git local branch, using pull to update but without push

I am working on a local copy of a large project on github. Most of the changes I make are modifications to tailor the application for a speific use case, as such they are not going to be accepted by ...
1
vote
1answer
29 views

Is it appropriate to use Semantic Versioning for the specification for a key/value file format?

I'm writing a Python tool to convert/store the data from a commonly used plaintext file format for volumetric data generated by computational chemistry calculations into the binary HDF5 format using ...
-4
votes
0answers
15 views

What is the Tfs_ClassLibraries database in TFS

Trying to understand the database migration process with regards to TFS. Most articles (for e.g. this one) talk about config database, team collection database, SharePoint and reporting services ...
2
votes
5answers
144 views

Compromise between formal correctness and convenience in database relations

Suppose that you are modeling and application in which you'll have 4 kinds of entities, say a Person a Job a Machine a Chemical Now you have to model all possible relations (N:M) between those ...
0
votes
1answer
37 views

Arbitrary protobuf message as byte-array over Websocket - how to determine actual message type upfront

Protobuf is nice and dandy, but it was not made with self-description in mind. Now this is totally okay if you're using a well-defined protocol and want to replace e.g. SOAP-messages or just want to ...
-2
votes
0answers
33 views

How to accomplish high-availability / failover for a client-server application? [on hold]

Is there a best practice to implement high-availability through replication or some other approach between two applications? The goal is to get a hot-warm scenario where if the hot app fails due to ...
2
votes
0answers
42 views

Should all structs that are expected to be read from binary be marked as packed?

I know that some structs, may, or may not, add padding between elements. My current project is reading input from /dev/input files. The binary layout of these files is defined in <linux/input.h>...
1
vote
1answer
40 views

How to share new features in a large multi module project

I have been working in large multi module projects over a period of time. One major issue I faced is, how to communicate to other teams of a new feature which they may be interested in. Consider this ...
-1
votes
0answers
12 views

What's the right way to notify a Xamarin.Forms ListView that it's not refreshing anymore in strict MVVM

I am currently trying to get my head around MVVM (Xamarin.Forms in this particular case) and I stumbled upon an issue that's eludes itself from my strict understanding of MVVM. I have a Page with a ...
5
votes
1answer
54 views

Should I retrieve related entities from the parent entity or the service layer?

Let's say I have a three tier application structure, with Presentation, Service and Data layers. The data layer is managed by an ORM and has two models/entities, Show and Episode, with a one-to-many ...
1
vote
3answers
69 views

Method requires concrete implementation of collection. Should I change all upstream methods to return concrete implementations?

I have a method processDataAssumingLinkedHashMapInput() that processes a Map. The Map must be a LinkedHashMap ordered by values. Data comes from getStrIntMap(query). This method gets resultSet from ...
0
votes
0answers
31 views

How should I implement generic datagrid for CRUD Operations?

I wrote multiple times different apps that have following requirement. CRUD Operations via DataGrid control... Everytime I start new prject I write new code for same requirement over and over - what ...
4
votes
2answers
132 views

If I have ten objects, should there be ten controllers for a Web API?

Is it good design to have a controller for each object of your API? I know this is a short question, but it's really a fundamental question that I do not know. Say I have a school or a CRM. That is ...
-1
votes
1answer
97 views

Can RSA be used to secure client data before sending to server? [on hold]

So one day i was reading about RSA and over there it was written that we can secure the data using the public key. So as an idea can I secure the data on the client itself before sending it to the ...
-3
votes
0answers
34 views

Suggestion about using include VS class [on hold]

Sorry for the title but my question is a little more complicated. I'm new on PHP so I'm some basic doubts. I wrote something like: switch ($variable){ case "value1:": include "page1.php"; break; case ...
1
vote
0answers
134 views

Does using returnTrue() or returnFalse() functions a code-smell?

I was trying to understand how jQuery's cross-browser events work, when I noticed these two functions in the source code: function returnTrue() { return true; } function returnFalse() { ...
-4
votes
2answers
111 views

What to do with old code? [duplicate]

Often I change code but I don't know if I might need the old one, I can leave it under comment but then I find myself with lots of green lines while I hardly can read the real code. Thanks.
2
votes
1answer
91 views

“Nightly” a good place for experimental features?

In my day job I work on a tightly controlled project with features and overall scope ultimately decided on by committee. Often the final features are the result of a single (or multiple) member's ...
-2
votes
0answers
35 views

How can I marry phpBB and Laravel into one website?

I hope this is the right place for this question. If not, I can upload a fatted calf as sacrifice to the gods of stack exchange. So I have an existing phpBB site that has grown quite a lot and has a ...
9
votes
3answers
142 views

Multitudes constructing one implementation. DI hopeless? Use service locator?

Say we have 1001 clients that construct their dependencies directly rather than accept injections. Refactoring the 1001 is not an option according to our boss. We're actually not even allowed access ...
-3
votes
0answers
19 views

What method exactly creates line in linechart javafx?

I still couldn't figure out what step actually creates line in linechart of javafx. Is it that xychart.series object itself a line object? Or is that lineChart.getData().add() step adds line? What i ...
-1
votes
2answers
64 views

multiple uses for original software [on hold]

How does a programmer figure out multiple uses or applications for the original software he/she has written. I am an artist who has designed a RPG game with several different and separate applications ...
0
votes
5answers
154 views

Is consequent and efficient refactoring enemy of code reviews in a legacy code context?

There are some Tech Leads that perform code reviews for each Git pull request. Apparently, a very good practice to be aware of the evolution of code. Basically, they expect to inspect a few lines of ...
-1
votes
0answers
48 views

How do I prevent a user from bypassing licensing in my application? [duplicate]

What stops a user from bypassing any licensing requirements I may build into my software? For example, if in my bootstrap method I have something like checkLicense() etc, what would prevent someone ...
2
votes
2answers
35 views

How can I maintain a reference to a set of defaults

I'm currently trying to better design a database structure for defaults where a reference to preset defaults is maintained globally, but the system is flexible enough to allow for new defaults to be ...
-2
votes
0answers
19 views

UrhoSharp wrapper for hololens and desktop [on hold]

I have a problem that bugs me for a while. UrhoSharp has classes for Desktop UI and also for hololens (if you plan to target hololens) and their corresponding events and controls. I want to make a ...
0
votes
1answer
30 views

CQRS + Event sourcing - event groups and event propagation

This is my current CQRS use-case setup: Command DTO is received in application layer handler where we map Command DTO to appropriate domain objects if needed, re-hydrate aggregate root from repo and ...
-5
votes
0answers
32 views

Does this show the use of public and private keys sufficiently? [on hold]

I have a simple web server running using HTTP. I generated some keypairs for a client that is supposed to encrypt using the web servers public key. When I send data via POST the web server decrypts ...
2
votes
1answer
59 views

How does the Aggregate Root concept and the Repository Pattern solve DRY in database operations?

If I have ten classes, and they all need CRUD operations, how does an Aggregate Root and the Repository Pattern solve me having to write lots of boilerplate code (the DRY)? Take the example of a ...
5
votes
2answers
282 views

Is an interface with only getters a code smell?

(I've seen this question, but the first answer goes about auto properties more than about design, and the second one says hide the data storage code from the consumer, which I'm not sure is what I ...
0
votes
3answers
140 views

Is a singleton with an update method and software state verification a valid pattern?

Stack overflow suggested that this question my be better suited here. I normally work in c#, but I'm working in a vb.net net application currently. So feel free to respond with vb.Net or c#... ...
4
votes
0answers
269 views

Does C use “$”?

As a general rule, programming languages are designed for use by humans, and thus for entry using a US-QWERTY keyboard. (This makes some number of conceptual skips, myself as proof as I'm doing most ...
2
votes
2answers
56 views

Introducing behavioural differences in a complex domain model

Assume we are building a system for managing large, tree-like domain-structures like banking loans or insurance contract. At the root of the domain model is a Loan class. It serves as an entry point ...
-5
votes
0answers
44 views

Angular2 Data manipulation best practices [on hold]

I begin in TypeScript and Angular2 programming, I have APIs for my business logic, should I create model classes or interfaces, or I just manipulate my data as json objects ? PS: I have a NoSQL ...
1
vote
1answer
96 views

Dependency Injection WIth Parameterless Constructor

Let's assume that I have the following interfaces and classes: public interface ITest { } public class Test : ITest { } In NinjectWebCommon.cs: kernel.Bind<ITest>().To<Test>(); And ...
-3
votes
1answer
101 views

Do I have to use Wordpress/frameworks as a web developer? [on hold]

Ive been making websites for a while, and I'm pretty well verse in JS, HTML, php, etc. Ive just been building them from scratch and hosting on Bluehost. I'm still in high school, and Ive begun some ...
-2
votes
1answer
35 views

Reference state of git repo on a per-commit basis

Not being an advanced git user I apologize if this is a trivial question. I could not find an answer for it elsewhere on StackExchange unfortunately. Cutting to the chase... Is it possible to ...
-2
votes
1answer
128 views

What do you call this code smell that features repeated calls? [on hold]

A c# developer might write: var response = HttpContext.Current.Response; response.Write("<HTML>This is my page</HTML>"); response.AppendCookie(new HttpCookie("Session", sessionKey)); ...
3
votes
1answer
236 views

Strange interview question or deceptively simple? [on hold]

Hi all: I've gotten this question like four times interviewing in silicon valley. What is the correct solution? Shuffling a deck of cards. The problem description is as follows: You are given a ...
-1
votes
0answers
10 views

Find maximum subsequence sum in an array, using the maximum suffix method with non-negative numbers

I'm trying to implement this algorithm that finds the sub-array with the maximum sum in a linear time. Algorithm MaxsubFastest(A): Input: An n-element array A of numbers, indexed from 1 to n. Output: ...

15 30 50 per page