instruction
stringlengths
34
19.9k
Though I have a specific case, but I was wondering about the general situation. Can two DLLs, when added as Reference to a Visual C# project collide with each other to prevent the solution from building? If this is the case, what are the possible ways to mitigate this.
As you may know, XMLHTTPRequest can be used synchronously or asynchronously, but synchronized requests have always been considered bad practice, and I've always agreed with that. Not only is the ideology of modern JS development heavily based on an event model, but there were also some more prosaic reasons to avoid sy...
I am developing a range of post filters for a wordpress site, and I have built the first 4 with a single class. The final two are different enough in scope to only share a single function (the function for producing the final links) in their classes. Is it reasonable, either in this instance or in any number of similar...
Here's what is meant by operators and methods. Attempting to keep the questions as simple and open ended as possible, since the question is more about the conceptual nature of operators and methods NOT how a language has decided to implement them. Proof of Concept: This example in Ruby is more of a proof of concept th...
I'm working on some projects where I'd like to supply an accurate changelog with each release, but I haven't found a method for collecting the changelog that would work without hassle. The problem is mostly when the time between versions is long and each version ships with a lot of features and bug fixes, and when the ...
IS MVVM getting any kind of traction outside the Microsoft community? Within Silverlight this is a non-issue, but for other technologies, like JavaScript it surely is: For instance Knockout.js is a great framework, but the 'rest of the world' seems to be on a Backbone path. My concern is that MVVM frameworks (like Kn...
Suppose you have a client that interfaces with a server which in turn invokes an external service to fulfill some of the client's requests. I'm designing the client and server and need to accommodate the limitations of the external service. I have these options: Encapsulate (as much as possible) all code dealing with ...
I have been researching the usage of the Presentation Model design pattern for an application I am preparing to build. The specific technology I will be using is Flex though I doubt that it matters for this question. In general most of the Presentation Model examples I have run across are pretty consistent in the basic...
I've been working on a project that is very data-driven (a checkers board game with customizable rules; I'm using XML for the data storage). I need a design that is easy to extend as we add new features to the project via new XML tags. My XML schema looks like this for a win condition (checkers): <game> <winconditio...
I am interested to know how many real world web application servers are hosted by windows? I am going to learn C# and ASP.NET and want to convert my self from an embedded developer to a web app developer. My friends told me that there are ways more Linux based servers than windows servers. He also mentioned the Java sk...
Many modern programming languages (Scala, Erlang, Clojure, etc.) are targeting the JVM. What are the main reasons behind that decision? JVM's maturity? Portability? Because JVM simply exists, and the language designers were not willing to write a new VM/interpreter?
It's possible to publish daily updates for your application on Google's Android Market, but I have an assumption that users don't like to get frequent updates. How can I determine when I should publish updates? Is there an optimum interval to balance between delivering new features and bug fixes while not upsetting my ...
My application has an icon file which is stored in version control. Now tomorrow I might decide to change the icon. I'm debating between two possible naming conventions for the icon file: Keep the filename fixed, e.g., application.ico Have the filename reflect the nature of the image, e.g., happyface.ico Option 1 ...
I have seen the Carnegie Mellon site covering TSP. I am looking for a practical, non-academic guide to application of TSP in the real world. I would really like to know, how does TSP reduce bugs?
I have undertaken a project concerning database deduplication. I did some research and have found that the Python dict type actually is a hashmap that uses open addressing. In the deduplication module, we'll have some rules that determine whether two records are identical, with the rules essentially spelling out the at...
Imagine a call center web application with a soft phone that automatically detects when a call has started or the caller has hung up. The obvious approach to receiving these messages would be some kind of server push (a.k.a. Comet). It's pretty disastrous if we miss one of those server pushes. Must this application b...
My department develops software to migrate databases for our customers from their old CRM software to ours. In this process we could be inserting up do millions of rows, processed one at a time as we need to do mapping and formatting to go from their old system (which could be anything from a Relational Database to a s...
When working on multiple projects simultaneously (for the sake of simplicity let's say half time each on two projects), which is better? Should the two projects Use the same language? Same/similar frameworks? Use entirely different languages? Additionally, is it best if they are target for similar platforms, or diffe...
In a class diagram, each class contains methods and attributes. What's the correct word for describing both of them besides something generic such as contents or items? Context: The Orange class extends the Fruit class and inherits its stuff. where stuff = a single word for both methods and attributes
I'm been working with PHP on and off for a bit now, and I've seen plenty of code both ways: $sql = "SELECT …"; mysql_query($sql); vs mysql_query("SELECT…"); Is there a reason for separating the two, beyond being able to also pass in something such as $con?
This is a question regarding the design of a collection of ordered nodes which have some requirements that I am struggling to satisfy. In the problem area that I am dealing with we have routes which are an ordered collection of nodes. A route will be between 1000 and 25000 nodes. A node itself is a complex object. I ...
Can DI/IoC be used for a simplified, local SOA? I have been reading up on SOA (examples: here, here and here) and it seems that at first a lot of the attention was at interoperability and enabeling distribution of tasks by using standard message-formats and transfer-protocols (web-services). Later the crux has been to ...
So you've inherited a large codebase that you need to make substantial changes to and you wish to get a pretty complete understanding of the software before starting. Would you diagram it? If so, which tool do find most suited for a large codebase? Ideally I'd want expandable nodes representing major concepts in the fl...
I've written a Windows Phone 7 application to display the Ordnance Survey maps that are loved so much in the UK (I am amazed that no-one else has done this yet). However I was about to shell out the £65 to pay for the app hub and get my app to the marketplace when I started investigating how you actually get paid for t...
What does the backslash really escape? It's used as an escaping character. But I always wonder what's escaping, or what's being escaped from. I know "\n" designates a new line. But what where does the escaping come in? Why is it called that?
I used to blame changing specifications from clients for code rot, not realising that business models do change and it's my job to develop in an adaptable way. I now see that as a sign of a bad developer (I've changed!). But now I see other 'whinges' in myself. A few times recently I've found myself saying 'it's like t...
Hopefully a relativity simple question. I'm starting work on a new internal project to create tractability of repaired devices within the buildings. The database is stored remotely on a webserver, and will be accessed via web API (JSON output) and protected with OAuth. The front end GUI is being done in WPF, and the bu...
I'm still new to web design/development. I'm working on a data entry form for an internal system at work. On the form, the user can select an office from a list queried from a database. (The backend for this is PHP and MySQL, if you're curious.) I would like to add the functionality to allow the user to add an office t...
I know that JRuby can access COM APIs, but can it interface with .NET?
Microsoft Guru Eric Brechner discusses measuring "time on task" in his book "Hard Code". The discussion comes up during a section on Agile - Scrum. My guess is that it means "time spent to complete task X", but then he goes on to discuss time on task in terms of percentages by team. So I don't know how to make this ...
I think I have a good grasp of SQL and the most features it has, but sometimes when I've done some more advanced Reporting Services a fellow developer has helped me with some stuff and when I open some existing procedures in T-SQL I understand that I have some learning to do. I think I have focused more in later years...
we're working on "two" android apps that are very similar; in fact, they're the same apps with different graphics and color schemes, slightly different configuration and one or two unique activities that are not in the other project - but the functionality is 95% the same. the plan was to work on one app until it is as...
Let's say I am storing start and stop points per user into a database table. For example... let's say in a chat system, a user only needs to see lines 24-293, and 500-512. (Let's say he logged off for the night, and was not present between lines 294-499). Saving each start and stop point as a discrete row would lead to...
According to Martin Fowler classical article, there are two types of verification: state and behaviour verification. At the same time I often see people telling about implementation vs. behaviour verification. So I guess we speak about pretty same stuff here and "state" in the first classification is "behaviour" in the...
I work as part of a scrum-like Agile team and a while ago, one thing we identified that the team should do is maintain good set of design documents for our code base. Because we are agile and do have good amount of discussion and communications, our designs are kept at a high level and are generally used for describin...
I want to know what is the cost of running a Windows Application Server. I know the cost of running a Linux server with Java based Application Server is probably zero. What is the cost of running a windows based server on which all Apps are written in C#? I assume is is just the license cost of a copy of Windows Serve...
I've read Franco Moretti's work, but I'm looking for something more technical and perhaps broad in scope, if possible. Specifically, I want to learn about techniques programmers are using to glean information from complex networks, eg clustering. I'd also like to know what are some interesting questions/problems when...
Think in terms of pre-computed lookup tables or something. At what point does it make more sense to use a database instead of hardcoding values in my application? The values are not going to change, and they're nicely segregated away from maintenance developers. 100 values, 1k, 10k, 100k? I'm wanting to store about...
I was studying about the infrastructure being used by Facebook, as I was developing a website based on social interaction for a university project. Facebook is using Tornado Web Server as its scalable, non-blocking web server, but it's written for Python. I'm trying to find something similar for Java: what should I be...
Some tools force developers to adopt a version scheme of a certain form, form instance "major.minor.build.revision", where each field must be a number. How do I fit in betas in there? For instance, what version should I choose for version "2.0 beta2"? Should it be of the form "1.99.x.y" (it's not yet 2.0 stable) or "2....
I'm writing a lot of estimates lately and I'm finding that quite often, a client might argue scope, deliverables or (most often) cost. In an effort to ensure that the breadth of coverage (of client requirements and mutually understood scope) for the estimate is clear (and given most clients will view an estimate as a f...
Something came to my mind today. I have been doing a lot of the following new Object().doSomething(); I create an object and call on of its functions, then forget about the object. I don't need it past this one instance. Does this signal a bad coding style. Is it best to convert these methods to a static function so a...
Last night I was discussing with another programmer that even though something may be O(1), an operation which is O(n) may outperform it if there are is a large constant in the O(1) algorithm. He disagreed, so I've brought it here. Are there examples of algorithms which greatly outperform those in the class below it? ...
I am a beginning programmer and in 5-10 years I'd like to be an expert. I love programming because it is a distinct skill set that you can continually improve on. But then I thought, how can you continually improve? At a certain point, don't you just "know" how to program? I imagine, just like at most things one can be...
I'm aware of a few cases where coders used a pseudonym for attribution instead of their real names. Examples include: Satoshi Nakamoto (Bitcoin) Why (Ruby) One thing I've wondered is if attribution is done via a pseudonym, who owns the rights to the code?
I am developing a website updater. The front end uses HTML, CSS and JavaScript, and the backend uses Python. The way it works is that <p/>, <b/> and some other HTML elements can be updated by the user. To enable this, I load the webpage and, with JQuery, convert all those elements to <textarea/> elements. Once they the...
I have a degenerate string S1=xadcdax, where x can be replaced by any of the four characters a, b, c, or d. This S1 string is match with another non-degerate string S2=dcbaa. I can first use brute force to find all possible strings of S1, which requires 4^n (n is the number of degenerates in a string), so the complexit...
Do you need to learn c or c++ for game programming? I am very good with java. Is it true that most game engines are in c or c++.should i learn c or c++ or start making games in java.Can you suggest some books to start with
Lets say I have an extremely robust and versatile function: void DoAnything(action, target, context) In my program, 90% of the time I call this function, it's with the same parameters: DoAnything(eat, food, lunchtime); Is it bad form for me to define a function such as: void EatLunch(){ DoAnything(eat, food, lunchtime...
When people mention COBOL, it's usually either met with a snort or groan. I don't know much about COBOL, but I've seen some programs written in it. I can see that it's wordy, and to uninitiated eyes such as mine, unintelligible. But, really, aren't all programming languages complete gibberish to a lay person? I underst...
I have seen a tool (Shed Skin) to translate one high-level language to another high-level language. Apart from knowing those languages what are the other areas of technical knowledge required to develop this kind of translators?
Throughout my various workplaces I always wrote code which made me think "this would be really useful in other situations". Indeed, I intentionally write code, even if it takes me longer write, which I know will help me in the future (e.g. custom SubString() functions). A good candidate for these snippets are various...
I've been reading Clean Code and various online articles about SOLID lately, and the more I read about it, the more I feel like I don't know anything. Let's say I'm building a web application using ASP.NET MVC 3. Let's say I have a UsersController with a Create action like this: public class UsersController : Controlle...
Extending the answer to this question, I have broken down a large system into a few classes per package. Each package is now shown in a different page for readability, but now how do I show the relationship of two classes in separate packages (separate printed pages)? An example for clarification: E has an association...
I'm beginning the design stages of a mobile application. I'm looking for knowledge about common practices for user notifications. I understand that the SDK for the device will expose methods which will allow me to notify a user how and when I need it to. What I'm not sure about is how my application gets notified from ...
We're working on a major re-write of a legacy VB6 app, into a WPF app. I've written several WCF services, which are meant to be used with the new WPF app. We want to use the MVVM design pattern to do this, but we don't have experience at that. So, in order to learn MVVM we've watched a video on WindowsClient called ...
Currently, I enjoy my Java 101 class. I have some ideas for apps that I'd like to make and with time and work I think the process of developing an application from the ground up will work out fine. When I get my Java app(s) up and running - will it be easy to find a place where I can offer them for sale? In the Enter...
Basically, I've learned so far that garbage collection erases forever any data structure that is not currently being pointed to. But this only checks the heap for such conditions. Why doesn't it also check the data section (globals, constants, etc etc) or the stack as well? What is it about the heap that it's the only ...
OK, I've learned what a static function is, but I still don't see why they are more useful than private member functions. This might be kind of a newb-ish question here, but why not just replace all private member functions with static functions instead?
Some background: My current job has be as the sole web developer for our company. I have been given responsibility for a number of external websites, as well as our internal intranet site. The external sites are currently hosted externally, and either created/maintained with a CMS, or custom designed by the external h...
Is freelancing in Android development or Web development the better choice to achieve a ~300$ income\month? It is too hard for me to do both. I'm currently studying CS in college and this is my second year. Financially, I'm 100% depending on my parents and this is really uncomfortable for me. My goal is to make at leas...
Recently I found a book, Purely Functional Data Structures and all the examples in this book are given in ML with Haskell versions in its appendix. But I only know one programming language with the functional paradigm: F#. And after a bit of research, I found out that F# is (or was) the .NET port of CAML, which is deri...
Possible Duplicate: Where can I find programming work online? I saw oDesk.com being mentioned in one thread here for contract work and freelance work, and the people listed for hire is asking for $15/hour and up to $80 or $100/hour -- of the ones that I saw for development jobs. I wonder what alternatives there are...
Why do software companies use download wizards for large files instead of letting users download the file directly? Is it so the user does not get discouraged by the waiting time, or is it something else?
What's the best way to store 3D point cloud data, optimising for time it takes to find all the points in a sphere of 3D space, and also for time it takes to insert new data points into the data set? Background: I have a cloud of 3D point data (with each point also including some further attached data), and need to be a...
As I understand it, abstraction is the term we use for when more meaning is created out of something simpler without altering it. It is derived from the latin verb abstrahere (to ‘draw away’). For instance, text is just one abstraction of binary data—as are bitmaps. So, in computers, text and bitmaps exist on top of (a...
So I am trying my hand at this whole tiered application thing with ASP.NET 4. The software I've developed is a maintenance nightmare and it isn't very well organized. I've done some looking around the web and can't seem to find an example of what I'm looking for here. Someone please pick this design apart. My Data A...
I was under the impression that the concepts of time and memory complexity are a must for graduates of compsci courses, but having studied engineering I have no knowledge if that is the case. I have recently been surprised to interview some graduates of a local college that do not even know the concept. I guess my ques...
I know you can use C# and F# together in the same project however I'm not sure if its a good idea to do so. It seems to me that mixing two very different coding styles (functional vs OOP) could cause a lack of cohesion in the design. Is this correct?
When I was deciding how to go about learning to design PHP web applications, it made sense to sort of shoot toward the middle and go with Zend Framework so that I could be closer to the lower level, but I would be able to get down to business fairly easily, too, while learning about design patterns, etc. That seemed to...
I am working on the application which in near future (hopefully) will have to process tens or hundreds of thousands of items (item is currently one row in relational database table) per second. If I understood it right NoSQL databases are superheroes of data retrieval thanks to map-reduce magic. But will NoSQL database...
Ya !! you can say "out of work" people have these thoughts, but then, what can one do :-P . My question is somewhat deep thought. How can someone evaluate himself as a developer and manager to understand whether or not, he is fit for starting a commercial venture on his own. Starting a development company doesn't need...
Introduction An Adapter normally wraps another object, so that it can be used in an interface it wasn't designed for, e.g., when you want to use interface Node { Node parent(); Iterable<Node> children(); } together with class TreeModel { private Node root; // example method (stupid) Node grandparen...
Well, I know that there are things like malloc/free for C, and new/using-a-destructor for memory management in C++, but I was wondering why there aren't "new updates" to these languages that allow the user to have the option to manually manage memory, or for the system to do it automatically (garbage collection)? Somew...
Given a particular third-party class/library you want to make use of, the simplest thing to do would be to just hardcode API calls to it through your application. On the other hand you have the possibility of defining a interface that generically dictates what you want -not how-, and then follow the Adapter pattern to ...
It seems to me that everything that can be done with a stack can be done with the heap, but not everything that can be done with the heap can be done with the stack. Is that correct? Then for simplicity's sake, and even if we do lose a little amount of performance with certain workloads, couldn't it be better to just g...
Being new to Java I'd like to use the following scenario to steer my learning and could use some advice! First I want to build a Java server app that handles login and client settings, and based on client info pulls up random database entries and sends these random entries to the client on a timer. This must work for ...
I'm thinking of using TFS Build workflows for complex deployments. We have some that may need to deploy: Web applications and services Database SSRS Reports SSIS Packages Who knows what else I like the fact that I can give the workflow some basic parameters like which build to deploy and it would just run. Potentiall...
Do any languages really need garbage collection? Is there not a way to figure out when a object should be destroyed? I haven't had leaks in C++ and i dont use smart pointers or reference counters or anything special. I confirm this by attaching something for leak detection: whether its built in to the IDE or a header t...
If you find out a way to interact with a web service API that is not publicly documented as available, and can emulate it within an application you develop, is it illegal to do so? Furthermore is it illegal to charge for a product that you build to interact with these services (maybe all that's needed is a reference t...
While I am studying for job interview, I got this kind of OOD questions a lot. But from my TDD perspective, I think it would be reasonable to ask more about use-cases of (or requirements for) the Car. Otherwise, there are tons of way of designing car. Am I missing something here? How would you handle this sort of inter...
I've asked a very similar question few days ago, but because I presented too much of my company's current situation, most answers focused completely on something that I wasn't looking to answer. So I wanted to try again... Given just about any agile team, you always have people with varied a) knowledge of the product ...
Regular expressions are powerful tool in programmer's arsenal, but - there are some cases when they are not a best choice, or even outright harmful. Simple example #1 is parsing HTML with regexp - a known road to numerous bugs. Probably, this also attributes to parsing in general. But, are there other clearly no-go a...
First, unless anyone has better definitions, let's define "back end" and "front end" according to their usage here: Is it common to separate back-end and front-end into two positions on web development projects?. How common is it to find programmers exclusively assigned to back end or front end roles on a team? What's...
I've noticed on MySQLWorkbench that you can choose how to store your indexes before forward engineering your design. The storage types are: BTREE RTREE HASH Researching this, I found some information that was pretty much over my head, so I'm looking for practical information on what the difference is between these an...
In relational world we have Foreign Keys to reference other entities. But how do document-oriented databases like MongoDb, CouchDb, RavenDb implement references among entities? Update. StackExchange related example. We have Question entity and its tags. Each tag, is a separate entity so it has its properties (for examp...
I have heard people say that variables should be declared as close to their usage as possible. I don't understand this. For example, this policy would suggest I should do this: foreach (var item in veryLongList) { int whereShouldIBeDeclared = item.Id; //... } But surely this means the overheads of creating a new i...
This is actually somewhat related to the question I asked yesterday about why both a Stack and a Heap are necessary in the applications we use today (and why we can't just go with a Heap instead of both, in order to have a simple & singular standard to go by). However, many of the responses indicated that a Stack is ir...
I'm creating a system where items will have one or more tags. Now there will be an item table that will store each item, and a tags table, that will store all tags used in the system. My question is: What is the best design I can have that will allow me to link items to their respective tags, and record how many times ...
I've been introduced to Computer Science for a little over a year now, and from my experience it seems that C and C++ are both considered to be "ultrafast" languages, whereas others such as Python and such scripting languages are usually deemed somewhat slower. But I've also seen many cases where a software project or ...
So I've kind of been getting angry about the current position I'm in, and I'd love to get other developers' input on this. I've been at my current place of employment for about 11 months now. When I began, I was working on all new features. I basically worked on an entire new web project for the first 5-6 months I was ...
I do line of business apps where the all the other developers are used to doing basic CRUD apps or are focused solely on making pretty/functional interfaces and I am getting the following a lot. "With the way we use to do it Employee would have all the things you could possibly do with an employee." And it was true. T...
I'm currently reading a book, chapter about I/O, and one question came to my mind. Basically, when you program in C/C++, you have an amazing opportunity to optimize for hardware behavior. Using buffering for block devices, use streaming and async I/O for high latency network devices and so on. And if you're writing a s...
When you recommend updating jQuery/jQuery UI? Or in other words: what are the best practices for updating jQuery/jQuery UI? I’m working on a long project that will take at least one more year. In that time span, I’m sure that jQuery/jQuery UI will be updated many times. Do you recommend update my jQuery/jQuery UI files...
Just a quick question, but why are there so many file systems still competing and in use today? (ntfs, fat32, ext3(ffs), etc) It seems that file system designers could agree upon the best aspects of each type of system and implement a "best" filesystem, no? Just a thought, since these filesystems have been around for a...
There is always a debate over the topic - "Whether to put the business logic in Stored Procedure or Not?". If we decide not to use the ORM Tool and not to put the Business Logic in Stored Procedure then where would we put the Business Logic? In my previous applications I have always preferred putting all of the Busines...
Is there an exact, but simple and understandable defintion of the distinction between "use case", "User Story" and "Usage Scenario"? there are quite a bunch of explanation, but right now, I see no one that explains the differences in a single sentence, or two... (e.g. http://c2.com/cgi-bin/wiki?UserStoryAndUseCaseCom...
As an expansion from my previous question about using separate projects for seperate layers - Good practice on Visual Studio Solutions I now wish to know if I am putting the right functionality in the correct layers. Background I'm building a WPF application from scratch, that contains business logic and business objec...
In language like C or Java, there are things like functions/methods to modularize and abstract stuff. What is there in SQL, specifically for Oracle? I've seen people talking about using views to reduce the complexity in various blogs but there is only so much that can be done with a view. (For example, a bind variable ...
I'm using xml to store cross-program information. This information is used in some webpages and in C# programs. When the information is altered, these alterations are not displayed right away in the webpages, they keep on displaying the information saved in cache, it takes a few refreshes for the webpage to show these ...