17
votes
9answers
3k views

Is writing your own Data Access / Data Mapping Layer a “good” idea?

We're currently in a situation where we have a choice between using an out-of-the-box object-relational mapper or rolling our own We have a legacy application (ASP.NET + SQL Server) where the ...
5
votes
3answers
636 views

Better to have 2 methods with clear meaning, or just 1 dual use method?

To simplify the interface, is it better to just not have the getBalance() method? Passing 0 to the charge(float c); will give the same result: public class Client { private float bal; float ...
1
vote
2answers
155 views

Roles and permissions: a good approach in defining permissions?

My application has users and administrators. The administrators split into two: super-admin and limited-admin. The super gets all permissions while the limited can be configured to inherit just the ...
2
votes
4answers
184 views

Interview question on accessing variable with pointers in c

Once I had a question in interview, it goes something like this. int main() { int a = 10; int b = 20; int *p = &a; // can i access b or can i get my pointer p to point to b. } ...
-4
votes
1answer
31 views

Migrating MYSQL functions and stored procedures to SQL Server

The company i'm working for is selling HRIS management software. It was built using ASP and mysql. But one of our client's demand is for it to be based on MS SQL Server. our team is made up mostly of ...
2
votes
3answers
53 views

What's the point of hidden files?

What is the point of hidden files? In Microsoft Windows they exist, in Mac OS X they exist and in Linux they exist. It seems to me that it just makes detecting malware more difficult. The only upside ...
0
votes
1answer
19 views

Best way to flatten an XML document

Say you have a document like this: <names> <first>Joe</first> <last>Smoe</last> <phonenumbers> <phonenumber ...
-4
votes
0answers
34 views

XML Stuctured C

Has a Programming Language been developed, which structures C code within XML like tags? (Y/N) If not please mention a place where I should submit this idea. (Sorry that this is a slightly open ended ...
0
votes
3answers
101 views

How far should I validate user input in my own created API?

I got something here that bogs my mind a bit. Let's say I write me this API (in TS), check out some of these properties: export class MyAPI{ ...
5
votes
4answers
101 views

Avoiding Division by Zero Using Float Comparison

Source code analyzers (like SonarQube) complain about float (or double) equality comparisons because equality is a tricky thing with floats; the values compared can be the results of computations ...
1
vote
1answer
13 views

Pull requests and work item linking in Visual Studio 2015 with non-TFS remote Git repo

We use TFS and Visual Studio 2015 at work but don't get full benefit from the ALM features as we have code in non-TFS Git repos. We would like to integrate these products in with all the TFS goodies ...
0
votes
0answers
9 views

Azure Active Directory

I am developing a suite of applications that will be hosted in Azure. Some apps will be for customer use (not public tho, i.e. invited/paid up customers) and some for internal employees. For ...
7
votes
1answer
261 views

How do CC licenses (0, BY, BY-SA) affect proprietary/closed source applications?

I think this question is specific to indie developers be concerned about. Think about it as a "license clarification" or a "license practical use case". I need to know how must be my project basic ...
2
votes
5answers
10k views
+50

How many bits' address is required for a computer with n bytes of memory?

How many bits of address is required (for the program counter for example) in a byte-addressed computer with 512 Mbyte RAM? What does the formula look like? How is this connected with the fact that ...
-5
votes
3answers
122 views

Java constructor: I can't understand

I am learning Java and I have a problem understanding the concept of constructor for the field variables. What is the problem with the following code. It shows "null" as an output. public class ...
-5
votes
0answers
9 views

When adding JCheckBoxes to JPanel, the JPanel resizes instead of using a JScrollPane

So essentially I am adding JCheckBoxes to a JPanel dynamically. I've added a vertical scroll bar to try and keep the panel the same size no matter how many checkboxes it has, but alas, it makes the ...
47
votes
4answers
98k views

Difference between Web API and Web Service?

I have heard about Web Services and Web API's a lot, is there any difference between them or are the same?
5
votes
2answers
206 views

Report test failures “all at once”, or report them one by one

I am a sole developer working for an organisation that has no testing strategy. I am trying to integrate a crime system developed by a vendor with an external application I developed. The external ...
0
votes
1answer
32 views

Database searching for string across different tables

Scenario: application will search in database almost all columns across about 8 tables/views for defined string and return all rows containing that string (will return collection of objects or JSON). ...
7
votes
1answer
566 views

OAuth shared Authorization server for multiple apps

At my shop we have a couple .NET Web APIs that use OAuth tokens for authentication. Currently, each web API is both authorization and resource server. Users authenticate to all of these APIs using ...
0
votes
3answers
195 views

Client-Server Application Object with child Objects

Actually I'm going to build an Client Server Application, at the Login I recive the User Object from the Server. An user has a List of tasks, but I don't want to load them at the Login. So what would ...
2
votes
2answers
515 views

Should I store my user claims in the JWT token?

I am using JWT tokens in HTTP headers to authenticate requests to a resource server. The resource server and auth server are two separate worker roles on Azure. I cannot makeup my mind as to whether ...
-4
votes
0answers
19 views

What kind of solution should I use [on hold]

My Current Situation: I got many instances of same application that read XML files from shared folder. that makes many calls to read file and sometimes locking the files.. What I look for: I want to ...
2
votes
1answer
164 views

Open / Closed Principle

I found this code example explaining Open / Closed principle. Code before application of principle: public class Logger { public void Log(string message, LogType logType) { switch ...
7
votes
0answers
61 views

What is the origin of the C Preprocessor?

The C preprocessor is attached to C, but it has a completely different syntax from the main language: syntactically significant whitespace (end of line terminates a statement, gap after the macro ...
4
votes
2answers
73 views

Understanding the Single-Writer Principle

The article on the Single-Writer Principle of the Mechanical Sympathy blog explains how bad queues are (performance-wise), because they need to be able to receive messages from multiple produers, and ...
0
votes
0answers
32 views

Use the chance to return booleans after method calls for an optional layer of exception handling?

I would like to ask a follow-up to a question I just asked: Better to have 2 methods with clear meaning, or just 1 dual use method? I now understand why it is best to separate charge(float c); and ...
1
vote
3answers
170 views

Tracking time users spend on my website

We are going to track user engagement (i.e. time spent on website, most viewed part/page of the system, etc). I don't see Google Analytics / MixPanel being able to do this, since we have to analyze ...
29
votes
8answers
20k views

What methods are there to avoid a stack overflow in a recursive algorithm?

Question What are the possible ways to solve a stack overflow caused by an recursive algorithm? Example I'm trying to solve Project Euler problem 14 and decided to try it with a recursive ...
1
vote
1answer
21 views

Side-by-side Functional and Acceptance Testing (SpecFlow)

This question is not about the differences between functional and acceptance tests! Almost all the info I could find on the web just explains the difference between them. I know that functional tests ...
-3
votes
1answer
53 views

C++ substitution cryptography

Is there a way to encrypt a text message by simple substitution? Ex: input +5 Hello World Output Mjqqt Btwqi Where +5 is the char incrementation for the substitution. I'm stuck splitting the ...
-5
votes
1answer
52 views

How to enable 'for-each' loop in my own linked list class? [on hold]

Please guide me on code additions that will allow someone to iterate over a custom linked list implementation using "for-each" loop, just like existing collection classes or arrays. All I know is that ...
0
votes
0answers
24 views

How to automate tasks performed on a web page

I apologize if this has been asked before, I don't know what this would be called and as such I don't know how to phrase the question. I work for a large company, and as such it has many people ...
-2
votes
0answers
20 views

Which database to use for real time data update for trading and analysis? [on hold]

I am thinking about a website for trading and analytics. I am thinking which technologies can be used for this kind of website and so I have doubt with database. Which database is suitable for a ...
4
votes
2answers
57 views

Is Module Pattern in JavaScript is useful only for singleton creation?

Some articles (JavaScript Module Pattern In Depth, Mastering The Module Pattern) describe defining modules in JavaScript like in the snippet below (from Addy Osmani's "Learning JavaScript Design ...
-3
votes
0answers
13 views

A Java program that will data KML data from a folder

I want to write a program that will take KML data from a folder and displace it on Google map and some other global map and continue update this data. I don't know what part of Java I need to use to ...
1
vote
1answer
665 views

How to test model binding within an MVC controller when Bind attribute with Include list is used?

Auto-generated action methods in MVC5 make use of the BindAttribute with an Include list that contains the field names in a string literal. Example: // POST: MyTable/Edit/5 // To protect from ...
8
votes
4answers
244 views

Which data store is best for my scenario?

I'm working on an application that involves very high execution of update / select queries in the database. I have a base table (A) which will have about 500 records for an entity for a day. And for ...
-5
votes
0answers
18 views

How to make a project like Image Locker Pro in Codeblocks? [on hold]

I want to create an Image Organizer(similar to Image Locker Pro but adding some extra functionality) project in codeblocks (may be using wxWidgets). There will be two parts. In the main program we can ...
0
votes
1answer
30 views

Which document model to choose in different situations

I needed some custom document format and stumbled on this issue. DocBook does it this way <chapter> <title>Chapter 1</title> <para>Hello world!</para> ...
4
votes
0answers
84 views

Which C++ IO interfaces for a complex data source i.e. converter

My question: When you've got a complex converter like, that takes chunks or large result sets out of a database, converts it into a line by line file/resource in the end, should one either design it ...
3
votes
2answers
250 views

Data warehouse architecture for mutating schema

I am setting up an ETL process and small data warehouse for querying the data in a few different dimensions. One issue is that the schema for the objects can mutate over time - mainly that some fields ...
11
votes
3answers
2k views

Branching breaks continous integration?

I think this article, A Successful Git Branching Model, is very well known among experienced DVCS users. I use hg mostly, but I would argue this discussion is fine for any DVCS. Our current ...
24
votes
7answers
2k views

Should a C++ program catch all exceptions and prevent exceptions from bubbling up past main()?

I was once advised that a C++ program should ultimately catch all exceptions. The reasoning given at the time was essentially that programs which allow exceptions to bubble up outside of main() enter ...
0
votes
0answers
12 views

Detailed Page for multiple hierarchy structure

I am planning to make an application that can read files and contains data in a hierarchy, e.g. Level1 elements, containing 0 or more Level2 elements etc. The GUI should look like: >Level1 item ...
-3
votes
0answers
18 views

Coverting iOS App For Web Use? [on hold]

I need to develop my app as a website. It is fully developed using Objective-C on iPhone and iPad already. I personally do not have the programming knowledge to develop a web version. Are there any ...
4
votes
2answers
1k views

Programmatically extending Hibernate table/entity definitions in Spring, how?

I would like to know if there is a way —maybe with AOP— to extend table/entity definitions so that I can add functionality across the board that requires persistence. Let me explain what I want to do ...
8
votes
4answers
220 views

What are the drawbacks to mapping integral identifiers to enums?

I've been thinking about creating custom types for identifiers like this: public enum CustomerId : int { /* intentionally empty */ } public enum OrderId : int { } public enum ProductId : int { } My ...
0
votes
0answers
31 views

OMG ASTM and weird languages (like Scheme, Ocaml, Haskell)

Abstract Syntax Tree Metamodel (ASTM) is an OMG standard to represent ASTs. In my very partial and limited understanding (I only spend an hour or two glancing into that spec), it is notably defining ...
6
votes
4answers
1k views

Does an Open Source license exist that allows me to retain rights to revoke usage of software/source at any time, for any reason, and without warning?

Does an Open Source license exist that allows me to retain rights to revoke usage of software/source at any time, for any reason, and without warning? I want to allow others to use my software and ...

15 30 50 per page