language-agnostic

Program Deployment and Cloning Environment

Hi... I'm developing a java program on my machine. When I want to test, I first try small test cases on my machine but then I want to run this program with real data. A small test would be to look at one file from the linux kernel and a "real" test would be to look at an entire kernel... But I would like to run multiple "real" tests at...

Do we really need NULL?

Is there an actual need for NULL or not? In most of the OO languages i have programmed in there has always been a way to set a variable to a NULL value which lead to all sorts of funny problems. What are your thoughts? ...

Astar-like algorithm with unknown endstate

A-star is used to find the shortest path between a startnode and an endnode in a graph. What algorithm is used to solve something were the target state isn't specifically known and we instead only have a criteria for the target state? For example, can a sudoku puzzle be solved with an Astar-like algorithm? We dont know how the endstate ...

How do you manage non-user facing work in a strict scrum shop?

We're a medium sized engineering shop (10-20). We are great at prioritizing and structuring work on our user facing stories and making customers happy. But the cobbler's children have no shoes. If it isn't about customers, we have 0 process. I'm looking for systems to ensure we correctly prioritize and accomplish the non user facing wo...

Value of computer science degree versus "practical" programming skills???

Duplicate: Is there any need to get a Computer Science degree?; Am I too young to be worrying right now?. I am currently a senior in high school and will be attending college (Cornell University) next year. Cornell happens to have a very highly regarded computer science department. From what I understand from current students and...

OOP: good class design

My question is related to this one: Python tool that builds a dependency diagram for methods of a class. After not finding any tools I wrote a quick hack myself: I've used the compiler module, I've parsed the source code into an Abstract Source Tree and I've walked it to collect dependencies between class methods. My script generated an...

Generating Professional Graphs In Windows

In Windows, I am looking at generating professional graphs using any mainstream programming language (C#, VB.Net, Java, PERL, etc). The best free looking graphs I have found so far is Microsoft Chart Controls for .NET. What other graph controls/modules do you suggest? Note: Added free to the requirements. ...

Splitting Probabilities

I've the following code in PHP which works fine (returns more or less 10 results each time it runs): function GetAboutTenRandomNumbers() { $result = array(); for ($i = 0; $i < 240; $i++) { if (Chance(10, 240) === true) { $result[] = $i; } } echo '<pre>'; print_r($result); echo '</pre>';...

"Diffing" objects from a relational database

Our win32 application assembles objects from the data in a number of tables in a MySQL relational database. Of such an object, multiple revisions are stored in the database. When storing multiple revisions of something, sooner or later you'll ask yourself the question if you can visualize the differences between two revisions :) So my q...

Are there any other uses for Perlin Noise besides the obvious?

I have been looking into different algorithms lately and have read quite alot about perlin noise. It seems like the only thing people use it for is to generate textures (clouds/wood grain) or to distribute trees. What else can Perlin Noise be used for? ...

Google Code Search-like source code indexer and visualizer

I'm looking for a way to search through our subversion repository or just packaged source code. Are there any downloadable servers/tools like Google Code Search to index source code (preferable with support of version control systems like svn) and allow us to search in it? Is there any tool that will index documents too? ...

Shortest distance between a point and a line segment

I need a basic function to find the shortest distance between a point and a line segment. Feel free to write the solution in any language you want; I can translate it into what I'm using (Javascript). EDIT: My line segment is defined by two endpoints. So my line segment AB is defined by the two points A (x1,y1) and B (x2,y2). I'm try...

What do you do for inspiration when you get programmers block?

Hitting the wall is an inevitable part of all creative processes, and programming is no exception. I've found that playing with Lego can give me a break from code, without a break from being creative or constructive. I'm curious to know what other people find useful. (I know this is subjective, but I'm genuinely curious, please don't ...

Practical tips debugging deep recursion?

I'm working on a board game algorithm where a large tree is traversed using recursion, however, it's not behaving as expected. How do I handle this and what are you experiences with these situations? To make things worse, it's using alpha-beta pruning which means entire parts of the tree are never visited, as well that it simply stops r...

Should I try to publish a book or write a blog?

I've got an idea for a book, and I think I could flesh out about 200-300 pages including code examples. I'd like to give back to the community from which I've gleaned so much information over the last couple of years, and I'd like to make a small amount of money to cover the free time I spend writing. I'm trying to decide whether I shou...

Monitoring system for build, source control and integration servers

Do you know about any lightweight system that will monitor servers in terms of disk space, CPU usage, uptime/availability? I'm talking mainly about DB, Subversion, Hudson, integration, qa and build servers. All the advanced server monitoring tools are very hard to configure and use. So I'm looking for something simple. Open source tool...

How do I calculate the likelyhood of a collision using md5?

I have keys that can vary in length between 1 and 256 characters*; how can I calculate the probability that any two keys will collide when using md5 (baring a brute force solution of trying each key)? * the character set is restricted to [a-z.-] ...

Good programmer is the one that put code into production?

Recently I found on a blog this: " So I changed my mind and now my single reason that identify good programmers is “A good programmer is the one that put code in production” it means that good programmers makes programs that works and works for long time. Surely I really think that with DI, IoC, AOP you can create bette...

How to modify map element key

I have a container that holds map of elements. class MyContainer{ ..... Map<String,MyElement> elements = new ... ... } Each element has name property. The key in the map is the element's name. i.e. the method insert is as follows: void addElement(MyElement elem){ elements.put(elem.getName,elem); } I need to use the map data s...

Suggestions for implementing a very simple updater that checks for a new version

I want to add a very very simple auto updater to my apps. I want to start with the simplest thing that'll work. Any suggestions of how to do this? Any suggestions of improvements (or an alternative) to the option below? Here's one option I'm considering. App displays a form that offers to check for a new version, with option to ...