1
vote
1answer
36 views

Java Unit testing multiple test cases in one test

Is it good practice to have multiple test cases in one test or should I always create one test for single test case in every situation even if it is redundant? Why?
0
votes
1answer
63 views

Periodically polling an API, are there alternatives?

I'm currently working on a service that is supposed to aggregate data from a number of APIs, unify the data, and offer it through another API to the users. I had a couple of ideas for solving this, ...
-4
votes
0answers
33 views

Any birdview article about Web development with Java? [on hold]

I am new to Java Web development. And I am tasked to create a prototype with Java and related technologies in a short time. So I am looking for some birdview article about the Web development ...
2
votes
4answers
89 views

REST-full design: recommended approach for fetching related entities

Suppose I have two entities author and post, were every post has an author. There exists a REST call to get a paginated list of posts: GET /posts?page={page} a REST call to get a list of authors: ...
0
votes
1answer
159 views

Where and how to reference composite MVP components?

I am learning about the MVP (Model-View-Presenter) Passive View flavour of MVC. I intend to expose events from view interfaces rather than using the observer pattern to remove explicit coupling with ...
18
votes
6answers
2k views

How to turn truth table into smallest possible if / else block

How can I take a truth table and turn it into a compacted if block? For instance, let's say I have this truth table where A and B are conditions and x, y and z are possible actions: A B | x y z ...
-4
votes
0answers
29 views

Wordpress site prevent acces wp-admin of live [on hold]

I have a wordpress site on my production server now the point is i want to stop the user to access the admin panel of the production server www.live.com/wp-admin And to change or access the admin ...
0
votes
0answers
17 views

Is having a parent controller to manage a set of tabbed sections an anti-pattern for an angular application?

A lot of times, I have long forms that I divide into multiple tabbed sections. Each section is managed by it's own controller and there is a parent controller that manages the whole view. I use ...
4
votes
3answers
229 views

Batching immutable object changes?

With immutable models, what would be the best way to batch several changes? For example, let's have a Book that is immutable. I need to change both title and year. I could change one by one, but that ...
7
votes
1answer
6k views

What have my fellow Delphi programmers done to make Eclipse/Java more like Delphi?

I am a veteran Delphi programmer working on my first real Android app. I am using Eclipse and Java as my development environment. The thing I miss the most of course is Delphi's VCL components and ...
8
votes
3answers
838 views

Reason for placing function type and method name on different lines in C

I just started at a company and one of the style comments at my first code review was that the return type and method name should be on different lines. For example, this void foo() { } should be ...
2
votes
2answers
131 views

OpenGL vs OpenCV for beginner

I am a freshman college student currently learning C++ programming. I am good at math and physics, so I am looking to specialize in 2D/3D graphics with OpenGL. My question is about the differences ...
-3
votes
1answer
64 views

How common are use SDLC methodologies in real life? [on hold]

My instructor told us that some programmers are not using SDLC methodologies for making a system. Because in our project, we used one of the methodologies. If we do not use one of them, maybe our ...
23
votes
2answers
5k views

How to improve upon Bloch's Builder Pattern, to make it more appropriate for use in highly-extendable classes

I have been greatly influenced by Joshua Bloch's Effective Java book (2nd edition), probably more so than with any programming book I've read. In particular, his Builder Pattern (item 2) has had the ...
0
votes
3answers
39 views

Standard practice to publish and source-control a single file?

I often want to publish some useful standalone script - e.g., a matlab script which converts flac files into wav files. If it were a big project I would immediately place it in Github, however it ...
-1
votes
0answers
16 views

Web Service To Upload Data And Expose As API [on hold]

Is there a SAAS solution that'll let me upload my data and expose that data via an API. My data is mostly simple; 90% of it can be represented by a CSV. There are some 1-Many, Many-1, 1-1, and ...
6
votes
2answers
586 views
+100

Does laziness yield more race conditions?

I recently ran into a race condition while accessing a configuration setting. After examining what I could of the code, I came to the conclusion that the Configuration class' laziness1 was the source ...
1
vote
2answers
144 views

Live search/filter as you type in client approach

As an exercise for myself to practice my JavaScript "skills" I'm trying to write a client-side filter. It should be able to filter "content blocks" as the user types. By "content block", I mean a ...
4
votes
3answers
638 views

Looking for parallel programming problem [on hold]

I am trying to come up with a problem that is easily solvable in a parallel manner and that requires communication between threads for a test. I also am trying to avoid problems that require require ...
1
vote
2answers
101 views

Separate methods or single method with if statement?

I'm working on a .NET application and I'm wondering if I should use separate methods to handle the click events of two different buttons. They essentially do the same thing, just on different objects ...
2
votes
1answer
604 views

How to translate SQL query into REST API requests?

Let's say I have a machine-readable description (such as in WADL, Swagger or RAML) of a REST API that provides interface to a database. My users submit queries about underlying database in form of ...
0
votes
1answer
67 views

AJAX - What exactly does that encompass?

So I see on a lot of people's resumes they list AJAX in their technologies (or programming languages - and I recognize that it is not a language). To me, AJAX seems like such a small concept to be ...
6
votes
3answers
1k views

Is it OK to partially change a collection with PUT or DELETE?

I have a collection of products in a product group e.g.: product-groups/123/products If I need to add to the collection, is it OK that I pass only some products with PUT? If I need to delete some ...
26
votes
7answers
4k views

Is there any algorithm pattern to protect any content in the web to ensure I am the first one who created it?

A few years ago there was this hacker (don't remember who he was) that full disclosed a vulnerability in a given system, but to make sure nobody took credit for that, he created some kind of PGP key. ...
-3
votes
0answers
65 views

How to keep legal rights when hired to make a program [on hold]

I have been hired to make an iOS application where I will be given a set amount of money for completing different stages of development. I want to keep the rights to the code, however, so I can use ...
1
vote
1answer
231 views

Designing the bridge between REST layer to service layer

I am working on a project and would like to expose some REST services. The technologies used are RestEasy, EJB and JPA/Hibernate. I have structured my app so that there is a clear delimitation ...
0
votes
3answers
220 views

MVC pattern synchronisation

I am facing a problem in synchronizing my model and view threads I have a view which is table. In it, user can select a few rows. I update the view as soon as the user clicks on any row since I don't ...
0
votes
1answer
35 views

Name for an ancillary executable [on hold]

I'm a stickler for naming conventions and for their consistent use. I'm writing an application that consists of a windows service that is in charge of maintaining x number of running instances of ...
3
votes
1answer
963 views

Passing a Context around with dependency injection

In the project I'm working on, I'm using Guice and trying to do as much as possible with Dependency Injection. However, there's one little snag; many of my objects rely on an object Context. This is ...
1
vote
0answers
68 views

how does 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
2answers
147 views

What is a good word for the current “state” of a state machine? [on hold]

My computer program has a state machine inside it, and I am currently documenting a database table that, among other things, reports the state of that program. I am looking for wording that is ...
-3
votes
0answers
40 views

Input data type conflict causing infinite loop [on hold]

The code below shows a simple program, which is a small piece of code from simple math game.But in the add() function...if we cin a data type other than an int..the console displays Try again ...
3
votes
2answers
241 views

C# static practices coming from dynamic background

I have been dappling in C# after coming from several years in PHP. I don't find the language particularly difficult, although there are considerably more constructs for me to get used to. My question ...
0
votes
0answers
6 views

Insert Dynamic HTML content for Electronic Catalogue - Magazine [migrated]

I am making an electronic book(magazine). But i have 200 pages(in jpg format). So, in order to avoid writing the same line code for 200 pages i want to find out how to do it with javascript and php. ...
7
votes
1answer
74 views

Why are Scala's Either and Option types not interfaces/traits but classes?

I wanted to create a class CompileResult, that can be treated like an Either type but has some additional useful methods. It should be a CompileSuccess or a CompileFailure (which, too, has some ...
5
votes
3answers
258 views

What are technologies like XML, JSON, and YAML classified under? [closed]

What are technologies like XML, JSON, and YAML classified as? I already looked at Query Language Data-structured Language But neither appeared accurate... None of them are really meant for ...
-4
votes
0answers
15 views

How to change the options of a select tag b when select tag changes option? [on hold]

I have 2 select tags: 'a' and 'b'. What I want to do is upon selecting an option in select tag 'a' I want the options in select tag 'b' to change value. example: In option 'a' "Institute of Accounts, ...
1
vote
2answers
2k views

Using WebStorm for Razor Syntax MVC

I am building a lot of client-side heavy SPA-like apps with VS2010 and MVC3/4. VS2010 Javascript/HTML/CSS editing (mostly javascript) is interminably slow and sluggish. I'd love to use something ...
-6
votes
0answers
37 views

Notepad++ is making my .html.erb files highlighted odd colors [on hold]

new Ruby on Rails dev here, coming from a Java background. I'm using Notepad++ to do all of my editing. When I open an .html.erb file, it has no syntax highlighting at all. So, I tried associating it ...
1
vote
1answer
81 views

Does phpDocumentor tags order matter?

When we document our class, method and/or function with phpDocumentor, is there any specific order I should follow according to the standards? I know it doesn't matter for output the document. Since ...
11
votes
0answers
161 views

Math model for a webpage layout? [on hold]

While web-programmers surely know CSS/HTML rules by heart, and web-browsers have algorithms to render web-pages, what interests me whether there are any mathematical/theoretical models or at least ...
1
vote
4answers
204 views

Member variables versus. state variables? [closed]

Sometimes we declare a member variable in the scope of class but we could do the same by providing input to and getting outputs of the functions. I am learning that member variables are to hold the ...
3
votes
0answers
116 views

How to handle a memory consuming member variable

Suppose multiple objects of the same class should do something which takes a memory consuming resource. Which of the following approaches is recommended to define and use the resource by the objects? ...
-3
votes
0answers
65 views

Why hasn't USL become as important as UML? [on hold]

I've been reading this articles, they talk about how the Universal Systems Language is used to make unbreakable systems. Why isn't this used in common software projects? Why we use other approaches ...
1
vote
1answer
54 views

Finding Methods of Classes from Use case

I know some nouns in the use case scenario are candidate to be class, for example member, customer, student .... I can find such entities and some attributes of them, but my problem is that I can't ...
0
votes
2answers
408 views

“positively formulated” vs. “reads as english sentence” style logic [duplicate]

Sorry, I'd be happy to have someone improve the title of this question. What are the benefits and downsides of "positively formulated" logic vs. having it "english readable". I'm looking for a ...
1
vote
1answer
60 views

What exactly are Link Relation Values?

From REST in Practice: Hypermedia and Systems Architecture: For computer-to-computer interactions, we advertise protocol information by embedding links in representations, much as we do with ...
3
votes
2answers
191 views

can a closed source commercial software make system(3) calls to GPL applications (not libraries)?

The closed source commercial software (CSCS), will just make system(3) calls to GPL applications. The user machine will run CSCS and it will call these GPL applications, in realtime, in the very same ...
0
votes
1answer
41 views

In a REST based system should a request for a sub-resource include the parent

I'm unsure of REST best practise in the following scenario: GET /Customer/23 = returns Customer = OK GET /Customer/23/Orders In the second request should a Customer AND the Orders be returned, or ...
2
votes
1answer
120 views

Why use a enum to create the singleton pattern [duplicate]

Why would you use an enum to create a singleton pattern? To what purpose would it serve over a conventional singleton pattern? I have seen the above used. The code uses an enum to create this pattern ...

15 30 50 per page