instruction stringlengths 34 19.9k |
|---|
I'm working on a new common .NET software design (mainly) for WCF-based web service applications with related client frontends (all written in C#). As far I've chosen some frameworks (NUnit,Autofac/Castle Windsor) as basis for the application.
Now I'm doing some research concerning db abstraction. I'm considering NHibe... |
First of all, I'm not really a Javascript guy, but more towards PHP.
However, I want to move to the next level, that is taking load off the server and let the client do the processing. Hopefully to be a more JS guy.
My first thought is to request of data off the server, and it just returns key-values which the client w... |
I'm still restructuring the code I have been given to update on my current work project, and I've come to the point where I'm looking at how the code handles an 'exceptional' input, that doesn't conform to the business logic.
In essence, the code stitches together various different excel spreadsheets, tarts them up and... |
I'm working on a project that processes requests, and there are two components to the request: the command and the parameters. The handler for each command is very simple (< 10 lines, often < 5). There are at least 20 commands, and likely will have more than 50.
I've come up with a couple of solutions:
one big switch/... |
I am writing a node.js application which I am breaking down into modules, the issue is I am not sure how to organise my code in an idiomatic Javascript way.
Currently each of my modules exposes a set of functions that are intended to be called directly. All state is modified by the module with the gameId being the firs... |
One of my teammates is a jack of all trades in our IT shop and I respect his insight.
However, sometimes he reviews my code (he's second in command to our team leader, so that's expected) without a heads up. So sometimes he reviews my changes before they complete the end goal and makes changes right away... and has eve... |
Consider the following scenario.
You currently have a feature set A you wish to extend to include feature set B. In the near feature there's a high possibility that you wish to extend this even further to include feature set C.
Option 1) Cost to extend A -> B is minimal, but high maintenance
costs.
Option 2) Cost to r... |
We have sprints of 4 weeks duration. What I have been doing is 3 weeks dev time and 1 week of pure manual/automated testing, stabilization and shipment assurance testing.
How to manage TDD within dev time? In my previous experience writing tests and getting 80% coverage requires round about 50% of the development time... |
We have a URL in the following format
/instance/{instanceType}/{instanceId}
You can call it with the standard HTTP methods: POST, GET, DELETE, PUT. However, there are a few more actions that we take on it such as "Save as draft" or "Curate"
We thought we could just use custom HTTP methods like: DRAFT, VALIDATE, CURAT... |
Can someone please explain the best way to solve this problem.
Suppose I have three classes
Person
Venue
Vehicle
I have a DAO method that needs to return some or all of these attributes from each of the classes after doing a query.
Please note, by requirements I am using one DAO for all three classes and no framework... |
I am currently working on a project that has client applications communicating with a server process. The client applications could be local to the same machine as the server process, on the same network, or over the internet. I had written a single-threaded asynchronous RPC module for the server process using Boost AS... |
Suppose I have a form in my web application where users can upload a profile picture.
I've got few requirements about file size, dimensions etc, but when the user uploads the image, how should I name them on my system? I suppose it would need to be consistent and also unique.
Maybe a GUID?
a5c627bedc3c44b7ae7c06a44fb3f... |
I started developing websites using PHP. I have read many times that PHP is free and open source which is an advantage over ASP.net.
However, due to my current job requirements, I had to switch to ASP.net which is pretty good. Now after developing few applications, I am wondering how can I publish them for free. As P... |
Long story short, I'm working on a web-based frontend that interacts with a database, and one of the functions is that every action on a particular table gets logged to keep a full history of all changes to that table.
An earlier attempt at using triggers in postgreSQL to handle the logging automatically ran afoul of ... |
Why do books say, "the compiler allocates space for variables in memory". Isn't it the executable which does that? I mean, for example, if I write the following program,
#include <iostream>
using namespace std;
int main()
{
int foo;
return 0;
}
and compile it, and get an executable (let it be program.exe), no... |
So I develop an app that is for both Android and iOS.
From time to time changes occur when working on one version that need to implemented on the other. I find it tedious to keep track of these changes so I don't forget them later.
I'm just curious as to what other workflows you guys use when managing a single feature ... |
In most of the projects at work it will eventually show up a package, a class (or multiple packages and classes) named "Utils", where every kind of function is dumped into.
It becomes excruciating harder and harder to navigate the project without a properly named structure. I have tried to ask to stop using "Utils".
... |
I am the maintainer of a project which has a large non-technical userbase. I've been maintaining it for about 4 years now and adding new features as they've been requested.
I'd like to move on to other projects now and stop developing for this application. Because of the non-technical nature of the users, there have be... |
I spent couple of months learning Scala and got overwhelmed by number of different constructs it had,
After looking at partial functions, partially-applied functions, pattern matching, actor syntax,
I gave a thought to learning Clojure which doesn't have too much in terms of syntax but looking at the how Java inter-op... |
for ( i = 1 ; i <= N ; i++ )
{
for ( j = 0 ; j < i ; j++ )
{
if ( arr[j] > arr[i] )
{
temp = arr[j] ;
arr[j] = arr[i] ;
for ( k = i ; k > j ; k-- )
arr[k] = arr[k - 1] ;
arr[k + 1] = temp ;
}
}
}
Source: http://programminggeeks.com/c-code-for-insertion-sort/
If not, ... |
I'm currently working on a project which will have client applications (desktop & android & web) communicate with varies processes running on a server(s).
My question is how much should I be thinking about load balancing and the like?
All projects which I have worked on before consisted of creating applications for int... |
I am discovering web services to implement in my ASP.Net website. I visited many sites about Why use webservices and read many articles and found out that web services are good when you have something that is used frequently without loading your page.
I want to know some other example scenarios where web services are ... |
Being new to node js magic world, i'm wondering how does a web application's setup look like on a real production server?
So far all tutorials, create the js file that is started from a console...and that's it.
Anyone has created a real world web app that uses node js in the back end? Can you please describe how is it ... |
Are developers actually likely to receive significant help by open sourcing a work in its unfinished stages, or are open source consumers more likely to want something ready to use?
This is frequently cited as a benefit of open source, but I haven't been able to find evidence of it outside of already established produc... |
I need some clarifications on the responsibilities of the Build Script and the Build Server.
I read several articles on the Net about continuous integration and builds. Including
The F5 Key Is Not a Build Process
The Build Server: Your Project's Heart Monitor
Daily Builds Are Your Friend
And I had a conversation with... |
So we have an interface like so
/// <summary>
/// Interface for classes capable of creating foos
/// </summary>
public interface ICreatesFoo
{
/// <summary>
/// Creates foos
/// </summary>
void Create(Foo foo);
/// <summary>
/// Does Bar stuff
/// </summary>
void Bar();
}
Recently, we played a document... |
Working in immutable data with single assignments has the obvious effect of requiring more memory, one would presume, because you're constantly creating new values (though compilers under the covers do pointer tricks to make this less of an issue).
But I've heard a few times now that the losses there in performance are... |
When to use blocking sockets over non blocking sockets on UDP?
Question 1:What's is recommended for the following scenario ?
Multiple clients send data over multiple UDP sockets, i.e. say client1 sends data over sockets 100, 101, 102,..,105 . client2 on sockets 110,111,112...115 etc. Port numbers are fixed for clients... |
One of the devs that works with me is following the Open/Closed Principle to add functionality to a Model by extending from our framework ORM.
class BaseModel extends ORM {
...
}
All our models are now inheriting BaseModel, and this model works well in the context of our application.
class Product extends BaseMode... |
There's a (possibly abandoned) library I'm using in my project. Its Google Code project page mentions it's MIT licensed. Nowhere in the code itself, nor any of the included files, is there a copyright notice or license specified. The closest thing is the author's name in one of the headers.
Since the sole requiremen... |
I was running our code through JSHint, and decided to switch checks against cyclomatic complexity, and then went on long refactoring sprint. One place though baffled me, here is a code snippet:
var raf = null //raf stands for requestAnimationFrame
if (window.requestAnimationFrame) {
raf = window.requestAnimationFram... |
I'd like to implement a simple chess peer to peer network application : one instance of the program may register friends player, and when one friend is "connected" (I mean both available by another program instance and registered as friend), I can ask him to play a game.
As I know J2SE language, as well as Swing framew... |
I come from a strong OO background, and I have recently started working in an organization which, although the code is written in Java, has a lot less emphasis on good OO design than what I am used to. I have been told that I introduce "too much abstraction", and that I should instead code the way it has always been do... |
Is it a good idea to use somebody else's library as a base and build your own library over that.
I want to make a JavaScript Canvas framework for a animation player on top of KineticJS. Should I do it? Do I need permission from the author of KineticJS? Do I just say to users to donwload KineticJS before my library, or ... |
I'm implementing floating-point arithmetic, for a micro-controller which does not support floating point numbers, in either hardware or software.
(Software being "written" in a sort of electrical diagram program.)
I've finished encoding/decoding from/to integers, adding, subtracting, and multiplication.
My "floats" are... |
I'm only passingly familiar with either, but it seems like most of what ZeroMQ offers is already built into Erlang, yet there's an Erlang-ZeroMQ binding that's fairly active according to its github page. What am I missing?
|
Recent QA testing has found some regression bugs in our code. My team lead blames recent refactoring efforts for the regressions.
My team lead's stance is "refactor, but don't break too many things", but wouldn't tell me how many is "too many". My stance is it's QA's job to find bugs that we can't find, and refactoring... |
I'm trying to remember a word, I think it's related to computational or database theory. The closest synonym is atomic but that's not exactly it. Basically it's a kind of computation that should produce the same result even when run multiple times in a row, meaning it doesn't create side effects for itself.
I specifica... |
We are developing a banking application. It's internal project of the bank. The application has to capture huge data to process.
So auto save is recommended approach to capture? How to perform validations in case of auto save?
And on jsp unload saving the data is correct approach?
Which is best way of saving form... |
I am working on creating a REST ws exposing few API's. A token is required for each API call. I am confused about the expiry time to be set for the token.
Security+Performance wise what is the ideal expiry time for token (if there is one)?
|
I am new to freelancing websites. The problem is I have zero rating and I can't get any projects even if I bid the lowest amount.
I tried bidding aggressively. I even tried bidding the lowest possible amount to get my first project but still people having higher ratings get the project. This in turn prevents me from ge... |
I've been playing around and learning javascript/KineticJS by making some simple games (think like board games).
I have the game model that is relatively logically simple. When a "move" is given to my game model, it updates the properties of all the pieces.
However, I would like to make the view have some nice-looking ... |
I am looking for a tool supporting me with estimations.
What I would like to do is to specify a higher level task and break it into several smaller tasks. When a task is small enough, I could assign the time it takes to finish it. The sum of these quantifiers should show up in the parent tasks.
One could use Project fo... |
I am currently maintaining/enhancing a project a bit old speaking of the 1990's. Atleast 15 developers would have worked over it.
Going through the code for understanding is bit difficult.
No coding standards being followed.
OOP concepts not clear.
Too many unnecessary methods and functions, also unused files.
Worst... |
I am developing enterprise iPad application which contained large amount of different bundle data in terms of group of images.
Is it worth to stored as a compressed file format or normal set of individual files?
I am not worrying about huge amount of data which is reside in the cloud.
My concern is that cloud computing... |
I can never do too many Haskell tutorials. There is always something to refine and learn. So, I am working through chapter 10 of Real World Haskell, and everything makes sense.
but
Why do
newtype Parse a = Parse { runParse :: ParseState -> Either String (a, ParseState) }
identity :: a -> Parse a
identity a = Parse (... |
Background
The Wikipedia page on Syntactic Sugar states:
In computer science, syntactic sugar is syntax within a programming language that is designed to make things easier to read or to express. It makes the language "sweeter" for humans to use: things can be expressed more clearly, more concisely, or in an alternati... |
We are embarking on a new project which will be using the ASP .NET MVC4 platform.
I have been informed that the design is being outsourced to a custom design firm and they will be supplying us with HTML pages and stylesheets.
How easy will it be to incorporate these css stylesheets and HTMl pages in our application?
... |
I ran across the CareerCup website which says they can help prepare you for programming interviews with various US based top tech companies. They don't "guarantee" anything, and the site appears to be backed by a well reviewed book*.
*The reviews are on Amazon
I have been an active member on StackOverflow so accordi... |
I'd like to improve my team's workflow and architecture.
Right now we have a LAMP dev server on which every member of the team has a subdirectory. We work directly in this directory via LAN. There is also a "release" directory for when we're ready to upload via FTP to the production server.
We use a github private repo... |
As images have EXIF data which provide info about where and how they are created, do any Text Editors append such kind of descriptive details to code files? For example I use Coda for my programming works. Does Coda sign any files created by itself? Is it possible to find out the author of two different projects by jus... |
I am interested in starting a career in artificial intelligence.
Can anyone suggest how I could prepare for this?
What languages should I study that would be best for this career choice?
|
I have this web application that is going to be all client-side technology (HTML, CSS, JavaScript/AngularJS, etc...). This web application is going to be interacting with REST API in order to access and modify data. Right now it is undecided on what type of authentication system the REST API is going to use.
From my ... |
I was wandering how can Object.Clone() access field fields that are actually defined in the subclasses, and not the actual implementation of this feature.
What is bothering me is that I cannot see the logic to allow base class (even if it is "special") to access the fields defined in the subclasses - doesn't this break... |
We're using MySQL with Sequelize.js as the ORM.
What we're wondering is whether a DOA layer of abstraction is worthwhile. Here are our options:
To use the Sequelize models throughout the application.
To abstract Sequelize by building a layer that converts Sequelize
models to Backbone models so that we're using Bac... |
I'm designing an XML response for a consuming application to take in, and I'm weighing two different designs. Currently I have a design as follows (where the Product element can repeat):
<Response>
<AccountType>
<ProductType>
<Products>
<Product>
<ProductID />
<ProductStatus />... |
What are the categories of cyclomatic complexity? For example:
1-5: easy to maintain
6-10: difficult
11-15: very difficult
20+: approaching impossible
For years now, I've gone with the assumption that 10 was the limit. And anything beyond that is bad. I'm analyzing a solution, and I'm trying to make a determination of ... |
I am trying to come up with a data schema/methodology for storing the data collected from various different user application forms.
All forms contain the basic info like name, address, etc but then they diverge in what they collect. Each application will have its own unique subset of questions they want to ask. Becau... |
I am planning on building a system where users "subscribe" to "records".
Records are updated on a schedule, several times a day.
When records are updated, the user should be notified that these records have been added/updated.
I don't want each user to have their own copy of the records due to storage space and the ove... |
I've been trying to grok the double-dispatch pattern and having a hard time. I finally attempted a sample program to help myself understand. Here's the gist. But then I decided to attempt it without Double dispatch and the solution didn't look any more terrible than usual. What am I doing wrong?
|
In my ASP.net MVC4 web application I use IEnumerables, trying to follow the mantra to program to the interface, not the implementation.
Return IEnumerable(Of Student)
vs
Return New List(Of Student)
People are telling me to use List and not IEnumerable, because lists force the query to be executed and IEumerable does ... |
Pretty simple setup: I've got a Cart and the cart has Items. I've got many varying types of "products" that can't really be boiled down into one thing or even a common ancestor, so I've instead decided to simply create a representation of the product as a CartItem, which contains all the information from the product ne... |
I work in a middle sized team which shares the same source code and while have a continues integration in place, but as all of us has to work in the same branch, the build is almost always broken.
As we also have a rule, which has been introduced recently to alleviate the broken builds, which states that no one is all... |
I have been looking at server side Javascript technologies like, Rhino and Node.js. What are the advantages of using server-side Javascript and where in the server-side to they fit in a stack?
|
I am trying to instantiate
LinkedList<?> op = new LinkedList<?>();
But I get error
Cannot instantiate the type LinkedList<?>
Why is it that this cannot be instantiated in Java?
|
I am confused a little as what should be my approach, Working on a design of shopping cart and i need to store shopping cart either in session or in database but not sure which approach would be best.here are the use case
User is not logged in and adding product to cart (Anonymous user)
User is logged in and adding pr... |
It seems most companies are practicing Agile methodologies these days for software development.
I'm curious to know if there are any downsides to using Agile, does it have shortcomings, is it always the right methodology to use?
Do you any of you have experiences of using Agile and it didn't really work, maybe it was... |
I have a desktop project I've been working on for a couple months that I want to run on Windows and Mac. When I started the project, I started writing it in Qt 4.8 in C++. Development has gone fine and the application runs fairly well on both Windows and Mac like I hoped. I would say it's about 40% complete at this poi... |
When looking at the ECMAScript 4th Edition specification here it mentions that
ES3 is a simple, highly dynamic, object-based language that takes its major ideas from the languages Self and Scheme.
I'm not familiar with these two languages and cannot seem to find any mention of what exactly is similar to these langua... |
In some pseudocode, I saw the following:
if w in [1..5,8,11]
Does it mean that if w is from 1 to 5 or 8 or 11? Or is it something else?
|
I recently implemented the Damerau-Levenshtein distance algorithm from the pseudocode on Wikipedia. I couldn't find any explanation of exactly how it works and the pseudocode uses completely uninformative variable names like DA, DB, i1, and j1 that left me scratching my head.
Here's my implementation in Python: https:/... |
Update: I've got a response from the FSF on this down in the answers
From the answer to Can I remove all-caps and shorten the disclaimer on my License?, it appears that the APP CAPS sections of a software license are largely to provide extra legal ammo and increase the weight of those sections.
On the flip side, ALL CA... |
I am developing a multipalyer web Application for Anti-Chess. It would be hosted on Google App Engine.
I have a few questions:
How do I get two different users who have opened the webapp on their browser to communicate moves with each other. P2P or through the server. If through the server, can I store some moves on i... |
If I was working on a web application designing and writing an API how does that differ from a general web application development?
What things would I need to consider and take into account? Are there any standard processes to follow when creating an API that could be used by thousands of clients?
|
I was reading some article on the internet as I was preparing for interview and I found out below statement-
Writing object oriented code, even in non-object oriented language?
Is this statement true??
Can anybody provide an example to justify the above statement if somebody asked me this question in the interview.
... |
I'm working on a MVC4 N-tier application and have a quick question about Service to Controller relation and using Domain/ViewModel.
public ActionResult Details(int id = 0)
{
TenantDomainModel tenant = _tenantService.GetById(id);
TenantViewModel tenantViewModel = Mapper.Map<TenantViewModel>(tenant... |
I am attempting to understand what a Package Management System. I grasp the main concept of it but I have some queries.
Does a package management system install features(compilers, libraries, virtual machines) necessary to run an application AND install an application or does it just install features necessary to run... |
I am attempting to understand what UML models/diagrams can be used to communicate a websites architecture.
The model or models' purpose is to communicate the architecture and functionality of a website to technical people (other software developers and engineers).
Website Features:
- The website is a recipe search engi... |
I am employed in a very brilliant company with a true intention of doing XP. Communication is good and management is open to constructive discussion but due to pressing time constraints, some certain things are considered too RUP to be discussed.
At the moment I'm a little troubled with the volume of change that become... |
JavaScript seems to calculate the array length property by the number of the last index in the array rather than counting the number of items in the array. Example:
var testArray = ['a', 'b', 'c'];
console.log(testArray.length); //3
testArray[8] = 'i';
console.log(testArray.length); //9
Normally I would use push() and... |
When Aiken devised the Mark I, why did he decided to separate data and instructions? It was not mentioned in Wikipedia (or in any other searches I've looked) on how or why Aiken separated data and instructions.
|
I have a table of user relationship which stores who follows whom, the table structure is as follows
-id
-follower
-following
when someone follows any other user, I add a record with follower user id and id of user he is following, now my question:
When user wants to un-follow that user, I have decided rather than del... |
I've seen many developers asking for "How to intercept in/out HTTP packets ", "How to modify them on the fly". The most "clean" answer I've seen is to make a kernel-mode-driver filter from the scratch (TDI for XP and earlier winx9 or NDIS for NT systems).
An other way, is to use a user-mode-driver like Windivert, also... |
Despite the best intentions of programmers; oftentimes, in the real world, software systems contain "accidental features" that are accepted as part of a working system.
For example, there may be some process that runs out of memory and crashes before the process exceeds its quota for calls to an external system (which... |
I was wondering about the origins of the "let" used in Lisp, Clojure, and Haskell. Does anyone know which language it appeared in first?
|
I was recently searching for the mathematical formula to find closest point of approach (CPA) between one ship and another ship. I need to apply the formula in my radar ship program and I can't find the correct way to calculates it.
Does anybody know what the correct formula (or pseudo-code) is instead of plotting it ... |
I have started to study design patterns using some course in pluralsight and the gang of four book.
While I feel I understand what I have studied so far, I think it would be very helpful if I would have some way of practicing them.
I know that I will get the chance in time but I feel I would get a better understanding ... |
I am looking for a language that
has First class functions
is dynamic
has prototypical inheritance
does not have too many features (i.e is easy to get into and write first program).
I have been programming in JavaScript for quite some time and have gotten quite fond of it. Are there any other languages that have simi... |
The other day I was reading a little about Unit Testing and I saw some examples where people create a repository interface (i.e. IExampleRepository) and then create the real repository (public class ExampleRepository : IExampleRepository) and a repository to be used for unit testing (FakeExampleRepository : IExampleRep... |
Heapsort is a sorting algorithm that has a time complexity of O(nlogn), and performs sorting using O(1) space complexity. However, I know that because it's unstable, it doesn't find many applications (f.e. compared to other sorting algorithms).
I know it's used for interval scheduling.
What are some practical applicat... |
For example, in case of GDB it is possible to debug itself by itself. I have not been able to find any JVM that can debug itself or even allows debugging on source level.
I was just wondering if someone can suggest on how the systems are made self debuggable. If you have references, please paste it here. I wanted to re... |
Right now we have our administrative features located at www.mysite.com/admin. It is locked down by UN/PW but it still seems like an insecure place to have it. Is there a better place to put it? Perhaps at another domain?
|
When developing on a long-running branch (here defined as living longer than one release), what's the most accepted practice(s) to keeping the branch current with its origin while keeping the history relatively clean prior to merging back?
As an example, consider the origin branch (m) and a (topic) branch (t) with the ... |
I am helping a friend with his rewrite of his .NET application, currently using WinForms + sockets, which is a client/server program that currently has on average ~120 concurrent users (sending messages, using the chat). The client will grow and eventually must be able to handle a several thousand concurrent users.
A t... |
This is a problem I've run into a few times. Imagine you have a record that you want to store into a database table. This table has a DateTime column called "date_created". This one particular record was created a long time ago, and you're not really sure about the exact date, but you know the year and month. Other rec... |
There is a class method (static method) in which I create and build some object. And for filling that object, I create it as mutable object.
My mutable object is a subclass of immutable object. So i can return it as super Class type.
That object is just created in class method and returns. It is not a part of object... |
I am coming from a php background with some python as well. I want to start working on a different language for both web and mobile development. I am also interested in real time apps dealing with games.
I am looking at node.js because I can use tools like titanium and/or phone gap to have my apps ported and compiled ... |
I know that integration testing means integrating unit tested moduls and testing for interface errors etc.
But in real world examples, I am kinda lost. Here is an example of our system:
Back end (Java).
Front end (Flex).
Back end is processind data heavily and we have a lot of tests for weekly automated regression. B... |
We have a very big application written in C++ using the MFC framework (millions of code lines). No need to say that it's a legacy system, but it's also heavily maintained and updated. This application lacks a lot of architecture. For example, we have a lot of classes that do queries directly to the database, which crea... |
Preparing myself for ISTQB, I found a bit odd many things in their textbooks. E.g. they call black box testing as functional testing when you are not concerned with structured but only observe the ouput based on inputs.
But later they say that functional testing is done at levels..well, how can I do unit testing withou... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.