3
votes
4answers
239 views

How is a state machine different from any other computer program?

I have seen several implementations of "State Machines" on github. As far as I understand, a state machine takes input that may or may not transform its state into one of a finite set of other states. ...
-4
votes
0answers
32 views

How do I use XCode 7.0 to compile Swift 1.2 apps? [on hold]

I installed the new version of XCode : 7.0. When I try to compile examples of github, for example, it tries to convert the code to Swift 2.0 and it doesn't work very well. I'd like to just use XCode ...
-3
votes
0answers
23 views

Programming design on heavy web I/O Django based scrapping application [on hold]

I've started a project few month ago for closest to real time database operations next to HTTP requests. I choose Django + Celery as a first place, then tried with home made multiprocessing + ...
0
votes
1answer
27 views

JEE MVC, controller calls the interface instead of the interface implementation

I'm following this tutorial: http://wiki4.caucho.com/Building_a_simple_listing_in_JSP It creates a basic web application in Eclipse using the MVC pattern with Resin as the web container. Here's the ...
-1
votes
0answers
22 views

Create/run a script, which securely stores account info, searches, scrapes targets, and then displays targets in canvas, without installing Python [on hold]

I made the title as brief and to the point as I could but I'll be more detailed here. I have a Python project in mind that I'd like to start working on now even though I'm still learning and should be ...
3
votes
1answer
129 views

Design: .NET web app architecture problem

I'm taking my first foray into .NET and I'm designing a web app that's heavy on other web services right now. I'm intending to do the following: Take user input (a USDOT number) Request data from a ...
1
vote
3answers
136 views

How to use Guice for an effective API Design?

I am creating a base API in JavaSE, which includes modules like MVP architecture, Service & Repository Layer, Event Model to fire events between presenter etc. I am trying to implement all best ...
2
votes
0answers
35 views

What's the etiquette of contributing to OSS that doesn't have a Contributing page

I'm thinking about contributing to a small R package on github that has only 1 contributor. What's the standard etiquette when there's not Contributing.md page on small projects like this? Should I ...
-3
votes
0answers
12 views

How to pass a string value to a String with “ ” [closed]

So it's kinda a simple thing but i can't find a way to do it without getting a syntax error.So i want to pass a string value from a variable to another.So lets say i have a variable. String view= ...
0
votes
0answers
55 views

Strategy for writing a scalable chat server in Java [on hold]

Currently I'm creating a chat server in Java using socket, seems that is the natural choice for a newbie java programmer. What are the strategies that need to be taken in order to scale the chat ...
-5
votes
0answers
29 views

How to interact browser from android application? [closed]

I'm developing an android application in which i need to interact with the chrome browser/default browser running on device. That is when the URL is been typed and browsed,i need to grab that URL ...
0
votes
1answer
63 views

Is N-Tier worth it when developing an ASP.NET application?

Let me start of by saying that by "worth it" I don't mean "remove DI and interfaces" and such. What I mean is to place the code in separate class libraries. Like done in the Onion architecture - ...
0
votes
0answers
2 views

What is the fool-proof way of setting up spreadsheet_excel_writer on Windows Server 2012 R2 [migrated]

I have an financial projection and budgeting application that produces spreadsheet outputs. This is working fine on Linux OS, with PHP 5.5.12 and also Spreadsheet_Excel_Writer 0.9.3 and OLE 1.0.0RC2. ...
-4
votes
0answers
35 views

What Are The Benefits Of Coding A Website From Scratch? [closed]

please what advantages does a website written from scratch have over the one done by CMS. Does a web developer just choose to use CMS at his own volition, or is it always at the client's request? ...
0
votes
3answers
78 views

Reading file during write on linux

As I understand, when a file is being written, the process writing to the file obtains an exclusive lock. So other processes cannot access this file for read. With the above knowledge, I'm unable ...
0
votes
2answers
40 views

Is there such a thing as the testing of automation?

I know that it's possible perform automation of testing. That is, take tests that are manual, and make them automatic. However, is there such a thing as the testing of automation? That is, checking ...
3
votes
1answer
240 views

How do C/C++ programs get ported to different platforms? [on hold]

Java applications can run on different platforms because they always run on top of a Virtual Machine specifically developed for each platform. So, there's no native installation, you just drop the ...
1
vote
2answers
32 views

Eclipse plugins - safe to install?

I've seen a few useful plugins for Eclipse such as jshint-eclipse. However, I'm a bit leery of installing third-party code. Is it generally safe to install Eclipse plugins without worrying about my ...
0
votes
2answers
89 views

What's the simplest way to deal with events in C in this situation?

I'm writing a text-based game, in C. I want the game to handle NPCs movement and actions in the background, while the user is making his moves. I'd also use time-based events to tell the user when ...
0
votes
0answers
12 views

Authentication structure for public area within admin dashboard?

I'm looking for input on how to organize the authentication scheme for a SaaS app where the application users offer a questionnaire to their customers. The paying SaaS user needs to login in order ...
0
votes
0answers
39 views

Why are the more popular seeds for angular less likely to include requireJS (and grunt), and does this reflect something beyond personal taste? [on hold]

You can skip this part unless you care about my motivation for this question. Sorry for the question title; I think it's a legitimate question but kind of difficult to ask without sounding like I'm ...
2
votes
1answer
43 views

Updating a video's view count. Should this happen client-side or server-side?

I built an iOS app similar to Vine, where a user can scroll a feed of videos that auto play. All of these video have a View_Count field in the backend to keep track of how many times the video has ...
0
votes
0answers
47 views

Simple Path to Route Algorithm

I'm currently conducting research into subway paths, but stand in front of a problem, with no programming knowledge and an extremely short time-limit. Probably the question I am asking is trivial, ...
2
votes
2answers
145 views

Algorithm and data structure to match groups of users (1-5 each) into 2 balanced sets of 5 users

I'm building a matchmaking queueing service for a 5v5 team-based game. I have a large set of users that are grouped into unique lobbies comprised of 1-5 users each. Each user has an integer based ...
0
votes
1answer
33 views

git workflow: read access + pull request or write access? [on hold]

Suppose there is a small team with 1 senior developer and 3 junior developers working on the same repo in a team on a github organization. The senior developer has admin access. What is the most ...
-2
votes
0answers
49 views

What documentation should we include in our source code? [closed]

What should we be keeping in our source code's docs? Should they just be brief descriptions of what each function/method's intentions are, or should they be full-blown reference information containing ...
-3
votes
0answers
9 views

myBatis update a table with values from another table [migrated]

I will have to update two columns of table B with values from the Table A object which is passed as parameter to the update statement. This is what I am trying to do <update id="id1" ...
0
votes
3answers
42 views

Deserializing an object at beginning of program which is used (much) later

I am writing a program, where in the beginning of the execution, I am instantiating a number of classifier objects using parameters stored in some files. I later use those classifiers in multiple ...
-2
votes
0answers
82 views

Disk faster than Memory? [migrated]

So I have a file called "Numbers.txt" having 10 million lines each containing one digit number. I want to sort this file and store the results in another file. So I wrote 2 really hacky solutions. One ...
1
vote
2answers
74 views

Inheriting and storing objects that contain different types of other objects

To start off, this is more of a best-practice question than anything. Introduction to the Environment I have myself an abstract class. Let's call this class Item. I also have another abstract class, ...
2
votes
2answers
39 views

Sharing functionality between platforms and languages

I'm in a situation where I already have a working, high-performance C++ program with GTK and OpenGL that renders data as a real-time graph. The data is saved as a report in a database which can be ...
5
votes
2answers
344 views

Generic Sorting of Lists<>

I have several Lists<> that holds objects of different classes. List<classA> listA; List<classB> listB; List<classC> listC; //... List<classM> listM; The classes do not ...
0
votes
0answers
29 views

Logging private data

In general, I write a debug log whenever one of my functions is entered, including the parameters. For instance: function execute_query($query, $conn_string) { ...
3
votes
2answers
174 views

Storing session key in a hidden field

Background: I have a question which is outline at Use different local storage between windows. The very high level question is "How can I keep tabs and windows sessions from clashing". Requirement: ...
-5
votes
0answers
28 views

What is an interactive Canvas? [closed]

I wish to implement an interactive HTML5 canvas in my website but I do not know what is the name of such implementations. I wish to create something like the responsive canvas on the main page of: ...
1
vote
0answers
64 views

How to avoid tying these two methods together with global mutable state?

I'm in the process of reading Code Complete 2 and learned that using global state is a no-no. What can I do to avoid using global state in this situation? Some background information: I have two ...
1
vote
1answer
107 views

Design Pattern - Adding features to a class

I'm finding myself unable to solve a design problem. For the sake of my simplicity, I'm going to use C# (Web API). Let's say I have an abstract class RestController: public abstract class ...
0
votes
0answers
58 views

Is it possible to cast Javascript anonymous object to a typed object? How? [migrated]

I'm looking for a way to cast JavaScript anonymous object to a typed Object, ... Using MooTools library (You may create them manually or using other tools), i defined several type, and then Using ...
3
votes
2answers
146 views

How to avoid …Helper or …Manager classes

I have quite a few Helper classes in my project. I have read that this is a bad thing, but I suspect that "Helper" is the wrong suffix for them. I'll give an example. First, I have a User class. I ...
-1
votes
1answer
50 views

What are the pros/cons of committing tests before/after the code they test in a code repository? [closed]

After a new feature is developed together with the corresponding tests and being prepared to be committed to the code repository, regardless of the order of their writing, what are the advantages of ...
-1
votes
0answers
18 views

Naming: how to call a list of specific styles [closed]

I have a list of projects I work on. Next I have a compiler that can compile in a few ways, let's say A, B, A and B and C (e.g. compiler arguments that should be used). There has to be a map that ...
-5
votes
0answers
29 views

WordPress simple page with input on the backend, output on the frontend [closed]

I'm a newbie and I have question about what plugin/theme/whatever I should use. I'm volunteering at advertising company and I got new task. We should create a page/web app for one client, that would ...
0
votes
0answers
48 views

A layer of abstraction too far?

Using an enterprise service bus, a message translator pulls a message off the queue ready to be consumed by a service. The translator picks up the message in a canonical data model (CDM) form and ...
1
vote
2answers
124 views

Should constructors for API classes ever be public, or can a factory always be used? [on hold]

I'm surprised this doesn't seem to have been asked before, or at least I can't find it anywhere. I know this is more of a philosophical question, but is there any particular reason not to use a ...
3
votes
3answers
173 views

Automatic code correction, Good or Bad? [closed]

We have a large team comprising of developers, interns who write rails and backbone js code with large codebase. We already have tools like JSCS and code climate to analyze the code and report ...
0
votes
0answers
64 views

Pattern to share fields in inheritance

I'm trying to figure out the best way to solve a design issue. I have to be able to clone (I'm cloning them to Apache HttpClient) different types of HttpServletRequest (POST, GET...) and then send ...
4
votes
2answers
890 views

Does this code follow duck typing?

The principle of duck typing says that you shouldn't care what type of object you have - just whether or not you can do the required action with your object. For this reason the isinstance keyword ...
0
votes
2answers
127 views

How to change the same code stored in several places after I improve one of them?

I have some codes written in Matlab. I use the code in different folders which contains different data. Because I want to change some parameters for each different data, I keep the codes in the folder ...
5
votes
3answers
89 views

REST API: Resource Ownership

Let's say there are Users and Pets. Each Pet has a single User as its owner, and a globally unique id. Endpoints could be /users/1/pets/2 /pets/2 I feel like the first option could be unintuitive ...
0
votes
0answers
38 views

Static classes vs prototype classes whats the difference really

I am manage to create both static and prototype classes in this JS code, Keeping in mind that I will always need 1 instance of prototype class "Fruits" here, what benefit could I get over static ...

15 30 50 per page