instruction stringlengths 34 19.9k |
|---|
My team of 4 experienced developers works on a large, modular Windows application (approx. 200 KLoC). I have focused on the core codebase since the beginning of the project (3 years ago) and have gradually shifted to a semi-lead developer position, though I am not the team manager.
Our current iteration is a high-prior... |
I've recently been reading through Mark Seemann's Dependency Injection in .NET and have been attempting to apply some of what I've learned in a new project I'm working on, and I'm stumped on a particular scenario trying to determine what dependencies I should and should not inject. I've read several other questions on ... |
How do you go about introducing the codebase, which may be rather complex and tangled with a lot of "gotchas," to a new member of your team?
I think the easiest way would be to have the overall architecture laid out with diagrams, and take a couple weeks (or months) giving the new person well defined (and well scoped) ... |
More and more I'm seeing functions being declared like
var foo = function() {
// things
};
Instead of how I had learned, like
function foo() {
// things
}
What's the difference? Better performance? Scope? Should I be using this method?
|
I'm a chess enthusiast and a programmer. I recently decided to start making a chess engine using my chess and programming knowledge. So here's my question:
What language (I'm familiar with Java, C++ and Python) and methodology should I adapt while writing a chess engine?
A little guidance would be much appreciated.
Edi... |
Like most modern developers I value Agile principals like customer collaboration and responding to change, but what happens when a product-owner (or whoever determines requirements and priorities) changes requirements and priorities too often? Like several times a day?
I recently inherited a smallish code base that was... |
In ASP.NET and C# I've ran across this before. Your class needs to implement interface ISomething in order for something in the super class to supply something to you.
I can't remember the details, as I ran across it quite a while ago, but it had something to do with session variables in ASP.NET C#. It was part of th... |
What exactly happens in Java when you instantiate the same object multiple times?
For example:
Test test = new Test();
then later on I will call it again, Test test = new Test(); again or inside a loop. Will the previous instantiation be disposed?
|
Go and D provide garbage collection, and yet they claim to be system programming languages. What degree of low-level programming can be achieved with languages having garbage collection?
For low-level programming, I mean close to the hardware or being able to:
Runs directly in limited memory, with no latency, and perf... |
In am reading Spring in Action (3rd edition) and here a snippet from it:
ApplicationContext ctx=new ClassPathXmlApplicationContext("springidol.xml");
Performer performer=(Performer)ctx.getBean("poeticDuke");
performer.perform();
It doesn't has any problem,however, when the author introduce the ... |
I have been working a while on a Django project which has been growing a bit lately. I have been think a bit about what strategy to use to make it easier to handle. One thing I would like to get some input on would be if I should split my application into several smaller applications. That would make my view and model ... |
It's easy to accept that objects should be used in all layers except a layer nominated as a data layer. However, it's just as easy to end-up with an 'anaemic domain model' that is just an object representation of data with no real functionality ( http://martinfowler.com/bliki/AnemicDomainModel.html ).
However, using ob... |
I am having a discussion on code style, and it's starting to sound like a "matter of taste". I strongly believe otherwise, so I'm writing this to get your opinion and learn from your arguments for and against.
The issue is that of hiding complexity by replacing a bunch of lines of code with a method. This discussion is... |
I'm working on an application, that does IP routing and QoS. Today we have the QoS implemented, with 3 priorities (low, normal and high) and for each level we create a Queue and as soon as the packages are queued, we send it forward in a FIFO way (the scheduler spend 60% of time with the high queue, 30% the time with n... |
Can website display issues on certain platforms affect a website's search rankings and potentially hinder any SEO efforts?
|
Currently I have three classes and respective interfaces and respective builders:
Tree: the data structure (implemented in SimpleTree)
ProbabilityTree: is a Tree with added functionality to randomly select child nodes and to adjust the probability of selecting a node (implemented in ProbabilityTreeImpl).
DynamicTree: ... |
In the Use case you need to make all the activities the user can do. And then in the Activity diagram I need to explain the Use cases, show the steps that it handles.
But if this is all correct, where do I need to show the enemies? Like: Generate path, walk, etc...
Because it isn't controlled by the player, the player... |
I've just started at a new job this past month and looks like they have NO source control for their code. They are relying on the backups their hosting provider takes for them.
After talking a bit I convinced my boss that we should definitely be using source control and after I gave a short seminar on it, the entire te... |
We elicit requirements from our product stakeholders by creating and refining user stories in monthly sprint planning meetings. This includes defining use cases, acceptance criteria, and identifying constraints, and the final result is a sprint backlog of user stories. The high-level customer requirements are refined... |
Simple question, what's more common / standard / won't make future developers look at me cross-eyed for unit testing:
Displaying just the errors, or reporting every passed test?
|
I am a developer in a good company. I was given a task by my company to accomplish within a week however I finished the same in 4 days, my boss, the client, and other team members all are happy by my work; even I was! However suddenly I got a thought in my mind: "For my work I took some code from internet and mixed it ... |
I've seen some people who make properties for every single member, private or not... does this make any sense?
private string mWhatever;
private string Whatever
{
get
{
return this.mWhatever;
}
set
{
this.mWhatever = value;
}
}
I could see it making sense in 1% of the cases a... |
My resume is no longer relevant. It can no longer contain an adequate description of my technical abilities. One can get a much better sense of what I am capable of by looking at my GitHub repositories, my Stack Exchange profiles, and the various courses that I am taking at Udacity and Coursera. The problem is that I h... |
Possible Duplicate:
How do I create my own programming language and a compiler for it
I want to create a new general purpose language that will compile to JavaScript and I'd like to be able to write it in that same JavaScript.
I wouldn't go much into detail about why, but how can I do it? Currently I have professiona... |
Every now and then I get or write some minimal code samples to achieve tasks. What's the usual practice for storing these samples (which could prove useful later on) ? Have a separate source folder or create a separate project ?
|
I come across this problem usually (especially when dealing with certain frameworks) where I would like once piece of code to execute once and only once however the provided method e.g (something like an onComplete function) that I wish to place this instruction in will in reality execute multiple times.
I am just wond... |
Consider an application where adds an email address to his profile and submits it.
We have some dispute in our team over how to validate this email address. Some developers (including me) believe that we should validate this simple string via an extension method:
bool isValid = newEmail.IsEmail();
They argue that any ... |
I would like to know if people have already asked back some technical questions to your interviewer. Saying something like "Well, you asked me a bunch of technical questions, and now, do you mind if I ask you some? If I am going to join your company, we will work closely together and I want to make sure my I respect th... |
I had this question asked on stackoverflow, but it was closed "as not a real question".
So i decided to remove all rumbling and post that question here, assuming that this stackexchange is for "conceptual questions about software development"
The main question is in the title: Why rpm and deb package formats are not un... |
I've finished a first working, releasable version of a testing framework. Prior to release, I want to apply a proper license to it. Normally I'd choose something like GPLv3 but here I am pretty unsure. If I put the testing framework under GPLv3, does that mean users won't be able to test their commercial applications w... |
I read the following in Algorithms 4th Edition by Robert Sedgewick and Kevin Wayne:
Our first qualitative observation about most programs is that there is a problem size that characterizes the difficulty of the computational task. Normaly, the problem size is either the size of the input or the value of a command-line... |
I used to heavily rely on session variables in the past, but have recently found many of them to be unnecessary, using things like query string parameters instead.
A colleague of mine refuses to use session variables. Is this a realistic goal and should session variables be avoided for any practical reasons? Can sessio... |
I learned to do Test Driven Development (TDD), Dependency Injection (DI) and Inversion of Control (IoC) all at the same time. When I write code using TDD I always end up using DI in my class's constructors. I am wondering if this is because of how I learned to do TDD, or if this is a natural side-effect of TDD.
So my q... |
I have a set of fractional coordinates.
I also have a rotation matrix that operates on cartesian coordinates.
Does anyone know how I could convert my rotation matrix so I can operate on the fractional coordinates?
The fractional coordinates are functions of the basis vectors a,b,c and the corresponding alpha, beta, gam... |
I'm starting a brand new project. The main access from the client side app will be via an API written in ASP.Net MVC3.
I'm looking for discussions on how best to handle logging information for security access as well has how to handle Phishing and Brute Force.
On the Information side of things, I'd also like some idea... |
I am a Automation Engineer. I use QTP for Automation.
I wanted to know couple of things.
In a scrum Project which has 2 weeks of work, how can complete automation be done in that time frame (talking only about the GUI Level)?
Similarly, how can API Level of automated testing be accomplished, especially inside a single... |
I have some innocent/beginner questions:
What is reverse engineering good for?
As a programmer, should I learn the art of reverse engineering?
What are the benefits to a programmer who is experienced with it?
|
Apart from the obvious reasons, like financial, employment and recognition, what are the practical/real benefits to using programming competition sites?
It seems quite algorithmic and maths heavy, but how does that map to something practical, in your everyday programming?
|
Don't know how to put it, But I'll try to be as clear as possible
I have a project in which I am creating lots of classes and those classes have some common properties and methods but those methods could have different code in them,
So I decided to make an interface so that I could inherit that in all classes and all c... |
I've been working on a software project mostly solo for over 5 years. It was a mess to begin with (I am the third or fourth developer to be working on it), and although it's less of a mess now it is still incredibly disorganized. The rate of progress in getting it under control is glacial and I'm starting to feel despo... |
Microsoft released today the final builds of Visual Studio 2012 on MSDN. I'm trying to decide from this version comparison page which edition to install (I can install any edition I want for free). I'm a solo developer who develops mostly web apps and console apps in C# and Python. Some of the features in Ultimate/Prem... |
A simple way to keep the settings of a Java application is represented by a text file with ".properties" extension containing the identifier of each setting associated with a specific value (this value may be a number, string, date, etc..). C# uses a similar approach, but the text file must be named "App.config". In bo... |
I was experimenting with new overloaded operators, I have created one void operator and another one that returns something when it's called:
#include <iostream>
struct chichachicha{
int operator()(){
return 25;
};
};
struct boomboom{
void operator()() {
std::cout << "Hi folks!" << std::end... |
As the title says, I find it useful to be able to overload operators. Is it possible to also change the way the operators are parsed by specifying the precedence and associativity of overridden operators?
|
In the early days of FORTRAN and BASIC, essentially all programs were written with GOTO statements. The result was spaghetti code and the solution was structured programming.
Similarly, pointers can have difficult to control characteristics in our programs. C++ started with plenty of pointers, but use of references a... |
I know in some areas (game industry, for example), STL is not recommended.
So my question is: is it really a good practice not to use STL in some cases? If so, what's the biggest reasons of not using the modern C++'s STL?
|
Team Foundation Server offers a version control system, but with many more side features, such as bug tracking, user stories, project planning, and it is all integrated into visual studio.
Someone put a more complete list of features over here:
Over the past year I have been working with Mercurial and from the moment ... |
I recently came across a weird piece of code
if(foo == bar){
function foo_bar(){
// Function definition
}
}
Is this a good practice of coding ?
|
I am always given the advice that developers need to stay up to date with the latest in technology - things like webrtc, updates on html5 and css3 and new js libraries, software methodologies like TDD, DDD, and BDD.
The question is why? Why do we need to constantly update ourselves? Can't we just stick with what we kno... |
I applied principles of the GRASP and ended up having a class called Environment.
This class's responsibilities are to:
Keep information about services in the environment,i.e. environment definition (Service is another class)
Start/stop services meeting some criteria
Apply configuration changes to different service an... |
How is programming a quantum algorithm different? What would a C like language look like if it was designed for qubits? Would types change?
|
Can I build a multi-threaded system that handles events from a game and sorts them, independently, into different threads based on priority, and is it a good idea?
Here's more info:
I am about to begin work on porting a mid-sized game from Flash/AS3 to Java so that I can continue development with multi-threading capabi... |
Due to not wanting to pay licenses my company is still using SQL Server 2000 for new projects.
This is very limiting for multiple reasons.
I'm wondering what are the limitations of using SQL Server Express 2008?
Is there any reason NOT to use it to power ASP.Net MVC3 websites?
|
We are continually revamping our front end developer test that we do in-house after a candidate has passed an online test. The online test has questions such as:
How does a for loop start?
What is the correct way to write a JavaScript array?
Write the css selector for the 3rd list item within an ordered list
with the ... |
Let's say you are given the following...
List<Thing> theThings = fubar.Things.All();
If there were nothing to return, what would you expect fubar.Things.All() to return?
Edit:
Thanks for the opinions. I'll wait a bit and accept the entry with the most ups.
I agree with the responses so far, particularly those suggesti... |
The codebase I'm working in now has the convention of using private fields and public properties. For example, most classes have their members defined like this:
// Fields
private double _foo;
private double _bar;
private double _baz;
// Properties
public double Foo
{
get{ return _foo; }
set{ _foo = value; }
}... |
Please do not dismiss the idea right away. I know that it is hard to compete with a mainstream approach that already works (mostly), so my question is partly "academic".
I also am aware that ClojureScript exists and is very cool, but it is a patch on an existing ugly thing, a useful abstraction.
Disclaimer: I am a prog... |
I'm using a lot of printf for tracing/logging purposes in my code, I've found that it's a source of programming error. I always found the insertion operator (<<) to be somewhat of a odd thing but I'm beginning to think that by using it instead I could avoid some of these bugs.
Anyone ever had a similar revelation or I'... |
On this wikipedia page I have found the following sentence regarding closures in C++11:
C++11 closures can capture non-local variables by copy or by reference, but without extending their lifetime.
Does this mean that an existing closure might refer to a non-local variable that has already been de-allocated? In such ... |
I work on a Windows/Mac cross platform application that is sometimes downloaded from web sites. It is sometimes re-branded by and sold by third parties.
I'm the 'windows guy', my Mac counterpart is on vacation.
I'm getting some questions from a customers about what the Mac user experience will be if we sign the Mac... |
Of course, it is very good use to use a logging framework for the error messages or warnings. But sometimes I use System.out.println() if I want to try something new in a short time.
Is it really so bad using System.out.println() for some quick test?
|
I am currently reading the Analysis of Algorithms section in Algorithms, 4th Edition and I'm trying to understand how the author calculated (N^2)/2 and (N^3)/6 frequencies of execution in the code snippet below (here is the full code):
public class ThreeSum
{
public static int count(int[] a) {
int N = a... |
This is a purely hypothetical question.
Say I create a class method that contains no references to instance variables or other resources. For example (C#):
protected string FormatColumn(string value, int width)
{
return value.Trim().PadLeft(width);
}
As far as I can see, there is absolutely no reason why this met... |
I submitted an application I wrote to some other architects for code review. One of them almost immediately wrote me back and said "Don't use static. You can't write automated tests with static classes and methods. static is to be avoided."
I checked and fully 1/4 of my classes are marked static. I use static when I am... |
Let's consider something like a GUI application where main thread is updating the UI almost instantaneously, and some other thread is polling data over the network or something that is guaranteed to take 5-10 seconds to finish the job.
I've received many different answers for this, but some people say that if it is a r... |
How does caching effect the performance of a running program? From my understanding, the assumption that each instruction always takes the same amount of time is not always correct, because of the effects of caching. How does caching affect algorithmic performance? Thanks in advance.
EDIT 1:
To further elaborate, lets ... |
I am using GDataXML library developed by Google as part of their Objective-C client library. As its Google’s XML processing library and I heard that Apple don't allow to use any third party libraries in app, will they allow this one?.
(I am using this library because many iOS geeks suggest to use this one!!).
Thanks in... |
I have a database table holding 40 million records (table A).
Each record has a string a user can search for.
I also have a table with a list of character replacements (table B) i.e. i = Y, I = 1 etc.
I need to be able to take the string a user is searching for, iterate through each letter and create an array of every ... |
I am taking a networking class(data communication) this coming semester. In many courses in my computer engineering degree, the books lack mathematical content. I am not a math wizard, but I think mathematics has the potential to give a much deeper understanding of different concepts, but it requires more work.
Is it ... |
I developed one application for iPhone and now I want it on App Store. So many my iOS geek friends told me to test it on actual device i.e. on iPhone.
So I wonder that why it is necessary to to test my iPhone app on actual iPhone device though they (Apple) have given "simulator" which is near about same as my device?
|
I often see projects (in Java projects and teams using Eclipse) that prefix function parameters with p.
For example
public void filter (Result pResult) ...
I personally don't see any benefit in this, but would like to know what the reasoning is. The best explanation I've heard yet is that it is to distinguish the nam... |
I am building a site and idealy I would like to record the users interaction via their webcam. How do I intergrate webcam recording into my site. I have seen It done with flash. But Im trying to avoid using this. My site is being built using c#, javascript and designed for IE 7 and older.
I want to record the videos f... |
In a git environment, where we have modularized most projects, we're facing the one project per repository or multiple projects per repository design issue. Let's consider a modularized project:
myProject/
+-- gui
+-- core
+-- api
+-- implA
+-- implB
Today we're having one project per repository. It gi... |
I'm using a registration function that hashes the email in PBKDF2 with a random and unique Salt each time. The hashes email and his salt are saved in the DB. No problem with that.
The problem is that now I want to make sure that users only create one single account per email. Obviously to verify that I need to check my... |
Possible Duplicate:
When are Getters and Setters Justified
Why are public and private accessors considered good practice?
In my time as developer I learned that properties can be very useful. I use properties to control read and write access or to add something like validation checks.
But assuming that I have an aut... |
I'm trying to create a JSON schema for the results of doing statistical analysis based on disparate pieces of data.
The current schema I have looks something like this:
{
// Basic key information.
video : "http://www.youtube.com/watch?v=7uwfjpfK0jo",
start : "00:00:00",
end : null,
// For results o... |
I'm requesting best practice with this question. This is only an issue if the customer company is strictly national has a native language other than English, I think.
If the customer has a lot of mainly very domain specific (say, German) expressions, mixed with some lesser domain specific namings. The language of our c... |
I have a line of text I would like to display only when a webpage is being printed. Is it possible to only display this line when printing the page or doing a print preview using PHP in some way?
Basically, I want to print a page without the print headers, but would like to include the page's URL within the page's con... |
I installed Apache2 and PHP5 last night on my fresh Linux Mint machine.
I created a folder and created a simple index.php file with a call to phpinfo() to test out the installation and every works correctly.
However when I open the file with Sublime Text 2 or any other editor, I cannot save my changes. I can use the su... |
I'm using this as part of a game, but it's not really a game development question, so I'm putting it on this more general Stack Exchange.
The goal is to generate "random" outputs for a fixed integer input, but (and this is the clincher) to generate the same random output every time the same random input is put in.
The ... |
I have the following:
html {
overflow-y: scroll;
}
body {
font-family: Georgia, "Times New Roman", serif;
font-size: 1.125em;
line-height: 1.5em;
margin: 0 auto;
max-width: 41em;
}
Which attributes should be with the HTML section, and which within the BODY section?
|
I have insert 14.485 lines on MySQL like this:
INSERT INTO `bairros` (`id`,`cidade_id`,`descricao`) VALUES (1,8891,'VILA PELICIARI');
INSERT INTO `bairros` (`id`,`cidade_id`,`descricao`) VALUES (2,8891,'VILA MARIANA');
...
It took around 5 minutes.
I had to insert in another table 16.021 lines, same database, so for t... |
We currently abuse our version control system and use it... pretty much as an FTP to store big release binaries (4+ GB).
We are seeking to move away from this horrendous practice which has and continues to devolve and take more and more of IT's resources while crippling the integration and release processes.
A solutio... |
I know Javascript for some time, although I am not a heavy user, I know it the first from the time when Netscape was my browser. I pretty much understand the main things, but since JavaScript approach to OOP is prototypical I have some problem grasping it.
One problem to add to this it seems that things can be done in ... |
I'm thinking of freelancing and building web sites in my free time.
I have experience in C#/ASP.NET, JavaScript/jQuery as well as HTML/CSS and SQL. Thus, I feel like I have sufficient web technologies knowledge to go down this path.
What I'm unsure of is if there are any tools which can be used to simplify the life of... |
In my last three jobs, I was a code maintainer. In all three cases, I was hired after the majority of the code for the project was already written.
I'm a self taught programmer. Before I ever started my first professional job, I had maybe a dozen projects under my belt that I started and shipped successfully.
Writing n... |
Possible Duplicate:
How should I test randomness?
One of the features to be developed in our application was allowing user to click a button which will choose an element at random out of (normally 5-10) values registered in the database. The randomness doesn't need to be secure or scientifically uniform, but we do n... |
I started programming with Python, and I was really confused by concepts like coroutines and closures.
Now I think I know them on some superficial level, but I've never felt that "enlightement" moment, so I choose to learn Clojure. I bought the book by Stuart Halloway and it's good, but when I looked at the index there... |
Who is responsible for bumping version number in commercial software development?
How to setup policies for that?
1) for small team
2) for medium team
It is important not to forget to change the version number that self-describes that output file.
Such as AssemblyInfo.cs / resource.rc / AndroidManifest.xml
|
What is Amortized Analysis? And how can it help me achieve worst-case performance guarantees in my programs?
I was reading that the following techniques can help the programmer achieve Worst-case performance guarantees (i.e. in my own words: guarantee that the running time of a program would not exceed the running time... |
Floating licensing is a software licensing approach in which a limited number of licenses for a software application are shared among a larger number of users over time. Nice for the corporates to reduce the costs. It has also the developer aspect.
I saw lots of pricing examples for many software. As far I understood, ... |
So when you call malloc or new [] from your C/C++ application, how does the CRT translate it into Windows API calls?
|
As a freelance developer, I sometimes have to access the administration panels of hosting providers of my customers. It is an astonishingly frightening experience. Below are some points I noticed when accessing recently a not-so-unpopular hosting provider based in UK which has the word "secure" mentioned in large on th... |
After reading about OpenMP and not finding functions to support semaphores, I did an internet search for OpenMP and the readers and writers problem, but found no suitable matches.
Is there a general method for replacing counting semaphores in OpenMP with something that it supports? Or is there just a gap in the enviro... |
How does the memory usage of an integer object written in Java compare\contrast with the memory usage of a integer object written in C++? Is the difference negligible? No difference? A big difference? I'm guessing it's the same because an int is an int regardless of the language (?)
The reason why I asked this is becau... |
I am trying to learn lua and am experimenting on my linux machine. I am not a programmer, so I am looking for your help to give me some suggestions.
What I want to accomplish is making my compile-rewrite-recompile cycle as efficient as possible.
Here is what I do.
I am using vim in one window to program. I have a shell... |
Continuing from my previous question: Javascript simple code to understand prototype-based OOP basics
Let's say we run into console this two separate objects(even if they are called child and parent there is no inheritance between them):
var parent = {
name: "parent",
print: function(){
console.log("Hell... |
I've created an application framework using the unit of work and repository patterns for it's data layer. Data consumer layers such as presentation depend on the data layer design. For example a CRUD abstract form has a dependency to a repository (IRepository).
This architecture works like a charm in client/server envi... |
While learning Haskell I have faced a lot of tutorials trying to explain what are monads and why monads are important in Haskell. Each of them used analogies so it would be easier to catch the meaning.
At the end of the day, I have end up with 3 differents view of what a monad is:
View 1: Monad as a label
Sometimes I t... |
I can find all sorts of weird information about templates in Perl, but nothing about what they actually are.
Are they generic types like in C++? Is it a class-like structure? Or maybe something else?
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.