0
votes
0answers
27 views

Help me understand this flow for recursive function [duplicate]

This recursive function blows my mind a bit because it executes the recursive calls until it hits 1. It returns n, but afterwards it does the multiplication below it four times and returns the final ...
1
vote
1answer
213 views

Name for this design pattern?

Background Working as a software engineer in the field of electronics, I often find that none of the existing design patterns i.e. GoF typically fit the bill for what I need to do. One of the ...
1
vote
1answer
96 views

Using ninject in a class library

Looking for some help getting my head around ninject and DI. Using the simple examples I've found online everything works nicely but trying to do something more complex is causing headaches. I have ...
4
votes
2answers
86 views

Serializing mutating objects

In our system a media file can have several states: invalid, empty, uploading, ingesting, ready… Depending of the state, information about the media are accessed in different ways. For example, during ...
-1
votes
1answer
93 views

How to get developers to fix broken tests

In our company we have multiple test stages: unit and integration tests (CI build) application tests (all calls to other systems are mocked) system tests (interacting with other systems) all ...
2
votes
2answers
53 views

Additional clause in GPL'd source code

I noticed this in the heading of some source code This core is written with the advise and consent of [author] and is released under the GNU Public License. This core is freely available for ...
2
votes
4answers
260 views

Is it strange for a Builder object to have getter methods?

I have a fairly complex immutable data type that I'm using a builder object to instantiate. Currently, I have a setup where I parse a file, setting various fields in my builder, and then build the ...
-5
votes
2answers
84 views

Javascript strange callBack format [on hold]

Some one could explain me what does this code mean? this someFuncion( () => callBack(someParameters) ) or this someFuncion( parameter => callBack(parameter) ) is it possible the previous ...
1
vote
1answer
21 views

Redesigning schedule value hierarchy

I have a couple of schedule value classes that represent the value a schedule holds for a specific slot. First, there's the ScheduleValue class for schedules with two dimensions, where the first one ...
0
votes
1answer
88 views

Finding all possible paths in a matrix [closed]

The problem I am having is finding the number of possible paths in a matrix, with a start point on the right above a certain which is given and end point on the right below the same point. The ...
4
votes
5answers
386 views

.NET: Are web-based applications inherently harder to build than client-server?

We currently have an ongoing discussion about which approach to move into - we want to replace multiple older environments with .NET applications, and two potential architectures are under discussion: ...
-2
votes
0answers
82 views

What's kind of real-time system are of high demand in software market? [closed]

Recently I'm doing some research on real-time web applications using PHP and javascript. Real-time chat and notification apps are commonly found. I would like to know what are the other real-time app ...
0
votes
1answer
17 views

AppCache vs Service Workers

I am looking around to create an offline HTML5 app to be used in both Android and iOS (I do not have the means to create a native iOS app), but when looking up some technology I find this interesting ...
0
votes
3answers
157 views

Is data duplication bad in programming (in contrast to database designing)?

I have three classes: User, Conversation and Message: Message properties: User sender; // Some more Conversation properties: List<Message> messages; List<User> participants; // Some ...
1
vote
1answer
56 views

Asynchronous client-server implementation

The mission: Implement a program that will listen to multiple client requests asynchronously (on TCP) and transfer them to a server (also on TCP) to which only one connection is allowed. The program ...
3
votes
4answers
223 views

From the perspective of OOP, taking performance into account - should a database connection be a static field, an instance field, or a local variable?

When methods use a database connection, should the connection be a static field, an instance field, or a local variable? Here are my doubts. I dithered which are correct and which are baseless. I ...
1
vote
2answers
119 views

How should I represent mutable boolean state?

When I have some object with boolean state that can be changed (like a checkbox's checkedness), there are several ways I can expose it. Getter property, Setter method bool IsChecked { get { ... } } ...
5
votes
2answers
116 views

Recreating complex aggregates from a persistance source

I'm building a web application with C#, and I have an aggregate root which has several entities and value objects. Then I have a repository object which persists the aggregate to the database (I'm ...
-2
votes
0answers
24 views

Schedule Timer on Main Thread [closed]

How would I schedule a timer in my main thread? Right now I'm having bit of a multi threading issue and figured it'll be better if I could just run my game on a single thread.
-1
votes
2answers
95 views

How to write code for different versions of linux

So, I've written some fairly big code for cent OS 7.1. The code essentially makes use of different command line tools by parsing the text output and shoving it in a database... pretty straight ...
-1
votes
1answer
62 views

Python Exception Handling in Def Function? [on hold]

I know that this is an elementary question as my misunderstanding is in the syntax and format of the coding. I'm learning, as we all are. So here's some Pyhton code: def SCounter(x): ...
2
votes
2answers
92 views

Image resizing client side vs server side

When uploading a lot of images to a server, to minimize the space taken by the images, is it better to resize the images before sending to the server or upon receiving them? It seems to me that ...
3
votes
5answers
105 views

Use Exceptions for control flow in order to increase performance?

I add a lot of elements to a list of lists. If the list of lists my element should be saved to, does not exist yet, I handle this by catching an exception and adding a new list to my list of lists. ...
5
votes
6answers
371 views

Dependency injection: should I use a framework?

I have recently worked on a Python project where we did dependency injection heavily (because we must in order for the app to be testable), but we didn't use any framework. At times it was a little ...
0
votes
1answer
51 views

React.js + Flux, immediate response during history back/forward

In Instagram (web), when you click back/forward arrows - I've noticed that the content isn't loaded from the server and it immediately show up. After reading the docs on react.js + flux, I had this ...
-1
votes
0answers
15 views

Stack for Web/Android/iOS app

I have been trying searching for this answer but perhaps i am not able to use proper words so apologies if this question has been asked earlier. I want to create something for my startup. I have ...
0
votes
3answers
64 views

Difference between passing by values/address and returning a values through functions?

According to a book I read you can pass variables from one function to another by passing by value/address. When you pass by address it will no longer preserve the variable if it is changed in a ...
-1
votes
1answer
42 views

C# asp.net mvc Entity Framework migrations [closed]

What are the pros and cons of using Entity Framework data migrations? I have never done this professionally but I see many tutorials that advocate this. The example I saw for core.net ef 7 shows code ...
0
votes
2answers
70 views

Can I release software under the GPL if it must be built with a proprietary compiler?

The compiler doesn't leave its own code in the software or link proprietary libraries with it, the source code is exactly the same one I used throughout the development process, everyone is free to ...
3
votes
2answers
53 views

Unused function parameters and polymorphism

I had a discussion with a co-worker about interface members having parameters that some implementations don't use. Say I have an interface interface IDoctor { string GetMedicalOpinion(Age age, ...
-1
votes
0answers
9 views

Can't install the “Boost” prerequisite for Caffe [migrated]

I'm getting into machine learning, and I recently happened upon this: Wide-Area Image Geolocalization with Aerial Reference Imagery . It's a net that predicts the GPS location of an image, from ...
3
votes
4answers
144 views

Why use a local variable over a global variable? [duplicate]

Im a beginner using visual studio 2013, and I know what they are, but I'm puzzled, why would one use a local variable? I would always just use a global variable.
4
votes
1answer
114 views

Is there something to be said for putting the “default” case of a switch statement first?

Like: switch (value) { default: something_common() case 1: niche_case() ... } etcetera. if-else statements require an "if" first and an "else" last, but switch statements are more flexible ...
0
votes
1answer
57 views

Architecture of badge system similar to StackExchange?

I want to implement gamification in my education mobile application. I have a database with user activity and I want to analyze it and give badges to a user. There will be many badges with totally ...
-3
votes
1answer
76 views

Which license should I choose so I can open source my Botnet and not get sued?

I have been working on a Botnet for a high school project in Python and would like to open source it and share it on GitHub without getting sued. I need help with choosing a license such that I am ...
1
vote
1answer
39 views

Best structuring for IRC message decoding (Python)

I am writing a simple IRC chatbot in Python and, in an effort to get more into OOP, made a basic "connection" class that manages all the backing-and-forthing involved. But IRC protocol is rather ...
2
votes
1answer
40 views

JWT refresh token exponentially?

This is how I do my JWT refresh token: A token is check for validity every time a request is made. If it's not expired, allow access. If it's expired calls another function named RefreshToken to ...
2
votes
2answers
184 views

In C++, why shouldn't all function parameters be references?

I am currently learning C++ from the C++ Primer 5th edition. The book's chapter on functions states that only large objects (large being relative as standard library strings count, but "primitive ...
0
votes
0answers
41 views

Compatibility with POSIX's fork() in Windows by means of the NT Native API [closed]

Small introduction for if the reader is not aware of the involved details: In the context of the NT architecture, the Native NT API, a.k.a ntdll.dll, is a fundamental part of the operating system, ...
7
votes
4answers
204 views

Code design: Duplicate code or good implementation

I'm working on application in C#, where I need to serialize and deserialize some classes into/from XML. This operations will be implemented in Class Library. I chose XMLSerialization class to ...
6
votes
3answers
158 views

Is it better to try and implement incomplete code, or write your own?

Our application is a 6-year old legacy application made by out-of-house contractors. Occasionally we stumble upon the skeleton of something they put together but never implemented, and it causes us ...
1
vote
1answer
50 views

Dividing software into requirement layers

In order to be able to create better documentation, better tests and to start using the just gotten to know requirement traceblity matrix I'm trying to understand the different software requirement ...
2
votes
4answers
175 views

Understanding closures

I'm reading the JavaScript guide on MDN and trying to understand the usefulness of closures. This sentence helped me the most, "In other words, the functions defined in the closure 'remember' the ...
26
votes
13answers
4k views

Is coding style in organizations an optional thing?

This programming style document has a general rule, that says : The rules can be violated if there are strong personal objections against them. This collides with the way I am thinking, and ...
2
votes
2answers
128 views

C#/VB struct – how to avoid case with zero default values, which is considered invalid for given structure?

How to implement some constrained .NET struct/structure (let's say LimitedString), where its state with default values (set by CLR to technical defaults, i.e. nulls, zeros, etc.) should be prohibited ...
0
votes
0answers
36 views

Is there a ddd approach for sending events about embedded aggregate views

I'm investigating how we can notify UI/async clients (websocket) about an update which happened in an embedded view. Let me elaborate... We currently have a newsfeed where NewsItem is an aggregate ...
38
votes
11answers
3k views

Are so called “cross-cutting concerns” a valid excuse to break SOLID/DI/IoC?

My colleagues like to say "logging/caching/etc. is a cross-cutting concern" and then proceed using the corresponding singleton everywhere. Yet they love IoC and DI. Is it really a valid excuse to ...
2
votes
4answers
142 views

Unit Test for Void which copies data from one location to another

Still learning and getting my head around Unit Testing, (also trying to get into TDD, though I appreciate it isn't the same thing) and in many ways it is changing/improving my code. But I come across ...
0
votes
2answers
232 views

Don't auto-implemented properties violate encapsulation?

In C#, when a field getting or setting requires logic, we use properties. For example: private int _age; public int Age { get { Console.Writeline("Club member is {0} years old", ...
0
votes
3answers
159 views

How to mark/track features in code?

After some time in every project sooner or later you will need to find a feature in it a fix it or extend it so I was wondering if there is already a system or a convention for marking those features ...

15 30 50 per page