instruction stringlengths 34 19.9k |
|---|
Possible Duplicate:
What is REST (in simple English)
What does RESTful web applications mean?
A web service is a function that can be accessed by other programs over the web (Http). To clarify a bit, when you create a website in PHP that outputs HTML its target is the browser and by extension the human being reading... |
What is the difference between Object Oriented Design Patterns and Principles? Are they different things? As far as I understood both of them try to achieve some common goal (e,g. flexibility). So can I say a pattern is a principle and vice versa?
Design Principle = SOLID (i.e. Dependency Inversion Principle)
Design Pa... |
We currently store points as three floats (lat,lon,alt) and support only one type of query (points within a given radius) but look forward to support more queries. We are using PHP and MySQL.
What are the benefits of using geospatial types?
|
^ For actual questions, skip to the lists down below
I understand, that his is a vague topic, but please, before you turn the other way and disregard me, hear me out. I am currently doing research for a web application(I don't know if application is the correct word for it, but I will proceed w/ that for now), that one... |
I'm trying to figure out what the benefit to having a WYSIWYG HTML editor over hard coding, outside of, say, accessibility. It seems like a waste of time to learn how to use something like Dreamweaver over Notepad++. Am I missing something here? Every time I've ever used one, I end up going back into the code to fix... |
We are working with a group of developers on a project. The project is still in progress (not completed) and these developers charge us for time spent on fixing bugs on codes that were not written valid in the first place. I understand that we should pay for changes/new requests if any, but not bugs fixes for a work in... |
Possible Duplicate:
Should I use one database per application or share a single database amongst multiple applications
We have a bunch of small to medium sized apps, each of which has its own database (MSSQL Server). There was a suggestion that we consoldate the 'related' databases into a smaller set amount of large... |
I can list part of the problems that will show up when writing a moderately-sized concurrent application with shared memory:
Locking granularity
Choice of synchronization primitive
Number of threads
Method for decomposing into threads (data parallelism; task parallelism; how threads are organized, etc)
What are other... |
Lately I've been working a lot in PHP and have run into an abnormally large number of parsing errors. I realize these are my own fault and a result of sloppy initial coding on my part, but it's getting to the point that I'm spending more time resolving tags than developing. In the interest of not slamming my producti... |
I just wanted to ask for your opinion on a situation that occurs sometimes and which I don't know what would be the most elegant way to solve it.
Here it goes:
We have module A which reads an entry from a database and sends a request to module B containing ONLY the information from the entry module B would need to acco... |
All the languages I know of would execute something like:
i = 0
while i < 100000000
i += 1
..and you can see it take a noticeable amount of time to execute.
Why though, do languages do this? The only effect this code will have is taking time.
edit: I mean inside a function which is called
function main(){
us... |
My company is evaluating adopting off-the-shelf ALM products to aid in our development lifecycle; we currently use our own homegrown solutions to manage requirements gathering, specification documentation, testing, etc. One of the issues I am having is understanding how to move code between stages of development. We ha... |
Say I have a large function like the following:
function do_lots_of_stuff(){
{ //subpart 1
...
}
...
{ //subpart N
...
}
}
a common pattern is to decompose it into subfunctions
function do_lots_of_stuff(){
subpart_1(...)
subpart_2(...)
...
subpart_N(...)
}
I usually ... |
I am learning Objective-C and iOS development and not sure what proper naming convention should be used. I understand how to use the label aspect of Obj-C methods but not the proper way to name each label. What is the best practice for naming methods, properties, objects, outlets, and actions?
Also,
Should different na... |
William Cook in a tweet wrote that:
"UML is the worst thing to ever happen to MDD. Fortunately many people now realize this ..."
I would like to know the reasoning behind that claim (apparently, I'm not referring to his personal opinion).
I've noticed that many people out there don't like UML that much. Also it is wo... |
I have made a product which I have used the GPL licence, and am now getting pull requests from other authors.
The product also has a less restrictive commercial license available for purchase.
Can I include the submitted code with the commercial licensed product?
|
I am a front-end developer. For many experiements I do I need to have a server that talks JSON with my client side app. Normally that server is a simple server that response to my POSTs and GETs.
For example I need to setup a server that saves, modifies and read data from a "library" database like this:
POST /books c... |
I have a list of Students that I should display to user on a web page in tabular format.
The items are stored in DB along with SortOrder information.
On the web page, user can rearrange the list order by dragging and dropping the items to their desired sort order, similar to this post.
Below is a screenshot of my te... |
I have always applied constraints at the database level in addition to my (ActiveRecord) models. But I've been wondering if this is really required?
A little background
I recently had to unit test a basic automated timestamp generation method for a model. Normally, the test would create an instance of the model and sav... |
Can the Turing machine be classified e.g. as a Mealy machine? Why not? Can a Turing machine be input to another Turing machine without complication like halting problems?
Thanks
|
I'm lately working on a few mobile web apps for Android (2.3+) and iOS (4+). Their browsers support most of ECMAScript5, which is very powerful, and I wanted to use language features where possible, resorting to jQuery only when I had to.
Turns out the only thing I use jQuery for is to have a shorter alternative for do... |
A co-worker and I were looking at the behavior of the new keyword in C# as it applies to the concept of hiding. From the documentation:
Use the new modifier to explicitly hide a member inherited from a base
class. To hide an inherited member, declare it in the derived class
using the same name, and modify it with... |
So far I have been using either handmade or generated (e.g. JAXB) Java objects as 'carriers' for messages in message processing software such as protocol converters. This often leads to tedious programming, such as copying/converting data from one system's message object to an instance of another's system message objec... |
I'm currently trying to come up with a database migrations strategy for my organization. This includes getting the database scripts into source control, managing versioning, managing releases to QA / Production, managing branching and merging across different release branches, etc.
Ruby Migrations seems to offer solut... |
I've read about DDD for days now and need help with this sample design. All the rules of DDD make me very confused to how I'm supposed to build anything at all when domain objects are not allowed to show methods to the application layer; where else to orchestrate behaviour? Repositories are not allowed to be injected i... |
I'm thinking of applying Reflective Practice to improving my programming skills. To that end, I want to be able to watch myself writing code.
In general, what is a good method for applying Reflective Practice to the craft of programming?
In particular, if it's a good idea, is there an editor that records keystrokes t... |
I asked a question on SO, and found that there are no non-blocking ORMs for my favorite web framework. By non-blocking I mean an ORM with callback support for asynchronous retrieval. The ORM would be supplied with a callback or some such to execute when data has been received.
I want to create one, but I have some qu... |
I am preparing for a programming contest where we have to code in C++ and it is all about producing working code in a short time. An example would be to use a macro to get the minimum of two ints or using memsets to initialize arrays (but I was told that you shouldn't use either here).
This leads to the question, what ... |
Edit: Thanks for all of the answers, guys! I think I'm just going to include some kind of text on my webpage telling users to only download from the links provided. The thing is that there have been some legitimate and illegitimate websites that have picked up on my software, so it would be safer just to tell users to ... |
How do you manage two-way synchronization between a 'main' database server and many 'secondary' servers, in particular conflict resolution, assuming a connection is not always available?
For example, I have a mobile app that uses CoreData as the 'database' on the iOS and I'd like to allow users to edit the contents wit... |
Hi I am an intern working with ASP.NET.
My current task is to make a website which will incorporate some jquery viewing features. This project seems to me will be primarily dealing with reading data from a database and making graphs out of them. This will require me to make custom queries from whatever the client is lo... |
I'm curious if my current experiences as an intern are representative of actual industry.
As background, I'm through the better part of two computing majors and a math major at a major university; I've aced every class and adored all of them, so I'd like to think that I'm not terrible at programming. I got an internshi... |
There are a lot of manuals. I am trying to create an database to hold information of these documents. But, there is a small problem.
How can I give meaningful id to the manuals? Are there any standard or logic behind the giving meaningful id to the documents? If there is no standard, can you tell me how I should do tha... |
I was reading this question on SO which discusses some common undefined behavior in C++, and I wondered: does Java also have undefined behaviour?
If that is the case, then what are some common causes of undefined behaviour in Java?
If not, then which features of Java make it free from such behaviours and why haven't ... |
Good day folks.
I am very confused in this situation. I need to implement system which will be based on HP open view service desk 4.5 api. But this system are reached the end of supporting period. On oficial site no information available
I am looking an information about this API(articles, samples etc). Now i have only... |
Lately I've become more and more frustrated that in most modern programming languages I've worked with (C/C++, C#, F#, Ruby, Python, JS and more) there is very little, if any, language support for determining what a subroutine will actually do.
Consider the following simple pseudo-code:
var x = DoSomethingWith(y);
How... |
I was doing a presentation on F# and was discussing the Option type when someone in the audience asked me if the Option type is F#'s implementation of the maybe monad. I know that's not the case but I did want to ask how the two concepts are related. I mean it seems to me that an option type might be the result of th... |
I'm attempting to understand how "switch as a code smell" applies when the proper code path is determined by some observable piece of data.
My Webapp object sets an internal "host" object based on the hostname of the current request. Each Host subclass corresponds to one possible hostname and application configuration:... |
Yesterday, Twitter was hit with a "Cascading Bug" as described in this blog post:
A “cascading bug” is a bug with an effect that isn’t confined to a particular software element, but rather its effect “cascades” into other elements as well.
I've seen this kind of bug, on a smaller scale of course, on some projects I'... |
I'm learning how to build parsers using grammars, but I got stuck trying to express comments, because they can appear almost anywhere.
This indicates that comments can be stripped from the token stream before parsing takes place.
Is that the standard practice, or are comments ever/often specified in grammars?
|
Given an array of integers A[1...n-1] where 'N' is the length of
array A[ ]. Construct an array B such that B[i] = min(A[i], A[i+1],
..., A[i+K-1]), where K will be given.
Array B will have N-K+1 elements.
We can solve the problem using min-heaps
Construct min-heap for k elements - O(k)
For every next element de... |
I have been using SCRUM in three different projects over the last four years. One of SCRUM's advantages seems to be its flexibility and adaptability, e.g. wrt to changing customer requirements. Another advantage is that management can easily track the progress of a project.
SCRUM's flexibility can be an advantage e.g. ... |
We have REST webservices that can serve XML or JSON (WCF). I'm toying with idea of implementing Protobufs. Why?
PROS
Less load on servers.
Smaller message size - less traffic.
It is easier to switch now than later.
CONS
Need to be implemented
Going to be harder to troubleshoot/sniff messages for debugging.
I can en... |
I'm teaching CS2 (Java and data structures), and am having some difficulty coming up with good examples to use when teaching queues. The two major applications I use them for are multithreaded message passing (but MT programming is out of scope for the course), and BFS-style algorithms (and I won't be covering graphs u... |
What I have: 1 hypothetical object/class + other classes and related methods that gives me functionality.
What I want:
linking this object to 0 to N methods in realtime on request when an event is triggered
Each event is related to a single method or a class, so a single event does not necessarily mean "connect this 1... |
Is it acceptable to return a non-zero exit code if the program in question ran properly? For example, say I have a simple program that (only) does the following:
Program takes N arguments. It returns an exit code of min(N, 255). Note that any N is valid for the program.
A more realistic program might return different c... |
I spoke with a guy who claimed that he's working (programming) on a GPS-system that is going to be accurate to the centimeter.
Is this even possible?
What is the limiting factor, the big distance between the satellite and the GPS, or is it the software?
Can the software be improved to make a GPS accurate to centime... |
I have created a .net windows form application that I want to restrict from being duplicated. I want this application to be portable, so I would like to allow it to be moved. How would I be able to do this without managing it through a remote server?
|
I have a situation where objects are created at unpredictable times. Some of these objects are created before an important event, some after. If the event already happened, I make the object execute stuff right away. If the event is forthcoming, I make the object observe the event. When the event triggers, the object i... |
I was reading this excellent blog article regarding speeding up the badge page and in the last comment the author waffles (a.k.a Sam Saffron) mentions these tools:
dapper and a bunch of custom helpers like rainbow, sql builder etc
Dapper and sql builder was easy to look up but rainbow keeps pointing me to a CMS, can... |
Edit:
To avoid further confusion: I am not talking about web services and such. I am talking about structuring applications internally, it's not about how computers communicate. It's about programming languages, compilers and how the imperative programming paradigm is extended.
Original:
In the imperative programming f... |
I'm currently evaluating a potential new project that involves creating a DB for typical customer information (userid, pwd, first & last name, email, adress, telfnr ...). At this point, requirements are only roughly defined.
The customer DB is expected in the O(millions) of records. In order to calculate some back-of-t... |
I am in the process of working on a video on demand system part of it involves the management of a hierarchical tree structure (think windows explorer) which allows users to upload videos, move folders around, create new folders etc. User action will be allowed depending on which permissions they have.
In addition to m... |
The Golang "netchan" package seems to have been discontinued.
That makes me think that the concept of "networked channels" were not a good practice after all. (Why wouldn't them just "let it be" otherwise?)
Is this the case? And if it is, why is that?
|
Just a random question regarding switch case efficiency in case after case; is the following code (assume pseudo code):
function bool isValid(String myString){
switch(myString){
case "stringA":
case "stringB":
case "stringC":
return true;
default:
return false;
}
more efficient than this:
fu... |
I'm starting with a short introduction of what I know from the C language:
a pointer is a type that stores an adress or a NULL
the * operator reads the left value of the variable on its right and use this value as address and reads the value of the variable at that address
the & operator generate a pointer to the vari... |
I'm creating a Ruby game using the Gosu framework. All good.
Sometimes, when I run the game, it has some kind of slow startup, and probably it will be rather slow during the whole game. So I close it and... open it again. It is very likely that it will startup quickly and the whole game will run smoothly and fast.
Why ... |
I'm learning C# by programming a real monstrosity of an application for personal use. Part of my application uses several SPARQL queries like so:
const string ArtistByRdfsLabel = @"
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT ?artist
WHE... |
I've created a few open-source projects in the past, and had some success. The process was generally the following: I'd start alone, create something that works, promote it, and finally (maybe) get some contributions.
I have less that to contribute to open-source now, but I still have ideas and can still code :) So I w... |
Code Review.SE is great when you need feedback on a precise, short piece of code.
But where to get similar feedback about the code itself when:
you have thousands of LOC,
don't have colleagues in your workplace ready or willing to review the code¹,
don't have thousands of dollars to spend for a professional review by ... |
There is an interesting interview with Werner Vogels which is partly about how Amazon does Service Oriented Architecture:
For us service orientation means encapsulating the data with the
business logic that operates on the data, with the only access through
a published service interface. No direct database access... |
I'm building an ajax heavy application (client-side strictly html/css/js) which will be getting all the data and using server business logic via webservices.
I know REST seems to be the hot topic but I can't find any good arguments. The main argument seems to be its "light-weight".
My impression so far is that wsdl/so... |
This is a pretty generic question but one I've been wondering about for a while: is there a standardized, generally accepted, or even just systematic way that people write code as a group?
For example, in a project written in C++, does one developer write one class, which he passes off to the next developer with a quic... |
I have not worked with any caching mechanisms and was wondering what my options are in the .net world for the following scenario.
We basically have a a REST Service where the user passes an ID of a Category (think folder) and this category may have lots of sub categories and each of the sub categories could have 1000 o... |
I'm basing my Git repo on A successful Git branching model and was wondering what happens if you have this situation:
Say I'm developing on two feature branches A and B, and B requires code from A. The X node introduces an error in feature A which affects branch B, but this is not detected at node Y where feature A an... |
We have a SOA-based system. The service methods are like:
UpdateEntity(Entity entity)
For small entities, it's all fine. However, when entities get bigger and bigger, to update one property we should follow this pattern in UI:
Get parameters from UI (user)
Create an instance of the Entity, using those parameters
Get... |
We are crawling and downloading lots of companies' PDFs and trying to pick out the ones that are Annual Reports. Such reports can be downloaded from most companies' investor-relations pages.
The PDFs are scanned and the database is populated with, among other things, the:
Title
Contents (full text)
Page count
Word cou... |
I'm trying to determine what my legal obligations are if I use an MIT-licensed library (JAR file) in my program. Do I need to include the library's source code when I distribute my program? Do I need to include a README explaining the licensing of the packaged JAR? If I'm simply including the unedited JAR file, do I ev... |
I learned to program in C many years ago, and used C steadily for about 10 years.
These days, I occasionally have to look at C code, because our Informix 4GL RDS customized runners also contain C code, but it is fairly simplistic code.
When I was using C a lot, I never remember hearing about of flexible arrays. I am a... |
I've a huge classic ASP application where in thousands of users manage their company/business data. Currently this is not multi-user so that application users can create users and authorize them to access certain areas in the system.
I'm thinking of writing a handler which will act as middle man between client and serv... |
I'm trying to working how to handle authentication when I have iOS clients accessing a Node.js server and want to use services such as Google, Facebook etc to provide basic authentication for my application. My current idea of a typical flow is this:
User taps a Facebook/Google button which triggers the OAuth(2) dialo... |
All the programmers in my team are familiar with unit testing and integration testing. We have all worked with it. We have all written tests with it. Some of us even have felt an improved sense of trust in his/her own code.
However, for some reason, writing unit/integration tests has not become a reflex for any of the... |
I like the fact that the C language lets you use binary arithmetic in an explicit way in your code, sometimes the use of the binary arithmetic can also give you a little edge in terms of performance; but since I started studying C++ i can't really tell how much i have seen the explicit use of something like that in a C... |
I have just moved from Linux to Windows, and I have to use the Zend Framework library. Where should the library be placed?
Directly on C drive
Create a lib folder like C:/lib/
Create a lib folder in my user folder
I am wondering if there is a classic folder where these kind of libraries are placed.
Update:I am askin... |
In our project, an assembly combines logic for the IoC-Container, the project internals and the communication layer.
The current version evolved to have only internal classes in addin assemblies.
My main problem with this approach is, that the entry point is only available over the IoC-Container. It is not possible to ... |
We are developing the agile way for a few months now and I have some troubles understanding the agile manifesto as interpreted by my colleagues. The project we are developing is a framework for future projects and will be reused many times in the next years.
Code is only written to fulfill the needs of the current user... |
I know the company you work for owns the code and obviously you will get arrested if you try to sell it. But is it uncommon for developers to keep a personal copy of the code they wrote (for future reference)?
Apparently this guy was sent to prison for copying source code.
|
I have a question related to mobile compatible websites, I have seen two type of websites
One in which they adopt traditional website look and adjust website according to mobile screen, if they have lot of information which can not be adjust according to screen then they expand the height of page, so that user can scr... |
I am an undergraduate student and I have to create a Semantic Network based on Wikipedia. This Semantic Network would be similar to Wordnet(except for it is based on Wikipedia and is concerned with "streams of text/topics" rather than simple words etc.) and I am thinking of using the Wikipedia XML dumps for the purpose... |
I'm writing an app that will make available a set of api functions that require cross site scripting to work. I'll be utilizing jsonp which will allow other developers to consume these services for their web applications.
What security concerns should I consider to protect my server data?
What security concerns sho... |
Typically in C# I use dependency injection to help with mocking;
public void UserService
{
public UserService(IUserQuery userQuery, IUserCommunicator userCommunicator, IUserValidator userValidator)
{
UserQuery = userQuery;
UserValidator = userValidator;
UserCommunicator = userCommunicator;
}
...
... |
Lately I've been getting professional work, hanging out with other programmers, and making friends in the industry. The only thing is I'm 100% self-taught. It's caused my style to extremely deviate from the style of those that are properly trained. It's the techniques and organization of my code that's different.
It's... |
I'm like doing TDD so I started everything mocking objects, creating interface, stubbing, great.
The design seems to work, now I'll implement the stuff, a lot of the code used in the stubs are going to be reused in my real implementation yay!
Now should I duplicate the tests to use the real object implementation (but ... |
I just came across the Caliper project and it looks very nice.
Reading the introduction to microbenchmarks, one gets the feeling that the developers would not suggest to use the framework if the benchmark takes longer than a second or so. I looked at the code and it looks like a RuntimeOutOfRangeException is actually t... |
I am working on a C++ project that is getting bigger and bigger. I do a lot of UML so it was not really hard to explain my work to co-workers until now. Lately I implemented a lot of new features and I gave up updating by hand my Dia UML diagrams. My code is documented with Doxygen but the generated doc is not really v... |
I am very new to IT industry and have no prior experience. However I came into contact with a party who is gear to build a mobile application. But, they want me to sign NDA (No Disclosure Agreement).
The definition seems vague,
The following definitions apply in this Agreement: Confidential
Information means informa... |
I am working with developers right now that write code the way they want and when i tell them to do it other way they respond that its just matter of preference how to do it and they have their way and i have mine.
I am not talking about the formatting of code, but rather of way site is organized in classes and the way... |
I'm still a student in high school (entering 10th grade), and I have yet to take an actual computer course in school. Everything I've done so far is through books. Those books have taught me concepts such as inheritance, but how does splitting a program into multiple classes help? The books never told me.
I'm asking th... |
I'm one of the developers of Ruby (CRuby). We are working on Ruby 2.0 release (planned to release 2012/Feb).
Python has "PEP302: New Import Hooks" (2003):
This PEP proposes to add a new set of import hooks that offer better customization of the Python import mechanism. Contrary to the current import hook, a new-style ... |
What is the best way to track defect sources in tfs?
We have various teams for a project like the vulnerability team, the customer, pre-sales, etc. We give a build and these teams independently test it. They do not have access to our tfs system. So they usually send in their defects via email. It will usually be send i... |
The web application I work on has been live for a year now, but it's time for it to evolve and one of the ways in which it is evolving is into a multi-brand application - in this case several different companies using the application, different templates/content and some slight business logic changes between them.
Th... |
Is it possible to change the used sequence in Planning Poker, for some stories, it is thought that when the stories gets larger it contains more uncertainty but stories have nearly exact time estimations and these estimations don't drop into two bounds defined by Fibonacci series.
|
I work at a place where we buy a lot of IT projects. We are currently producing a standard for systems-requirements for the requisition of future projects. In that process, we are discussing whether or not we can demand automated unit testing from our suppliers.
I firmly believe that proper automated unit-testing is t... |
I am developing a software project in Java/Swing licensed under GPL v3.
Later, I want to create a Android application which uses the algorithms of the Java/Swing application. This Android app will be a commercial product (sold on Google Play Store).
Is this a problem, when I use my OWN GPL code in a commercial SW devel... |
I am creating some Web Services that would have 2000 concurrent users. The services are offered for free and are hence expected to get a large user base. In the future it may be required to scale up to 50,000 users.
There are already a few other questions that address the issue like -
https://stackoverflow.com/questio... |
I am probably not the only one that feel that way. But I have what I tend to call "The syndrome of the perfect programmer" which many might say is the same as being perfectionist but in this case it's in the domain of programming. However, the domain of programming is a bit problematic for such a syndrome.
Have you ev... |
I understand the concept that a Scrum Master should remove impediments. However I'd like to know where exactly the line should be drawn. For example a team member might have an impediment whereby they need to get support to log onto a live server and get some details. They can't progress a bit of work until this is don... |
I'm working on a rails application, and so far I've focused on the api and the functionality. But now I'm more and more reaching a point where I will want to add static content, descriptions of the software and help information. Information that is generally in a CMS system.
How do I in the best way structure this so I... |
I work for a small software company (about 200 people building 8-10 applications) and I was hoping to get some advice on products that might be out there to manage the information of which clients are using which versions of our products?
The most fundamental relationship would be that a "product" has "versions" and a ... |
I have an abstract class which has all abstract methods except one which constructs objects of the subclasses. Now my mentor asked me to move this abstract class to an interface.
Having an interface is no problem except with the method used to construct subclass objects. Where should this method go now?
Also, I read so... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.