101
votes
19answers
26k views

Should I return from a function early or use an if statement?

I've often written this sort of function in both formats, and I was wondering if one format is preferred over another, and why. public void SomeFunction(bool someCondition) { if (someCondition) ...
25
votes
8answers
15k views

Learning Multiple Languages Simultaneously [closed]

When learning new languages, is it better to commit yourself to one language 100% and wait until you've "mastered" it to move on to another, or to work on learning different languages at the same ...
23
votes
9answers
2k views

How should I go about learning a very large and complex application? [duplicate]

Being a young and fairly inexperienced developer recently employed by a "real" software company I'd like some opinions and pointers on how to do the following: Approaches on how to get familiar with ...
9
votes
8answers
1k views

Functional testing must be done by external party to avoid bias? [duplicate]

Our developers demand that someone external to the development team completes the functional testing. Their argument is that they are biased and cannot test their own code as they are too close to it. ...
2
votes
1answer
413 views

What is O(…) and how do I calculate it? [closed]

Possible Duplicate: Plain English explanation of Big O I've seen some questions here and on SO talking about the most efficient way to find or sort this or that. The questions usually talk ...
48
votes
9answers
4k views

When do you know it's time to move on from your current job? [closed]

Have you ever reached a point at your job when you just know it's time to move on? When do you move to the point that you're willing to let go of the demons you know for the ones you don't know? ...
83
votes
14answers
25k views

Do I need to use an interface when only one class will ever implement it?

Isn't the whole point of an interface to for multiple classes to adhere to a set of rules and implementations?
61
votes
3answers
11k views

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 ...
20
votes
7answers
9k views

Best approach to learning web programming [closed]

I come from a scientific and embedded programming background, and I have had minimal experience with web programming. What would be the best approach to take to get up to speed with web programming? ...
100
votes
22answers
9k views

Elegant ways to handle if(if else) else

This is a minor niggle, but every time I have to code something like this, the repetition bothers me, but I'm not sure that any of the solutions aren't worse. if(FileExists(file)) { contents = ...
22
votes
21answers
10k views

Self Documenting Code Vs. Commented Code

I had a search but didn't find what I was looking for, please feel free to link me if this question has already being asked. Earlier this month this post was made: ...
18
votes
6answers
2k views

Getting involved with an Open Source Project [closed]

I am heading into my senior year in computer engineering and have gotten a internship for this summer and fall. Since I will not be doing homework I would love to take this opportunity to get involved ...
54
votes
36answers
3k views

What can I do to get better at estimating how long projects are going to take? [duplicate]

I don't want to make life hard for management. I really don't. They're nice enough guys, but every time I am assigned a new project or task and get asked "how long do you think it will take to do ...
24
votes
17answers
5k views

Does Silverlight have a future? [closed]

Recently I have read some articles/blogs/comments about the development and history of WPF and Silverlight. In some forums many developers and users criticize the performance of WPF applications (for ...
265
votes
10answers
27k views

I'm a Subversion geek, why should I consider or not consider Mercurial or Git or any other DVCS?

I try to understand the benefits of distributed version control system (DVCS). I found Subversion Re-education and this article by Martin Fowler very useful. Mercurial and others DVCS promote a ...
159
votes
25answers
15k views

How to convince my boss that quality is a good thing to have in code? [duplicate]

My boss came to me today to ask me if we could implement a certain feature in 1.5 days. I had a look at it and told him that 2 to 3 days would be more realistic. He then asked me: "And what if we do ...
141
votes
26answers
14k views

Is constantly looking for code examples a sign of a bad developer?

I am a CS student with several years of experience in C and C++, and for the last few years I've been constantly working with Java/Objective C doing app development and now I have switched to web ...
45
votes
2answers
4k views

Checklist for starting an open-source project [closed]

To start an open-source project is not just to throw up the source code on some public repository and then being happy with that. You should have technical (besides user) documentation, information on ...
12
votes
5answers
6k views

What to plan before starting development on a project?

Say I've received the specs for a project from a client, and now its time to start developing it. Normally, I just start with the first module (usually user registration) and then go from one module ...
24
votes
6answers
7k views

Is there a canonical book for learning Java as an experienced developer? [closed]

I have been a .NET developer now for about the past 5/6 years give or take. I have never done any professional Java development and the last time I really touched it was probably back in college. I ...
33
votes
15answers
3k views

Does heavy library and code snippet usage make you a bad programmer?

Overall I'm in programming for about 8 years now and it seems to me that I'm relying more and more on open source libraries and snippets (damn you GitHub!) to "get the job done". I know that in time I ...
14
votes
2answers
771 views

How to manage and estimate unstructured requirements received from customers

A lot of the times during the bidding phase of a project I receive a software system's requirements from our potential customers in a very unstructured format from various sources [email, word ...
14
votes
7answers
2k views

Rule of thumb for cost vs. savings for code re-use [duplicate]

Is it a good rule of thumb to always write code for the intent of re-using it somewhere down the road? Or, depending on the size of the component you are writing, is it better practice to design it ...
11
votes
6answers
2k views

Should I extract specific functionality into a function and why?

I have a large method which does 3 tasks, each of them can be extracted into a separate function. If I'll make an additional functions for each of that tasks, will it make my code better or worse and ...
0
votes
2answers
198 views

How should I test the functionality of a function that uses other functions in it? [duplicate]

Suppose there is a function get-data which returns a map of information about the id of the user passed in. now this function uses 3 functions source-a, source-b and source-c to get three different ...
77
votes
15answers
35k views

How can I really master a programming language?

I know that learning a language, you can simply buy a book, follow the examples, and whenever possible try the exercises. But what I'm really looking is how to master the language once you've learned ...
98
votes
19answers
57k views

Why are interfaces useful?

I have been studying and coding in C# for some time now. But still, I can't figure the usefulness of Interfaces. They bring too little to the table. Other than providing the signatures of function, ...
71
votes
16answers
12k views

When is unit testing inappropriate or unnecessary? [duplicate]

It seems to be generally assumed (on Stack Overflow at least) that there should always be unit tests, and they should be kept up to date. But I suspect the programmers making these assertions ...
80
votes
19answers
38k views

Are `break` and `continue` bad programming practices?

My boss keeps mentioning nonchalantly that bad programmers use break and continue in loops. I use them all the time because they make sense; let me show you the inspiration: function verify(object) ...
44
votes
18answers
24k views

In plain English, what is recursion?

The idea of recursion is not very common in real world. So, it seems a bit confusing to the novice programmers. Though, I guess, they become used to the concept gradually. So, what can be a nice ...
60
votes
17answers
26k views

How can software be protected from piracy?

Why does it seem so easy to pirate today? It just seems a little hard to believe that with all of our technological advances and the billions of dollars spent on engineering the most unbelievable and ...
24
votes
7answers
4k views

Should I keep investing into data structures and algorithms? [closed]

These days, I'm investing heavily in data structures and algorithms and trying to solve some programming puzzles. I'm trying to code and solve with Java and Clojure. Am I wasting my time? should I ...
28
votes
7answers
3k views

How to explain that it's hard to estimate the time required for a bigger software project?

I'm a junior developer and I find it hard to estimate how much time it takes to finish a bigger software project. I know how to structure the architecture in general, but it's hard for me to know what ...
38
votes
7answers
6k views

What should you test with unit tests?

I'm freshly out of college, and starting university somewhere next week. We've seen unit tests, but we kinda not used them much; and everyone talks about them, so I figured maybe I should do some. ...
25
votes
7answers
42k views

Functional or non-functional requirement?

I'm wondering about functional or non-functional requirements. I have found lot of different definitions for those terms and I can't assign some of my requirement to proper category. I'm wondering ...
17
votes
6answers
2k views

git / other VCS - how often to commit? [duplicate]

I've been a programmer now for over 11 years, and am just starting to get into version control for real. The places I've worked at have never really used version control (one committed at the end of ...
19
votes
12answers
4k views

How to explain programming to a non-programmer? [duplicate]

Possible Duplicate: How do you share your craft with non programmers? I tend to think that I might get such a question in the future... How should I answer to it in layman terms?
2
votes
4answers
3k views

Can I use GPL, LGPL, MPL licensed packages with my application and make it closed source?

I saw a company is using BusyBox and also using Gpl + Lgpl + Mpl packages on it, and then they have there own application running on it. Their application is a closed source package. You buy the ...
18
votes
0answers
2k views

What is the difference between software engineer and software developer? [duplicate]

Possible Duplicate: What are the key differences between software engineers and programmers? What is the difference between software engineer and software developer? In my previous company, ...
299
votes
13answers
88k views

So Singletons are bad, then what?

There has been a lot of discussion lately about the problems with using (and overusing) Singletons. I've been one of those people earlier in my career too. I can see what the problem is now, and yet, ...
124
votes
19answers
108k views

Is there any reason to use C++ instead of C, Perl, Python, etc.? [closed]

As a Linux (server side) developer, I don't know where and why should I use C++. When I'm going for performance, the first and last choice is C. When "performance" isn't the main issue, programming ...
132
votes
20answers
113k views

When should you call yourself a senior developer? [duplicate]

Possible Duplicate: Whats the difference between Entry Level/Jr/Sr developers? I'm curious what senior developer means because apparently the definition doesn't mean what I thought it ...
120
votes
20answers
122k views

When to favor ASP.NET WebForms over MVC

I know that Microsoft has said ASP.NET MVC is not a replacement for WebForms. And some developers say WebForms is faster to develop on than MVC. But I believe speed of coding comes down to ...
73
votes
6answers
13k views

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?
50
votes
8answers
10k views

Defensive Programming vs Exception Handling?

I'm working through the book "Head First Python" (it's my language to learn this year) and I got to a section where they argue about two code techniques: Defensive coding vs Exception handling. Here ...
40
votes
10answers
6k views

How can I quantify the amount of technical debt that exists in a project?

Does anyone know if there is some kind of tool to put a number on technical debt of a code base, as a kind of code metric? If not, is anyone aware of an algorithm or set of heuristics for it? If ...
20
votes
8answers
4k views

How to manage a Closed Source High-Risk Project?

I am currently planning to develop a J2EE website and wish to bring in 1 developer and 1 web designer to assist me. The project is a financial app within a niche market. I plan to keep the source ...
34
votes
6answers
22k views

Can a developer get a discount for Microsoft products? [closed]

If I would start to focus on the .NET platform and be self-employed, then I probably would like to have some Windows 7, Windows Server 2008, Visual Studio 2010 licenses just for the development ...
36
votes
9answers
2k views

Prototyping vs. Clean Code at the early stages

I'm planning to work/start on a few personal projects that could end up as my daily job. It made me think, which way should I start? Just prototype—write just working basic code that could cost me ...
27
votes
6answers
1k views

Getting users to write decent and useful bug reports

Does anyone know a good way to get users to write a semi-decent (read: useful) bug report? We wanted to put up something that would make sense to most users (be easy to read and understand), yet give ...

15 30 50 per page