0
votes
3answers
691 views

Where should authentication be handled, in the server's code, or in the application's server-side code?

I'm developing a simple web application in node.js. Users can log in from any page in the application, so I handle authentication in the server's code and logic, and the application's server-side ...
1
vote
1answer
664 views

Languages with graph data structures and algorithms in standard library

I am trying to improve my knowledge and ability with graphs and graph algorithms and have noticed something curious: as far as I can tell no "mainstream" language contains support for graphs in its ...
19
votes
3answers
1k views

What algorithms are there for picking colors for plot lines on graphs?

I'm interested in what algorithms or rules I can programmatically implement to generate RGB or HSV colors for plotlines to keep them visually distinct from the neighbors. I know that in professional ...
0
votes
1answer
102 views

Is context-driven testing suitable for all projects?

One thing I cannot find anywhere is: is this approach limited to non-critical software? Because in critical (or just when customer wants us to follow his rules) we have no freedom in testing and just ...
5
votes
1answer
433 views

How can I benchmark concurrent key-value stores?

I have some concurrent key-value store implementations that are implemented with hash tables and search trees that I would like to compare. I would like to benchmark them with a real world application ...
1
vote
0answers
126 views

Unit Tests for Database Abstraction Layer

I previously asked this question about creating an algorithm for joining records from multiple databases, and since then, I have built a rudimentary version of it (which doesn't allow for inter ...
3
votes
1answer
575 views

Reading from a file and inserting into a database, a good practice

I am making an Android application which reads several JSON files and inserts the read information into tables in my database. For instance, there are three files: countries.json { "countries"...
4
votes
1answer
199 views

Order collisions in ecommerce

Suppose I have a web app where sellers add their products and set them as available for sale. Then I show a list of products in my mobile app, where I get products via my REST API. My problem: suppose ...
2
votes
1answer
186 views

Websocket protocol server development

I am interested in building a custom Websocket server for college project. I have a good familiarity about HTTP 1.1 and knows quite well of how it works. I am asking this question assuming that ...
1
vote
3answers
521 views

Why not use a RTOS with microkernel architecture for highly concurrent web servers?

Why not use a RTOS with microkernel architecture for web servers? The scheduler is deterministic and all requests will be handled quickly leading to faster response time? It's easy to extend an OS ...
3
votes
2answers
856 views

MVC framework that uses classes instead of methods for actions

In most MVC frameworks, Controller class contains multiple methods, each representing one action. Then annotations and reflection is used to call those methods appropriately. But from OOP point of ...
1
vote
2answers
553 views

Single codebase for client and server with Node.js [closed]

There are a few claimed benefits to Node.js that I typically hear. Some (many?) I agree with. There is one that I completely do not understand, which is the one language argument: "You can now use one ...
3
votes
1answer
1k views

What are standard directory layouts for storing database scripts in TFS?

I recently took over the maintenance of 10-15 SQL Server databases and to my surprise found out that the team does not store the code scripts anywhere. They currently deploy changes to each ...
0
votes
2answers
1k views

Why do people consider Python a weak language? [closed]

I've been using Python for a little while now and I am enjoying it, but a few of my friends are telling me to start using a language like C# or Java instead and give these reasons: Python is a ...
2
votes
1answer
700 views

Using gerrit (or similar tool) on a team where multiple devs work on a single feature

We have a team of roughly ~8 devs who regularly work on the same feature over the course of a 3 week sprint. It isn't quite pair programming, but in our current workflow devs regularly push up ...
1
vote
5answers
2k views

Why would you want to use an array, or hash as hash key in ruby?

i'm using Ruby 1.9.3 I figured out that you can use an array, or a hash as hash key in ruby: h = Hash.new h[Array.new] = "Why?" h[Array.new] # Output: "Why?" h[Hash.new] = "It doesn't make sense" ...
2
votes
3answers
2k views

Is there a better way of handling access control logic instead of it being in the UI?

Through most of my dev experience, I've never had to deal with much variety of access control architectures. They've all been pretty straight forward: Group [Create, Update, Delete] - User 1 ...
10
votes
4answers
2k views

Is Domain Entity violating Single Responsibility Principle?

Single responsibility ( reason to change ) of an entity should be to uniquely identify itself, in other words, its responsibility is to be findable. Eric Evan's DDD book, pg. 93: most basic ...
3
votes
2answers
123 views

Prevent anomalies caused by signal propagation time

In electrical engineering class we learned that signal lines are not ideal, so it takes time for the signal to reach the other end of the cable, and if we doesn't take this into account, it can lead ...
3
votes
2answers
2k views

VPS vs Web Hosting: Which one is good for java web services [closed]

I have some questions about VPS and web hosting. As far as I understand, VPS is a virtual machine on which we can do anything as we can do with our local machine. Install software, change settings ...
6
votes
5answers
3k views

Programming Style in Large Scale C++ Applications

Recently I've been browsing source code of large applications written in C++ to learn a bit but I couldn't help but notice that most if not all use a lot of IFDEFs and class-less functions (where they ...
5
votes
1answer
2k views

How should I structure modules in an Angular.js application?

I am fairly new to Angular.js, and one that confuses me is how to best use modules in an application. It seems to me that modules can contain any of the other common constructs in AngularJS (...
13
votes
4answers
1k views

Do Windows Installers for internal business applications make sense?

I'm trying to build a general understanding for what's common in this situation so that I can decide if it makes sense to pursue it further. Are installers welcome in a typical corporate environment ...
16
votes
2answers
21k views

How to run C++ code in browser using asm.js?

An asm.js application is very fast (near native C++ speed): http://kripken.github.io/mloc_emscripten_talk/micro4b.png But how is it possible to write one in C++, convert it to LLVM code, then do ...
5
votes
6answers
7k views

Is this a Best Practice with Enum in C#

When Enum is used as below, say if we have enum Designation { Manager = 0, TeamLead = 1, Associate = 2 } then write the below code if (designation == Designation.TeamLead) //somecode ...
3
votes
3answers
402 views

Migration to embedded systems

My company has so far been developing a medical device, which is connected via USB to a desktop system (running x64 Windows 7) to run the image analysis and do everything GUI related. I am familiar ...
3
votes
1answer
576 views

Best Practices for calculating data in GIS-like web application

Let's assume that we have a simple GIS-like application, which presents (using Google Maps or anything similar) recorded tracks. Each track consists of points (data portions) with geo-data and ...
7
votes
1answer
7k views

How does Jump Point Search algorithm work and why is it so efficient?

While trying out the below applet, I saw that this path finding algorithm called Jump Point Search yields significantly faster result than A* and Dijkstra. http://qiao.github.io/PathFinding.js/visual/...
15
votes
7answers
40k views

Why are constructors not inherited?

I am confused as to what the problems could be if a constructor was inherited from a base class. Cpp Primer Plus says, Constructors are different from other class methods in that they create ...
0
votes
1answer
174 views

Show all definitions in Scheme?

I want to see all user-made definitions in a Scheme REPL, both loaded from files and entered at the REPL. Is there any way to "dump all definitions"? E.g. if there is: (define (plusone x) (+ 1 x)...
3
votes
1answer
183 views

“Final” Scheme REPL definitions: how to save them?

Is there a way to show and save all "final" definitions entered into a Scheme REPL into a text file? Say, if I have defined in the REPL: (define (increase x) (+ 1 x)) (define (multbytwo x) (*...
10
votes
4answers
8k views

How to document a project which is already developed?

I would like to know what options are available for documenting a project which has already been developed, as the developers who worked on didn't write even a single page of documentation. The ...
1
vote
3answers
671 views

Security through obscurity and storing unencrypted passwords

What exactly does "Security through obscurity" means in the context of stroing unencrypted passwords? I'm using a small program (I won't name it, to not enlarge enough large shame on its author) that ...
2
votes
1answer
831 views

Modern REPL for Haskell - is anybody working on it? [closed]

It's time Haskell had a modern REPL like Mathematica's (or better). Make each calculation run in a separate thread, so user has control over each computation box's resources (ability to pause, play, ...
8
votes
2answers
2k views

Could we build a functional computer?

As mush as FP has done, in the end, all our programs are structured. That is, it doesn't matter how pure or functional we make a them - they are always translated to assembly, so what actually runs ...
0
votes
2answers
1k views

Overriding - Access to Members with Reference Reassignment

I have recently been moving through a couple of books in order to teach myself Java and have, fortunately, mostly due to luck, encountered very few difficulties. That has just changed. I read a ...
0
votes
1answer
309 views

Functional metrics in Agile methodologies

I'm preparing a presentation about Agile methodology for managers (not programmers) and I'm looking that, from a side, the Agile talks about functional perspective*^ (in Scrum we have planning game) ...
1
vote
2answers
461 views

Working with Multiple Versions of Websites (Git)

I have a main template like website I have made that will allow me to quickly roll out and make new websites on demand when I need them, for my personal use. I'm wondering what is the best practice ...
0
votes
1answer
6k views

Best place to write SQL queries

I've been working on this project for my company. Currently I am embedding my SQL statements inside the program itself as and when they are needed. I do have two seperate classes - QueryBuilder ...
14
votes
5answers
3k views

What are the downsides of mixing tabs and spaces? [duplicate]

The advantage of using tabs for indentation is that people can configure their editor to use the tab width they are comfortable with. The only argument against this seems to be that people don't want ...
2
votes
2answers
526 views

In C# what is lifetime or lifespan of constant variable?

In C# if i declare a constant variable is any memory allocated to it as it acts as a compile time replacement? How long is the variable's life?
1
vote
2answers
474 views

Fundamental TDD: stuck with writing a test so I can write code that I want

I have a Season class. This Season has a few properties: among them, a list of Games. This should be populated from the same source that populated the rest of the Season properties. I have a test ...
3
votes
1answer
738 views

Arithmetic coding issue

Since a few days I am fighting my way through implementing arithmetic coding. I found a really great source of information which made me understand how it should work. Long story short, it implements ...
7
votes
2answers
7k views

Using node.js, how to serve content without using a framework like express?

I'm trying to learn node.js and create a web application, and although I'm doing my best to just use only node.js to create it, I'm having a very difficult time finding resources and examples that ...
3
votes
1answer
215 views

Shared context: good or bad?

RSpec allows users to share context across tests / examples, which would reduce the number of code lines in my app by a significant amount. On the other hand, somehow related to the question of ...
6
votes
0answers
384 views

Object Constraint Language (OCL) for Stack in java.util package

I have an exam coming up and I'm looking at past papers to get some ideas of what to expect. I'm a bit stuck on the following one and would really appreciate if someone could give some example ...
0
votes
1answer
2k views

Sorting an ArrayList by a Split Value [closed]

I am attempting to create an list which should be sorted by a particular field in a colon separated string. I have an array of strings with the following values: name1:535 name2:697 After sorting ...
0
votes
1answer
126 views

Keyword Collection, ManyToOne or OneToMany relationship?

I hope this is the right place for this type of problem. An Object of my class Movie can have several keywords ( like 'fight club', 'brad', 'fincher'), and be part of different categories (like '...
4
votes
1answer
768 views

Xerox SOLID example in PHP

There is a good example on Wikipedia regarding the violation of SOLID principles. The ISP was first used and formulated by Robert C. Martin while consulting for Xerox. Xerox had created a new ...
2
votes
1answer
249 views

Where does UI fit in a Multi Agent system

tl;dr How would I represent GUI as agents in a multi agent system. I am learning more about Multi Agent Systems. I like the concepts of such systems, it makes a lot of sense and it sounds very ...

15 30 50 per page