instruction stringlengths 34 19.9k |
|---|
My team is looking for a technical term which may or may not exist.
We are trying to describe an environment, such as a database, which has been built up over time with little or documentation about the change process that has gone into it. Generally these are legacy systems who's original developers have long since... |
I'm writing (in PHP) a client/proxy for a SOAP web service. The return types are consistently wrapped in response objects that contain the return values. In many cases this make a lot of sense - for instance when multiple values are being returned:
GetDetailsResponse Object
(
Results Object
(
[TotalRe... |
I'm developing a PHP login component which includes functions to manipulate the User object, such as $User->changePassword(string $old, string $new)
What I need some advice with is how to return a status, as the function can either succeed (no further information needs to be given) or fail (and the calling code needs t... |
I work in a Rest Oriented environment. The number of endpoints is quite large and span multiple applications. The dependencies between the endpoints are large in number as well and not very well planned. Applications have cyclic dependencies amongst each other. Unfortunately, there is no central location where all th... |
I have a question, it's about why programmers seems to love concurrency and multi-threaded programs in general.
I'm considering 2 main approaches here:
an async approach basically based on signals, or just an async approach as called by many papers and languages like the new C# 5.0 for example, and a "companion thread... |
So I'm learning about design patterns in school. Many of them are silly little ideas, but nevertheless solve some recurring problems(singleton, adapters, asynchronous polling, ect). But today I was told about the so called 'Prototype' design pattern.
I must be missing something, because I don't see any benefits from it... |
Unfortunately, Excel format is required for the project I am working on. I have no problems getting the data I need in objects and arrays, and currently PHPExcel is doing handling the document generation. It works, but it's slow and loopy. Was wondering if there is a more efficient server language to generate Excel doc... |
Is it possible, legally, for code to be publicly available online, but have copyright protection?
|
I'm creating a stack oriented virtual machine, and so I started learning Forth for a general understanding about how it would work. Then I shortlisted the essential stack manipulation operations I would need to implement in my virtual machine:
drop ( a -- )
dup ( a -- a a )
swap ( a b -- b a )
rot ( a b c -- b c a )
... |
There are a lot of analogies for HTML/CSS development; which can be a bit confusing for a beginner.
HTML = foundations/house
CSS = walls/blueprint/wallpaper
Is there any best practice here? Which one should we write first?
|
Many times there is the need to load external resources into the program, may they be graphics, audio samples or text strings.
Is there a patten for handling the loading and the handling of such resources?
For example: should I have a class that loads all the data and then call it everytime I need the data? As in:
Grap... |
What are technical specifications? Are they the same as design documents. If not, what is the difference and some examples?
|
I own a .co.uk domain, and I whenever I've dealt with Java-style package naming, I've gone with uk.co.domainname. Once I encountered package that did the following: co.uk.domainname.
Is one of these right, or is it something that's up to the developer's discretion? Is there some sort of convention that deals with this?... |
I have been programming for many years but I am still not comfortable with the concept of "Interfaces". I try to use interfaces but many times I don't see a mandatory use for it. I think this is probably because the projects weren't so big, or because interfaces are more useful when teamwork is involved.
So, making ano... |
I have recently been reading The Pragmatic Programmer which states that:
Details mess up our pristine code—especially if they change frequently. Every time we have to go in and change the code to accommodate some change in business logic, or in the law, or in management's personal tastes of the day, we run the risk of... |
Anyone know of a free license that offers the user the right to use the software freely, but not modify it or share it?
In other words, it is closed source, but it's free. And since it's gonna be a website it can only be used on this one website.
What would be a good simply license for this? If possible that it's not t... |
I am thinking of applying a real dependency injection library to my toy C#/GTK# desktop application. I chose NInject, but I think this is irrelevant to my question.
There is a database object, a main window and several utility window classes. It's clear that I can inject the database into every window object, so here D... |
I couldn't find a better topic but here it is;
1) When user clicks a button, code starts t work,
2) When another button is clicked, it would stop doing whatever it does and start to run the second button's code,
3) Or with not user interaction, an electrical power down detected from a connected device, so our software... |
I find that I understand much of the Javascript concepts used in the Google Maps API code, but then again there is quite a bit that is way over my head in syntax.
For example, the geocoder syntax seems to be of Ajax form, though I don't understand what is happening under the hood (especially with lines like results[... |
I want to ask – I am slowly learning jQuery.
What I see is an exact example of a God Object anti-pattern. Basically, everything goes to the $ function, whatever it is.
Am I right and is jQuery really an example of this anti-pattern?
|
I need to find or create a tool that analyzes the audio spectrum of a sound file (like a .wav or .mp3). I need to output the "volume" or power of x number of frequency bands and output the data as text. This will be used to produce a visualization, a graphic equalizer like you'd see on a stereo.
I am currently looking ... |
I've recently been delving into functional programming especially Haskell and F#, the prior more so. After some googling around I could not find a benchmark comparison of the more prominent functional languages (Scala,F# etc).
I know it's not necessarily fair to some of the languages (Scala comes to mind) given that th... |
I had read an interview with a great programmer (it is not in English) and in it he said that "a great programmer can be as 10 times as good as a mediocre one" giving reason for why good programmers are very well paid and why programming companies give many facilities for their employees. The idea was that there is a v... |
Possible Duplicate:
Which hashing algorithm is best for uniqueness and speed?
I have created a hash algorithm and would like to test if it is usable. What do I need to test and how?
|
What benefit could C++ bring to system administrators?
I am working on Windows and Ubuntu. If I learn C++, where could I implement it in system administration, Please specify some of its benefits.
|
As programming in JavaScript, I've noticed everything that can be done with statements and blocks can be done with expressions alone. Can a programming language work fine with only expressions? And, if yes, why are statements used at all?
|
In a Drupal programming guide, I noticed this sentence:
The theme hook receives the total number of votes and the number of votes for just that item, but the template wants to display a percentage. That kind of work shouldn't be done in a template; instead, the math is performed here.
The math necessary to calculate ... |
I'm creating a standard library for a programming language, and I'd like to license each and every single class or function in there under the MIT license, so they're completely FOSS.
All of the files reside in a single directory. Would it be enough to put a LICENSE.txt file in the same directory, containing the MIT li... |
I'm talking about giving clients professional looking code. The whole nine yards, everything you hardcore professional highly experienced programmers here probably do when coding freelance or for the company you work in.
I'm fresh out of college and I'm going into freelance. I just want to be sure that my first few pro... |
Background
I have a joomla based application. My customers sign up and they register as a user on the site. My customers (primary customers) then have their own space on the site that they can then setup their own customers (secondary customer).
Question/Problem
The problem I am having is that I need to tag each second... |
Suppose that you need to implement persistence, I think that you're generally limited to four options (correct me if I'm wrong, please)
Each persistant class:
Should implement an interface (IPersistent)
Contains a 'persist-me' object that is a specialized object (or class) that's made only to be used with the class th... |
I have a network game licensed under the AGPL that I modified to suit my needs. Theoretically, I want to charge people to play this game over a local area network that is set up in a private establishment of which I own all the local network infrastructure including the server and the game stations. would I still be r... |
I have a script, and now it's the perfect time to have an option to change theme templates.
I was looking forward to store these files in php files, or html files. with CSS file. I looked over some codes and I found that they use brackets to refer to the variable.
Here's an example of a template block:
<div class='bl... |
Can software with AGPLv3 license be used with GPLv3 project?
Can the resulting project be GPLv3, or must it have the special requirements of AGPLv3?
I am not very smart from clause 13 of GLPv3 that mentions AGPLv3.
Notwithstanding any other provision of this License, you have
permission to link or combine any covere... |
Problem Statement -
Given a NxM grid of 1s & 0s (1s mark walls, while 0s indicate empty chambers), the task is to identify the number of chambers & the size of the largest. And just to whet my curiosity, to find in which chamber, a cell belongs.
It seems like an ad hoc problem, since the regular algorithms just don't... |
I've come to notice that a lot of software that companies use for managing things like time, expenses, setting up phone systems, etc is very non-intuitive from a user experience point of view. I know personally I waste a lot of time just trying to figure out how to navigate these systems, especially if I don't have a ... |
What's the basis behind SHA-1 or SHA-2 or other Checksum algorithms?
I read about it here http://en.wikipedia.org/wiki/SHA-1#Data_Integrity
But I am still wondering about an answer in a layman's language.
Can I understand it as a very, very compressed code that can be translated back into original data?
Let's say, I ... |
In this post, Martin (the language's head honcho) writes:
[XML literals] Seemed a great idea at the
time, now it sticks out like a sore thumb. I believe with the new
string interpolation scheme we will be able to put all of XML
processing in the libraries, which should be a big win.
Being interested in language... |
I am fighting about a web application script optimization. I have an ASP.NET web app that reference jQuery in the master page, and in every child page can reference other library or JavaScript extension.
I would like to optimize the application with YUI for .NET.
The question is, I should put all the libraries referen... |
I was wondering if there's some software to manage a XP project. I'm starting a school project and I want to follow this methodology, but, we don't have a place to work. Each one works at home (in pairs), therefore I can't follow XP ambient patterns.
So, anyone knows of any software to manage this?
|
I have been reading up on arithmetic coding and, while I understand how it works, all the guides and instructions I've read start with something like:
Set up your intervals based upon the frequency of symbols in your data; i.e., more likely symbols get proportionally larger intervals.
My main query is, once I have en... |
We want to allow the same core service to be either fully implemented or, as other option, to be a proxy toward a client legacy system (via a WSDL for example).
In that way, we have both implementation (proxy & full) and we switch which one to use in the configuration of the app.
So in a nutshell, Some desired features... |
I am somewhat familiar with the concepts and benefits of Scrum. With that in mind, I am trying to improve the failing Scrum product management structure of a company I'm now working for that has three separate B2C products, catering to the same demographic and accessible on the same website. Each product has a product ... |
I am currently working on a rather large project, and I have used JUnit and EasyMock to fairly extensively unit test functionality. I am now interested in what other types of testing I should worry about. As a developer is it my responsibility to worry about things like functional, or regression testing? Is there a goo... |
I would like to implement some kind of manager class in my application. It will be in charge of loading textures, processing them, distributing them etc...
At first, I wanted to make a global variable that simply contains an instance of my manager class. I found this question: https://stackoverflow.com/questions/464657... |
I have a need to produce a simple dependency tree diagram. The input data would be in the following simple format:
ITEM_NAME DEPENDENCY
----------------------------
ITEM_101 ITEM_75
ITEM_102 ITEM_77
ITEM_102 ITEM_61
ITEM_102 ITEM_11
This means that ITEM_101 depends on ITEM_75 and ITEM_102 depends on item... |
So yeah, I'm creating a programming language. And the language allows multiple threads. But, all threads are synchronized with a global interpreter lock, which means only one thread is allowed to execute at a time. The only way to get the threads to switch off is to explicitly tell the current thread to wait, which all... |
What is the "stack" exactly?
I've read articles, tried comprehending it through my understanding, experience, and educated guessing of programming and computers, but I'm a bit perplexed here.
The "stack" is a region in RAM? Or is it some other space I'm uncertain of here?
The processor pushes bits through registers o... |
I'm looking for some input and theory on how to approach a lexical topic.
Let's say I have a collection of strings, which may just be one sentence or potentially multiple sentences. I'd like to parse these strings to and rip out the most important words, perhaps with a score that denotes how likely the word is to be i... |
I need an algorithm to place horizontal text labels for multiple series of points on the screen (basically I need to show timestamps and other information for a history of moving objects on a map; in general there are multiple data points per object). The text labels should appear close to their points--above, below, o... |
How could a random generator be implemented?
I'm not speaking about the invocation of a language mathRandom() method, but the implementation of the routines that lead to generate numbers totally random.
|
In http://www.json.org Douglas Crockford shows the specs of the JSON format in two interesting ways:
In the right side column he lists a text spec that looks like a YACC or LEX listing.
In the main body of the homepage, he put several images that gives us a simple way to visually understand the valid sequences that com... |
A class that performs both computations and data logging* seems to have at least two responsibilities. Given a system for which the specifications require heavy data logging, what kind of design patterns or architectural patterns can be used to avoid bloating all the classes with logging calls every time they compute s... |
In a C++ program that doesn't contain legacy C code, is there a guideline regarding the maximum number of levels of indirection that should be used in the source code? I know that in C (as opposed to C++), some programmers have used pointers to pointers for a multiple dimension array, but for the case of arrays, there... |
I appreciate you can't start an open source project with just an idea but would just a design be enough? Has anyone ever seen that done where a designer posts a design and developers join to start the coding?
|
I am designing a logic analyzer and I would like to implement some Matrix Algorithm.
I have several channels each one represented by a row in the matrix and every element in the column would be the state, for example:
Channel 1 1 0 0 1 0 1 1 0 1
Channel 2 1 1 0 1 1 0 0 1 1
Channel 3 0 1 0 1 1 0 1 0 0
I would lik... |
I have to read lines from a text file in sequential order. The file is a custom text format that contains sections. If some sections are out of order, I would like to look for the starting of the next valid section and continue processing.
Currently, I have some code that looks like this:
for (int currentLineIndex=0; c... |
I worked in academia a few years, but more on the D-side of R&D. The race for papers never appealed to me and I'm a practical not theoretical type, but I do like reading papers on certain topics (e.g. Google Papers, NLP, FB papers, ...) a lot.
How common is it that normally working developers submit papers to conferen... |
Is support for non-english characters common in programming languages? I mean, technically, I would think it is feasable, but I don't have any experience in anything other than english, so I don't know how common it is.
I know that there are non-english based programming languages, but can something like C#, C++, C, Ja... |
We are using TFS and SQL Server 2005 (looking to upgrade to SQL Server 2012 if that makes a difference). We store our database schema in a Visual Studio Database project (VS 2010).
When code is released to live we currently use the Visual Studio Database Project to build a script for all our schema changes. The problem... |
Can any one please explain this piece of code I found in the linux kernel source. I see a lots of code like this in linux and minix kernel but dont seem to find what it does (even if C compilers support that kind of function definition)
/* IRQs are disabled and uidhash_lock is held upon function entry.
* IRQ state (as... |
One of the problems web apps have against native apps, especially on the mobile front, is the constant need to re-download each web page on request. Ultimately, this leads to slower performance. Why if web apps only download new pages if they're actually needed, not because they're simply requested.
For example: perhap... |
I would like to publish part or full source code of one or more plugins (licensed under GPL, GPLv2, MIT or no license) in my website/blog. Website I am talking about is for everyone, free to use and free to copy code. Plus, is it okay if I do not provide any link to the source code/plugin? I will definitely give full c... |
The 'continue' keyword in Java (and probably in many other programming languages) is used to skip further execution of the current iteration.
Why was the name 'continue' chosen? Why not something more straightforward like 'skip' ?
|
I have read recently some articles (e.g. http://dailyjs.com/2012/09/14/functional-programming/) about the functional aspects of Javascript and the relationship between Scheme and Javascript (the latter was influenced by the first, which is a functional language, while the O-O aspects are inherited from Self which is a ... |
I always get confused about how to use the verb "to map" in the context of associating objects with each other, particularly if the mapping is directional.
Is there a distinction between
mapping users to IDs
and
mapping IDs to users
In the given example, which would be the better way to put it?
|
I've built a few API's using the complete rails stack. In each project there have been multiple uses for rails core features. Each of the API has had management screens for monitoring usage, managing authentication keys, etc. Is there such thing as an API without a management front end?
|
I need a very simple pseudo random generator (no any specific quality requirements) and I found Microsoft's variant of LCG algorithm used for rand() C runtime library function fit my needs (gcc's one seems too complex).
I found the algorithm here:
http://rosettacode.org/wiki/Linear_congruential_generator#C
However, I w... |
I'm in a new position where I need to process a flat files on a regular basis. The last time I did this was 5 or 6 years ago but as part of the file layout I received control totals. It gave me simplistic information on the file like the total number of records as well as sums of the important fields. This helped me... |
Zend's Coding Standard Naming Convention says
Functions in the global scope (a.k.a "floating functions") are permitted but discouraged in most cases. Consider wrapping these functions in a static class.
The common wisdom in Python says practically the opposite:
Finally, use staticmethod sparingly! There are very few... |
I'm building a blogging site for learning, with a PHP/MySQl back-end. All of the user input is handled with forms sent in POST requests.
Will using JSON somehow make it cleaner, or easier to maintain or add features? Or am I just adding an interchange format for no reason?
So essentially, what functionality would be be... |
(This is mainly aimed at those who have specific knowledge of low latency systems, to avoid people just answering with unsubstantiated opinions).
Do you feel there is a trade-off between writing "nice" object orientated code and writing very fast low latency code? For instance, avoiding virtual functions in C++/the ove... |
What is a better approach when it comes to performance and optimal resource utilization: accessing a database multiple times through AJAX to only get the exact information needed when it is needed, or performing one access to retrieve an object that holds all information that might be needed, with a high probability th... |
Edit: my language allows for multiple inheritance, unlike Java.
I've started designing and developing my own programming language for educational, recreational, and potentially useful purposes.
At first, I've decided to base it off Java.
This implied that all the code would be written in form of classes, and that code ... |
Is there a difference between
public class A extends AbstractB implements C
{...}
versus...
public class A extends AbstractB
{...}
abstract class AbstractB implements C
{...}
I understand that in both cases, class A will end up conforming to the interface. In the second case, AbstractB can provide implementation for ... |
I'm developing a Javascript library, and I'm thinking about releasing it under an open source license (e.g. GPL, BSD, MIT) — but that requires that websites that use the software link back to my website.
Do you know about any such licenses? And how have they formulated the attribution part of the license text?
Do you t... |
I grasp that it can fetch internet resources, but I'm not really fully appreciating what that means. I was doing the challenges at pythonchallenge.com, and I got past the one that requires urllib to fetch the page and read the source, but I don't see how this is useful quite yet. And examples are kind of lacking in div... |
I have been interested in some of the concepts of functional programming lately. I have used OOP for some time now. I can see how I would build a fairly complex app in OOP. Each object would know how to do things that object does. Or anything it's parents class does as well. So I can simply tell Person().speak() to mak... |
Recently I have been assigned to work on a major requirement that falls between a change request and an improvement. The previous implementation was done (badly) by a senior developer that left the company and did so without leaving a trace of documentation.
Here were my initial steps to approach this problem:
Cons... |
Why it is less common to use wiki/markup in enterprise as documentation?
They use Word document instead.
Wiki/markup are in text format, which is version control friendly.
|
I am new to DDD, having worked only in Transaction-Script apps with an anemic model, or just Big Balls of Mud, so please forgive any terminology I abuse.
I am trying to understand the proper separation between the domain model and the repository. What is the proper way to construct a domain object that is coming from a... |
I need to develop an app for booking appointments. This is going to be hosted in a shared server. So performance is the most important thing. I have used symfony2. I quite liked the framework. But seems to be heavy.
Which framework would suit me considering my requirements? I have shortlisted three frameworks yii, symf... |
I often encounter the following statements / arguments:
Pure functional programming languages do not allow side effects (and are therefore of little use in practice because any useful program does have side effects, e.g. when it interacts with the external world).
Pure functional programming languages do not allow to ... |
Today, I got into an argument about the term "procedural generation".
My point was that its different from "classic" random generation in that procedural generation is based on a more mathematical, fractal-based, algorithm leading to a more "realistic" distribution and the usual randomness of most languages are based o... |
I've writing a date-time library, and need to implement the addition of a duration to a date-time.
If I add a 1 month duration: P1M to the 31st March 2012: 2012-03-31, does the standard define what the result is?
Because the resulting date (31st April) does not exist, there are at least two options:
Fall back to the l... |
Edit: Comments suggested, that DSM just faded out by being not used recently. What were the reasons for this, what are DSMs drawbacks? Literature lists many positive aspects like
easy to port programms to, no marshalling and therefore faster and so on but also negative aspects like only usable in homogenous environment... |
Possible Duplicate:
Writing Web “server less” applications
So, let's say I'm going to build a Stack Exchange clone and I decide to use something like CouchDB as my backend store. If I use their built-in authentication and database-level authorization, is there any reason not to allow the client-side Javascript to wr... |
I'm modeling a chemical system, and I'm having problems with naming my elements / items within an enum.
I'm not sure if I should use:
the atomic formula
the chemical name
an abbreviated chemical name.
For example, sulfuric acid is H2SO4 and hydrochloric acid is HCl.
With those two, I would probably just use the atomi... |
For PHP, best practices, I have read somewhere that if you assign your data to a variable it takes almost no memory or resource.
So let's say I have this function that return a count.
public function returnCount($array){
return count($array);
}
or if this is better?
public function returnCount($array){
$count ... |
A project I am working on has a bunch of legacy tests that were not properly mocked out. Because of this the only dependency it has is EasyMock, which doesn't support statics, constructors with arguments, etc. The tests instead rely on database connections and such to "run" the tests. Adding powermock to handle these c... |
I am an experienced Java programmer, and I want to create a complex web application requiring dynamic pages, drawings, etc (take SO as an example). Do I have to learn javascript/html in order to create such an application?
It is not that I don't want to learn another language (I've done this before), but technology on ... |
Problem statement:
Given:
TFS as Source Control
Heavy desktop client application with tons of legacy code with bad or
almost absent architecture design.
Clients constantly requiring new features with sound quality, fast
delivery and constantly complaining on user unfriendly UI.
Problem:
Application undoubtedly requi... |
I discovered some time ago that the GOTO control keyword was introduced in PHP 5.3.0.
http://php.net/manual/en/control-structures.goto.php
Why did it happen?
What are the language design goals behind this?
Did the PHP developers community asked for it?
|
I am developing a rather eye-candy application which is to be released on Mac App Store.
Due to its graphics intensive use, it would save a great deal of time on UI end if the app could be released with a fixed size main frame-dialog.
I did try doing a search regarding App Store policies on the matter but could not fin... |
Let's say I have ThingImpl and IThing. The former is an implementation of the latter, which is an interface.
IThing has 1 method: do(arg1)
Is it considered a hack/bad practice to add a method in addition to do()?
Example: do(arg1, arg2)
|
I would like to know, is it considered a common practice to use constructions like |=, &&, ||, != altogether in the single line of code?
E.g.
hasErrors |= vi2!=null && vi2.hasErrors() || vi.hasErrors();
What can be done to make the code more readable?
The programming language is Java, if it matters.
|
I do not fully understand what am I asking (lol!), well, in the sense of if it is even possible, that is. If it isn't, sorry.
Suppose I have a Java program. It has a Main and a JavaCalculator class. JavaCalculator has some basic functions like
public int sum(int a,int b) {
return a + b
}
Now suppose I have a ruby f... |
I am new to web crawling and I am testing my crawlers. I have been doings tests on various sites for testing. I forgot about robots.txt file during my tests.
I just want to know what will happen if I don't follow the robots.txt file and what is the safe way of doing the crawling?
|
Both Android and iOS seem to support their application having a binary delta update. But how does it work? I build a binary program, neither of the distribution sites have the source code - how does the update process know what is changed?
|
TL/DR: Any way to work out if known numbers between a known start and ending figure should be positive or negative numbers?
I am developing an application in PHP which can import and read PDFs. The PDFs are financial ones such as bank statements with records of transactions in and out of a bank account. I only have PDF... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.