language-agnostic

Should implicit octal encoding be removed or changed in programming languages?

I was looking at this question. Basically having a leading zero causes the number to be interpreted as octal. I've ran into this problem numerous times in multiple languages. Why doesn't the language explicitly require you to specify octal with a function call or a type (in strong typed languages) like: oct variable = 2; I can under...

Can garbage collection work effectively with really huge memories?

It's more a theoretical question than a practical one. I know that GC are currently working with big process that use 1,2 or 3 Go of memory but I'd like to know if it is theoretically possible to have an efficient GC with really huge memory (1000 Go or more). I ask this question because, even if the GC could run its algorithm progressiv...

What does "Core" mean in the Context of Library Design?

I often see other developers naming libraries with "CORE". What does it actually mean? ...

Where can I learn more about datastructure tricky questions?

I am relatively new to programming (around 1 year programming C#-winforms). Also, I come from a non CS background (no formal degree) Recently, while being interviewed for a job, I was asked about implementing a queue using a stack. I fumbled and wan't able to answer the question. After, the interview I could do it(had to spend some tim...

What's the optimal way to compute a hashcode for a set of points?

I'm looking for the optimal way to compute a hashcode for a set of bi-dimensional points (so that I can store polygons in a hashtable). There are some obvious ways to do that, such as concatenating all the points coordinates in a string and its hashcode, but this would be very slow. On the other end of the speed/collision spectrum, I c...

How to correct the user input (Kind of google "did you mean?")

I have the following requirement: - I have many (say 1 million) values (names). The user will type a search string. I don't expect the user to spell the names correctly. So, I want to make kind of Google "Did you mean". This will list all the possible values from my datastore. There is a similar but not same question here. This did no...

What happens under the hood when one Method Calls Another?

This is similar to http://stackoverflow.com/questions/1204078/what-happens-when-you-run-a-program, but not a dupe. Let's say I have a simple console program with two methods Aand B. public static void RunSnippet() { TestClass t = new TestClass(); t.A(1, 2); t.B(3, 4); } public class TestClass { ...

Versioning of programs as dependent on library

I have a set of programs, each one with its own version. All these programs are dependent on a library, again with its own version. For example Foo-1.0.3 Bar-2.1.5 Baz-1.3.4 They depend on libfrobniz-1.4.5. It happens that I have to do a major overhaul of the library (involving a lot of refactoring). This means that it will break ever...

Efficient Algorithm for String Concatenation with Overlap

We need to combine 3 columns in a database by concatenation. However, the 3 columns may contain overlapping parts and the parts should not be duplicated. For example, "a" + "b" + "c" => "abc" "abcde" + "defgh" + "ghlmn" => "abcdefghlmn" "abcdede" + "dedefgh" + "" => "abcdedefgh" "abcde" + "d" + "ghlmn" => "abcdedghlmn" "abcdef...

What is the most efficient data structure to hold keywords?

I decided to write a small parser to parse BBCode and return properly formatted HTML. I am having a hard time deciding what the most efficient way to represent the keywords would be. I could always use separate strings to hold them, but I feel like there must be some unknown data structure (to me) that would allow for efficient lookup. ...

Security considerations when deploying an open source application to production

I am using an open source eCommerce application and will soon push the application (including some modifications of my own) to production, i.e. the internet. Given that the code and data structures are freely available online, what are the security considerations/best practices when deploying such a piece of software? ...

which language to use for very large data set and lot of computation involved

The general idea of problem is that data is arranged in following three columns in a table "Entity" "parent entity" "value" A001 B001 .10 A001 B002 .15 A001 B003 .2 A001 B004 .3 A002 B002 .34 A002 B003 .13 .. .. .. A002 B111 .56 There is graph of entities and values can be seen as weight of dir...

Are there any ELMAH-like exception-logging FOSS packages?

Are there any ELMAH- or crashkit-like exception-logging FOSS packages? Specifically, these are exception-logging applications; the code you write pushes exception reports to these systems so they can be logged, grouped, searched, and acted-upon. Both apps help with the approach of Exception Driven Development (not a fan of the phrase, ...

Misunderstood Good Ideas

Sometimes someone has a great idea that solves a problem. But as time passes, people forget why it was a great idea and try to use it in ways that end up causing problems as bad (or worse) than what the idea was originally supposed to solve. Example: I'm sure that distributed source control is sufficiently counterintuitive that ...

Books/articles that inspired you

Hi, Some time ago I found a book "Fatal Defect: Chasing Killer Computer Bugs" by Ivars Peterson. Those who read the book, most probably was impressed by thrilling stories of real live bugs around us. Later I come across of well known Death march by Edward Yourdon. This book was describing so many things happing in my day by day job li...

Page change notification via RSS for a POST page

Are there any web services that can return an RSS feed for a page that must be requested with a POST? Page2RSS.com or something like it generally works very well for this but they only work with GET requests. The website I am trying to turn into an RSS feed really should probably use GET instead of POST in the first place. Alternatively ...

How to do true==false or true!=true in your language?

Booleans seem to be the most primitive building blocks of programming languages, because they can actually take only two (or in some cases three) "singleton" values: true, false (and sometimes undeterminded/null) But it seems that sometimes language design might allow someone to write code where actually "true is false" or "true is not ...

What should the accessablity of Fields in a Abstract Class be?

To put it simply as an example, public abstract class AbstractFellow { protected Thing buddy; .... public class ConcreteFellow extends AbstractFellow { public void someMethod() { buddy.doSomething(); //OR buddy = somethingElse; //OR somethingElse = buddy; } } Is this ba...

What is the most complete (free) ISBN API?

I've been using the Open Library Books API, but it lacks many of the books I have. Which API has the best coverage (especially for non-English books)? Edit: I'm particularly interested in APIs that can be accessed from the server side and that provide metadata (author, title, publisher, year, etc). My coverage benchmark is this arbitra...

What are good references about testing a domain specific language?

I am creating a new domain specific language. How do you test a language, or something you can do (transform, compile, check) with a language. What are good references or starting points for learning about best practices? ...