The tag has no wiki summary.

learn more… | top users | synonyms

3
votes
1answer
67 views

Legitimate cases of having .equals() behaving inconsistently with .compareTo()?

Java documentation says it's "strongly recommended" to have them behaving consistently. But are there legitimate cases of java/c#/python/etc Object.equals() method behaving inconsistently with the ...
1
vote
4answers
153 views

List comparing techniques for faster performance

I need to cross names from two lists, and find all occurrences of one name in the other. The lists are too big, one have 50k elements and the other 400k. For a small list I would use two foreach ...
0
votes
0answers
47 views

Compare names and the use of Levenshtein's algorithm

I need to cross names from two lists. What is the best away to compare the names? As you may expect, in one list we can have the complete name, on the other just the first and last. Besides that, ...
0
votes
3answers
275 views

Is JavaScript fail-safe?

I was compiling a list of comparison of top 10 programming languages (JavaScript included). I was doing it from this Wikipedia page. However, in the third table (Failsafe I/O), there is no row for ...
31
votes
12answers
15k views

What's the difference between a “developer” and a “programmer”? [duplicate]

Possible Duplicate: What are the key differences between software engineers and programmers? What is the difference between software engineer and software developer? What's the difference ...
0
votes
0answers
25 views

Strategy for “multi-level equality” test

It is well-known that Lisp supports multi-level equality test. I want to implement similar multi-level equality test on a custom class in Python. I know that I can (and should) override the __eq__, ...
2
votes
1answer
34 views

Comparing path strings against list of rules

I am trying to find a way to enhance a filtering algorithm. I am developing a backup software that enables users to specify custom filters to exclude unwanted files/directories. Currently when trying ...
3
votes
4answers
320 views

Why are return values from compare functions in many languages defined loosely?

Many languages define that compare functions should return ANY negative value, zero, or ANY positive value. Is there some reason that it shouldn't be clearly defined as -1 0 and 1? Does a wide range ...
89
votes
5answers
34k views

How can Swift be so much faster than Objective-C in these comparisons?

Apple launched its new programming language Swift at WWDC14. In the presentation, they made some performance comparisons between Objective-C and Python. The following is a picture of one of their ...
49
votes
6answers
4k views

Dynamically vs Statically typed languages studies

Do there exist studies done on the effectiveness of statically vs dynamically typed languages? In particular: Measurements of programmer productivity Defect Rate Also including the effects of ...
-2
votes
1answer
162 views

Why are mostly 9999, 99999… are used for making comparisons [closed]

I (I am sure everyone else also) have always seen comparisons of some value to 999 or 9999 .... etc. for e.g.: in CSS z-index: 9999 or some times str.length < 99999 I wonder if there is some ...
15
votes
2answers
3k views

Algorithm to merge two sorted arrays with minimum number of comparisons

Given are two sorted arrays a, b of type T with size n and m. I am looking for an algorithm that merges the two arrays into a new array (of maximum size n+m). If you have a cheap comparison ...
6
votes
5answers
268 views

Algorithm to test file equivalence

I'm writing a program that needs to test if a file is equivalent to one or more other files. To accomplish this, every time we see a new file we stat the file and get the size. We use the size as a ...
19
votes
1answer
8k views

What are the main advantages and disadvantages of LL and LR parsing?

When building a parser to a programming language what I earn and what I lost choosing one or the other?
1
vote
4answers
1k views

When to use identity comparison instead of equals?

I wonder why would anybody want to use identity comparison for fields in equals, like here (Java syntax): class C { private A a; public boolean equals(Object other) { // standard ...
5
votes
2answers
296 views

Is there any language-agnostic specification for “String Natural Sorting Order”

As I painfully try to find a good natural sorting algorithm written in JavaScript I then stumble upon a bunch of different implementations, & interesting blog posts & answers on Stack ...
-2
votes
2answers
140 views

Comparing doubles [duplicate]

I need to compare to double variables like this if (distance <= radius) both distance and radius are doubles and I remember in class how to use epsilon comparisons for checking equality but how ...
0
votes
2answers
139 views

Finding metrics for development time in different languages [closed]

I'm trying to determine if a language I'm investigating (Groovy) is better for developing enterprise applications than our current language (Java). Specifically I'm trying to figure out if it will ...
0
votes
1answer
113 views

comparison of an unsigned variable to 0

When I execute the following loop : unsigned m; for( m = 10; m >= 0; --m ){ printf("%d\n",m); } the loop doesn't stop at m==0, it keeps executing interminably, so I thought that ...
0
votes
2answers
214 views

Comparing two software versions in C#

I´m working on a mod update checker for minecraft, but there is a big problem: The modders and online database that I´m using for update checks has no standard software versions e.g.: Local: ...
0
votes
1answer
38 views

How to develop a product compare page

I want to develop a product comparison page, where a user can compare 2 or 3 products. I was thinking about a 3 column list displaying every specification. But I want to highlight the differences. I ...
3
votes
2answers
297 views

Comparison of languages by usage type? [closed]

Does anyone know of a good place to go find comparisons of programming languages by the intended platform/usage? Basically, what I want to know, is of the more popular languages, which ones are meant ...
2
votes
2answers
182 views

How to (or should I) have one assert per test with object comparisons? [duplicate]

I've recently read The Art of Unit Testing by Roy Osherove which I found very useful for helping me establish how to define a good unit test. One key aspect of the guidelines Roy puts forward are to ...
0
votes
2answers
140 views

How to choose between different open-source libraries? [closed]

Recently, I found multiple GitHub repositories that would allow me to perform the same task. (In my case, assess the readability of text strings.) It made me wonder, what are the best practices for ...
1
vote
0answers
29 views

Difference between MPL 2.0 and LGPL 2.1 (+static linking exception)? [duplicate]

Is there a difference between MPL 2.0 and LGPL 2.1 (+static linking exception)? If yes, what is it? As long as i understand the only difference between them is you can't use trademarks of ...
2
votes
6answers
859 views

Why is PHP's method of comparing different types bad?

I'm working on designing a new programming language and trying to decide how I will do variable comparisons. Along with many different types of languages, I've used PHP for years and personally had ...
2
votes
4answers
1k views

Shallow or deep equal, which one is idiomatic in Java?

I have a domain model in which I use a few aggregation relations, i.e. an object of class A contains zero or more objects of class B. I use Java for the implementation and I represent such an ...
33
votes
7answers
19k views

What ASP.NET MVC can do and Ruby on Rails can't? [closed]

ASP.NET MVC and Rails have similar area of use, are built around same architecture, both frameworks are relatively new and open source. So as a Rails programmer I'd like to know, what ASP.NET MVC can ...
14
votes
1answer
1k views

Scala as a language for Generic Programming

In the paper “An Extended Comparative Study of Language Support for Generic Programming” by Garcia et al. an interesting comparison of programming languages features for generic programming is given: ...
26
votes
10answers
3k views

Is there any reason why most programming languages don't have '!>' (not greater than) and '!<' (not less than) operators?

I wonder if there is any reason - or if it is just an accident of history - that there are no !> and !< operators in most programming languages? a >= b (a greater OR equals b) could be ...
6
votes
2answers
458 views

Is Free Pascal just an open source, multi-platform clone of Turbo Pascal & Delphi?

Does Free Pascal introduce any significant language features over Turbo Pascal & then Delphi, or does it just introduce the Turbo Pascal & Delphi flavors of Pascal to more platforms?
3
votes
3answers
476 views

Which is the better: a <= b or a < b+1 [closed]

For loops are usually inclusice, exclusive, meaning that you start at the bottom, and stops when you reach, but don't to the top. In Python: for i in range(0,a): print(i) would print 0 through ...
5
votes
3answers
195 views

Importance of diffing and merging for design specifications documentation

The context of this question is choosing tools for writing design specifications for software projects. These documents will be written and maintained by architects and developers, I'm not talking ...
13
votes
2answers
509 views

Trying to understand the 2N lnN compares for quicksort

I was going through the analysis of quicksort in Sedgewick's Algorithms book. He creates the following recurrence relation for number of compares in quicksort while sorting an array of N distinct ...
4
votes
4answers
320 views

What security practices should you be aware of when writing software? [closed]

What different types of security do there exist? Why and when should they be implemented? Example: SQL Injection Prevention
-1
votes
1answer
114 views

Special feautures of each of these languages that make them special [closed]

I interested about C++, C#, Java, Python, Ruby and Perl. All this languages are very popular and I believe that each one have something that make people to choose them. What is that special thing that ...
2
votes
5answers
252 views

Best practice to sort then reverse, or write “backwards” comparator?

I wrote a comparator for a custom class of mine and when I ran my code I realised the output of my list of these objects was in the reverse order as to what I wanted. It was "ascending" as opposed to ...
3
votes
2answers
1k views

Tricky compareTo, inheritance, easy to extend - Java

Let's say we have 4 classes A, B, C, D where: A is a superclass of both B and C and C is a superclass of D. I suppose, in a diagram, it should look like this: A / \ B C \ D ...
2
votes
1answer
1k views

Is it possible to check that MS word file is hand written or auto generated by using some converter?

I got one project with some requirements. Basically my client provide data entry work. In that he converts image files(scan copy of articles, forms etc) to document file (MS word) by typing ...
5
votes
2answers
565 views

Are Scrum and XP comparable things or are they used for different things

Are Scrum and XP comparable things or are they used for different things? what is the main features of each of them? how do they overlap? I've been reading about both XP and Scrum over the past weeks ...
1
vote
1answer
1k views

Rails vs. Drupal [closed]

I was querying indeed.com/salary to investigate general market trends. When comparing ruby on rails with drupal, you would observe a substantial difference between these two. I'm not sure if the data ...
5
votes
5answers
786 views

How representative is Ohloh? [closed]

My colleague recently pointed me to Ohloh, a website providing statistics on FOSS based on versioning repositories. It's quite a fun procrastination tool, e.g. to compare programming languages by ...
0
votes
3answers
198 views

I need some help creating a non-binary tree (or some other data structure that will better solve my problem)

I have about ten lists of numbers and some strings. Each list has about <= 30K lines. Each line on a list has a distinct number. I need to build an efficient way of finding all the lines in each ...
2
votes
5answers
469 views

What do you call “X <= $foo <= Y” comparison?

While writing a Perl statement like if ( $foo >= X && $foo <= Y ) yet again, I wondered why many programming languages do not support the more comfortable form if ( X <= $foo <= Y ...
3
votes
2answers
192 views

Custom graph comparison?

I'm trying to compare two graphs using hash value ( i.e, at the time of comparison, try to avoid traversing the graph ) Is there a way to make a function such that the hash values compared can also ...
1
vote
2answers
449 views

Efficient way to compare scene-graph trees

I'm designing a scene graph system, where it is required to compare two trees. The trees are populated with individual objects, each with varied number of children; and they have a root. Eg: Parent: ...
17
votes
12answers
1k views

Commented short fancy code vs. uncommented longer easy-to-understand code - which is preferred?

Sometimes an algorithm can be written in two ways: The short, fancy way; or The longer, easy-to-understand way. For example, here is a longer, easier way of copying a string source to dest in C: ...
18
votes
3answers
642 views

Are there any empirical studies on the effect of different languages on software quality?

The proponents of functional programming languages assert that functional programming makes it easier to reason about code. Those in favor of statically typed languages say that their compilers catch ...
10
votes
5answers
3k views

Do Fortran compilers really generate faster code than C compilers?

When I was studying in the university I often heard the idea that Fortran compilers produced faster code than C compilers for an equivalent program. The key reasoning went like this: a Fortran ...
7
votes
7answers
3k views

How do you choose to use a specific programming language? [closed]

I was having a small talk between teammates about how you choose a programming language for use in a project which lead me to think that there are many criteria to choose one in the beginning of a ...