19
votes
1answer
1k views

Why do arrays in .Net have Length but other collection types have Count? [closed]

In C# for example, arrays have Length property. But other collection types like lists, etc. have Count property. Is there a reason why these two are different? If so I would like to know.
22
votes
6answers
2k views

Explaining new or uncommon syntax in comments [duplicate]

As per the title, should I be explaining syntax that I use in my code when I have a reasonable expectation that a developer looking at my code in the future will not be familiar with it? Short caveats ...
2
votes
1answer
126 views

C# try/finally for state cleanup

Is there any reason (for instance: performance) against moving state "cleanup" code in a finally state? Example: this.state.InProgress = true; // logic here this.state.InProgress = false; With ...
0
votes
0answers
4 views

Could not send form data in PHPUnit? [migrated]

I am new to PHPUnit with Symfony 2. I have a problem sending form data to client. I have login details needed to log in the page. so i send it as array. Every time i run test i got Error Message as: ...
-2
votes
0answers
48 views

Builder Design Pattern : Accessing/Passing model data in/to Concrete classes [on hold]

First of all Sorry for question if its completely wrong, i am new to Design Patterns. I asked this question here also ...
2
votes
5answers
83 views

What is a URI Scheme?

I have searched for this question, but I haven't found a good answer. Even the Wikipedia Article on URIs does not explain it thoroughly. I thought it was the protocol for accessing a web page. e.g. ...
-2
votes
0answers
51 views

What's the lhs/rhs equivlent of a single parameter? [closed]

Typical operator overloading conventions go like this: MyObject operator+(const MyObject& lhs, const MyObject& rhs) { return MyObject(lhs.my_value + rhs.my_value); } What would be the ...
2
votes
1answer
145 views

How do you troubleshoot an issue that you simply can't duplicate? [closed]

I have a client that keeps reporting a certain issue that users are experiencing with a public-facing site written in MVC and hosted on Azure. It seems to happen at random, but for the life of me, ...
0
votes
0answers
22 views

Should an API specification include roles?

I'm considering options for specifying an API in a code library (e.g., XML or JSON) that can be consumed by various clients. In addition to the standard kinds of input/output specifications, I'm ...
1
vote
3answers
128 views

How can I create an abstract parent class which uses data from an inherited class?

I'm getting my feet wet with Android app development and tying to find a good way to manage database interactions across multiple similar objects. My goal was to have a structure like: public ...
2
votes
1answer
61 views

Algorithm for determining transactions among weekly data series?

I'm trying to develop a small reporting tool (with sqlite backend). I can best describe this tool as a "transaction" ledger. What I'm trying to do is keep track of "transactions" from weekly data ...
4
votes
0answers
34 views

Do classes in a JRE library support observable and/or asynchronous reads from external/non-JRE assemblies?

How can I implement my cross-platform library (e.g. on JRE) to operate in a thread-safe manner on object references, so that native front-ends on other platforms can observe the object and take ...
-4
votes
0answers
50 views

Spring's @Configuration - main() method required? [closed]

When you're coding for a .jar file, and you're using Spring, you can code an @Configuration class that defines your beans, using the @Bean notation. So far, so good. Do you need a separate class ...
3
votes
1answer
70 views

Designing a ticketing system where the User and Administrator have similar but different functionality

I am designing a simple ticketing system in Laravel 4. The system will simply allow a User to create a ticket, and an Administrator to answer it. The User will be able to: View a list of his ...
0
votes
2answers
119 views

Repository pattern with service layer - too much separation?

I have an MVC site which uses the repository pattern. I don't feel like I'm using the MVC style enough, so I'm getting ready to re-architect some of it. But I'm also wanting to do it so if the ...
8
votes
2answers
201 views

How much should a view know about model?

I am building an application in python with a python wrapper for WPF and with DAG support. I am currently at a point where I have to decide a consistent way of interacting between the data and the ...
-5
votes
0answers
93 views

Bad project structure? [closed]

OK, so first I'll start with an introduction. Recently, I've met a friend of mine whom I haven't seen for quite some time. He said he works as a C++ developer for a huge company (they make software ...
2
votes
2answers
179 views

Should the ternary operator be used outside of assignment statements? [duplicate]

Edit This isn't a question of whether or not the ternary operator is harmful. It's about whether or not there's a consensus about whether or not it should be used outside of assignment statements. ...
-5
votes
2answers
83 views

Does CPU need local cache if Intel and Micron 3D XPoint is used? [closed]

As Intel and Micron stated, the new 3D XPoint RRAM is 1,000 times faster than NAND. See link here. From speed perspective, does CPU still need L1 cache if Intel & Micron 3D XPoint RRAM is used as ...
3
votes
4answers
101 views

Should create and edit be two separate user stories?

I often come across situations where creating and editing actions are very similar, but they are not exactly the same story. So should they be handled as separate user stories, or as one? For example, ...
0
votes
1answer
59 views

Is wrapping a message queue in a web service a bad pattern? [closed]

We (our team) have a web app that was periodically polling a web service. The web service was querying a database (MySQL). Then, we considered using a message queue (like RabbitMQ) instead of the ...
4
votes
2answers
91 views

What document/artifact should alert me when an old requirement changes the scope of new one?

I developed a software application a year ago, I delivered it with a simple documentation. For example, it has an special and complicated login system as requirement. Now the customer calls and ask ...
-2
votes
0answers
49 views

Paxos consistency [migrated]

I'm looking at the paxos family of protocols for solving consensus in a network of unreliable processors. I'm working through scenarios where processors fail, and I know I'm wrong, but I don't know ...
0
votes
3answers
101 views

When estimating with a fresh team on a new project, is there a reason not to use default velocity for estimating?

Generally when estimating using an Agile points system on an experienced project team, the points have meaning relative based on past experience - that take into account: understanding of the ...
2
votes
0answers
64 views

Seperate settings and implementation class hierarchies

We use XML serialization to store class settings. Each setting-class has (but doesn't reference) corresponding implementation-class. Therefore we can easily make a "settings dll" without any ...
1
vote
1answer
80 views

Pattern for passing in a field as a parameter

I'm writing a Rails app which uses ActiveRecord ORM and a Postgres DB. I've got two attributes which are similar but are separate fields in the database. The assignment and saving of these is kinda ...
1
vote
1answer
47 views

Does ReaderWriterLockSlim provide thread safety and speed efficiency (compared to a traditional lock) when using a List?

I have a list, to which I write once in every update Loop and then I spawn some tasks which create read that List and create a duplicate to manipulate that data. More or less it's List.ToList() call ...
0
votes
0answers
21 views

.Net MVC 5.0 Website using Asp.Net Identity

I have a newly configured website using web api 2.2 and the latest version of asp.net Identity. I have the authorization working great for users that login and navigate the site. I'm trying to ...
1
vote
0answers
53 views

Detecting surface faces of a huge 3D mesh/grid

I've written a module in my application that creates a mesh from existing coordinate and face data. The number of vertices in the mesh could easily exceed 10 million and the same goes for the faces. ...
-3
votes
0answers
39 views

die() or try/catch when interacting with MySql database in PHP? [closed]

A lot of tutorials and books I have been over and read have used the die() method to catch an exception when interacting with a local MySQL database For example: mysql_connect($dbhost, $dbuser, ...
-3
votes
0answers
17 views

Using regular expressions in Python to parse LaTeX code [migrated]

I am trying to write a Python script to tidy up my LaTeX code. I would like to find instances in which an environment is started, but there are non-whitespace characters after the declaration before ...
1
vote
1answer
77 views

How to create a re-usable, command based messaging system

I am having trouble writing a simple command based system for a chatroom. I want users to be able to do chat actions such as /j myChatRoom or /join myChatRoom /w user12 Hello or /whisper user12 ...
-1
votes
0answers
53 views

Backpropagation in layman terms [closed]

I've been studying neural networks, and I'm beginning to understand the basics. I know what the backpropagation algorithm does. It feeds sample input and calculates an error against a given output. ...
1
vote
1answer
34 views

Should “special” roles exist in an ARO system?

Right now we're implementing a (honestly overly complex) role-based permissions system where users will be assigned to roles and those roles will be granted permissions on some combination of ...
-1
votes
0answers
20 views

Compromising performance for code readability and developer convenience [duplicate]

This could be a highly subjective topic without a definitive answer, which I am not looking for, only perhaps some anecdotal accounts as well as general guidelines that one might follow. ...
1
vote
3answers
217 views

Would combining enums with static strings in java be sloppy?

Currently my team has a number of constants defined as static final strings. I want to be able to iterate over these strings as if they were an enum in one location, but everywhere else they are used ...
4
votes
2answers
206 views

When is it appropriate to use expression bodied members? [closed]

C# 6 introduces expression-bodied members, which allow for simplified code in methods and properties that only return the result of an expression: public override string ToString() { return ...
7
votes
4answers
233 views

How do you approach transitive dependency conflicts that are only known at run-time? [on hold]

How do you normally approach transitive dependency issues that occur at run-time in large software projects? For the past three weeks, I have been trying to start a component of a large piece of ...
1
vote
0answers
109 views

Integrate C++ DLL with C# GUI asynchronously (design issue)

This is more a design than an implementation question. I am aware of how to integrate a C++ DLL within a C# main app that acts as GUI. Believe me that I've read all other questions on similar topics, ...
-1
votes
0answers
57 views

Design pattern for user-roles on MVC, following SRP [closed]

I'm working on an application with 3 types of roles. Some roles may view the same data, and perform the same actions; but also differ in some other view or actions. Following SRP, I'm used to see a ...
0
votes
0answers
62 views

Open Source License But Maintain Prominent Attribution [migrated]

I'd like to release a program under an open source minimal restriction license but there are 2.73 bajillion options (give or take an order of magnitude). Basically our only requirements are: Don't ...
-4
votes
0answers
47 views

Why is console.log() not working inside module.exports? [closed]

I am trying to export the functions so that they are executed when my /submissions endpoint is hit. In app.js I have app.use('/submissions', submissionbot) Why can I not use console.log from within ...
4
votes
1answer
230 views

How to make sure people call methods in the right order?

Situation I'm designing a database abstraction layer for sql (mysql, sqlite) and mongoDb. The goal is to give the user/developer a library which is able to create queries for different databases. ...
4
votes
4answers
231 views

Should an application configuration interface be broken into multiple interfaces to reduce feature creep?

My windows service is neatly separated into 5 components - each with their own interface and pulled together by a bootstrapper. One of my requirements is to provide configuration options in my ...
1
vote
1answer
84 views

What is the point of the dao layer? [closed]

With the current technologies which are pretty good (JPA, Hibernate, others), what is the point of the DAO layer? It's very rare for a project to switch its backend from one vendor to another, so it's ...
1
vote
2answers
63 views

REST autocomplete endpoint design

We're designing a rest endpoint for retreiving name autocompletion suggestions for hotel names. Currently it's defined like this: GET /suggest/:term, so that if you queried `/suggest/hil' you would ...
0
votes
1answer
26 views

Combining Fitnesse, .NET and RESTful APIs

I know there is Fitsharp for combining Fitnesse and .NET. And there is RestFixture to combine Fitnesse and REST. Is there a way to test a RESTful service with Fitnesse under .NET? If not, is there ...
7
votes
6answers
2k views

How to implement a property on class A which refers to a property of a child object of class A

Not a very large architectual decision, but nevertheless I would value your opinion. We have this code (rest of the code is left out) public class Room { public Client Client { get; set; } ...
-4
votes
0answers
47 views

Creating simple client to fuzz the VPN server [closed]

I downloaded an official open source implementation of OpenVPN. My goal is to create a custom client to fuzz the OpenVPN server. Is my idea correct: I need to figure out what message types the ...
-1
votes
0answers
95 views

How to triangulate a 3D polygon? [closed]

How can I create a set of triangles to fill a 3D polygon? The polygon is an ordered sequence of 3D vertices defining a single geometric contour (a closed path). Vertices are not necessarly coplanar. ...

15 30 50 per page