41
votes
12answers
4k views

How do I approach a coworker about his or her code quality? [duplicate]

I work on a new venture at a large enterprise software company (3000+ programmers). In my group, we have a bunch of projects and people usually work on several projects over the course of a year. I ...
0
votes
0answers
12 views

Alternatives to cron jobs or other ways of improving scheduled task performance

I'm working on a social networking website where users gain ratings after specific actions taken and proper conditions are met on the tables. The ratings are calculated depending on 'total hours ...
-4
votes
1answer
23 views

Is this a scam: client's first question is “do you process Credit Cards”, and can't talk on phone because hard of hearing [on hold]

I was contacted by a potential client via text message who's first question was "do you process credit cards". Over the course of a couple days, he sent maybe one message every day or every other ...
-4
votes
0answers
27 views

How to use the shell more professionally?

I recently got my first job as working student in a software company. Although I'm still a student, I already have almost a decade of experience with various programming languages and especially a lot ...
0
votes
1answer
13 views

Multiple Canvas in the Browser — How to Proceed?

Here's something I wrote ages ago as Java applet. I want to convert it into JavaScript and run in html5 canvas in the browser. From what I can see, canvas makes the most sense here. (SVG / DIV ...
0
votes
0answers
19 views

Aggregate and its root in purchase management domain

I'm having problems defining the aggregate boundaries (and maybe even the aggregate root) to enforce the transactional consistency rule. Let me first describe the problem domain. In our domain we ...
0
votes
0answers
6 views

How can Specflow (Cucumber) test cases be run with Autofac as the IoC container?

I'm trying to adopt BDD in my organization and since C#.Net is our primary mode of development, Specflow is our best bet for "anything Cucumber". However, I've been a Spring aficionado in the past, ...
-2
votes
2answers
26 views

Server-Side Development for Android Developers [on hold]

I'm a Java/Android Developer, I recently graduated college and currently working as a Jr. Android Developer. I feel very comfortable around Android and Java in general, also I'm always reading and ...
1
vote
1answer
38 views

Is it still an antipattern if we log an exception message and throw a different exception?

Our webapplication is using an ExceptionMapper to map some exceptions to Response. We log the exception messages before throwing a new exception as follows: catch (SomeException ex) { ...
2
votes
1answer
98 views

Reuse already fetched data for request

I have action that fetches user model from db to check access. Then I have method that in some cases requires same model. function checkAccess(req, res, next) { var data = ...
9
votes
3answers
3k views

How to unit test method that returns a collection while avoiding logic in the test

I am test-driving a method that is to generate a collection of data objects. I want to verify that the properties of the objects are being set correctly. Some of the properties will be set to the same ...
-3
votes
0answers
13 views

how to solve error opening (../../modules/highgui/src/cap_ffmpeg_impl.hpp:545? [on hold]

I trying to connect visual studio 2010 and foscam IPcamera. After running the code it give me this error "warning: error opening (../../modules/highgui/src/cap_ffmpeg_impl.hpp:545". Opencv2.411. Any ...
1
vote
4answers
129 views

Class design, responsibility granulation, efficiency and performance

I am in a design dilemma. I have a set of data that can be interpreted in numerous ways, but I cannot really decide how finely grained should it be. To illustrate it with some simple code: class Base ...
-3
votes
1answer
21 views

Database to store and search email metadata [on hold]

I'm building an application which allows users to search their emails via a simple cloud-based application. Users will automatically (via 3rd party) sync their email messages on a daily basis. In my ...
0
votes
1answer
15 views

Coping with Spring-Security's incomplete documentation

I have been a user of core Spring functionality (IOC) for a decade and really appreciate the IOC paradigm. I am also a fan of XML configuration, with limited use of autowiring, as it places all the ...
-5
votes
0answers
27 views

I need to create a stock class [on hold]

I need to create a class called Stock on BlueJ, with 2 parameters each to be assigned to the "symbol" and "name" instance variables & there should be 2 "set" methods , one each for the ...
18
votes
3answers
19k views

AngularJS: structuring a web application with multiple ng-apps

The blogosphere has a number of articles on the topic of AngularJS app structuring guidelines such as these (and others): http://www.johnpapa.net/angular-app-structuring-guidelines/ ...
1
vote
2answers
92 views

Does printf in C99 automatically round numbers for me?

Does printf in C99 automatically round numbers for me? I wrote a program as shown below and I am getting unexpected output. #include <stdio.h> #include <math.h> int main(void) { ...
4
votes
1answer
158 views

How to design a time tracking or activity monitoring application?

I am trying to build something like Manic Time - which is an application that tracks what the user is currently working on. It worked flawlessly on Windows, but doesn't support Linux. It has mad ...
1
vote
1answer
42 views

Adding new features to software while keeping the same database

My little team is just a few days from launching our web page. Its another user content type page so a lot of our data will be about user preferences and behavior. We decided to get it out of the door ...
4
votes
3answers
655 views

What are the valid uses of static classes?

I noticed that nearly every time I see programmers using static classes in object oriented languages such as C#, they are doing it wrong. The major problems are obviously the global state and the ...
1
vote
1answer
47 views

How do distributed applications verify that the data was processed correctly?

There are a lot of projects out there that rely on the public sphere to process data for them, but I do wonder how they ensure that every computer participating has processed the data properly. The ...
-4
votes
0answers
12 views

Web api VERB to use to create a document

I've created a Web api endpoint that when called will generate a document. It doesn't need to return the document. it just needs to create the document. fire and forget. I'm currently using the POST ...
2
votes
1answer
35 views

Manual Dependency Injection Examples Still Tightly Coupled

I've been using AutoFac for some time now to take care of the dependency injection we're using in a web project. All is well, but I now want to demonstrate DI outside of an AutoFac context for reasons ...
-1
votes
0answers
27 views

Average size of UML projects [on hold]

I need to estimate the scalability of a tool which is an add-on for a software modeling tool Enterprise Architect. The tool implements algorithms of O(n2) complexity. These algorithms scan "each ...
12
votes
3answers
307 views

What to do about large svn history when moving to git?

Edit: unlike some similar questions such as Moving a multi-GB SVN repo to Git or http://stackoverflow.com/questions/540535/managing-large-binary-files-with-git My scenario doesn't involve several ...
56
votes
14answers
7k views

Are data type declarators like “int” and “char” stored in RAM when a C program executes?

When a C program is running, the data is stored on the heap or the stack. The values are stored in RAM addresses. But what about the type indicators (e.g., int or char)? Are they also stored? ...
1
vote
1answer
59 views

Is it OK to use (WTF) forms to refer stuff from DB?

Form classes are intended (IMO) for submitted data against rules. For example: are passwords equal, is end date later than start date. submitted data--->|Form| Is it okay for Form classes to ...
2
votes
3answers
171 views

How do I recreate this Access Control/Group/ whatever methodology in OO/MVC

I am looking at trying to rewrite an application that is mostly procedural to an MVC/OO approach in order to teach myself a deeper understanding of both. BUT, I am having some conceptual issues with ...
0
votes
0answers
23 views

writing a controller file in Python

I need some advice on my idea to write a controller file in Python, and not like the C in MVC type controller but a more simpler idea. Just a Python script that controls the operation of some other ...
2
votes
3answers
65 views

What is an accepted method of timestamping in a distributed system?

In a normal application, a simple call to time.Now() in most languages will suffice for getting a timestamp, but what about in a web application spread over multiple servers? As I understand it ...
-1
votes
0answers
33 views

How can i prevent page from reloading? [migrated]

My Question is: I have one page and I redirect to another page by passing Response.Redirect On the second page I am downloading file but when I am reloading page from user side it again downloads ...
31
votes
3answers
3k views

What happens if a feature merged into develop is postponed by management?

We recently had a problem whereby a feature for our webapp (automatic signup) was postponed by management because they felt the start was too "cold" but they wanted all the other features we had been ...
0
votes
0answers
25 views

How to structure a SaaS application?

The Problem I need to develop a Software-as-a-Service application, that will be used from our clients. The application contains a lot of forms (Company Application) using a step-by-step forms. They ...
0
votes
0answers
11 views

SharePoint upload data - function refactoring - design questions [migrated]

I currently have a series of functions that write to various SharePoint lists, I am trying to amalgamate them into a single function but want to be able to have an elegant way to do this. each ...
0
votes
0answers
12 views

Using the <img> element in XHTML [migrated]

I'm a noob and learning HTML to begin with. I used the following code and tried to validate it at validator.w3.org. <p><img src="C:\Users\46506090\Pictures\FS ...
-4
votes
2answers
43 views

Converting (constant) to (address of function) [on hold]

My problem is that how to convert constant to address of function. Here an example. This code just printing that address of function. Suppose the TestFunc's address is 0x12345678 and I want to assign ...
0
votes
1answer
46 views

diagnosed eye problem ¿How to reduce eye strain on dev environment? [on hold]

I've suddenly started having blurred vision on one eye [don't worry: I'm seeing a doctor, this is not asking for med help]. While I wait for an eye OCT (tomography) I want to modify my coding ...
0
votes
0answers
10 views

Better way to wrap incompatible objects with default-method emulated traits?

In my Selenium web tests, I wrapped some elements and custom widgets with trait-like interfaces with default methods[1]. I want to add a caching feature to this type hierarchy to avoid repeated ...
-1
votes
2answers
58 views

3D visualization of moment using accelerometer on Android device

Is it possible to reconstruct the movement of an Android device in 3D space using data from accelerometer? For example, I may draw a circle with my hand in the air, holding an Android device. Is ...
0
votes
0answers
29 views

How to convert JSON Stringify to Object JavaScript? [migrated]

I have example : var data = [{"name":"eric","age":"24"},{"name":"goulding","age":"23"}] I want to convert json above to object like this result : [{name:"eric",age:24},{name:"goulding",age:23}] ...
2
votes
1answer
66 views

SRP and Getters/Encapsulation

I recently watched this presentation of Robert C. Martin about the Single Responsibility Principle: https://www.youtube.com/watch?v=Gt0M_OHKhQE He presents an Employee class with multiple ...
2
votes
3answers
118 views

Best naming practice for interface implementation with repetitive words

I have an interface ILogFactory with some implementations like ConsoleLogFactory or NullLogFactory Following this naming pattern, a LogFactory based on NLog would be named NLogLogFactory which sounds ...
-2
votes
0answers
14 views

How do I remove the dot using isDot() using RecursiveDirectoryIterator? [migrated]

I have this simple below code to help me get the contents of all files and sub folder. I took this code from the PHP cook book. it says that I can use the isDot() but it doesn't explain how to .. I ...
1
vote
1answer
112 views

DTOs vs Domain Models and invoking Command Handlers directly

I was just hoping someone might be able to answer a few questions I have regarding the proper design of DTOs and Domain Models. I'm currently working on a project which involves leveraging a SOAP API. ...
0
votes
1answer
31 views

AngularJS and ASP MVC

We have started to implement AngularJS in our web-applications using ASP MVC. I am wondering what approach to use for building application in the future. Keep using our current stategy: Build the ...
2
votes
2answers
37 views

Refactor presentation logic from model

I've seen this pattern used in a considerable amount of MVC applications. Let's assume we have a User model with the methods: hasSessionExpired displaySessionExpired The first method ...
1
vote
0answers
24 views

Git repo with lots of medium-sized images?

I've just used git-tfs to checkout a TFS repo into a Git repo. The .git directory comes to 2.33GiB, and the primary reason for this is a couple of large directories coming to about 650MiB each. Each ...
-4
votes
1answer
45 views

Whats the differnce between server and site? [on hold]

I read about what is server? and what is site? and relationship between them. But still I couldn't understand them and their relationships and their differences. Please anyone clarify me.
2
votes
2answers
131 views

Class with only one execution

I'm implementing a long algorithm (about 500 lines of C++). The algorithm consists currently of about 10 different methods. Each method I have to hand over multiple data-structures as parameters, ...

15 30 50 per page