language-agnostic

Avoiding Language Keyword Conflicts

How do you guys avoid keyword conflicts in your language? For example, I'm creating a class (VB 2008) to hold all the configuration variables for some reports we generate. Naturally, one of the variables is "Date". And of course you can't have anything named the same as a keyword. In VB 2008 you do have the option of surrounding a confl...

How to define the version number of a software?

What is the best method to determine the version number I should use for a software or component? Is there a general rule to set version numbers? I'm pretty sure it is a basic question but I didn't find anything useful after searching a while. ...

How can I convert the decimal representation of an IP address into binary?

Does anyone knows how to convert decimal notation of an IP address into binary form in Java? Please let me know... ...

Skills to look for when hiring a web developer

Want to hire a developer to develop a web app (or SaaS) that allows teachers to create and sell their courses online through the site. Much like ChalkBoard.com What skills should I be looking for in such a developer? Also, what kind of hosting service should I look for since this app would need to be able to handle many concurrent user...

Library for an interactive stats website

How would you go about coding an interactive website to display stats/graphs. Say I wanted to create something interactive for people to look at Stackoverflow stats - something that looks like awstats / google analytics but allows you to drill down to stats/graphs like: All questions: total, by hour of day, by day of week (interesting...

What to teach after Scratch?

My son is enthusiastically programming simple games in Scratch. However Scratch is a very simple programming environment (no subroutines even), and I can see that soon he is going to need to move on to something else. Does anyone know of a good learning language that makes graphics easy but provides "real" programming features like dat...

Why must UI elements always be created/updated from the UI thread?

The title says it all: Why must UI elements always be created/updated from the UI thread? In (almost?) all programming languages UI elements may be safely accessed/modified only from the UI thread. I understand that it's a standard concurrent access and synchronization problem, but is it really necessary? Is this behaviour imposed by th...

Difference between a linear problem and a non-linear problem? Essence of Dot-Product and Kernel trick.

The kernel trick maps a non-linear problem into a linear problem. My questions are: 1. What is the main difference between a linear and a non-linear problem? What is the intuition behind the difference of these two classes of problem? And How does kernel trick helps use the linear classifiers on a non-linear problem? 2. Why is the dot ...

keep great ideas open and prevent theft

Question If you have what you think is a great idea, how do you make your idea open source and ensure that it stays that way? How do you prevent your ideas from getting stolen and patented by someone else? Background I recently had an idea about a programming project that I think could be revolutionary. Being a young programmer I real...

how did female pronouns become so common as gender-neutral in programming books?

NOTE: I think this is a good thing. I've read a lot of computer books, as I'm sure many of you have, and I've noticed that many (far more than half) of these books use "she" and "her" to refer to unnamed programmers/users/etc, rather than "he" or "him". I don't read a lot of other nonfiction, so I can't comment on other subject areas, b...

Standards for System Tray applications

Are there any standards out there for how applications that have a system tray icon should behave? I recently wrote an application that sits in the system tray most of it's life. I handed it to a friend, and her first instinct was to double click the icon to get at the main window (which worked). But this got me thinking. In .NET atleas...

2D smoke/fire/mist algorithm

Where can I find a good algorithm, or where is just a good place to start, to implement real-time, non-interactive smoke or fire or mist, in 2D? I've come across this simple one and this complex 3D one but I was hoping for something in between. Anyone know of any good algorithms? ...

Computing estimated times of file copies / movements?

Inspired by this xckd cartoon I wondered exactly what is the best mechanism to provide an estimate to the user of a file copy / movement? The alt tag on xkcd reads as follows: They could say "the connection is probably lost," but it's more fun to do naive time-averaging to give you hope that if you wait around for 1,163 hours, it ...

command pattern returning status

Once I had a discussion about design, relative to the command pattern. My peer stated that a command object should not return the status (successful, unsuccessful, and why) after the .execute() method is called. The reason is that you should not be concerned if the command gets executed or not, because the command must contain no state. ...

What bizarre averaging algorithm is my bike computer using?

My bike computer can show me various figures such as distance travelled, time elapsed, max speed, average speed, current speed etc. I usually have it set to display the current and average speeds. You can reset the distance and time (both together) at any point; the max and average speeds are calculated since the last reset. The distanc...

What does macro mean?

I have somewhat experience with what people call excel "macros". The vba code that controls the activeX components, right? But I still do not know the true meaning of the term macro :). What kind of code is called macro? Is it something like vba or js implemented into a program? Like vba to excel or vba to autocad or js to flex? ...

Algorithm to determine the effective "phase difference" between two signals with different frequencies?

The quick version: What algorithm could I use to determine the "phase difference" between two square wave signals with different frequencies, if the only information that I have is the time at which each rising edge occurs? The detailed version: I'm working on an embedded software project, and I have run across an interesting proble...

Is there a O(nlog(n)) algorithm for inverting a simply linked list?

In comments to this answer an idea is brought up that inverting a simply linked list could only be done in O(nlog(n)), not O(n) time. This is definitely wrong – an O(n) inversion is not a problem - just traverse the list and change pointers as you go. Three temporary pointers are required - that's constant extra memory. I understand co...

What is Code Coverage?

Hi there , I have 3 questions : What is CodeCoverage ? What is it good for ? What tools are used for analyzing Code Coverage ? ...

In functional list manipulation, what do we call "inserting something between each item"?

Occasionally I find I need to process a list by inserting a new item after each item, except the last one. Similar to how you might put a comma between each item of a list of strings. I got fed up of coding the special case for the last (or first) item every time, so I captured the pattern in a Linq-style extension: public static IEnum...