instruction stringlengths 34 36.1k |
|---|
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... |
Disclaimer: I'm aware of the questions How do I review my own code? and What advantages do continuous integration tools offer on a solo project?. I do feel that this question aims at a different set of answers though, as it is about a specific software, and not about general musings about the use of this or that practi... |
I'm working on a content synchronisation module for Drupal. There is a server module, which sits on ona website and exposes content via a web service. There is a also a client module, which sits on a different site and fetches and imports the content at regular intervals.
The server is created on Drupal 6. The clien... |
I'm currently choosing between two viable software designs/solutions. Solution 1 is easy to implement, but will lock some data in a proprietary format, and will be hard to change later. Solution 2 is hard to implement, but will be a lot easier to change later on.
Should I go YAGNI on this or should I incorporate the ex... |
It has happened in our team that our issue-tracker is down. Happens about once a week now (yes, wow), and there's not really much we can do to get it back up, since it's hosted by our client in a different timezone. It sometimes takes several hours for it to be operative again.
In the meanwhile, we can't really tell wh... |
This analysis makes sense, and states anything that avoids code duplication and simplifies maintenance speaks for a service layer.
What is the technical behavior?
When a service client references a service, does it do so at runtime, or does it happen at compile time?
When I change something in the service layer code,... |
Currently the company I work in gives each developer their own development virtual machine. On this machine (Windows 7) they install the entire stack of the product (minus database) this stack is normally spread amongst multiple machines of differing OS (although moving towards windows 2008 and 2008r2)
So when a develo... |
I am looking for a design for my application, here are the players(classes) involved.
struct Transform {
// Uses a matrix to transform the position.
// Also acts acts as the state of a Dialog.
Position transform(Position p);
//other methods.
};
struct Dialog {
// There are multiple dialog for the... |
I'm finding it difficult to frame this question so ... I want to execute code both before and after a method runs in PHP. There are, as far as I know, two ways to implement this:
Method One: pre and post methods
class Model
{
function find($id)
{
$this->_precode();
// ... do stuff
$this->post_code();
... |
I want to start/improve a culture of collective code ownership at my company but at a geographically distributed level... I'd say there is some current collective code-ownership mentality, but only at single geographical sites.
This is a follow-up to this question: What is the politically correct way of refactoring oth... |
For a school assignment we're supposed to make a Java implementation of a compressor/decompresser using Huffman's algorithm.
I've been reading a bit about it, specially this C++ tutorial: http://www.cprogramming.com/tutorial/computersciencetheory/huffman.html
In my program, I've been thinking about having Nodes that ha... |
I'm against compiled stuff going into version control, specially when it comes to compiled binaries, however, my principles are now in question after adding doxygen support for a project.
Should the hundreds of files generated by doxygen go into version control?, what is the recommended practice here?, I think the idea... |
I read a lot about vim and emacs and how they make you much more productive, but I didn't know which one to pick. Finally when I decided to teach myself common lisp, the decision was straight forward: everybody says that there's no better editor for common lisp, than emacs + slime. So I started with emacs tutorial and ... |
Often I need to apply some small fixes (to make them run on my environment) or even change some parts of the software (to tailor it to my needs) to software from outside. However this obviously creates problem with updating said software, even when it changes nothing related to my fix. It would be easier when the softw... |
I have to debug an issue which requires me to print all the values of a Value Object that is returned by a web service call. The Value object is a complex object in the sense, it has another object as its member which in turn has another object.
Printing all the values by using get methods is cumbersome. So I was wonde... |
I got the idea that basics of fuzzy logic is not that hard to grasp. And I got the feeling that someone might explain it to me in like 30 minutes. I understand neural networks and am able to re-create the famous Xor problem. And understand how to go just beyond it and create 3 layer networks of x nodes.
I'd like to und... |
So, I'm on my quest about creating a Java implementation of Huffman's algorithm for compressing/decompressing files (as you might know, ever since Why create a Huffman tree per character instead of a Node?) for a school assignment.
I now have a better understanding of how is this thing supposed to work. Wikipedia has a... |
In corporate in-house software development it is common for requirements to be determined through a formal process resulting in the creation of a number of requirements documents. In open source software development, this often seems to be absent. Hence, my question is: how are requirements determined in open source so... |
I was reading code of a java project where I found a class name like "UserSansXml". This class is dealing with user objects. I wanted to know the meaning of "sans".
|
We had a senior level interview candidate fail a nuance of the FizzBuzz question12.
I mean, really, utterly, completely, failed the question - not even close.
I even coached him through to thinking about using a loop and that 3 and 5 were really worth considering as special cases.
He blew it.
Just for QA purposes, I ga... |
So here's the confusion, let's say I declare an array of characters
char name[3] = "Sam";
and then I declare another array but this time using pointers
char * name = "Sam";
What's the difference between the two? I mean they work the same way in a program. Also how does the latter store the size of the stuff that som... |
In a current project we have setup the build so that we could mix Java and Scala. I would like to use more Scala in our code base to make the code more readable and concise. In the process also learn the language by handing over real features.
So I plan to use Scala for some classes to showcase its benefits and convi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.