Most Popular

1500 questions
53
votes
16 answers

Is a senior programmers advice about always using books a good idea?

I am a junior developer and have only been in the industry for 5 years. At my current company there is a senior let's call him Infestus. Occasionally I am being given opportunity to shine and do something completely brand new from scratch. One of…
Quillion
  • 419
53
votes
6 answers

Unit-Tests and databases: At which point do I actually connect to the database?

There are answers to the question on how test classes that connect to a database, e.g. "Should service test classes connect ..." and "Unit testing - Database coupled app". So, in short let's assume you have a class A that needs to connect to a…
TobiMcNamobi
  • 1,171
53
votes
19 answers

Forcing people to read and understand code instead of using comments, function summaries and debuggers?

I am a young programmer (finished computer science university but still under a year of working in the industry) and I recently got a job working on some C code for a decent size web service. Looking at the code the only places I saw comments were…
ThePiachu
  • 288
53
votes
27 answers

What is the most egregious waste of money you have seen, and what did you do about it?

Often we as programmers see large organisations wasting huge sums of money on bloated and inefficient solutions to problems. This pains me greatly because I like organisations to benefit from best of breed solutions. However, my abilities as a…
Gary
  • 24,440
53
votes
6 answers

"A good programmer can be as 10X times more productive than a mediocre one"

I had read an interview with a great programmer (it is not in English) and in it he said that "a great programmer can be as 10 times as good as a mediocre one" giving reason for why good programmers are very well paid and why programming companies…
Random42
  • 10,520
  • 10
  • 52
  • 65
53
votes
2 answers

Can I use new BSD licensed library/code in commercial closed source project?

I've found a software library, licensed under the new BSD license. I want to use in my closed source commercial project. Can I do it?
kravemir
  • 680
53
votes
12 answers

How to take a step back and look at code with fresh eyes?

I've spent the last year as a one-man team developing a rich-client application (35,000+ LoC, for what it's worth). It's currently stable and in production. However, I know that my skills were rusty at the beginning of the project, so without a…
BenCole
  • 665
53
votes
3 answers

What is the benefit of writing to a temp location, And then copying it to the intended destination?

I am writing an application that works with satellite images, and my boss asked me to look at some of the commercial applications, and see how they behave. I found a strange behavior and then as I was looking, I found it in other standard…
53
votes
4 answers

What is the difference between building and compiling ?

What's the difference between Building and Compiling.
53
votes
20 answers

Does Object Oriented Programming Really Model The Real World?

I've seen it commonly repeated the object-oriented programming is based on modeling the real world but is it? It seems to me that is not true of anything outside of the business layer. My GUI classes/data access classes aren't modeling anything in…
Winston Ewert
  • 25,052
53
votes
17 answers

Is it a good practice to name the returned variable "result"?

Is it a good practice to call the variable a method returns with a variable name result? For instance: public Zorglub calculate() { Zorglub result = [...] [...] return result; } Or should I name it by its type? public Zorglub…
53
votes
10 answers

How to correct a junior, but encourage him to think for himself?

I am the lead of a small team where everyone has less than a year of software development experience. I wouldn't by any means call myself a software guru, but I have learned a few things in the few years that I've been writing software. When we do…
Phil
  • 3,680
  • 28
  • 30
53
votes
11 answers

Get 100 highest numbers from an infinite list

One of my friend was asked this interview question - "There is a constant flow of numbers coming in from some infinite list of numbers out of which you need to maintain a datastructure as to return the top 100 highest numbers at any given point…
53
votes
5 answers

Organizing Git repositories with common nested sub-modules

I'm a big fan of Git sub-modules. I like to be able to track a dependency along with its version, so that you can roll-back to a previous version of your project and have the corresponding version of the dependency to build safely and cleanly. …
53
votes
8 answers

Should every git commit leave the project in a working state?

I'm curious to know what the prevailing best practice is. Should git commits be enforced such that the project is in a working state (builds properly, all tests pass etc), or is committing broken code OK? For example, if you waive this requirement…
Suan
  • 631
1 2 3
99
100