language-agnostic

What advantages are there to programming for a non-cache-coherent multi-core machine?

What advantages are there to programming for a non-cache-coherent multi-core machine? Cache_coherence has many benefits, but how would one take advantage of the opposite of this feature - an independent cache for each individual core. What programming paradigm and to what particular practical problems would such an architecture be benefi...

Cost, schedule, quality: pick two

We have heard the adage, "Cost, schedule, quality: pick two." It has been my recent experience on big government projects that quality often suffers due in part to schedule constraints. In fact, sometimes project managers choose schedule with little apparent regard to quality and sometimes little regard to cost. Are you asked to compr...

Has anyone found a code kata for web development?

Jeff Atwood and Robert "Uncle Bob" Martin have both blogged about the virtues of code katas. I was wondering: Has anyone found a code kata for web development? I'm currently develop websites with ASP.NET, ASP.NET-MVC, and jQuery; but I suppose that a good web development code kata could be language-agnostic. A good web deve...

Is it better to rewrite inherited code than fix it?

Possible Duplicate: When is it good (if ever) to scrap production code and start over? Say you have been given a project, and you look at the code. Although it works, and is functional, you realize that to make future changes it would be easier to rewrite a large portion or all of the code. Is it better to do the rewrite? If it ...

Algorithm to swim like a fish in c#

I need to implement a feature in my application where these words are going to "swim" around in the background, basically I need to pick a point in front of the leading letter of the word, and swim to it using a "wavey" style. I also need to avoid the walls, so it turns in time, among other 'fish like' behaviors it needs to implement. ...

Is the ability to recurse a function of the processor or the programming language/compiler or both?

Is the ability to recursively call a function a capability inherent of the processor or the programming language/compiler. Perhaps, both need elements to support recursion? I've always been under the impression that the ability to recursively call a function is purely implemented in the programming language and how it lays out its runti...

How do you make mathematical equations readable and maintainable?

Given maths is not my strongest point I'm implementing a bezier curve for 3D animation. The formula is shown here, and as you can see it is quite nasty. In my programming I use descriptive names, and like to break complex lines down to smaller manageable ones. How is the best way to handle a scenario like this? Is it to ignore progra...

Function approximation

I have a function, P(x0, x1, ..., xn) that takes 100 integers as input and gives as output an integer. P is a slow function to evaluate(it can range from 30 seconds to a couple of minutes). I need to know which values of points will maximize the yielded value from P. What techniques can I use to accomplish this? I know generally peop...

Is using an if() ... return an accepted practise ?

Is using an if coupled with an immediate return like in the example below an acceptable practise instead of having a if with a block of code inside {} ? Are these equivalent in practise or is there a disadvantage to one of the approaches ? An example in Java: protected void doGet(HttpServletRequest request, HttpServletResponse response...

Merge several regexes to a single one

I have several regexes (actually several thousands), and I must check if one string matches any of these regexes. It is not very efficient, so I would like to merge all these regexes as a single regex. For example, if a have these regexes: 'foo *bar' 'foo *zip' 'zap *bar' I would like to obtain something like 'foo *(bar|zip)|zap *ba...

Where can I find statistics on OS usage?

I am trying to decide whether it is worth it or not to put in the time to make an app work on Windows 2000 and/or Windows 98, so I'm curious to find out how many people are still using these operating systems. Thanks, as always. ...

Would you feel offended or upset if another developer ran a code beautifier on the code base?

I am working on a project which other developers work on. I would like the code to be standardized. I don't necessarily care what standard it is (K&R, GNU, 2 lines max, 1 line max, spacing between commas, etc..) just that it is consistent. I was thinking, that as a separate checkin, I could run a beautifier on the source code. What do ...

Looking for novice book on combinatorics

I am looking for books on the math & computing applications of Combinatorics. Let me know your favorite books on this topic. Thanks. ...

Preferred implementation of '<' for multi-variable structures

Initially this may seem overly abstract or philosophical, but I am genuinely interested to see if someone has a convincing argument in favor of one implementation over the other. Given operator< for std::pair<T1, T2>, which would be the better implementation: return x.first < y.first || x.first == y.first && x.second < y.second;...

Inspiration on how to build a great command line interface

I am in the process of building interactive front-ends to a distributed application which to date has been used to run workloads that had a batch-job like structures and needed no UI at all. The application is mostly written in Perl and C and runs on a mix of Unix and Windows machines, but I think this isn't relevant to the UI. The firs...

Best way to test for total reachability

I have a set of nodes, each of which is connected to at least one other node. I would like to know if the connections are such that each node is reachable from every other. For example: 1--2 | 3--4 Versus: 1--2 3--4 I am convinced this kind of reachability testing can be projected in terms of an exact cover problem, however I c...

Should I obscure primary key values?

I'm building a web application where the front end is a highly-specialized search engine. Searching is handled at the main URL, and the user is passed off to a sub-directory when they click on a search result for a more detailed display. This hand-off is being done as a GET request with the primary key being passed in the query string. I...

How to find Eulerian paths using the cycle finding algorithm?

I'm trying to understand the algorithm described here, but the explanation really isn't very clear: 'tour' is a stack find_tour(u): for each edge e=(u,v) in E: remove e from E find_tour(v) prepend u to tour to find the tour, clear stack 'tour' and call find_tour(u), where u is any vertex with a non-zero degree. Wha...

Difference between concurrent programming and parallel programming

Hi all I have a question: what is the difference between concurrent programming and parallel programing? I asked google but didn't find anything that helped me to understand that difference. Could you give me an example for both? For now I found this explanation: http://www.linux-mag.com/id/7411 - but "concurrency is a property of the ...

Stages in the application development process

I've heard terms like "deployment" and "production" applied to the development process. What are the usual stages and what do they involve ? ...