instruction stringlengths 34 19.9k |
|---|
I'm integrating EASTL into my game programming framework. I did some changes to it since I have my own memory management sub-system and now I'm wondering what I need to do to not break the license under which EASTL was released.
The source code files include the following notice:
Copyright (C) 2005,2009-2010 Electronic... |
I have an API library for C# that provides flexible multithreaded task management of objects on task bases. The library was developed extensively for a project that was later cancelled by the client. I received the legal rights to the library, and the client doesn't care what I do with it now.
I don't know what to do w... |
During times of heavy development, the database schema changes both rapidly and continuously, and by the time our weekly push to the beta build comes around, the schema has changed so much that the only sensible option is to nuke all of the tables I can and copy the new versions from my dev database. Obviously, this is... |
I have the task to implement the state pattern in one of my classes. The assignment referenced a suggested implementation, and upon reviewing that implementation I was confused since I believed it to be nonsensical for most applications and frankly simply bad from a design point of view, since it completely dismisses s... |
I am planning learning Model-View-Controller (MVC) development using Java. While reading I came across a post which mentions java.util.Observer and java.util.Observable for MVC development.
As I never heard of it before, upon more googling I came across this SO post, which discusses some design flaw with the above-ment... |
I think the discussion for programmatic service oriented usage vs human interaction is clear.
But if I were to create an application that makes use of both a programmatic API and a website that makes use of the data connected by the same API, does it lean the favour towards using only ASP.NET?
How easy is it to integra... |
Maintainability is a major stake of professional software development. Indeed, maintenance is nearly always the longest part of a software life cycle, as it lasts from the project release until basically the end of times.
Moreover, projects being in maintenance represent a large majority of the overall number of projec... |
As part of writing an Iterator, I found myself writing the following piece of code (stripping error handling)
public T next() {
try {
return next;
} finally {
next = fetcher.fetchNext(next);
}
}
finding it slightly easier to read than
public T next() {
T tmp = next;
next = fetcher.fetchNext(next);
... |
I'm a developer in large IT company that is centered around providing services to clients (by that I mean development department is <20 people and not a major part of organisation). I'm solving different tasks relevant to current problems, and everything is fine so far, but management somehow came up with idea to imple... |
Can somebody explain me in what use-cases I should consider using AMQP like e.g. RabbitMQ? What are the pros and cons?
|
I've been a programmer for the past six years. Throughout my career, I have worked on many web applications.
Most of the time, when a database was needed, it was given to us (the programmers) or we had some legacy database to work on. If not that, we had to create and design the database on our own which was not that ... |
I was asked to create for a freelance project a Monopoly game in Java. After finishing it the same guy asked me to create four UML diagrams from which he could understand how the game works. Everything went well this far but his third request presented me with some problems.
He now wants me to write for him in about 20... |
I have a Java application that I am implementing following the MVC pattern.
I want to have a window (view) that contains a form which allows the user to add several text fields. There will also be a button that will allow the user to add more text-fields to the form.
I have several questions about this.
Will the code ... |
I'm upgrading a desktop application that currently displays the currency symbol anytime money values are displayed or printed. A friend of my from the UK told me "Whenever British people see software with the American Dollar Sign ($) it automatically turns them off."
Given the fact that we (developers) only have one sh... |
I have a reservation system that I have coded and my final task is to allow the user to enter a set of dates and then show them all available options.
The reservation table is set up with unit_id, check_in and check_out. There are twelve different unit numbers.
So I have to somehow iterate through them and find the uni... |
I was reading an old Coding Horror article about indentation, when I read this:
Or, maybe you're using a next-next-generation editor that treats code as "data" and the layout (including whitespace) as a "view", making all these concerns largely irrelevant.
Exactly what next-next-generation editors was Jeff Atwood ref... |
What is the correct usage of UML sequence diagrams? Should they contain objects of View classes or DB classes? Or should they modeled in a more generalized fashion? Or is this completely arbitrary?
|
I've done some searching and quite haven't come across the answer I am looking for. I do not think this is a duplicate of this question. I believe Windows could be a suitable development environment based on the mix of answers in that question.
I have been developing in Ruby (mostly Rails but not entirely) for about a... |
i'm designing a client-server system via web broswser and i have this problem:
I send the data to the client via JSON, then the javascript view shows the stuff. Then the user takes actions and commands are sent back to the server. Usual stuff, the problem is what if the view's data is corrupted or old?
One solution i t... |
The question that bothers me is whether it is possible/feasible/reasonable to expect for an open-source app to sell well on the mobile market?
Should I believe that my users will use my app, rather than build the checked-out version, and, more important, how can I deal with the competition if I make my app available ... |
What's the difference?
In my opinion, I can replace the term "Schema" with "Scheme". Can I?
|
Possible Duplicate:
What is the most effective way to add functionality to unfamiliar, structurally unsound code?
Till now, all I have worked on is with Java projects that I build from scratch (mostly course projects and some hobby stuff). But now, I have come across a huge code base of about 46000 lines spread acro... |
In this particular website, when you hover your mouse over a particular region, it displays something that is clickable. I know of tool tips, but in my experience, I have only used tool tips to show static text, not click able html text.
http://www.cry.org/projects/projects.html
What technology do you think is being us... |
Some programming languages are modeled on machine code, like assembly languages. Other languages are modeled on a natural language, the English language. Others are not modeled on either machine code or natural language. Languages such as PROLOG, for example, don't follow either model.
I came across this Perl module Li... |
Suppose you develop a system that has multiple services (implemented by different teams, in different countries, using different technologies including java, php, c#, c++ and more). Let's assume that despite using different technologies, somehow you have agreed to integrate using RESTful APIs.
Does such a system need ... |
I'm implementing a hashtable structure for a dictionary. Dictionary is in a text file. There are 2 words on each line. I'm generating the hashtable by using the first word as a key. I'm holding the hashtable on a list. I want to save the hashtable to a text file to use it every time. What kind of structure should I use... |
In a project, I've found a code like this:
class SomeClass
{
private SomeType _someField;
public SomeType SomeField
{
get { return _someField; }
set { _someField = value; }
}
protected virtual void SomeMethod(/*...., */SomeType someVar)
{
}
private void SomeAnotherMeth... |
From SVN 1.5, it supports reintegrate feature. I wonder when I should reintegrate. Should it be done before release or after release?
If I do it
Before release
Pro: It is not forgettable to merge with trunk.
Con: Merged version can be different from QAed version.
After release
Pro: Releasing version is same with QAe... |
As noted in this question, I ran into an issue with git add /**.... I can't actually find any documentation on the "/**" form of path specifications - possibly because it's hard to google.
How is it meant to work, exactly? I'm particularly curious that git add /\*\*.py can work but git add /path/foo.py won't - why is t... |
I am writing unit tests for a web frontend implemented in Django.
I have written unit tests that check that all views return the correct status code (200, 302 etc) so that template errors (which give 500) are found. I also do HTML validation with tidylib.
What else is there I should (or can) do?
Models are unit tested... |
I'm working on a new framework for PHP that utilises an architectural pattern called RMR, instead of the more common (pseudo)-MVC that most PHP frameworks currently implement. So far it feels like a better fit for web-apps than MVC was.
I'm currently separating the various concerns involved with managing a page reque... |
Can Agile be employed in a field like Healthcare IT, where so much of patient care depends on the quality and timely delivery of systems?
|
My responsibilities at a small company are mostly programming-related, but I also perform a number of other roles that definitely require access to PHI1. In larger organizations with clearer delineation of responsibilities, is it prudent to provide programmers with only dummy data and never actual PHI?
1 Protected Heal... |
I am building an online game much like Mafia Wars. I was thinking of displaying the number of registered users on the home page, but then I thought:
"What if a new user sees that the total number of registered users
is 5?!" :D
That would be too embarrassing to my still growing game. Then another thought came by:
"... |
My question is coming from an somewhat uneducated perspective.
What are the relative merits of a "message passing" system vs an "event based" system.
Why would one choose one over the other? What are their strengths and weaknesses?
I would like to know not just "in theory", but also "in practice".
EDIT:
Specific proble... |
I'm developing a RESTful service. Here is a map of the current feature set:
POST /api/document/file.jpg (creates the resource)
GET /api/document/file.jpg (retrieves the resource)
DELETE /api/document/file.jpg (removes the resource)
So far, it does everything you might expect. I have a particular use case whe... |
I'm writing a school administration software package, but it strikes me that many developers will face this same issue: when communicating with users, should you use email or SMS or both, and should you treat them as fundamentally equivalent channels such that any message can get sent using any media, (with long and sh... |
I want to store an encrypted string (specifically, email addresses) in a database. I'm currently using Python and MySQL. I was initially going to use MySQL's AES_ENCRYPT/DECRYPT to handle it, but then got to wondering if one was was better than another.
It seems that if I tie it to a database function, that could poten... |
On my projects where the repository is shared between me and other programmers, I always write commit messages even if I'm the primary developer.
But on those projects where I'm the solo developer working on a project, and the repository is hosted on my personal laptop, and is not even hosted by the client, hence no on... |
I'm writing a program to handle the xbox 360's STFS files. I'm encountering all sorts of problems about how to keep track of used vs unused blocks, reading non-sequential files, etc. These aren't so much problems with the structure of STFS - it's just another file structure - but I don't know how I should do certain th... |
I've strong interests in Functional and Logic programming and Mercury seems like a good blend of the two. Is it used in industry at all? I'm one to learn a language just for the fun of it but it would nice to have practical, employable avenues for it. I could not find much in the way of examples of use in industry on t... |
I'm learning programming in school and I have this question that's bugging me about data structures and transferring the information stored inside them to databases. We're doing just small systems - registration for an event, point of sale for a local restaurant, sales and inventory, etc
Let's say someone registers hi... |
Is it considered bad practice to pass items in a PHP array by reference instead of by value?
Relevant documentation: http://php.net/manual/en/control-structures.foreach.php
|
I want to work with a variety of data structures (arrays, singly/doubly linked lists, sorted structures, etc.) on a plug-and-play basis. For example, I want to be able to easily swap in and out the sorted list and the array (which is re-sorted after every insertion/deletion), to test which one has better performance.
I... |
Our task is to build a software frontend to control a hardware device that does not yet exist. We should start development about half a year before the first prototype is available, the project is timeboxed to one year. It is yet unclear what the hardware and the embedded software will be capable of. There're no specif... |
A stack is something that piles bottom-up.
Hence a call stack adds new items on the stack when functions are called with items being removed from the stack as each function ends until the stack is empty and then the program ends.
If the above is correct, why do people refer to control moving "up" the call stack? Surel... |
As web developers, we all learn that sessions help overcome the problems related to the stateless nature of HTTP. We create a unique session id, and send it to the browser -- and when the browser sends the same id back to us, we identify the user easily.
All this sounds pretty straightforward, and NOT so complicated to... |
I was sure that I would find this question, but I couldn't. How to create an isolated development environment? It other words, a sandbox, where I can install different combinations of web servers, databases, other software packages and play with them, without cluttering my system packages and without manually downloadi... |
When designing a novel system in a hospital or other clinical setting, I think it would be important to gather information from doctors, nurses, pharmacists, technicians, et al on use cases for the system.
Aside from the fact that all of these are also busy professionals, what is a good way to get them to share infor... |
I do not know too many things about databases, so a lot of questions concerning architecture came up lately. Two of these things are:
If I have a table with a lot of entries(millions probably), how can I make the select queries faster? I thought about sorting the table alphabetically and then splitting it in two, but ... |
I am new to event driven development, and I feel lost when I try to implement events that should pass the core/UI boundary.
In my program I have the following (example in c#):
UI.RuleForm Core.RuleList UI.ResultForm
Cell 1 Rule 1
Cell 2 Rule 2
Cell 3 Rule 3
What I want is:
when a RuleForm ce... |
I am educating myself on algorithms and data structures. For that, I am doing a simple program that would read lines like this:
bdhj 168.24
dahf 42.88
dhfa 128.92
First column represents an account name (and it needn't have to be 4 characters), and second represents value to add (or remove if value is negative) to tha... |
What should be the attitude towards getting stories done that are assigned to a sprint? Obviously you want to prioritize getting them done in the sprint, but to me the whole point of agile is to be dynamic: You don't want to deliberately procrastinate or make it "ok" to miss finishing user stories in a sprint, but at t... |
Most of the time when I'm writing some code that handles the response for a certain function call I get the following code structure:
example: This is a function that will handle the authentication for a login system
class Authentication{
function login(){ //This function is called from my Controller
$result=$this->au... |
Your domain model contains a set of objects. I'm here presenting a side project, but I have a much more complicated work project falling to its knees because I didn't do a good separation of the database and the domain.
In this case, the object is called a CyclingRecord.
Following Onion Architecture, the domain objects... |
The Strategy pattern works well to avoid huge if...else constructs and make it easier to add or replace functionality. However, it still leaves one flaw in my opinion. It seems like in every implementation there still needs to be a branching construct. It might be a factory or a data file. As an example take an orderin... |
I work for a small company. The software development arm of the company before I was hired consisted of one self-taught overworked guy. Now that I've been writing software for the company for a few years, I have been tasked with establishing formal company-wide software development practices. We currently have no guide... |
Consider a method m of a class A in an object-oriented language like Java or C++.
In the body of the method m it is possible to reference the member variables of the object on which the method is invoked. These variables are not defined in the method itself but are bound in the moment in which the method is invoked.
Is... |
I'm using jQuery, jQueryUi and qTip in my web application alongside custom JavaScript I've written. All three of the JavaScript libraries I mentioned above are licensed under the MIT license. From what I've read, I just need to include a copy of the MIT license for each of those libraries in my web application.
Is ... |
I am practicing algorithm and data structures. Therefore, I keep profiling my programs. Here is an example output from gprof:
Each sample counts as 0.01 seconds.
% cumulative self self total
time seconds seconds calls ns/call ns/call name
29.76 2.58 2.58 ... |
I have some basic knowledge of iOS development and I want to now start connecting my apps to databases hosted on the internet, so that users will have access to remote / public data that pertains to my app.
My problem is that after searching the internet for some advice, I realised I don't even know what this type of p... |
I am working on a Drupal theme. I am going to be using "intermediary" languages to develop it, ie Stylus for styles, and CoffeeScript for some of the front-end scripts.
I am going to be using a git hosting service to be able to share the code among colleges. I am also going to be using it to update the code locally and... |
I have an application that needs to run in SCTP environment, I have a question in sharing the connection among multiple threads for packet receiving only, I've tried with the sctp_sendmsg and it worked without even locking the threads (is that been taking care of by the OS, in other words, is it thread safe to do that)... |
I saw many issue numbers from comments of jQuery code. (Actually, there were 69 issue numbers in jQuery code.) I think it would be good practice, but I've never seen any guidelines.
If it is a good practice, what are the guidelines for this practice?
|
I've been using Python for a while now, both in the context of personal and professional projects.
One thing that occured to me recently is that I had never thought about a good way to deploy Python programs. Basically, since it's mostly a bunch of scripts, I usually just copy them to the machine where I want it deploy... |
In an ideal Agile world, you quickly build a small, but useful subset of the desired end system, and give it to users. They're excited, because it's useful, they start using it and give feedback. You then work out what to add on to it, build that, and repeat until you run out of time.
I've had a couple of projects rece... |
I have to run certain number of statements (which are executing .exe) in a loop.
ForEach(object obj in ListOfVersions)
{
Step 1: call Exe1 Args=obj.somevalues
Log Step 1 completed for obj
Step 2: call Exe2 Args=obj.somevalues
Log Step 2 completed for obj
Step 3: call Exe3 Args=obj.... |
I'm trying to modify a serial program that reads from a database, and writes results to a file, this is done in a blocking way and I think we can get performance boost of there is a memory buffer and have the file being written in the "background" asynchronously
I can think of the "job interview" solution, using Thread... |
What would be a real world usage of DelayQueue, what common problem it was designed to solve?
|
I have read some code and here are two ways to check and log the error in cpp code that repeats in my project many times. Which way is better?
1.
bool AClass::myMethod()
{
if (!SomeCondition())
{
Warning("AClass::myMethod: your description");
return false;
}
doSomthing();
return... |
According to the essay "The Object Calisthenics" by Jeff Bay in the book ThoughtWorks Anthology,
Use of Getters and Setters should be avoided as they break encapsulation and we should instead ask the object to do something for us instead of digging in to the object and getting its fields.
how about comparison of object... |
I am tasked to conduct a training for an upcoming team of 20 Java developers for a new project. The project owner wants us to use state of the art development techniques like TDD and CI. The developers are skilled Java developers but have minor to no experience with unit testing, and most likely only superficial experi... |
I have about 8 web applications (all of them ASP.NET based), and I want to implement multiple language support for all of them and have an architecture that I can leverage on new web applications down the road. I would also like to try to centralize the admin piece (where all the text translations and other language sp... |
I understand that when any software under the GPL is given to another the recipient has the same rights over the software that I do. I also understand that this applies to "a work based on the Program".
Questions:
1) I noticed several companies sell wordpress plugins and require that you buy a new plugin for each web... |
I am a Java developer, but I was asked to learn about applying Six Sigma with the goal of increasing our organization's profits. I have read that Six Sigma can be applied in all environments, but I'm interested in the nuances of applying it to software development.
Which concepts of Six Sigma can be applied to a softwa... |
Often I see a class where a value is injected into a method or even a constructor. That value is then used by several methods within that class and a reference is simply passed through to each method that requires it. To me this seems like a code smell, although I could very well just be a pedant.
Unless a variable i... |
I've been working on some code recently that interfaces with a CMS we use and it's presented me with a question on class design that I think is applicable in a number of situations. Essentially, what I am doing is extracting information from the CMS and transforming this information into objects that I can use program... |
I want to output an analog signal from my Windows 7 computer. The wave will be a combination of about 5 frequencies, with a maximum of 28 MHz. It won't be a problem to generate the wave data with C++, but I am not sure how to output the wave dynamically (as it is being generated). I am sure an audio port is not set up ... |
I'm working through our bug list today and I'm trying to clear up/fix issues that we commonly receive exception emails for. Although all the exceptions (so far) are handled, some don't actually represent an error in the code. For instance, if a third party service goes down temporarily, our code fails, handles the ex... |
I have one class called "Institution" which represents a public institution (with properties like id_inst, name_inst, tel_inst, fax_inst...). The institution can have affiliated institutions, for example a university is composed of different faculties (which are also institutions with the same properties and methods). ... |
For example consider:
int index = 3;
int array[4] = {0, 1, 2, 3};
then both index[array] and array[index] are valid expressions, much like *(index + array) and *(array + index).
In C arrays why is this true? array[5] == 5[array] explains how it works. My question is: Why did the language designers choose to allow this... |
Meaning that OOP allows me to have data-trees, of arbitrary depth and breadth, with some leafs being functions (and those leafs would be called methods) ?
Because everything else that people often put near "OOP" mark, just don't seem to have anything to do with it. (Inheritance, subtype polymorphism and encapsulation... |
We have a SaaS business (we host everything) where people, using our software, pay for various services offered by a few "vendors." We collect this money and every week we deposit the balance into the vendor's account. Our cut is a small piece from each of these service payments; so if nobody buys anything the vendor d... |
Here is the question I'm having trouble with:
Give the resource graph and determine whether a deadlock state results. Assume that when a thread requests an available or unallocated resource, the OS immediately allocates that resource to the thread.
There are three threads: T1, T2, T3
There are three resources: R1... |
I've read through some very good resources on the internet trying to find out if my initial proposed testing process is a valid option. So please any advice or recommendations are appreciated.
Currently we have a Dev and Test environment which has served our needs fairly well so far. We are having QA and UAT test off t... |
I am planning to read some design patterns and I took the book on "design patterns in C++' by gang of four. However, I am not really some one who reads book and prefers reading slides/watching course lectures and then apply and read the book. I cannot find any course lecture videos on net(yeah, its not that important a... |
We've been put in a bit of a difficult situation and I'm trying to figure out the best way to deal with it and how to charge for it.
We've built a custom web app for a customer and I've been maintaining it for the last 1.5 years. They sent email an email a couple weeks ago saying they've hired a developer and would lik... |
Google released Caja around 2008(Capability JavaScript). It is still mainly a laboratory language. But XSS and other attacks would be prevented if there was widespread integration of Caja.
|
After seeing http://www.kickstarter.com/projects/ibdknox/light-table
I'm wondering if anyone has come across other alternative methods of developing.
When working on embedded things Notepad++ was ample, which isn't necessarily an IDE but it is a different way of handling things from using Xcode, Visual Studio, or Eclip... |
It so happens that you are given a project specs and your knowledge about the language is very basic. There are features in the project that you have never worked with. But you have some ideas and logic on how this can be implemented.
Later on as the development continues you discover that the required features cannot... |
After asking this question, I got to realize that parallelism may not always be good.
So far I can see that parallelism (under c#) is
A little complicated code-wise
Will probably insert some concurrency complications
Will not always be faster
I am looking inside parallelism because I want to make existing and new ap... |
Kind of a yes / no question and why?
Is it the responsibility of the software developer to understand what the customer meant with his/her request or is it the responsibility of the customer to properly explain his/her request to the developer?
The situation at work is currently "the customer already explained us, wha... |
It seems to be generally assumed (on Stack Overflow at least) that there should always be unit tests, and they should be kept up to date. But I suspect the programmers making these assertions work on different kinds of projects from me - they work on high quality, long-lasting, shipped software where bugs are A Really ... |
I've been pondering this problem for a while now and find myself continually finding caveats and contradictions, so I'm hoping someone can produce a conclusion to the following:
Favour exceptions over error codes
As far as I'm aware, from working in the industry for four years, reading books and blogs, etc. the current... |
I (am just a developer) am tasked with training my team on a technique or technology. I zeroed upon System Interfaces, IComparable and IEquatable to be specific. How does one go about teaching (even if it is 1 hour), what an IComparable is and where we can use it by giving them an example.
However, I am not entirely s... |
I have many times seen various benchmarks that show how a bunch of languages perform on a given task.
These benchmarks always reveal that Python is slower than Java, and faster than PHP, and I wonder why that's the case.
Java, Python, and PHP run inside a virtual machine
All three languages convert their programs into... |
I've never written a unit test.
I'm reading The art of Unit Testing by Osherove, and he explains a way to choose where to start when you're writing tests for legacy code. Basically you end up with two kinds of tests to write: easy (on components with few dependencies) and hard (on components with many dependencies).
Th... |
Someone wrote a .NET library to use the Google Maps API (link to the project). I downloaded the entire repository and there are only source files, no LICENSE.txt, readme, etc. However, I guess Google makes you pick a license when creating a new project so the author specified "New BSD License".
What I would like to d... |
Here's a simple question (kind of), but I'm having a hard time taking a decision. First, a history on how I came to have this problem. In my new job, we need to use a third party API to communicate with their proprietary database (this is manufacturing technologies). This API only comes with very simple c example (not ... |
I'm trying to use Jini, in a "Masters/Workers" arrangement, but the Worker jobs may be long running. In addition, each worker needs to have exclusive access to a singleton resource on that machine.
As it stands, if a Worker receives another request while a previous request is running, then the new request is accepted a... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.