Most Popular

1500 questions
208
votes
12 answers

What's the difference between an API and an SDK?

I was looking through various APIs and SDKs, when I realized that I couldn't really tell the difference between something called an API and something called an SDK. Both of them are, conceptually, a way for your program to interface with and control…
KeithS
  • 22,104
206
votes
10 answers

Are exceptions as control flow considered a serious antipattern? If so, Why?

Back in the late 90's I worked quite a bit with a code base that used exceptions as flow control. It implemented a finite state machine to drive telephony applications. Lately I am reminded of those days because I've been doing MVC web apps. They…
Aaron Anodide
  • 5,553
  • 6
  • 30
  • 37
203
votes
9 answers

Why is Mercurial considered to be easier than Git?

When looking at comparisons, it seems to me that there could be a 1:1 mapping between their feature sets. Yet, an often cited statement is that "Mercurial is easier". What is the basis of this statement? (if any)
203
votes
4 answers

What is an Anti-Corruption layer, and how is it used?

I'm trying to figure out what the Anti-Corruption layer really means. I know that it's a way to transition/work around legacy code or bad APIs. What I don't understand is how it works and what makes it a clean separation from the undesirable…
knownasilya
  • 3,194
  • 3
  • 17
  • 16
202
votes
7 answers

How do searches fit into a RESTful interface?

When designing a RESTful interface, the semantics of the request types are deemed vital to the design. GET - List collection or retrieve element PUT - Replace collection or element POST - Create collection or element DELETE - Well, erm, delete…
Rob Baillie
  • 2,436
202
votes
14 answers

When are Getters and Setters Justified?

Getters and setters are often criticized as being not proper OO. On the other hand, most OO code I've seen has extensive getters and setters. When are getters and setters justified? Do you try to avoid using them? Are they overused in general? If…
Winston Ewert
  • 24,862
201
votes
10 answers

Is every language written in C?

Sometimes while programming in different languages (C/C++, C#), this thought comes to my mind: Is each and every language written in the C programming language? Is the C language the mother/father of all languages? Is each concept (OOP, etc.) all…
200
votes
32 answers

Is micro-optimisation important when coding?

I recently asked a question on Stack Overflow to find out why isset() was faster than strlen() in PHP. This raised questions around the importance of readable code and whether performance improvements of micro-seconds in code were worth even…
Boz
  • 171
200
votes
17 answers

What is meant by "Now you have two problems"?

There is a popular quote by Jamie Zawinski: Some people, when confronted with a problem, think "I know, I'll use regular expressions." Now they have two problems. How is this quote supposed to be understood?
IQAndreas
  • 2,675
198
votes
62 answers

Why do programmers write closed source applications and then make them free?

As an entrepreneur/programmer who makes a good living from writing and selling software, I'm dumbfounded as to why developers write applications and then put them up on the Internet for free. You've found yourself in one of the most lucrative…
Ken
  • 793
198
votes
9 answers

What's the difference between Entry Level/Jr/Sr developers?

Other than title and pay, what is the difference? What different responsibilities do they have. How knowledgeable/experienced are they? What is the basic measure to determine where a developer fits into this basic structure?
JD Isaacks
  • 8,936
197
votes
40 answers

My Dad is impatient with the pace of my learning to program. What do I do?

So my Dad bought me 5 books on programming (C++, Java, PHP, Javascript, Android) about a month ago. He's an architect and he knows NOTHING about programming. He bought me them because I told him programming was fun and I wanted to learn it. As you…
David
  • 461
197
votes
20 answers

Should you keep a copy of all the code you write?

I know the company you work for owns the code and obviously you will get arrested if you try to sell it. But is it uncommon for developers to keep a personal copy of the code they wrote (for future reference)? Apparently this guy was sent to prison…
superFoo
  • 421
197
votes
14 answers

What's wrong with circular references?

I was involved in a programming discussion today where I made some statements that basically assumed axiomatically that circular references (between modules, classes, whatever) are generally bad. Once I got through with my pitch, my coworker asked,…
196
votes
3 answers

How is localStorage different from indexedDB?

localStorage and indexedDB are used for offline storage of data in HTML5. What are their key differences and which one is preferable in what situations?
user52009