10
votes
0answers
242 views

Why do Haskell functors only have derived types in their target category?

In Haskell, the Functor typeclass functor is defined as follows (see e.g. Haskell wiki): class Functor (f :: * -> *) where fmap :: (a -> b) -> f a -> f b As far as I understand ...
9
votes
0answers
132 views

Unit testing for data munging pipelines made up of one-line functions

Reading Mary Rose Cook's Practical Introduction to Functional Programming, she give as an example of an anti-pattern def format_bands(bands): for band in bands: band['country'] = 'Canada' ...
8
votes
0answers
130 views

Algorithm to generate Edges and Vertexes outwards from origin with max multiplicity of 3

I am creating a 2d game for a website where the universe can grow extremely large (basically infinitely large). Initially, the universe is composed of 6 stars that are an equal distance from the ...
7
votes
0answers
95 views

After breaking our code into reusable bits, how do we test and deploy?

We started out with one developer, and one svn repo containing all our code: ^/foo/trunk/module-a ^/foo/trunk/module-b ^/foo/trunk/module-b/submodule-b1 ^/foo/trunk/website1 (at the time this was a ...
7
votes
0answers
236 views

How do I associate command objects with the right receiver?

I tried to use Command Pattern for implementing Undo and Redo in my project public abstract class Command { protected Form Receiver { set; get; } protected HtmlElement Element { set; get; } ...
6
votes
0answers
371 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 ...
5
votes
0answers
163 views

Software design: too many static objects?

About the subject I hesitated for a while between using singletons objects or plain static ones. After having read a lot of different opinions, I made mine: If you don't need to prevent ...
5
votes
0answers
98 views

Algorithm to generate all sets of m points in n x n x n cubic lattice which are unique under symmetry

I am implementing an algorithm which is going to be quite computationally complex, and want to try to make sure I'm not doing unnecessary work. There is an n x n x n cubic lattice, e.g. if n=2 this ...
5
votes
0answers
113 views

Explicit DAG instead of Vector Clocks for synchronisation

I've started looking at approaches to data synchronisation among a set of peers. The peers must be able to work in a disconnected way and then synchronise together to merge their local changes. Peers ...
5
votes
0answers
161 views

Using Haskell type classes to enforce commutativity

I want to define a type class for geometric objects that can be intersected together: class Intersect a b c | a b -> c where intersect :: a -> b -> c -- Language extensions: ...
5
votes
0answers
296 views

How can I make a universal construction more efficient?

A "universal construction" is a wrapper class for a sequential object that enables it to be linearized (a strong consistency condition for concurrent objects). For instance, here's an adapted ...
5
votes
0answers
2k views

How to parse multipart field/file data separately?

I want to parse a multipart form twice: Once to grab the incoming fields, and later to process the file upload. I am trying to maintain a proper separation of concerns within my Node app: ...
4
votes
0answers
25 views

Is this a correct JWT authentication implementation?

I've created a Flask RESTful API which requires an email / password and Facebook login flow. This will probably need to be extended in the future to support more social logins. I've chosen to ...
4
votes
0answers
67 views

possible to achieve Rust's ownership model with a generic C++ wrapper?

Looking through this article on Rust's concurrency safety: http://blog.rust-lang.org/2015/04/10/Fearless-Concurrency.html I was wondering how many of these ideas can be achieved in C++11 (or ...
4
votes
0answers
65 views

Distributed Calculation of Geometric Distance between vectors

I am looking at a large scale low latency way to calculate the geometric distance between vectors. Let's say I have a vector A. It has size 128 and of type 32 bit float. I want to get it's geometric ...
4
votes
0answers
55 views

Estimate if benchmark sampling difference is significative

In order to estimate the fastest function in various cases in a non fully deterministic context, I'm running an experiment calling one or the other at random and recording the duration of the ...
4
votes
0answers
69 views

Modelling a complex schedule of work

I've got a real-world problem that I'm trying to represent and automate. I've simplified and abstracted it down to the following: There are n places of work (P1, P2, ..., Pn). Each place, Pn has a ...
4
votes
0answers
94 views

Is the observer pattern suitable when the observers are not independent of each other?

I have a class Car which has 2 properties: int price and boolean inStock. It also holds a List of abstract class State (empty class). There are 2 states which can be applied on the car and each is ...
4
votes
0answers
84 views

Using mysql 5.7 Json Columns for EAV

I am developing an e-commerce product and I have been able to implement all functionality and am left with allowing users to create additional attributes for a product. Right Now I have two options. ...
4
votes
0answers
124 views

Is there a simpler way to help testers push code to a testing branch?

I'm a amateur programmer, I'm not used to working with Git. It's my job to help test new code, for a while now this has included pulling the branch containing the issue, merging it with the main ...
4
votes
0answers
354 views

Multiple Oauth2 access tokens

I have an API that uses oAuth2 and my own mobile apps that use this API as their backend. Since users can be logged on via multiple devices (i.e iphone, ipad, android tablet or android phone) at the ...
4
votes
0answers
68 views

Conditional CSS based on external modifier class - good practice?

Introduction / background: CSS components For a relatively large website we are working with SASS, and trying to manage CSS in components. The basic idea of components is that a component should look ...
4
votes
0answers
247 views

How can unums emulate IEEE's negative zero?

I am currently reading "The End of Error - Unum Computing" by John Gustafson (Youtube). What I am still not sure about is how the cases handled in IEEE by negatively signed zero are handled with ...
4
votes
0answers
197 views

inserting json document with `.` in key to mongodb

Firstly, this is more of a design question than a programming question. I am creating an application where I have to fetch existing json data and insert it into mongoDB. I found that some of the the ...
4
votes
0answers
67 views

Seeking opinions on using device tree for I/O definition

I've been working ELLCC, a clang/LLVM based development tool chain targeting ARM, Mips, Microblaze, PowerPC, and x86 targets. The tool chain is pretty complete and runs on Linux, Windows, and Mac OS ...
4
votes
0answers
350 views

What is the relationship between “flux” and pure functional reactive programming?

Flux, as far as I understood, is a technique about dealing with the dataflow of an application unidirectionally, keeping state isolated from the rest of the program in read-only, self-contained ...
4
votes
0answers
290 views

Is there a reasonable way for a typescript class to derive from a dojo/dijit class?

DefinitelyTyped has a dojo solution which uses named modules and may work with legacy dojo and explicit typing, but these declarations do not facilitate typescript import since there are no anonymous ...
4
votes
0answers
144 views

How should private dependency links be handled in setup.py

At work we use a private pypi server. This pypi server is specified as a dependency link: ... from setuptools import setup config = ConfigParser.ConfigParser() rc = ...
4
votes
0answers
183 views

Design for an application framework that will allow each implementation to customize parts of the UI

I am tasked with designing an application framework that will allow each implementation to customize parts of the user interface. One such example would be that the implementation (let's call it ...
4
votes
0answers
493 views

Dynamic programming in Bin packing

Problem: Given a list L of objects of possible sizes from set S={1,2,4,8} and unlimited supply of bins of sizes 16 each and we have to use minimum possible numbers of bins to pack all objects of L. I ...
4
votes
0answers
182 views

Diagram to show code responsibility

Does anyone know how to visually diagram the ways in which the flow of control in code passes between code produced by different groups and how that affects the amount of code that needs to be ...
4
votes
0answers
238 views

What's the proper way to merge two projects in source control software

I'm using Fossil-SCM to maintain my projects. Since I don't work in a team I usually have just a very linear branch of development: 1.0 -> 1.1 -> 1.2 I'm wondering what the procedure is when you have ...
4
votes
0answers
309 views

Facebook authentication with an Authoritative Server for a Flash Game

I'm working on a multiplatform game in Flash. This game utilizes Photon Server for authoritative physics and user statistics tracking. I'm looking to leverage Facebook authentication as an alternative ...
4
votes
0answers
287 views

Help/suggestions for Parallel assembly line scheduling (Dynamic programming)

I am working on a problem similar to the assembly line scheduling by dynamic programming.The issue is that unlike the classic problem where we have predefined stations now I only have information ...
4
votes
0answers
369 views

Is this any form of service pattern, some other pattern, SOA or just an anti-pattern?

I'm going to set out a scenario/pattern I've encountered and then I have a few questions pertaining to it. During an MVC request in a web framework (PHP, Laravel in my case), if I have an abstract ...
4
votes
0answers
195 views

RSpec + Selenium tests for .NET on Windows

I'm a Rails developer doing TDD on a Mac with RSpec, Capybara and Selenium webdriver. Now I have been asked by my company to use this approach for a .NET on Windows environment. What is the best way ...
4
votes
0answers
121 views

Script language native extensions - avoiding name collisions and cluttering others' namespace

I have developed a small scripting language and I've just started writing the very first native library bindings. This is practically the first time I'm writing a native extension to a script ...
4
votes
0answers
432 views

Implement FBP / Dataflow programming in VBA?

Intrigued by Flow Based Programming a la J Paul Morrison. I wonder if one can implement FBP in Excel/VBA. I searched quite a bit for a Basic-Lang FBP implementation to no avail. I've looked at some ...
4
votes
0answers
119 views

Acceptable dependencies in a service-oriented architecture, internal to a team

In a service-oriented architecture, subsystems can depend on each other in different levels: Database level => Foreign keys to enforce data integrity across services on deletions and updates ...
4
votes
0answers
134 views

How can I best organise a Jekyll + Bootstrap + Git site?

So after many many many years of building sites from scratch (and doing a lot of the lifting myself) I've dipped my toes into two projects that have been around for a few years that I've been ...
4
votes
0answers
289 views

I want to write a data processing & analysis programming language that compiles to SAS. How to go about choosing a language to write my compiler in?

As a side project I wrote a simple macro in SAS to add syntatic sugar to SAS code. I hate how verbose SAS is sometimes! So my macro looks like this %macro md(code); /* expects a superquoted ...
4
votes
0answers
591 views

Client side authentication through signatures instead of passwords

I want to save some user-generated data with some signature of the user that generated it (let's say that the user has to fill some forms with some data and I want him to sign the written data). The ...
4
votes
0answers
175 views

Web revisioning and the Accept-Datetime header

I have been in the process of generating documentation for an upcoming project. One of the features of the data available in this project is that it will be revisioned (or at least large parts of it ...
4
votes
0answers
633 views

Fluent interface implementation and reflection. Case study

I hope I picked the right group for this question... I have this little framework I want to implement and I would like to have an opinion on it. In particular I am more concerned about the ...
4
votes
0answers
61 views

When connecting to a server using the DRDA protocol, is it true that the first Client-To-Server command MUST be EXCSAT chained with ACCSEC?

When connecting to a server using the DRDA protocol, is it true that the first Client-To-Server command MUST be EXCSAT chained with ACCSEC? I found 2 different answers when I googled it. If you look ...
4
votes
0answers
201 views

Open Grid Engine or Akka/Something more fault tolerant?

My use case is that I have a pipeline of independent, stand alone programs, that I want to execute in a certain order on specific pieces of data that are output from previous pipeline stages. The ...
4
votes
0answers
106 views

XDIME for Mobile Applications

I'm involved in a project that requires to mobile-enable some previously developed Portlets. The Portlets are deployed in WebSphere Portal, and the container offers a technology called IBM Mobile ...
4
votes
0answers
520 views

Design thoughts on a schema based request object for CXF endpoint

Trying to seek design suggestion on a schema based request object for a CXF endpoint. I've created a CXF SOAP endpoint which takes the following object as an input. The request object will have ...
3
votes
0answers
132 views

Why is a vertical bar used as the OR operator in so many programming languages?

The Vertical Bar Operator (|) is used in a variety of constants to mean OR in some way: C-style languages use a | b to mean bitwise OR of a and b, a || b to mean logical OR of a and b. Regular ...
3
votes
0answers
84 views

Finger Paint path gets huge over time and slows the app

So I am writing a Finger paint app. I have multiple color which user can select. I save the path and paint information inside an array. ArrayList<PaintPath> arrayPaintPath = new ...

15 30 50 per page