Most Popular

1500 questions
100
votes
17 answers

(Why) Should I learn a new programming language?

I'm quite proficient with Java, C/C++, JavaScript/jQuery and decently good at Objective-C. I'm quite productive with the languages and their corresponding frameworks too and do produce enterprise level systems (and also small scale ones) with…
PhD
  • 2,531
  • 2
  • 18
  • 32
99
votes
5 answers

Functional Programming vs. OOP

I've heard a lot of talk about using functional languages such as Haskell as of late. What are some of the big differences, pros and cons of functional programming vs. object-oriented programming?
GSto
  • 8,531
99
votes
10 answers

How can I teach a bright person, with no programming experience, how to program?

I have been asked to take a person in our IT department who has no programming experience but is a smart and capable person and help him move into programming at lets say an entry level developer supporting existing .Net applications. I definitely…
99
votes
34 answers

30 minutes to explain programming to a 15 year old

I've been volunteered to sit down and talk about the life and work of a Developer with a 15 year old work experience student next week. The catches are that I've got just half an hour, and I'll be just one of the people talking to her - other…
Dexter
  • 212
99
votes
9 answers

Is it the correct practice to keep more than 10 years old spaghetti legacy code untouched without refactoring at all in big product development?

I have been in two software product houses for three years in a row. The first is a small company maintaining a fairly small management system with a monolithic legacy code base (almost twenty years). Tightly coupled code is everywhere without…
Rui
  • 1,699
99
votes
14 answers

Is it considered an anti pattern to write SQL in the source code?

Is it considered an anti pattern to hardcode SQL into an application like this: public List getPersonIDs() { List listPersonIDs = new List(); using (SqlConnection connection = new SqlConnection( …
w0051977
  • 7,081
99
votes
1 answer

Is there really a fundamental difference between callbacks and Promises?

When doing single-threaded asynchronous programming, there are two main techniques that I'm familiar with. The most common one is using callbacks. That means passing to the function that acts asynchronously a callback-function as a parameter. When…
Aviv Cohn
  • 21,388
99
votes
9 answers

What are the advantages of build scripts?

For most of my programming career, I've used the "build/compile/run" command in whatever IDE I'm working with to produce a runnable program. This is one button, pretty easy. As I learn more about different languages and frameworks, though, I see…
WannabeCoder
  • 2,794
99
votes
8 answers

Client wants source code, but it contains a lot of shared code I reuse with other projects

I have a client who would like me to deliver the source code with a developed application binary. They originally said nothing about source code, but they recently said they need it. The contract is not finalized. They agreed to the work, did not…
robby987
  • 1,079
99
votes
7 answers

Should I use Dependency Injection or static factories?

When designing a system I am often faced with the problem of having a bunch of modules (logging, database acces, etc) being used by the other modules. The question is, how do I go about providing these components to other components. Two answers…
RokL
  • 2,421
99
votes
16 answers

Why aren't user-defined operators more common?

One feature I miss in from functional languages is the idea that operators are just functions, so adding a custom operator is often as simple as adding a function. Many procedural languages allow operator overloads, so in some sense operators are…
beatgammit
  • 1,917
  • 3
  • 18
  • 25
99
votes
8 answers

Is browser fingerprinting a viable technique for identifying anonymous users?

Is browser fingerprinting a sufficient method for uniquely identifying anonymous users? What if you incorporate biometric data like mouse gestures or typing patterns? The other day I ran into the Panopticlick experiment EFF is running on browser…
SMrF
  • 1,093
  • 2
  • 8
  • 7
99
votes
3 answers

What does "GPL with classpath exception" mean in practice?

Oracle seems to license all their Java-related open source code under the GPL with a classpath exception. From what I understand, this seems to allow to combine these libraries with your own code into products that do not have to be covered by the…
Thilo
  • 4,776
  • 2
  • 16
  • 9
99
votes
34 answers

"Comments are a code smell"

A coworker of mine believes that any use of in-code comments (ie, not javadoc style method or class comments) is a code smell. What do you think?
Fishtoaster
  • 25,919
98
votes
12 answers

My client wants 25% of comments in my current project, how to react?

junior developer here. I am currently working alone on a web application for a big client of my company. I started last month. The client wants at least 25% of comments in each of its software projects. I checked the code of previous applications…
Robin_
  • 553