language-agnostic

How does your favorite language handle deep recursion?

I recently started learning Python and I was rather surprised to find a 1000 deep recursion limit (by default). If you set it high enough, about 30000, it crashes with a segmentation fault just like C. Although, C seems to go quite a lot higher. (The Python folks are quick to point out that you can always convert recursive functions t...

To Buy or To Build That is The Question

We've been specifying a rather large app for inventory management and customer sales. The scope is pretty large and the cost of development is making the suits nervous. I've been contending that it'll be just as painful to buy an app and try to customize it or worse yet, change our business to fit the software's capabilities. What are...

What are good sites for free sounds that developers can use in applications?

So far I have found: http://www.soundsnap.com/ ...

Ignore pattern for eclipse workspace

Do you have a good ignore pattern for svn, git, etc. that handles an eclipse workspace? I want to version handle all projects in the workspace. It has to ignore all the eclipse configuration, compiled files, and output folders. ...

What have you done to customize your IDE?

What tweaks / addins / themes do you have rigged up to make your IDE awesome? For example, in Visual Studio I color themes, CodeRush draws lines between braces, I always install and use the Consolas font and I have it setup to sync my settings across computers for when I change hotkeys and whatnot with the help of FolderShare. Also, th...

Tech Books you have but never read

Let's be honest. Many of us have books that were bought thinking "I might need this some day". That day has never come. Or maybe you spent $50+ on the book but only used it a few times. Or you bought it thinking it was the current technological trend. Post your list of books that you have but have never read, let alone used for a proj...

Upper vs Lower Case

When doing case-insensitive comparisons, is it more efficient to convert the string to upper case or lower case? Does it even matter? It is suggested in this SO post that C# is more efficient with ToUpper because "Microsoft optimized it that way." But I've also read this argument that converting ToLower vs. ToUpper depends on what you...

How do you handle one-off requests from customers?

Often, customers will request specific functionality that doesn't really fit into the existing system and probably will only get used by the specific customer. For example, there is a web application that functions as a portal for many different organizations. Say there are 15 organizations that all use the same underlying code, but ha...

The Halting Problem in the Field

When have you ever personally come upon the halting problem in the field? This can be when a co-worker / boss suggested a solution which would violate the fundamental limits of computation, or when you realized yourself that a problem you were trying to solve was, in fact, impossible to solve. The most recent time I came up with it was ...

UNIX vs Windows memory deallocation

My understanding is that in unix, when memory is freed, the memory doesn't get returned back to the operating system, it stays in the process to be used again for the next call to malloc. On windows, I understand that the memory actually gets returned to the operating system. Is there any big difference between these two ways of doing ...

Manual vs. Automatic Memory Management

Do you prefer malloc and free / new, delete, etc... or do you prefer your language to have garbage collection? Why and why not? Do you have any proof besides your own reasoning about why your method is better? ...

Can garbage collection coexist with explicit memory management?

For example, say one was to include a 'delete' keyword in C# 4. Would it be possible to guarantee that you'd never have wild pointers, but still be able to rely on the garbage collecter, due to the reference-based system? The only way I could see it possibly happening is if instead of references to memory locations, a reference would be...

Why do software engineers hate writing documentation?

I ask because I quite enjoy it! I'm talking about design documentation and implementation notes (NOT user manuals), which are non-existent in most of the codebases I've been handed. I can understand why a developer wouldn't want to write requirements (that's the analyst's job) or the user documentation (that's a technical writer's job) b...

Capturing system command output as a string

Perl and PHP do this with backticks. For example: $output = `ls`; This code returns a directory listing into the variable $output. A similar function, system("ls"), returns the operating system return code for the given command. I'm talking about a variant that returns whatever the command prints to stdout. (There are better ways ...

How is the photoshop cutout filter implemented?

Photoshop has a lot of cool artistic filters, and I'd love to understand the underlying algorithms. One algorithm that's particularly interesting is the Cutout filter (number 2 at the link above). It has three tunable parameters, Number of Levels, Edge Simplicity, and Edge Fidelity. Number of levels appears to drive a straightforward ...

Code Golf: Factorials

Since the palindrome code golf was a big hit, here is one that doesn't rely on built in functions. What is the shortest (in characters) way to write a factorial function? ...

Worst UI You've Ever Used

What is the worst user interface you've ever had to use? One that made you want to somehow locate the creators over the internet, personally fly to their location, and then beat them severely with a large trout. What made it so terrible? Was it too many screens, ill-marked buttons, or just really annoying dialog boxes showing up everyw...

What is the best UI you've ever used?

What is the best user interface you've ever used? One that made doing your task a pleasure, that was perfectly designed for the task it was intended for and facilitated doing it with ease. One that made you want to somehow locate the creators over the internet, personally fly to their location, and then hand them a large pile of money. ...

When have you used dynamic programming in the field?

When have you ever directly applied the concepts of dynamic programming to solve a problem in the field? It's sometimes not evident how it can be applied when using it to solve a made-up instance of the knapsack problem. ...

Proprietary system documentation 'leaks' and how to stop them?

The ability to use BitKeeper free of charge had been withdrawn by the copyright holder Larry McVoy after he claimed Andrew Tridgell had reverse engineered the BitKeeper protocols in violation of the BitKeeper license. At Linux.Conf.Au 2005, Tridgell demonstrated during his keynote that the reverse engineering process he had used was s...