100
votes
16answers
20k views

Is there an excuse for short variable names?

This has become a large frustration with the codebase I'm currently working in; many of our variable names are short and undescriptive. I'm the only developer left on the project, and there isn't ...
100
votes
18answers
25k views

How does learning assembly aid in programming?

I have been programming in higher level languages (Python, C#, VBA, VB.NET) for around 10 years and I have completely zero understanding on what's going on, "under the hood." I am wondering what are ...
100
votes
12answers
7k views

Effective Strategies for Localization in .NET

I am developing the UI for a .NET MVC application that will require international localization of all content in the near future. I am very familiar with .NET in general but have never had a project ...
98
votes
60answers
9k views

Which things instantly ring alarm bells when looking at code? [closed]

I attended a software craftsmanship event a couple of weeks ago and one of the comments made was "I'm sure we all recognize bad code when we see it" and everyone nodded sagely without further ...
98
votes
20answers
4k views

Project Manager that wants to lock in time estimate with a signed contract

At a previous employment, a project manager (PM) wasn't satisfied with the delivery time of the code on a project I was on. I was told by my project lead that that the PM was considering having me ...
98
votes
22answers
9k views

Do job postings exaggerate their requirements? [closed]

I feel like a reasonably qualified programmer, but a lot of job postings I run into make me feel otherwise. Almost all of them separate qualifications into requirements and desirables, but even the ...
98
votes
16answers
4k views

How do you store “fuzzy dates” into a database?

This is a problem I've run into a few times. Imagine you have a record that you want to store into a database table. This table has a DateTime column called "date_created". This one particular record ...
98
votes
6answers
36k views

What is the difference between BDD and TDD?

I have been learning writing test cases for BDD using specflow. If I write comprehensive tests with BDD is it necessary to write TDD test separately? Is it necessary to write test cases for both TDD ...
97
votes
20answers
52k 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 ...
97
votes
20answers
11k views

Making money with Open Source as a developer?

I'm currently a student (Applied Information Technology) and we do most of our programming in C# and Java. I was wondering how can I as a developer, make money with open source. I know there is the ...
96
votes
10answers
9k views

On developing deep programming knowledge

Occasionally I see questions about edge cases and other weirdness on Stack Overflow that are easily answered by the likes of Jon Skeet and Eric Lippert, demonstrating a deep knowledge of the language ...
95
votes
16answers
4k views

Should I remove unreferenced code?

I'm working on a medium sized (100k lines) code base, it's all relatively recent code (less than a year old) and has good unit test coverage. I keep coming across methods which are either no longer ...
94
votes
17answers
12k views

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 ...
94
votes
18answers
6k views

When should I make the first commit to source control?

I'm never sure when a project is far enough along to first commit to source control. I tend to put off committing until the project is 'framework-complete,' and I primarily commit features from then ...
94
votes
10answers
3k views

TDD vs. Productivity

In my current project (a game, in C++), I decided that I would use Test Driven Development 100% during development. In terms of code quality, this has been great. My code has never been so well ...
93
votes
11answers
53k views

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

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 ...
93
votes
10answers
24k views

Is Ken Thompson's compiler hack still a threat?

Ken Thompson Hack (1984) Ken Thompson outlined a method for corrupting a compiler binary (and other compiled software, like a login script on a *nix system) in 1984. I was curious to know if modern ...
92
votes
16answers
11k views

How can I tell in an interview if a programmer is passionate about programming?

While most interview questions are focused on current knowledge of a candidate or check his/her skill to solve algorithmic problems I would like to hire a developer who is passionate about ...
92
votes
11answers
15k views

Should we avoid object creation in Java?

I was told by a colleague that in Java object creation is the most expensive operation you could perform. So I can only conclude to create as few objects as possible. This seems somewhat to defeat ...
92
votes
17answers
7k views

Importance of hobby projects

I want to know, how important is it to program in your spare time? Is it necessary to work your 9-5 as a programmer and then get home and work on your hobby to become a better programmer? This said, ...
91
votes
18answers
10k views

How to market yourself as a software developer? [closed]

I have noticed that this is a frequent issue among younglings from technical areas such as ours. In the beginning of our careers we simply don't know how to sell ourselves to our employers, and ...
91
votes
12answers
26k views

Why do we need private variables?

Why do we need private variables in classes? Every book on programming I've read says this is a private variable, this is how you define it but stops there. The wording of these explanations always ...
91
votes
6answers
7k views

Why does the US government disallow dynamic languages for secure projects?

I know some people that are currently working on a project for the US military (low security level, non-combat human resources type data). An initial state of the project code was submitted to the ...
91
votes
22answers
5k 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 = ...
91
votes
9answers
5k views

Am I too young to burn out? [closed]

I feel like I have burned out, even though I am only out of college for 5 years. For the first 3 years of my career, things were going awesome. I was never anything special in school, but I felt ...
90
votes
17answers
6k views

Being stupid to get better productivity?

I've spent a lot of time reading different books about "good design", "design patterns", etc. I'm a big fan of the SOLID approach and every time I need to write a simple piece of code, I think about ...
89
votes
14answers
11k views

Learn programming backwards, or “so I failed the FizzBuzz test. Now what?”

A Little Background I'm 28 today, and I've never had any formal training in software development, but I do have two higher education degrees equivalent to a B.A in Public Relations and an Executive ...
89
votes
17answers
11k views

Why is Global State so Evil?

Before we start this, let me say I'm well aware of the concepts of Abstraction and Dependency Injection. I don't need my eyes opened here. Well, most of us say, (too) many times without really ...
88
votes
21answers
6k views

What's the benefit of avoiding the use of a debugger?

Over the course of my career, I've noticed that some developers don't use debugging tools, but do spot checking on erroneous code to figure out what the problem is. While many times being able to ...
88
votes
25answers
8k views

How do programmers quit a job? [closed]

I'm thinking about leaving my current employer and wondering how one goes about that process in the programming world. We have a lot of projects on the go at the moment and I'm the only developer. We ...
88
votes
13answers
7k views

I'm in over my head at my job. What should I do? [closed]

About 8 months ago I was hired as the sole developer at a small company to take on a certain project. Although there are other small projects that come up from time to time, I've been spending about ...
87
votes
28answers
8k views

Why is cleverness considered harmful in programming by some people?

I've noticed a lot of questions lately relating to different abstraction techniques, and answers saying basically that the techniques in question are "too clever." I would think that part of our jobs ...
86
votes
16answers
5k views

Regulation of the software industry [closed]

Every few years someone proposes tighter regulation for the software industry. This IEEE article has been getting some attention lately on the subject. If software engineers who write programs ...
86
votes
19answers
15k views

Why isn't OCaml more popular?

I've always heard that C is the language of choice to use for embedded systems, or anything that needs to run at maximum speed. I never developed a fondness for C, mostly because I don't like pointer ...
86
votes
14answers
7k views

Why do most programming languages only support returning a single value from a function?

Is there a reason why functions in most(?) programming languages are designed to support any number of input parameters but only one return value? In most languages, it is possible to "work around" ...
86
votes
5answers
19k views

Scheme vs Common Lisp: Which characteristics made a difference in your project? [closed]

There are no shortage of vague "Scheme vs Common Lisp" questions on both StackOverflow and on this site, so I want to make this one more focused. The question is for people who have coded in both ...
85
votes
27answers
13k views

Why do people use programming books? [closed]

I find that when someone asks what is the best way to learn how to program, people usually provide them with references to a bunch texts written by various authors. However I don't believe many ...
85
votes
37answers
44k views

Should curly braces appear on their own line? [closed]

Should curly braces be on their own line or not? What do you think about it? if (you.hasAnswer()) { you.postAnswer(); } else { you.doSomething(); } or should it be if (you.hasAnswer()) { ...
85
votes
17answers
22k views

Is it a good idea to design an architecture thinking that the User Interface classes can be replaced by a command line interface?

In Code Complete page 25, it's said that it's a good idea to be able to easily replace the regular user interface classes by a command line one. Knowing its advantages for testing, what about the ...
85
votes
14answers
15k views

What triggered the popularity of lambda functions in modern mainstream programming languages?

In the last few years anonymous functions (AKA lambda functions) have become a very popular language construct and almost every major / mainstream programming language has introduced them or is ...
84
votes
14answers
8k views

Is it illegal to rewrite every line of an open source project in a slightly different way, and use it in a closed source project?

There is some code which is GPL or LGPL that I am considering using for an iPhone project. If I took that code (JavaScript) and rewrote it in a different language for use on the iPhone would that be ...
84
votes
16answers
24k views

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 ...
84
votes
10answers
6k views

One-line functions that are called only once

Consider a parameterless (edit: not necessarily) function that performs a single line of code, and is called only once in the program (though it is not impossible that it'll be needed again in the ...
84
votes
29answers
18k views

Can my company give IP rights away for an application I wrote off hours to another startup? [closed]

I am an intern for a health company (unpaid), let's call it Company A and I noticed that they are using a lot of paper form for things that can be done on the computer. Excel files for things that ...
84
votes
16answers
22k views

What functionality does dynamic typing allow?

I've been using python for a few days now and I think I understand the difference between dynamic and static typing. What I don't understand is under what circumstances it would be preferred. It is ...
83
votes
16answers
5k views

Should I point out spelling/grammar related mistakes in someone's code?

While reviewing a coworker's code, I came across some spelling mistakes in function names and also grammatical errors like 'doesUserHasPermission()' instead of 'doesUserHavePermission()' in function ...
83
votes
13answers
37k views

What is the advantage of currying?

I just learned about currying, and while I think I understand the concept, I'm not seeing any big advantage in using it. As a trivial example I use a function that adds two values (written in ML). ...
82
votes
7answers
10k views

How to reject a code review that you believe is unnecessary?

I am in a position where I have been asked to review some code that fixes a problem that I don't believe exists. The fixer, who is more senior than me, insists his fix is necessary but it appears ...
82
votes
18answers
10k views

Are unit tests really that useful? [closed]

I just graduated with a degree in CS and I currently have a job as a Junior .NET Developer (C#, ASP.NET, and web forms). Back when I was still in university, the subject of unit testing did get ...
82
votes
12answers
4k views

Best practices for sharing tiny snippets of code across projects

I always try to follow the DRY principle strictly at work; every time I've repeated code out of laziness it bites back later when I need to maintain that code in two places. But often I write small ...

15 30 50 per page