2192
votes
1answer
296k views

What technical details should a programmer of a web application consider before making the site public?

What things should a programmer implementing the technical details of a web application consider before making the site public? If Jeff Atwood can forget about HttpOnly cookies, sitemaps, and ...
532
votes
32answers
104k views

My boss decided to add a “person to blame” field to every bug report. How can I convince him that it's a bad idea?

In one of the latest "WTF" moves, my boss decided that adding a "Person To Blame" field to our bug tracking template will increase accountability (although we already have a way of tying bugs to ...
519
votes
8answers
159k views

Which hashing algorithm is best for uniqueness and speed?

Which hashing algorithm is best for uniqueness and speed? Example (good) uses include hash dictionaries. I know there are things like SHA-256 and such, but these algorithms are designed to be ...
501
votes
21answers
42k views

Where did the notion of “one return only” come from?

I often talk to Java programmers who say "Don't put multiple return statements in the same method." When I ask them to tell me the reasons why, all I get is "The coding standard says so." or "It's ...
428
votes
2answers
54k views

Is the use of “utf8=✓” preferable to “utf8=true”?

I have recently seen a few URIs containing the query parameter "utf8=✓". My first impression (after thinking "mmm, looks cool") was that this could be used to detect a broken character encoding. So, ...
417
votes
3answers
151k views

What is the Mars Curiosity Rover's software built in?

The Mars Curiosity rover has landed successfully, and one of the promo videos "7 minutes of terror" brags about there being 500,000 lines of code. It's a complicated problem, no doubt. But that is a ...
386
votes
22answers
54k views

Should UTF-16 be considered harmful?

I'm going to ask what is probably quite a controversial question: "Should one of the most popular encodings, UTF-16, be considered harmful?" Why do I ask this question? How many programmers are ...
372
votes
28answers
84k views

I'm doing 90% maintenance and 10% development, is this normal?

I have just recently started my career as a web developer for a medium sized company. As soon as I started I got the task of expanding an existing application (badly coded, developed by multiple ...
348
votes
23answers
17k views

Overcoming slow problem solving due to increased knowledge of what might go wrong

This has been troubling me for some time, and I'd really appreciate the input of other professionals. Short background: I started programming when my parents bought me my first computer in 1988 (at ...
345
votes
21answers
85k views

My customer wants me to record a video of how I develop his software product

Working as a freelancer, I often see strange requests from my customers, some of which can negatively affect my daily work¹, and others trying to set some sort of control. I usually encounter those ...
340
votes
33answers
122k views

How do I create my own programming language and a compiler for it [closed]

I am thorough with programming and have come across languages including BASIC, FORTRAN, COBOL, LISP, LOGO, Java, C++, C, MATLAB, Mathematica, Python, Ruby, Perl, JavaScript, Assembly and so on. I ...
340
votes
12answers
10k views

Should I intentionally break the build when a bug is found in production?

It seems reasonable to me that if a serious bug is found in production by end-users, a failing unit test should be added to cover that bug, thus intentionally breaking the build until the bug is ...
306
votes
29answers
48k views

Why can't the IT industry deliver large, faultless projects quickly as in other industries?

After watching National Geographic's MegaStructures series, I was surprised how fast large projects are completed. Once the preliminary work (design, specifications, etc.) is done on paper, the ...
276
votes
6answers
13k views

What is negative code?

I was reading the Wikipedia article on Douglas McIlroy and found a quote that mentions "The real hero of programming is the one who writes negative code." What does that mean?
268
votes
20answers
62k views

How should I behave as a developer in a project that's headed for failure?

I am a developer in a 5-member team and I believe our project is headed for disaster. I'll describe why in a moment, but my question is: how should I behave? The deadline is in 1.5 months, and I ...
260
votes
34answers
14k views

How do you tell if advice from a senior developer is bad?

Recently, I started my first job as a junior developer and I have a more senior developer in charge of mentoring me in this small company. However, there are several times when he would give me advice ...
254
votes
39answers
188k views

Why isn't Java used for modern web application development? [closed]

As a professional Java programmer, I've been trying to understand - why the hate toward Java for modern web applications? I've noticed a trend that out of modern day web startups, a relatively small ...
254
votes
4answers
96k views

What software programming languages were used by the Soviet Union's space program?

I got interested in the Soviet space program and was interested to discover that the software on the Buran spacecraft circa 1988 was written in Prolog. Does anyone know what languages might have ...
253
votes
9answers
57k views

Why is 80 characters the 'standard' limit for code width?

Why is 80 characters the "standard" limit for code width? Why 80 and not 79, 81 or 100? What is the origin of this particular value?
249
votes
33answers
14k views

How can I deal with the cargo-cult programming attitude?

I have some computer science students in a compulsory introductory programming course who see a programming language as a set of magic spells, which must be cast in order to achieve some effect ...
246
votes
11answers
22k 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 ...
242
votes
20answers
71k views

What does SVN do better than Git? [closed]

No question that the majority of debates over programmer tools distill to either personal choice (by the user) or design emphasis, that is, optimizing design according to particular uses cases (by the ...
224
votes
13answers
54k 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, ...
209
votes
15answers
22k views

How can a code editor effectively hint at code nesting level - without using indentation?

I've written an XML text editor that provides 2 view options for the same XML text, one indented (virtually), the other left-justified. The motivation for the left-justified view is to help users ...
205
votes
25answers
18k views

How do you know you're writing good code? [duplicate]

Serious question here. I love programming. I've been messing around with code since I was a kid. I never went the professional route, but I have coded several in-house apps for various employers, ...
195
votes
29answers
16k views

What's the canonical retort to “it's open source, submit a patch”? [closed]

The danger of ever suggesting some feature on a product, especially open source, is that you'll get the response, "why don't you do it?". That's valid, and it's cool that you can make the change ...
192
votes
15answers
48k views

Why was Tanenbaum wrong in the Tanenbaum-Torvalds debates?

I was recently assigned reading from the Tanenbaum-Torvalds debates in my OS class. In the debates, Tanenbaum makes some predictions: Microkernels are the future x86 will die out and RISC ...
191
votes
64answers
117k views

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

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 ...
189
votes
23answers
31k views

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 ...
172
votes
13answers
35k views

How to respond when you are asked for an estimate?

We, as programmers, are constantly being asked 'How long will it take'? And you know, the situation is almost always like this: The requirements are unclear. Nobody has done an in depth analysis of ...
160
votes
26answers
18k views

How to apologize when you have broken the nightly build

My first commit in my project resulted in the nightly build being broken and people are all over me as we are nearing the release. I want to send an apology email that should sound sincere and at the ...
160
votes
23answers
13k views

How can I deal with a team member who dislikes making comments in code?

One of my team members consistently avoids making comments in his code. His code is not self-documenting, and other programmers have a difficult time understanding his code. I have asked him ...
157
votes
11answers
78k views

When to use C over C++, and C++ over C?

I've been introduced to Computer Science for a little over a year now, and from my experience it seems that C and C++ are both considered to be "ultrafast" languages, whereas others such as Python and ...
155
votes
31answers
22k views

Is it unusual for a small company (15 developers) not to use managed source/version control?

It's not really a technical question, but there are several other questions here about source control and best practice. The company I work for (which will remain anonymous) uses a network share to ...
154
votes
29answers
9k views

Humor in Documentation

Is a small amount of lighthearted wording or humor acceptable in source code documentation? For example, I have an algorithm that has a message hop around a graph (network) until its path forms a ...
151
votes
17answers
58k views

How can one manage thousands of IF…THEN…ELSE rules?

I am considering building an application, which, at its core, would consist of thousands of if...then...else statements. The purpose of the application is to be able to predict how cows move around in ...
148
votes
25answers
12k 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 ...
148
votes
14answers
9k views

How do you balance between “do it right” and “do it ASAP” in your daily work?

I find myself pondering over this question from time to time, again and again. I want to do things the right way: to write clean, understandable and correct code that is easy to maintain. However, ...
145
votes
9answers
16k views

Has “Not everyone can be a programmer” been studied?

An old adage that many programmers stick to is "It takes a certain type of mind to learn programming, and not everyone can do it." Now I'm sure that we all have our own trove of anecdotal evidence, ...
144
votes
11answers
38k views

How can I find a good open source project to join? [closed]

I just started working a year ago, and I want to join an open source project for the same reasons as anyone else: help create something useful and develop my skills further. My problem is, I don't ...
143
votes
16answers
11k views

Is there a benefit in compiling your code as you go along?

I recently had a job interview in which they gave me an hour to write some real code. It wasn't a huge amount, probably less than 100 lines. After about 45 minutes, I compiled, ran it, and got it to ...
142
votes
18answers
11k views

How do I review my own code?

I'm working on a project solo and have to maintain my own code. Usually code review is done not by the code author, so the reviewer can look at the code with the fresh eyes — however, I don't have ...
141
votes
29answers
9k views

Offshoring: does it ever work?

I know there has been a fair amount of discussion on here about outsourcing/offshoring, and the general opinion seems to be that at best it is difficult, and at worst it fails. I have direct ...
141
votes
10answers
14k views

Mono is frequently used to say “Yes, .NET is cross-platform”. How valid is that claim? [closed]

In What would you choose for your project between .NET and Java at this point in time? I say that I would consider the "Will you always deploy to Windows?" the single most important (EDIT: technical) ...
139
votes
21answers
11k views

Why does automated testing keep failing in my company?

We have tried to introduce developer automated testing several times at my company. Our QA team uses Selenium to automate UI tests, but I always wanted to introduce unit tests and integration tests. ...
138
votes
13answers
8k views

If my team has low skill, should I lower the skill of my code?

For example, there is a common snippet in JS to get a default value: function f(x) { x = x || 'default_value'; } This kind of snippet is not easily understood by all the members of my team, ...
136
votes
10answers
12k views

Is my work on a developer test being taken advantage of?

I am looking for a job and have applied to a number of positions. One of them responded, I had a pretty lengthy phone interview (perhaps an hour +) and they then set me up with a developer test. I was ...
134
votes
5answers
2k views

Programmer, not a blogger [closed]

I need advice from people who might understand where I'm coming from. I'm the lead engineer on a software product. The company I'm working for recently expressed serious interest in having me blog ...
134
votes
31answers
18k views

How do you dive into large code bases?

What tools and techniques do you use for exploring and learning an unknown code base? I am thinking of tools like grep, ctags, unit-tests, functional test, class-diagram generators, call graphs, ...
132
votes
18answers
8k views

How to keep a big and complex software product maintainable over the years?

I have been working as a software developer for many years now. It has been my experience that projects get more complex and unmaintainable as more developers get involved in the development of the ...

15 30 50 per page