instruction stringlengths 34 19.9k |
|---|
I'm working on a git workflow to implement in a small team. The core ideas in the workflow:
There is a shared project master that all team members can write to
All development is done exclusively on feature branches
Feature branches are code reviewed by a team member other than the branch author
The feature branch is ... |
I'm coming from a web forms n-tier background into ASP.NET MVC projects, and I'm wondering what the best practices are for separation of the components of MVC into different libraries (or not to) in the way one might with an n-tier model. Most of the sample apps I have seen only had one project file and objects were se... |
Should I put unit testing stuffs in a separate repository, not in the same repository as the programming library?
So I reference the programming library as submodule.
But most open source projects that I have seen do not organize the projects like what I mention above.
Can anyone explain which approach is better?
|
As a team lead of about 10+ developers, I would want to promote code reuse. We have written a lot of code-- a lot of them are repetitive over the past few years. The problem now is that a lot of these code are just duplicate of some other code or a slight variation of them.
I have started the movement ( discussion) on... |
Let's say I have a procedure that does stuff:
void doStuff(initalParams) {
...
}
Now I discover that "doing stuff" is quite a compex operation. The procedure becomes large, I split it up into multiple smaller procedures and soon I realize that having some kind of state would be useful while doing stuff, so that I ... |
I saw that Java 1.2 is also known as Java 2. Do "Java 1.x" and "Java x" (for example "Java 1.6" and "Java 6") refer to the same version of Java?
And if yes, why the need for this duality?
|
I need to implement something similar to a license server. This will have to be installed off site at the customers' location and needs to communicate with other applications at the customers' site (the applications that use the licenses) and an application running in our hosting center (for reporting and getting licen... |
In objective C, I have a situation where I would like to have an abstract protocol (interface) with 5 methods and 4 properties, but at the same time, I'd like to have a common implementation of 3 of those 5 methods.
So my question is, is it ok to
1) have just an interface declaration with all the method and property d... |
In several articles and books I learnt that "V-model introduced QA into SW development".
I would like to understand the point of such statement, as from my understanding, V model activities (verification and validation) cannot be considered as QA as both deal directly with product control, no matter if it's static (ver... |
I've been thinking about unit testing best practices and have come across the one assertion per unit test rule. I can see where this idea would help to isolate pieces of complex operations or verification when you have code like so:
private Place place;
@Test
public void test_whiteHouse(){
place = new place(KnownP... |
I am developing an app in DDD manner. And I have a little problem with it.
I have a Fare (airline fare) and FareRepository objects. And at some point I should load additional fare information (from a server, call server api) and setup this information to existing Fare.
I guess that I need to create an Application Servi... |
Some time ago I have read two different books and each of them gives totally different answer for the question if it is a good pattern to define constant values in the interface (in java).
So I am curious of your opinions with some reasonable arguments.
Is it a good habit/ pattern to define constant values in interface... |
Once in a while, a co-worker will check-in bad code which blocks my application from initializing properly.
To get around this problem quickly, I comment out the offending code. I then forget to uncomment the offending code at the time of my check-in, so I want to prevent this from happening again.
Do you have any sugg... |
When you learn new technology you spend time understanding its concepts and tools.
But when technology meets real life strange and not pleasant things happen.
Reuqirements are often far from ideal and differ from 'classic' scenario.
And soon I find myself bending the technology to my real needs. At this point I begin... |
For a simple example, assume your application sends out notifications to users when various events happen. So in the database I might have the following tables:
TABLE Event
EventId uniqueidentifier
EventName varchar
TABLE User
UserId uniqueidentifier
Name varchar
TABLE EventSubscription
EventUser... |
I roughly understand that cc, ld and other parts are called in a certain sequence according to schemes like Makefiles etc. Some of those commands are used to generate those configs and Makefiles. And some other tools are used to deal with libraries. But what are other parts used for? How are they called in this process... |
While using Selenium and Ruby to do some functional tests, I am worried with the performance. So is it better to add all test methods in the same Ruby file, or I should put each one in separated code files?
Below a sample with all tests in the same file:
# encoding: utf-8
require "selenium-webdriver"
require "test/unit... |
Is there an easier way to process multiple true/false states than using nested if statements? I think there is, and it would be to create a sequence of states, and then use a function like when to determine if all states were true, and drop out if not. I am asking the question to make sure there is not a preferred Cloj... |
Possible Duplicate:
Programmers forgetting syntax
Do programmers need a good memory?
I'm a new web developer. I began learning HTML/CSS around June of this year. I picked them up easily, now I'm moving on to Javascript. My problem is this. I understand the concepts that the training material are teaching but I f... |
Background:
3-5 developers supporting (and building new) internal applications for a non-software company. We use TFS although I don't think that matters much for my question.
I want to be able to develop a deployment pipeline and adopt continuous integration / deployment techniques.
Here's what our source tree looks ... |
Today some friends and I started discussing frameworks..
Some of us strongly believe that in 99.9% of cases, writing a new framework is a bad idea. We believe that probably some of the millions of frameworks out there should fit our problem, and if not, some hack, API, or configuration should be enough. If not, we thi... |
I've got a WinForms business application that evolved over the past few years. It's forms over data with a number custom UI experiences taylored to the business, so I don't think it's a candidate to port to something like SharePoint or re-write in LightSwitch (at least not without significant investment).
When I start... |
If my application is responsible for redirecting/doing a single sign on to a destination managed by a third party, in general, where should I draw the line for error handling during this process? If an error happens on the other application's end, is it reasonable for my stakeholder to expect the application I am worki... |
I have to add new funcionality in a web service legacy project and I'm thinking what is the best approach for a concrete situation.
The web service is simple: It receives a XML file, unmarshalling, generates response's objects, marshalling and finally it sends the response as a XML file. For every XML files received, t... |
I have a number of open-source projects that have gotten some significant usage and would like to find co-maintainers so that I am not a bottleneck when it comes to maintenance and support requests and to get other perspectives on how the project should evolve.
Where should I look for co-maintainers, what should I look... |
I sometimes create 'Util' classes which primarily serve to hold methods and values that don't really seem to belong elsewhere. But every time I create one of these classes, I think "uh-oh, I'm gonna regret this later ...", because I read somewhere that it's bad.
But on the other hand, there seem to be two compelling (... |
In a traditional MVC application, which component (model, view, or controller) is responsible for reading/writing the model to/from disk?
|
When I took the Realtime and Concurrent programming course our lecturer told us that when writing concurrent programs in Java and using monitors, most of the logic should be in the monitor and as little as possible in the threads that access it. I never really understood why and I really would like to.
Let me clarify.
... |
I've been working on some project on my free time for the past few months. Recently I've been approached by friends to build a startup, and this source code would be very valuable to us.
As a co-founder, this code could count for something in the company's capital, and be exchanged for shares. But how can you estimate ... |
I have an asp.net mvc "edit" page which allows the user to make edits to the parent entity, and then also "create" child entities on the same page. Note: I'm making these data transfer objects up.
public class CustomerViewModel
{
public int Id { get; set; }
public Byte[] Timestamp { get; set; }
public strin... |
I'm in a project for creating a game engine and eventually a game, and we need ideas on how to get our game out into the internet.
I had an idea with putting it onto the windows 8 store at a low cost(or free) in order to get the word out, but does the windows 8 store only support apps programmed in windows RT?
Our game... |
We are in the business of building customizable web applications. We have the core team that provides what we call as the core platform (provides services like security, billing etc.) on top of which core products are built. These core products are industry specific solutions like telecom, utility etc. These core produ... |
I have just started learning Android App Development a few days ago, with prior knowledge of C/C++, HTML and CSS.
This is the situation I am facing Repeatedly:
I am learning from a Video Tutorial Series, after each video, or each few videos, I say myself: Let's use what I have just learnt in the simple (and also "meani... |
Preparing myself also to ISTQB certification, I found they call static analysis actually as a static testing, while some engineering book distinct between static analysis and testing, which is the dynamic activity. I tent to think that static analysis is not a testing in the true sense as it does not test, it checks/ve... |
Why does the following code output y>x when clearly 1>-1?
unsigned x=1;
signed char y=-1;
if(x>y){
printf("x>y");
}
else {
printf("y>x");
}
Please explain this result.
|
I wish to project a collection from one type (Something) to another type (SomethingElse). Yes, this is a very open-eneded question, but which of the two options below do you prefer?
Creating a new instance using new:
var result = query.Select(something => new SomethingElse(something));
Using a factory:
var result = q... |
I am working on a small Delphi project, composed of two units. One unit is for the GUI, and the other for data management, file parsing, list iterating and so on.. I've already made a class diagram, and my workflow looks like hell- it's too complex, even for anyone to read. I've considered making a dataflow diagram, bu... |
Whenever I find myself wanting to use the isinstance() function I usually know that I'm doing something wrong and end up changing my ways. However, in this case I think I have a valid use for it. I will use shapes to illustrate my point although I am not actually working with shapes. I am parsing XML configuration f... |
I'm looking to determine the congressional district based on an address my user is providing. This will avoid having the user to look it up themselves.
Does an API of this sort exist?
Note
Through my attempts to find one, I've only come across these:
http://www.govtrack.us/developers/api
(not sure how to submit an an ... |
I was trying to install Windows Phone 8 SDK on my Windows 7 machine and it hit me with the 'supported only on Windows 8' message. I actually wanted to develop Phone 7.5 apps on Visual Studio 2012, impossible thing with the 7.1 SDK, so I thought 8 SDK will do the job.
As if it was not enough that the 8 SDK was controver... |
This is primarily a lein question about setting up a major project and its sub-projects, and is not intended to be a discussion question. Instead, I am interested in either a pointer to documentation or to a Clojure/lein best practices link.
I have a municipal property assessments application that splits two master fli... |
Over the years I've noticed a shift in attitude towards design patterns, particularly amongst the emerging generation of developers.
There seems to be a notion these days that design patterns are silver bullets that instantly cure any problem, a proliferating idea that advancing as a software engineer simply means lear... |
What do you do when you are writing a test and you get to the point where you need to make the test pass and you realize that you need an additional piece of functionality that should be separated into its own function? That new function needs to be tested as well, but the TDD cycle says to Make a test fail, make it p... |
We have been asked to add comments with start tags, end tags, description, solution etc for each change that we make to the code as part of fixing a bug / implementing a CR.
My concern is, does this provide any added value? As it is, we have all the details in the Version control history, which will help us to track ea... |
We have built a service (PHP Based) for a client, and are now looking to offer it to other clients as a hosted service. For this example, think of it like a hosted forum service, where a client signs up on our site, and is given a subdomain or can use their own domain, and the code picks up the domain, checks it agains... |
If I understand correctly, all ARC does is automatically add memory-management statements such as retain and autorelease in the proper places in a program. Is there any way to see all the memory-management statements that ARC automatically adds to a program?
|
Its seems like there are 2 ways someone can handle naming classes for elements that are designed to have multiple classes. One way would be:
<span class="btn btn-success"></span>
This is something that twitter bootstrap uses. Another possibility I would think would be:
<span class="btn success"></span>
It seems lik... |
Looking for non-conceptual/non-contrived reasons of when one would need to use an object with both a private copy constructor and a private assignment operator?
As in what problem does this technique/practice solve, that some other technique couldn't solve?
|
I work as a Java programmer, but C and C++ were always my favourite languages during studies. Unfortunatelly I don't have an opportunity to work with them as often as I would like to. As a result I sometimes get realized that I don't remember something quite important (today example: inherited protected members cannot ... |
My company has been conducting a lot of interviews lately for candidates with various experience levels, ranging from interns to senior candidates. We put our candidates through five 45 minute interview sessions where we try to ask a range of questions. One person always asks the same questions that test logic and comm... |
The development team has finished a website and my duty is to prepare a document so that other programmers can maintain the website with ease.
I have no experience in this and would like to ask what should be mentioned (document structure) in that report?
So far my idea is only to prepare a ERD diagarm for the databa... |
I'm a 19 year old student who really REALLY enjoys programming, and I'm hoping to glean from your years of experience here. At present, I'm studying PHP every chance I get, and have been for about 3 years, although I've never taken any formal classes. I'd love to some day be a programmer full time, and make a good care... |
I am writing a class library to serve as a managed .NET wrapper over a REST API. I'm very new to OOP, and this task is an ideal opportunity for me to learn some OOP concepts in a real-life situation that makes sense to me.
Some of the key resources/objects that the API returns are returned with different levels of deta... |
I was recently reading an answer to this question, and I was struck by the statement "The language is mature".
So I was wondering what we actually mean when we say that "A programming language is mature"? Normally, a programming language is initially developed out of a need, e.g.
Try out / implement a new programming ... |
I've just been reading through some basic design patterns,
Could someone tell me if the term "strategy pattern" only applies if your implementing a completely abstract interface?
What about when your children (concretes?) inherit from a parent class (the strategy?) with some implemented methods and some virtual and/or... |
In javascript, what is the difference in applying a toString() method to the primitive datatype, number like this
var myString = myNumber.toString();
and applying the same toString() method by creating a reference datatype equivalent, the Number class like this
var numberObject = new Number(myNumber);
var myString = ... |
So the problem is that I have a 3D projection of a rectangle that I want to turn into 2D. That is I have a photo of a sheet of paper laying on a table which I want to transform into a 2D view of that sheet.
Thus, what I need is to get an un-distorted 2D image by reverting all the 3D/projection transformations and gett... |
I have received comments from the supervisor reviewing my thesis. He asked two questions I cannot answer right now:
If ISO 12207 says under "Integration verification" that it "checks that components are correctly and completely integrated into a system", how this can be verified without testing, if all testing is vali... |
Hey guys I am really new to the C++ programing I have a little knowledge in C and a bit more in C++, but I do not know them enough to call myself a programmer. I am working as a PHP Web Developer I like being a crafts man and creating things so that is the reason to combine the programming with web development. I think... |
Let's assume that I'm extending a graphical file chooser class (JFileChooser).
This class has methods which display the file chooser dialog and return a status signature in the form of an int: APPROVE_OPTION if the user selects a file and hits Open /Save, CANCEL_OPTION if the user hits Cancel, and ERROR_OPTION if somet... |
I was recently asked the following question in an interview :
How do you debug a C++ program ?
I started by explaining that programs may have syntax and semantic errors. Compiler reports the syntax errors which can be corrected. For semantic errors, various debuggers are available. I specifically talked about gdb, wh... |
I'm learning node.js and am trying out Express. My first app had this code:
var express = require('express')
, routes = require('./routes')
, user = require('./routes/user')
, http = require('http')
, path = require('path');
Reading through the mongoose tutorial gives me this:
var mongoose = require('mongoose... |
Many sources note that automatic static code analysis include data flow and control flow. But these two are included in white box testing as well. Is there a difference in the automation? That in automatic static analysis all is done by the tools while in white box testing, a person creates the data to exercise the pos... |
I have an affiliate marketing client who needs to know if I can program this. Can I do one or both of the following scenarios without violating the GPL license?
Scenario A:
Make a software installer for a GPL licensed product which includes source, binaries, and license info. The installer also has a checkbox for insta... |
I was posed with the idea of creating an object that checks if a point will collide with a line:
public class PointAndLineSegmentCollisionDetector {
public void Collides(Point p, LineSegment s) {
// ...
}
}
This made me think that if I decided to create a Box object, then I would need a PointAndBoxColl... |
So let's say that I have a test:
@Test
public void MoveY_MoveZero_DoesNotMove() {
Point p = new Point(50.0, 50.0);
p.MoveY(0.0);
Assert.assertAreEqual(50.0, p.Y);
}
This test then causes me to create the class Point:
public class Point {
double X; double Y;
public void MoveY(double yDisplace) {
... |
I have a small tool I'm designing which would require a configuration file of some sort. The configuration file in my case is really more of a database, but it needs to be lightweight, and if needed the end-user should find it easily editable. However, it also will contain a lot of things in it. (depending on certain f... |
Is there a specific name to this? For me it looks like a view router, or a presenter router (I would name it like that) but maybe there is a better name and explication.
|
Yesterday I asked a question that happened to have another meaning inside. I can see that Control/data flow is often mentioned to be static analysis (when tools is used) or dynamic analysis testing in terms of white box testing. Could it be that automatic analysis tools can just help by creating graphs or they do actua... |
I'm sure there is such a correlation, because
experience and skill leads good programmers to picking languages that are better for them, in which they're more productive, and
working in a language forms how programmers think and influences their methods and skills.
Is there any research or some statistical data of th... |
I remember reading that there are no existing data structures which allow for random-access into a variable length encoding, like UTF-8, without requiring additional lookup tables.
The main question I have is, is this even a useful property? I mean, to look up and replace random single codepoints in O(1) time.
|
I have written a tiny bit of jQuery which simply selects all the Select form elements on the page and sets the selected property to the correct value. Previously I had to write code to generate the Select in php and specify the Selected attribute for the option that was selected or do loads of if statements in my php ... |
I want to know if there are any tools/tool-kits which aid in building
source level debuggers for domain specific languages ?
(I work on a proprietary DSL, which doesn't have any tools
and sometimes debugging will become difficult, so, if in case
there are any such tool-kits, wanted to try)
|
I've just developed a block cipher symmetric-key algorithm and I am using it in some of my products. I want to put it to real test.
How would one go about entering their encryption algorithm into an international encrytption contest?
|
I am pretty new to Java and its JTables and this is where I am struggling at the moment.
I need to create a GUI which shows me results of a sql query like SELECT * FROM tblPeople WHERE name='Doe'. My idea was to create a a JFrame which displays a JTable with all found records.
Besides this, I need to also implement s... |
For some legal reasons I haven't worked for anybody for the last 12 years. I am a java web developer or at least I am thinking so. For this period I have been working on my project- some sort of business network - and I did few small jobs, so right now I feel I am far behind in terms of my skills and the skills needed ... |
I'm trying to think about the best way to handle group memberships on a website. People sign up and select checkboxes in a list of interests. Every week we send out interest-themed emails to those members that indicated that interest.
however i store the information in the database, while i am working with the lists an... |
I have an API which allows a user to update their system status; and a separate call to retrieve system status updates from other users. Would it make sense to unify them under a PUT request where a user would request a PUT update with their own status update, and they would receive the status updates of other users?
M... |
In Java, there is the final keyword in lieu of the const keyword in C and C++.
In the latter languages there are mutable and immutable methods such as stated in the answer by Johannes Schaub - litb to the question How many and which are the uses of “const” in C++?
Use const to tell others methods won't change the logi... |
I am learning Hibernate (OR Mapping). I am using Maven for project management. However, I am currently reading a Hibernate book by O'Reilly, and they use ANT for their example. So my question is are there any difference between setting up hibernate with ANT and Maven?
Thanks in advance!
|
I need to write a unit test which validates the serialization of two attributes of an XML(size ~ 30 KB) file.
What is the best way to provide an input for this test?
Here are the options I have considered:
Add the file to the project and use a file reader
Pass the contents of the XML as a string
Create the XML through... |
I am unsure regarding the scalability of the following model. I have little experience with large systems, big number of requests and so on but I'm trying to build some features considering scalability first.
In my scenario there is a user page which contains data for:
User's details (name, location, workplace ...)
Us... |
Recently I was asked:
Why is NoSQL faster than SQL?
I didn't agree with the premise of the question... it's just nonsense for me personally. I can't see any performance boost by using NoSQL instead of SQL. Maybe SQL over NoSQL, yes but not in that way.
Am I missing something about NoSQL?
|
I am confused which approach to choose - Poll (which waste battery), GCM or any other approach which suits best?
Scenario is: my client is Android and server is C#.Net. Server sends Invitation to client. Server can choose whom to send (Regionwise, Particular, To All). Client can accept or reject the invitation.which se... |
I am given a set of sets:
{{a,b}, {a,b,c}, {a,c}, {a,c,f}}
I would like to have a data structure to index those sets such that the following "lookup" is executed fast: find all supersets of a given set.
For example, given the set {a,c} the structure would return
{{a,b,c}, {a,c,f}, {a,c}}
but not {a,b}.
Any suggesti... |
Possible Duplicate:
Is it OK to push my code to GitHub while it is still in early development?
I've been working on a hobby project for a few months now; it's clocking in at over 15000 source lines of code. A number of people have expressed interest in joining development, and I have full intentions of going open so... |
I am currently doing some research about software patterns and about architectural patterns for frameworks specifically.
Google is not really showing off for this topic, so I am curious which patterns would you consider specificially important for the architecture of frameworks? I am focusing on frameworks for web, mob... |
We're about to start a new project using Agile (using TFS), and I have a couple of "good practice" questions regarding the product backlog:-
When we first start adding users stories, is it a good idea to put them in (say) a "Backlog" iteration, or just leave their iteration blank? Obviously when the time comes to start... |
Possible Duplicate:
Where does this concept of “favor composition over inheritance” come from?
I have colleagues at work who claim that "Inheritance is an anti-pattern" and want to use composition systematically instead, except in (rare, according to them) cases where inheritance is really the best way to go.
I want... |
A client has asked me to do a redesign of their website, an ASP.NET Webforms application that was developed by another consultant. It seemed like a relatively straightforward job, but after looking at the code, it's clear that's not the case.
This application was not written well. At all. It is extremely vulnerable to ... |
I'm currently working in a geographically distributed team in a big company. Everybody is just focused on today's tasks and getting things done, however this means sometimes things have to be done the quick way, and that causes problems... you know, same old, same old.
I'm bumping into code with several smells such as:... |
Ok, I am a newbie and don't really think "dimensionally" yet, I have most of my initial schema roughed out but I keep flipping back and forth on one table.
I have a Contract table and it has a quantity column (tonnes), and a net price column, which need to be summed up a bunch of different ways, and the contract has l... |
My company switched from Subversion to Git about three months ago. We had weeks of advance notice prior to the switch. Since I'd never used Git before (or any other DVCS), I read Pro Git and spent a little time spinning up my own repositories and playing around, so that when we switched I'd be able to keep working wi... |
Possible Duplicate:
Avoid having an initialization method
I want to determine when to do non-trivial initialization of a class. I see two times to do initialization: constructor and other method. I want to figure out when to use each.
Choice 1:
Constructor does initialization
MyClass::MyClass(Data const& data) : m_... |
I'm currently working on a project where the original author informally told me that he didn't want to publish the source.
Since then, the original author has gone leaving me to be the sole developer on the project. I've tried to contact him several times about making the project open source so that I can have other d... |
First question here; please help me if I'm doing something wrong.
I'm a graphic designer who's trying to teach himself ASP.NET/C#. My server-side background is PHP/WordPress and some ASP Classic, and when I do code I've hand-coded just about everything since I started learning HTML. So, as I've started to learn .NET, m... |
I want to link several tables to a many-to-many(m2m) table.
One table would be called location and this table would always be on one side of the m2m table.
But I will have a list of several tables for example:
Cards
Photographs
Illustrations
Vectors
Would using GUID's between these tables to link it to a single colu... |
Assume two nodes in a peer-to-peer network initiating a communication.
In this communication, one node has to serve as a "sender", another as a "receiver" (role names are arbitrary here).
I'd like the nodes to assert either role with approximately equal probability. That is, in N communications with various other nodes... |
In Python, I often hear that it is better to "beg forgiveness" (exception catching) instead of "ask permission" (type/condition checking). In regards to enforcing duck typing in Python, is this
try:
x = foo.bar
except AttributeError:
pass
else:
do(x)
better or worse than
if hasattr(foo, "bar"):
do(foo... |
ISTQB, Wikipedia or other sources classify verification acitivities (reviews etc.) as a static testing, yet other do not. If we can say that peer reviews and inspections are actually a kind of a testing, then a lot of standards do not make sense (consider e.g. ISO which say that validation is done by testing, while ver... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.