instruction stringlengths 34 19.9k |
|---|
I have a collection of products in a product group e.g.:
product-groups/123/products
If I need to add to the collection, is it OK that I pass only some products with PUT?
If I need to delete some products from the collection, is it OK that I pass filter data (an array of ID's) with DELETE?
What's the best way to imp... |
Currently our company develops applications consisting, most of the time, in Ruby on Rails web servers and a bunch of different REST clients, from kiosk systems in Java to embedded devices in C/C++ (besides the interfaces for standard web browsers). We need to expand our team and, having failed at finding good senior p... |
I am setting up an ETL process and small data warehouse for querying the data in a few different dimensions. One issue is that the schema for the objects can mutate over time - mainly that some fields will be added and some removed. What are some methodologies or approaches for handling this?
(Note the source data is m... |
I am trying to create a class which allows me to do something every 5 seconds and I want to be able to start and stop this from running from any of the other classes. Here is my Timer class:
public class Timer extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated ... |
I work for a company that develops a web server that runs in a customer datacenter. The customer wants the server to have hot failover and I'm currently investigating HA approaches such as Pacemaker and LVM (might as well have the backup doing something so I'm using load balancing as well).
It occurs to me that some o... |
I have a project where I need to allow users to run arbitrary, untrusted python code (a bit like this) against my server. I'm fairly new to python and I'd like to avoid making any mistakes that introduce security holes or other vulnerabilities into the system. Are there any best-practices available, recommended reading... |
Can anyone explain in detail, how exactly the virtual table works and what pointers are associated when virtual functions are called.
If they are actually slower, can you show the time that the virtual function takes to execute is more than normal class methods? It is easy to lose track of how/what is happening without... |
So I have a program with "cue" objects and each have their own table cell. The thing is that the table cells have loading bars on them that represent the progress of the cues. This presents the following question: How should I structure the program?
Should the objects representing the Cues store pointers to the table c... |
Many programming languages have only those 2 structures, and even some languages that have more structures still only provide special syntax for those 2; usually, [] and {}. Why is this? Is there anything special about those datatypes that is necessary for the completeness of the language?
|
I have a web host that supports cPanel and email addresses. I'm interested in creating a web app that checks for email messages, reads their contents and then does something with them, like interact with a database.
For example, Bob with email bob@gmail.com links his email address to his account on my web app. He send... |
One of the problems I have with null references is that they may not be exceptional. In my current position, there are few requirements and you are lucky if conventions are followed. This means being unable to handle a request is a frequent occurrence and throwing an exception is too slow (think millions of requests). ... |
I am a recruiter. I want to learn as much as I can about JEE5/JEE6 so when I try and find these types of candidates I can at least talk intelligently with them.
What I need to understand is what goes without saying?
So for example, if you were a J2EE or had experience with JEE5 or JEE6, could I assume you had spring an... |
I'm reading about design patterns. I know what this principle does.
High-level and low-level classes depend on abstractions. But why we say this is inversion?
|
I heard from a friend that Bjarne Stroustroup admitted that he doesn't know entirely the C++ programming language due to its vast complexity
Is it true and there's some referrable sources or is it just an exaggeration?
This affirmation should be present on his website, he told it in an interview/conference some time ag... |
I'm trying to devise a document system for a specific domain involving simple objects (People, Companies, Invoices, etc.) that would also be able to completely describe itself. This self-description ability would ideally be recursive. The document system will be based on JSON, but I believe the principle in question ap... |
I remember learning VB4 and dragging a button onto a form, double-clicking on that button, and typing code into that event handler I had just been magically blessed with. Coming from QBASIC I was thrilled with the "V" in "VB", the visual designer was literally the best thing since sliced bread.
Of course you could do a... |
In the Software testing book from Koirala, Sheihk, they say:
A positive test is when you put in a valid input and expect some
action to be completed in accordance with the specification.
A
negative test is when you put in an invalid input and receive errors.
Part of my question:
Let's say there is a requirement... |
What is wrong with using database tables with phpmyadmin or mysql? What are the benefits, if I'll use 'migration'?
|
When choosing a value based off of 2 boolean values in this format
var foo:int;
if (X){
foo = 50;
} else if (Y){
foo = -50;
} else {
foo = 0;
}
I discovered that I can condense this down by typecasting the boolean operations to integers, and mathing it up a bit like so:
var foo:int;
foo = ( int (X) - in... |
OK, so I paraphrased. The full quote:
The Internet was done so well that most people think of it as a natural resource like the Pacific Ocean, rather than something that was man-made. When was the last time a technology with a scale like that was so error-free? The Web, in comparison, is a joke. The Web was done by am... |
There is ambiguity in all papers I have read so I would like to ask about the following requirement:
Requirement: Being a Game master, I can access the GM menu by typing "menuInvoke".
Trying to do that as a regular player - is that a negative test or still positive in terms of verifying the requirement? Because some au... |
I don't know yet how it feels to be a part of dev/testing teams. If in an organization (mostly single-product company), can a developer handle testing efficiently?
From what I have read:
Developers do not like testing and hence effectiveness of testing suffers, Testing requires special tools and skills.
So in a work ... |
In our workplace we use simple ajax library for getting page data and submitting changes to the server. Sometimes we need to change the form’s field values. We know that fields can be of any type (dropdown, textbox, radio buttons, etc.) and one of the most annoying and tedious tasks was remembering each field’s ID so c... |
I have difficulty to learn about ant colony algorithm (ACO), I have read about generating crossword game using (genetic algorithm) GA.I Know both of GA ant ACO usually used for optimization, but my question is Is possible if create crossword game generator using ACO and how it can work for optimization in this case?
|
I'm creating a model where one element can contain other elements. I'm currently writing the interface to the model, and I'm not sure which is the best of the two options:
Option 1
interface Container {
List<Element> getElements(); // returns an unmodifiable list.
void addElement(Element e);
void removeElement(El... |
I normally work by myself as a freelancer, and the setup I use has worked pretty well for me so far. I'm not sure if it's the optimal setup for a team though.
I develop on Windows, and I setup a Linux VM on my local machine, running the same OS/stack as our production machines (CentOS, Nginx, PHP-FPM). I setup Samba, a... |
Ruby on Rails
Twitter Bootstrap
Html5Boilerplate
Backbone.JS or Knockout.JS
I sort of understand what each one is individually, but my understanding isn't strong enough to understand whether some of them sort of overlap in functionality and whether any subset of that list contains items you wouldn't use togethe... |
I have a scripting engine I just published as an open source project. It's been sitting on my harddrive waiting for about a year. My engine of course isn't complete in any way, but it does work for simple scripts. It has a javascript-ish feel to it, but I don't wish to abide by the ECMA spec or anything.
Now, the big ... |
I have the following situation: I have to create a website and a web service that will share a part of the functionalities.
This is why I do not want to write code twice.
I have thought of the following architecture:
MyApp.BusinessLogic --> here we save the DataModels to the database
MyApp.DataAccess -> DataModels & En... |
I have a database having around 15 tables.Currently I am working on a report generation page, which is having 16 criteria.The values are distributed among multiple tables.User can select any number of search criteria. The problem is, if the user is entering 2-3 values, it is better to filter first by certain value and ... |
I am doing an internship on Big Data technologies so I am new to this area. My question is about the use of NoSQL in the Big Data architecture. Do we need always to use a distributed storage (like HDFS in the case of Hadoop) then to put on top a NoSQL databases (like Hbase )?
I find it difficult to understand the typic... |
I'm creating an application which needs to have a key file based product activation.
If a user purchases the application, the key file may have to be attached to the application EXE file dynamically (may be online) and package it to an MSI installer. The user downloads the application from a server or repository.
How c... |
In a lot of examples for the Azure platform I'm seeing a lot of self-administration happening: an application will test for the presence of an external system such as a queue or database and create the necessary structures it needs to function.
This behaviour seems contrary to a more traditional application's environme... |
I've been taught since high school that defining variables like this:
int _a;
or
int __a;
should be consider bad practice because this would eventually puzzle compilers that use variables starting with an underscore to name temporary variables.
As far as I know this is the reason why some people like to move the unde... |
I have seen on some sites which say ,for-example, multiple votes/views from same computer will be neglected/penalized etc. For-example liking a facebook page, or youtube video from same computer(different accounts) will not increase its worth(according to my knowledge).
How do these sites identify bogus votes? I just n... |
When I learned relational databases, the prof said that one would "almost always" want an artificial int as the primary key in a table, but did not specify what the exceptions are. At some time I stopped using them for junction tables, and never had a problem.
Now I am making a database with a lot of lookup tables, an... |
I've been working in a very small team for PHP development and we've been using an ad-hoc, "Invented Here" style guide. Now that our team and codebase is growing, we would like to use a more broadly-used style guide that would be, if not an official standard, a de facto standards used in many PHP communities. Does such... |
I have a fair number of items in a session, and I am wondering if there are any advantages to copying the session variable to a normal php variable (in order to close the session file as quickly as possible) and then do any calls from there. Something like:
session_start();
$copiedSession = $_SESSION;
session_write_clo... |
I'm learning programming in Objective-C and I can't understand what a static method is. I know what class/instance/private/public methods are. Can someone explain what it is using an example and comparing it to the others I mentioned? And in what situation would someone use it?
From what I read on Wikipedia, it soun... |
First, some context (stuff that most of you know anyway):
Every popular programming language has a clear evolution, most of the time marked by its version: you have Java 5, 6, 7 etc., PHP 5.1, 5.2, 5.3 etc. Releasing a new version makes new APIs available, fixes bugs, adds new features, new frameworks etc. So all in al... |
I have just released an iOS app for beta-testing with TestFlight.
I'm wondering what is good practice during beta-testing?
Should I halt development of the app during beta-testing?
Should I continue developing but make a snapshot image of what the
code looked like when it was released for beta-testing?
Issues that cou... |
A colleague and I have been taking turns debating/discussing the issues/merits of integrating a version derived from the current git repository into our code whenever it builds.
We think the merits include:
No need to worry about human error in updating a version number
Traceability between what we find in a device an... |
I know exception handling is a topic often discussed in the world of Java. I've read a few threads on here and SO as well.
https://stackoverflow.com/questions/2169339/exception-handling-in-a-java-web-application
I find myself identifying with principles such as Do not suppress or ignore exceptions, Do not catch top-... |
My organization does web projects and employs a handful of disciplines like backend dev, frontend, BA, UX, graphic design, QA. We've been pushing to have tasks for every discipline in our sprints with explicit dependencies (Can't build a page without comps, can't do comps without wires, etc). I've heard some other orga... |
Hi I had today my first interview for a position of android developer.In my portfolio I had a php e-commerce application that has a catalog , ajax powered shopping cart , and administrator functionality.
Because my Android knowledge is prety limited , I only started learning about 3 weeks ago , I was asked to migrate ... |
I am developing an Android application for my final year project which allows the holder of a mobile device to receive a text notification containing potentially sensitive information from a server.
My question is this, if a User downloads the application, what is a suitable way for them to create an account / log in o... |
https://stackoverflow.com/questions/98734/what-is-separation-of-concerns
In computer science, separation of concerns (SoC) is the process of
breaking a computer program into distinct features that overlap in
functionality as little as possible. A concern is any piece of
interest or focus in a program. Typically,... |
I was recently talking with a recruiter who wants to put me at a company for a position of Developer in Test. He essentially made it sound like a position where you get to fiddle with new programming techniques and test bugs and improvements in software but where you don't need to worry about standard deadlines. You ge... |
I have created web services before that are used by a small number of users but have a new project that would have lots of users.
For each user that uses the services, this is what they would do:
1) Call a method on the web service that calculates a "price" based on parameters passed by the user.
2) The actual method a... |
I have an event(s) controller:
class Event extends CI_Controller{
public function index(){
}
public function foo(){
}
//Shouldn't be able to use this method unless logged in
public function bar(){
}
}
And I'm trying to organise my code so it's fairly tidy and straightforward. Just now I have ... |
I am currently building a website, which until quite recently was purely PHP. However I am now making trying to have the site use more AJAX, to lessen the page reloads. In PHP I had a lovely object orientated user class with methods for updating data, logging out, and so on. When a user logs on this would be stored as ... |
To me, it seems as though "mainframe" is a somewhat dated term; is it simply an older synonym of "server," or does it server a purpose more similar to a cluster/supercomputer?
|
I pulled the term smurf naming from here (number 21). To save anyone not familiar the trouble, Smurf naming is the act of prefixing a bunch of related classes, variables, etc with a common prefix so you end up with "a SmurfAccountView passes a SmurfAccountDTO to the SmurfAccountController", etc.
The solution I've gener... |
I'm in the process of implementing a programming language on top of LLVM. For my polymorphic system, I'm looking for suggestions for a ultra-fast dictionary. I am not concerned with insert time, as these maps are only written to a dozen times or so. But I'm looking for super fast lookup.
I did some research on the ope... |
Have you ever had this feeling that your code is bad, the whole project is a mess, and you just want to step off? On your daily job you can explain this feeling away with your coworkers, asshole boss, or something like this. But with side/pet projects there is really no excuse.
For example I'm currently maintaining my ... |
What are the common terminology used to schedule software update and support. For example, I really have no clue how releases and updates differ, how often are updates released (not everyday I hope)?
Most importantly communicating stuff like milestone (what is this mean?), roadmaps, basically I want to know how I can o... |
I know there are different ways to combine programming languages (Haskell's FFI, Boost with C++ and Python, etc...). I have an odd interest in combining programming languages; however, I have only found it "necessary" once (I didn't want to rewrite some older code). Also, I notice that this interest is shared (there ar... |
My university lists the rotation of courses each semester/year. Therefore, it is possible to predict when every class will be taught.
I am trying to create a JavaScript (language is irrelevant, really) program that will have the user select all the courses they would like to take, for how many semesters, and the max (o... |
I am developing a small application which I want to make open source.
Currently only my work is on the application, and so in all the files I have put up a copyright notice in my name.
Now when I make the project open source and say a developer Sam does some enhancements to some existing files. Then should he be allowe... |
Bug tracker for any decent sized project seem like a bit of a no-brainer to me - it makes it really easy to organise hundreds or thousands issues, without issues colliding or getting mixed up.
So when I see some really big projects, like Git, using a mailing list as the main method of coordinating maintenance and devel... |
The scope: it is part of a big ERP system which provides specific calculations. One can think of it as a salary calculation module in a CRM. Yet this is way beyond that in both complexity and integration points. Thus, there are a lot of technological debt, but not unmaintanable one. There some some unit/integration tes... |
I have a generic design question that relates to enterprise applications but I think that software developers from other types of projects may have experience with this as well.
The scenario is following - you have a database and you are about to write an application that provides access to its data. The database also ... |
A question has been bothering me for a while: when developing international projects, it is common sense to use English as the reference language since it is the language that the most people understand.
However, how can one choose to name a function when it could have different valid English spellings. For example, wo... |
I am new to unit testing, I've one REST web method that just calls DB and populates a DTO. Pseudo code is
public object GetCustomer(int id)
{
CustomerDTO objCust = //get from DB
return objCust;
}
My doubt is how to write tests for these methods and type of tests (Integration/Unit) to be included. And for unit test... |
I am just a graduate from India and I have knowledge of Java, JSP and Servlets, Android application development and some iOS development.
I do not have a background in C or C++ and a little weak background in Data Structures and Algorithms. I want to know whether I can make a successful career in the IT industry withou... |
I am working on one of my first projects in C (microcontroller code) which is split up into multiple C files. I noticed some inconsistency in my coding where I had some variables declared as extern global variables and would just access them directly (ISR and some other places), and others declared static global variab... |
A typical MVP application might have a View method such as:
void setDisplayItems(List<DisplayItem> items);
Should the Presenter sort the list of items or is that a task for the view?
I feel this might be a task for the View, for two reasons:
If it were a task for the Presenter, then methods such as:
void addDisplayIt... |
I have a question regarding ASP sections and partial views.
What ser the benefit of using one over another?
Because if I have a menu, i guest that it could be both as a section, but also as a partial view.
So what is the difference?
|
I would like some input on how to handle clients and third party vendors that ask me about the deficiencies in my design.
For example. It turns out I need a data field in a webservices response. This response has been signed off on weeks ago and I get questions like "Why haven't you identified this field X weeks ago?".... |
New to C++! So I was reading this: http://www.learncpp.com/cpp-tutorial/110-a-first-look-at-the-preprocessor/
Header guards
Because header files can include other header files, it is possible to
end up in the situation where a header file gets included multiple
times.
So we make preprocessor directives to avoid t... |
I am creating the model part of an MVC architecture. My one class will provide all the accesses to allow one to fetch system state. I want most of this state to be immutable as it shouldn't be changed and I don't want anyone accessing my model to be able to break the state by making a foolish change.
However, The obj... |
It is said, by Mike P. Wittie, in the course curriculum of computer architecture that,
Students need to understand computer architecture in order to
structure a program so that it runs more efficiently on a real machine
I'm asking to more experienced programmers or professionals that have a background in this topi... |
In a single directory with a Git root folder, I have a bunch of files. I am working on one of those files, X.py, with my friend Alice. The other files I am working on with other people. I want Alice (and everyone else) to have access to X.py. I want Alice to only have access to X.py though.
How can I achieve this with ... |
I have been seeing a lot of projects that have repositories that return instances of IQueryable. This allows additional filters and sorting can be performed on the IQueryable by other code, which translates to different SQL being generated. I am curious where this pattern came from and whether it is a good idea.
My big... |
The few LAMP web applications I have installed require me to create the necessary database tables myself, with a schema file, instead of doing it automatically with a script or setup page. Is this a normal and accepted practice? In my own hobby projects I find it much easier and hassle free to just create the tables in... |
I have developed a Java program for academic purposes (non-profit, non-open-source).
In the process, I made extensive use of many apache common libraries.
The program is now to be set free on the net, so I was wondering what my precautions should be. My program will (preferably) consist of a single .jar file, having a... |
So my CS professor gave the whole class a simple assignment. "Write a recursive function that will swap the order of a section in an array of chars." I thought to myself, "Easy. I'll finish this up in about 5 minutes and I'll get to work on my Trig homework before I leave."
This is not what happened.
An hour later, the... |
Ok, so I'm at a point where I think I have my basics down. I'd like to think I'm just starting to become an intermediate dev. So, how do I level up here?
It feels like I have reached my threshold, but I really want to break it, and move ahead, do more crazy stuff (for context, I'm talking about programming).
So, what w... |
I know a lot of programming languages that can be used to web development like PHP, ASP, etc. but why many web developers use java programming language for web development?
|
I am trying to find a efficient algorithm in Java to find the repeating decimal part of two integers a and b where a/b.
eg. 5/7 = 0.714258 714258....
I currently only know of the long division method.
|
I was recently asked this from my friend after explaining how µTorrent worked, he then went to ask me, "Could this be used for browsing the web?", (not a direct quote) but I found my self thinking about this for a while there after.
Could someone be credited with making the first Peer-2-Peer browser?
How could it sen... |
I have a question, to explain that, what better than an entirely fictional example?
Let's say you are a young developer just being employed in a firm.
All data is stored in a huge database (let's say 500+ tables with billion rows).
Your boss ask you to make some consolidation queries stuff.
So, you start making your qu... |
I have data available in the form of Structs and Arrays.
I need some design pattern advice, which I can use to model this situation
into corresponding Coldfusion Components.
Here is the data definition
I have objects like
Hotel
Apartment
Bus
Each object has it's attributes and images. Images have also different types... |
A WebApp writes a stream of data coming over a network to disk as key/value pair and then reads & send it over network again after few milliseconds in 99% of case. In 1% of cases write/read can be few hours to days apart (really don't know).
Latency is strict "no" in the app and we have to serve 100% of customers there... |
I want to build a command line interface with menus and sub-menus and eventually the leafs of the tree should be operations like..
bank management -> account management -> add acount (insert account info)
And I'm looking for a good way which works with the OO principles...
Thanks for any piece of advice!
|
What are the general strategies to employ when attempting to ensure that a module of code will function correctly on the live system? A common problem we have at our software house is that we typically deploy solutions to a remote client's server, which hasn't got any software-development-related software installed on ... |
I'm developing a .Net application that uses google protocol buffers. Historically the application used the approach, advocated by the protobuf-net team, of decorating the classes with attributes instead of using .proto files.
I am now in the process of migrating part of the application's client to another technology an... |
This isn't career advice, this is more of a question of logistics.
When looking at job market and such there is a lower than what I think would be out there of database admins but I'm curious if database admins actually include strictly database developers, or of database developers are more under a blanket term "Prog... |
I've been reading various techniques for splitting large user stories in helpful ways, such as by user workflow through the system etc. What I'm struggling with is how to word these smaller stories if all they achieve is facilitating the next step in the process and not delivering the application's main benefit to the ... |
Recently we have had some turnaround in the shop I work in, because of this comments in our source code were made hastily and explained very little. We have started working on the departments first draft of coding standards and one of the bigger questions is: Should we implement this standard across the existing sourc... |
I work for a large financial company that manages money for thousands of clients. This company has very complex business processes and they operate in a very dynamic environment.
This is a fairly old company and over the years they have implemented many heterogeneous systems to automate processes within the company. ... |
I am trying to build a project which uses an unmodified copy of libconfig (http://www.hyperrealm.com/libconfig/). libconfig is LGPL, but I don't want to open source any of my code. By my understanding, LGPL means I need to provide the source for the library (easy), and a means for them to use their own modified version... |
I am developing a PHP Application that needs to display and accept content written in tamil.
For example "login" should be written in tamil on the form.
How can I achieve this ?
|
Reusing large amount of helpful codes made by other programmers is very tempting for me. I specifically refer to codes that can perform generic tasks, such as Data Access Layer (DAL) codes.
I am just beginning a project using a newly familiar language, and I don't think programming from scratch is feasible. I can unde... |
I'm starting to hear rumblings about this project called ASM.js. Currently their web site is terrible and confusing. Here's what I know from my research on the web.
It is a subset of JavaScript that can be highly optimized. I'm guessing because it avoids the more dynamic parts of the language.
Performance of code comp... |
When and why would you generally sacrifice typesafety for a nicer programming interface?
Let me give you an example: if you had the choice between two event aggregators, which one would you prefer and why?
Reflective Version:
SomeEvent.subscribe(instance, "nameOfAMethod"); //method called via reflection
SomeEvent.fire(... |
How can I handle timeouts in a network application.
I'm implementing a provisioning system on a Linux server, the code is huge so I'm going to put the algorithm, it works as like this
Read provisioning commands from file
Send it to another server using TCP
Save the request in hash.
Receive the response then
if suc... |
I have built a JavaScript library that I'd like to release for free within my user community. However I want to keep it under control, and not allow my users to pass it on to others without my permission.
As far as I can tell, a MIT or GPL license won't work for that scenario. What licensing options do I have?
Backgrou... |
I'm the lead programmer at a small software firm (currently 4 developers including myself), we develop bespoke ASP.NET WebForms applications for businesses. I joined there in 2010 just after graduation, so it was my first real job. After more senior programmers left, I was promoted to lead and we hired a bunch of junio... |
During a recent project I've been working on, I've had to use a lot of functions that kind of look like this:
static bool getGPS(double plane_latitude, double plane_longitude, double plane_altitude,
double plane_roll, double plane_pitch, double plane_heading,
double gimbal_... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.