language-agnostic

pass by reference or pass by value?

When learning a new programming language, one of the possible roadblocks you might encounter is the question whether the language is, by default, pass-by-value or pass-by-reference So here is my question to all of you, in your favorite language, how is it actually done? and what are the possible pitfalls? your favorite language can, of...

What is Test Driven Development (TDD)?

What is TDD (Test Driven Development) Please include both benefits and drawbacks, as well as tools for your taste....

How to contribute code back to an Open Source project?

If you're following an Open Source project and would like to contribute code changes, what will you need to do?...

List of the top Programming "shows"

When I started with .net I really got into podcasts/screencasts as it's an engaging way to learn and it's nice to hear other people passionate about software. So what can everyone contribute to this list? Hopefully this will turn into a nice list so others wont have to go rummaging around as much. I'll start by posting my two fave ones, ...

How to transition to Functional Programming

It seems that the next major transition / fad will be towards Functional Programming. What resources / experiences are you finding necessary to grok functional programming?...

Binary file layout reference

Where are good sources of information on binary file layout structures? If I wanted to pull in a BTrieve index file, parse MP3 headers, etc... where does one get reliable information?...

Best self-balancing BST for quick insertion of a large number of nodes

I've been able to find details on several self-balancing BSTs through several sources, but I haven't found any good descriptions detailing which one is best to use in different situations (or if it really doesn't matter). Specifically, I want a BST that is optimal for storing in excess of ten million nodes. The order of insertion of the ...

What are some good resources for learning threaded programming?

With the rise of multicore CPUs on the desktop, multithreading skills will become a valuable asset for programmers. Can you recommend some good resources (books, tutorials, websites, etc.) for a programmer who is looking to learn about threaded programming?...

What are some web-based knowledge-base solutions?

I've used a WordPress blog and a Screwturn Wiki (at two separate jobs) to store private, company-specific KB info, but I'm looking for something that was created to be a knowledge base. Specifically, I'd like to see: Free/low cost Simple method for users to subscribe to KB (or just sections) to get updates Ability to do page versionin...

Version Control. Getting started...

So I know I need to implement version control, even for just the developing I do at home. My issue is I have read about how great Subversion is for the past couple years. I was about to dedicate myself to learning this on the side. But now I am starting to read about Git being the up and coming version control system. So should I hol...

How can you tell when a user last pressed a key (or moved the mouse)?

In a Win32 environment, you can use the GetLastInputInfo API call see msdn doc. Basically, this method returns the last tick that corresponds with when the user last provided input, and you have to compare that to the current tick to determine how long ago that was. Xavi23cr has a good example for C# at codeproject. Any suggestions fo...

Best ways to teach a beginner to program?

Original Question I am currently engaged in teaching my brother to program. He is a total beginner, but very smart. (And he actually wants to learn). I've noticed that some of our sessions have gotten bogged down in minor details, and I don't feel I've been very organized. (But the answers to this post have helped a lot.) What can I ...

Peak detection of measured signal

We use a data acquisition card to take readings from a device that increases its signal to a peak and then falls back to near the original value. To find the peak value we currently search the array for the highest reading and use the index to determine the timing of the peak value which is used in our calculations. This works well if t...

What programming language do you wish would catch on?

What programming language do you wish would catch on? For me it is these domain driven languages that are useful for creating micro languages in an environment, such as Boo. Please state the reason why do you think so in your replies. ...

How do you typeset code elements in normal text?

Something I've run into posting on SO: when you refer to a function with arguments, what is the best way to typeset it for readibility, brevity, and accuracy? I tend to put empty parentheses after the function name like func(), even if there are actually arguments for the function. I have trouble including the arguments and still feeling...

What methods of caching, other than to file or database, are available?

Currently I know of only two ways to cache data (I use PHP but I assume that the same will apply to most languages). Save the cache to a file Save the cache to a large DB field Are there any other (perhaps better) ways of caching or is it really just this simple?...

[Team] Coding Styles

[Assuming you write code on a team] Does your team actually agree on a coding style standard? Independent of what language you are using, I'm curious to know A) do you agree and B) are the styles something you created as a group or did you decide to use a "third party's" style guide? Our team uses C# primarily, and we've taken to using...

Territory Map Generation

Is there a trivial, or at least moderately straight-forward way to generate territory maps (e.g. Risk)? I have looked in the past and the best I could find were vague references to Voronoi diagrams. An example of a Voronoi diagram is here. These hold promise, but I guess i haven't seen any straight-forward ways of rendering these, yet...

HTTP: How to know when to send a 304 Not Modified response

I'm writing a resource handling method where I control access to various files, and I'd like to be able to make use of the browser's cache. My question is two-fold: Which are the definitive HTTP headers that I need to check in order to know for sure whether I should send a 304 response, and what am I looking for when I do check them? ...

HTTP: Generating ETag Header

How do I generate an ETag HTTP header for a resource file? ...