instruction
stringlengths
34
19.9k
This question is inspired by this one. What was the initial goal of inventing SOAP? Why was it invented when we had old kind HTTP and REST?
I am building a web application and users will be able to upload pics. And I want to store these images into files instead of storing them into the DB. But if I saved these pics into relative paths to the web application, they will be removed with each build. So how I can handle this and the best practices related to t...
I started an open source project in 2010 and the project is gaining some visibility. We are now 2 active committers and we hope to engage more contributors in the future. We received today the second offer to "partner" with a company. This time is a hosting company that wants us to offer a hosting plan with a automatic...
In a simple application I am creating there are Admin and users where admin can create users. Right now I am creating Classes that encapsulate database CRUD calls with methods. For example: adminStore.CreateUser(userObject) will persist that user object into the Database and return the object. I am now confused as to w...
I am sorry if this a wrong place to ask the question. I saw the usage "Teardown report" for a product What does it mean?
There is a technique in which you don't end the response and this allows you to send content to the client in chunks like pieces of javascript or maybe xml document that can be parsed on the client side and give an effect of updating something in real time instead of polling the server again and again. Was there such a...
We're currently modifying out development process and I'm wondering if we should try to keep a 100% of our commits peer reviewed. What is your experience regarding code reviews? Do you tend to spend "a lot" of time on them (say 1/2 hours per day), or just skim over for 5/10 minutes max? Do you have a fixed amount of ...
If you've planned a number of user stories for a sprint and one candidate story is dependent on some external provider delivering something to your team. For example an online service provider adding a new API call to their system or enabling your test account on their system or suchlike. You know it's coming 'soon'....
People who are used to garbage collected languages are often scared of C++'s memory management. There are tools, like auto_ptr and shared_ptr which will handle many of the memory management tasks for you. Lots of C++ libraries predate those tools, and have their own way to handle the memory management tasks. How much t...
I'm not sure if this a common scenario or not, but I have a need along the following lines: I have an object (I'll call it node) and this object has methods X, Y, and Z. I want to be able to have subscribers be notified if the methods are called in a specific order with specific timing (a range of time would be ideal)...
Two part question: I am working on a project where the webservices all return a generic object. On success, that object then contains the data returned from the webservice along with additional information such as status messages or qualifiers. On failure, the object contains no data and error messages. What is the na...
Agile software development relies heavily on a work item type called user stories. For example, you have a backlog full of user stories and you can select a few of them to work on during the next sprint. But where and how do you find user stories to put into the backlog? There is a popular technique for doing that ca...
From time to time, I'll have a class in Java that takes a multitude of parameters, however, sometimes when I am creating an object of this class, I don't need to use all the parameters. As of now, I usually set the parameters to null or 0 depending on the type. However, would it be easier if I just created chained me...
Consider a Python class with a number of @staticmethod methods and few instance methods. The static methods don't accept an instance of the defining class as parameters. Do you think that all these static methods don't belong to the class and should be factored out? If yes, which approach would you take to clean up su...
It seems that frequently in large projects the software is still released with the bug tracker full of bugs. Now I can understand feature requests, but several times I've seen large numbers of bugs still unresolved, not reviewed, or not finished but a release is still pushed out. Why? Why would an open source project ...
Two things I've noticed in the past week that make me wonder: An interview where my Perl skills were reviewed. I always use C-style for loops and use map about once in every 10,000 lines of code, so I almost always have to reference it before using it. While I can interpret others code using that, it's not my style an...
Maybe someone can share from his experience about developing an application that is meant to scale big time where just throwing more money at better hardware isn't a realistic option using development methodologies such as SCRUM and XP. Did you need to rewrite substantial parts of your app because of current framewor...
My programming classes in school were C++, but I ended up working a job doing C# for the last few years. If there was a position that required say 1 or 2 years experience in C++, would my experience in C# be worthy of consideration? How effective could I be in such a position? So do I need to start out as an entry-leve...
We have a system here. Recently there is a wrong calculation in one of the number in the report generated by the system. Through out our experience, we've never encounter any problem/error in this system for some years. Because the writer of this system had already gone, we can hardly trace the programs. But we've veri...
I learned some javascript as my introduction into programming, and now I'm trying to move on to Java and Python and from there to c++, c#, etc. I've been caught up with schoolwork, so I've had very little chance to learn anything yet, but I have been lurking around SO looking for easy Java questions that I might have ...
We've built up a substantial number of unit tests for our main program over the years. Several thousand. The problem is that we don't have a clear idea of what tests we have because there are so many. And that's a problem because we don't know where we're weak on tests (or where we have duplicates). Our app is a report...
Unfortunately, somebody has taught our upper management the word "Agile" and now they want us to move towards it. I have a peripheral understanding of agile (in principle) but have never used it in practice. From what I know, it will not be a good fit for our organization. Right now, things are pretty grungey. Here's h...
It's not really a technical question, but there are several other questions here about source control and best practice. The company I work for (which will remain anonymous) uses a network share to host its source code and released code. It's the responsibility of the developer or manager to manually move source code ...
I currently have a project at my hand that I'll leave soon (PhD work) and should be left in an understandable form since it is likely to be taken up, though it is not known yet by whom and when. Therefore, I'd like to leave at least some documentation how it is built. The project consists of 7 packages, each of which i...
Most (all?) TDD resources show you how the cycle goes: Write Test Check Test Write Production Code Check Test Clean up Production Code Check test They also - to me - seem to imply that all code is covered by tests. However, reading posts like Writing Great Unit Tests: Best and Worst Practices (for example, linked to...
On my current project we have two or three engineers who are tagged as Tier 2 or Tier 3 support. We often work directly with customers to gather detailed information about bug and issue reports. Frequently we get cross-talk in the email threads and conversations about issues. While discussing Issue #1, someone pipes up...
Well... I was hired because I did not take a comp-sci or engineering course, however I was really good at coding. My job is doing the heterodox stuff when needed... You know, the guy that sometimes has to use a goto, or invent some bizarre technology. When I started my job, I blasted though stuff I needed to do, then I...
Preferably something that is a combination of affordable and close to real world robotics programming and will allow me to program it with C++.
I'm starting at this new company as a scrum master, and they want to dive into Scrum, which is nice and all, but they only have enough people (4) for one team. The road map includes delivering a new product and maintaining the old one, so what should we do? 2 products backlogs for 1 team? How should we do planning in ...
What is a good attitude from developers when discussing new features, and namely, non critical/questionable features? Say you are developing some sort of Java like language, and the boss says: "We need pointers so that developers could fiddle with object memory directly!" Should the developer shoot down the idea becaus...
What factors should be evaluated when determining a desktop software price?
In the book "Hard Code" by Eric Brechner, he states, Lying is one of a handful of valuable process canaries that can warn you of trouble. I've heard a dev or two toss around the old "canary". What is it? [Google didn't answer it for me. Perhaps my keywords were a poor choice.]
I recently had to investigate a field issue for our large enterprise application. I was horrified by the logs that I had to comb through in an attempt to find the problem and at the end of the day the logs did not help at all identifying/isolating the bug. Note: I understand not all bugs are discoverable through logs....
I sometimes hear that having too many "manager" classes in your program's design is code smell and add an unnecessary layer of complexity. To me it makes sense that people want to use manager classes for manipulating and controlling objects from a context that makes sense to them, but figuring out how to make a solutio...
I have a multi tenant ASP.NET MVC website and all client specific text is stored in resource files. Every time someone wants to change text I have to jump through hoops and fill out forms and let someone else put it in production. This was fine with 2 clients, but now we have 6 and are looking to roll out to 40+. I ...
When starting a new project, my boss always avoids to make fixed decisions. He is usually saying: ok, just start to write something and be as generic as possible. When you're finished we look how we continue. His argument is basically that you never know and "agile development". To keep the question as generic as possi...
These two words are completely synonymous for me, but I wonder if there's actually a useful semantic difference that I can incorporate into coding/naming conventions/process.
Boost has recently become available on the project on which I'm working, and I don't have much experience with it. The library has so many parts and features that it's hard to know where to get started in learning it - especially since I'll be trying to learn it while making production code (so it can't slow me down to...
The kind of OpenGL windowing that I refer to is like GLFW, GLUT, SDL, etc. Imagine three C++ programs: (ignore syntax) Game A: class Game resize() keyEvent() Game B: resize() keyEvent() Game C: class Key event() class Display resize() In A, everything is in one class, in B nothing is in a class, and ...
It's time. You've worked long and hard to add your vision to the open source project you love, on which you've worked, debated, and to which you've contributed inestimable amounts of code and insight. But it's not going to work out with the existing developers. You finally need to fork the code. How do you do this and ...
Here's the syntax for iterators in Java (somewhat similar syntax in C#): Iterator it = sequence.iterator(); while (it.hasNext()) { System.out.println(it.next()); } Which makes sense. Here's the equivalent syntax in Python: it = iter(sequence) while True: try: value = it.next() except StopIteratio...
I do contract development on the side. You could say that I'm a contract developer? Considering I've only ever had one client I'd say that's not exactly the truth - more like I took a side job and needed some extra cash. It started out as a "rebuild our website and we'll pay you $10k" type project. Once that was comple...
Why is Swing preferred over AWT? Which Swing component could be used for playing a video on it?
What is the benefit of studying bitwise operators (Bitwise Not, Bitwise AND, Bitwise OR, Bitwise XOR, Left Shift, Signed Right Shift, Unsigned Right Shift etc.)? Will we really use these operators in programming?
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 ...