2189
votes
1answer
357k 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 ...
709
votes
9answers
242k 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 ...
594
votes
22answers
70k 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 ...
583
votes
29answers
112k 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 ...
461
votes
2answers
59k 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, ...
457
votes
2answers
165k 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 ...
432
votes
22answers
70k 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 ...
394
votes
21answers
20k views

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

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 ...
377
votes
33answers
163k 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 ...
363
votes
21answers
88k 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 ...
355
votes
12answers
12k 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 ...
338
votes
29answers
53k 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 ...
321
votes
9answers
84k 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?
311
votes
13answers
92k 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, ...
305
votes
39answers
272k 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 ...
296
votes
6answers
17k 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?
288
votes
20answers
65k 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 ...
271
votes
13answers
74k 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 ...
266
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 ...
265
votes
4answers
99k 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 ...
252
votes
20answers
79k 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 ...
247
votes
16answers
43k views

Why are shortcuts like x += y considered good practice?

I have no idea what these are actually called, but I see them all the time. The Python implementation is something like: x += 5 as a shorthand notation for x = x + 5. But why is this considered good ...
231
votes
3answers
82k views

Pros and Cons of Facebook's React vs. Web Components (Polymer)

What are the main benefits of Facebook's React over the upcoming Web Components spec and vice versa (or perhaps a more apples-to-apples comparison would be to Google's Polymer library)? According to ...
224
votes
13answers
34k views

Should you write your back-end as an API?

I had a heated discussion today about our MVC application. We have a website written in MVC (ASP.NET), and it usually follows the pattern of do something in the view -> hit the controller -> ...
221
votes
7answers
18k views

Does using == in JavaScript ever make sense?

In JavaScript, the Good Parts, Douglas Crockford wrote: JavaScript has two sets of equality operators: === and !==, and their evil twins == and !=. The good ones work the way you would expect. ...
218
votes
25answers
25k views

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

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 applications for various employers, including a project ...
217
votes
15answers
24k 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 ...
206
votes
15answers
51k 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 ...
204
votes
21answers
29k views

Leaving intentional bugs in code for testers to find

We don't do this at our firm, but one of my friends says that his project manager asked every dev to add intentional bugs just before the product goes to QA. This is how it works: Just before the ...
204
votes
16answers
15k views

Started wrong with a project. Should I start over?

I'm a beginner web developer (one year of experience). A couple of weeks after graduating, I got offered a job to build a web application for a company whose owner is not much of a tech guy. He ...
201
votes
29answers
17k 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
64answers
118k 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 ...
185
votes
16answers
31k views

What's wrong with comments that explain complex code?

A lot of people claim that "comments should explain 'why', but not 'how'". Others say that "code should be self-documenting" and comments should be scarce. Robert C. Martin claims that (rephrased to ...
183
votes
24answers
70k views

If immutable objects are good, why do people keep creating mutable objects?

If immutable objects¹ are good, simple and offer benefits in concurrent programming why do programmers keep creating mutable objects²? I have four years of experience in Java programming and as I see ...
178
votes
18answers
69k 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 ...
172
votes
8answers
98k views

What is the difference between writing test cases for BDD and TDD?

I have been learning writing test cases for BDD (Behavior Driven Development) using specflow. If I write comprehensive tests with BDD, is it necessary to write TDD (Test Driven Development) test ...
171
votes
9answers
12k views

Why do many exception messages not contain useful details?

It seems there is a certain amount of agreement that exception messages should contain useful details. Why is it that many common exceptions from system components do not contain useful details? A ...
169
votes
17answers
17k views

How would you know if you've written readable and easily maintainable code?

How would one know if the code one has created is easily readable, understandable, and maintainable? Of course from the author's point of view the code is readable and maintainable, because the author ...
168
votes
17answers
10k views

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

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, ...
167
votes
1answer
89k views

Where can I find programming puzzles and challenges? [closed]

I'm trying to find places where I can hone my craft outside the context of school or work. Are there places online, or books available, where I can access lists of programming puzzles or challenges?
166
votes
24answers
21k views

How to apologize when you have broken the nightly build [closed]

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 ...
166
votes
23answers
15k 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 ...
164
votes
6answers
55k views

Why do dynamic languages make it more difficult to maintain large codebases? [duplicate]

Large codebases are more difficult to maintain when they are written in dynamic languages. At least that's what Yevgeniy Brikman, lead developer bringing the Play Framework to LinkedIn says in a video ...
163
votes
24answers
18k views

When is a BIG Rewrite the answer?

Just read the question about the Big Rewrites and I remembered a question that I've been wanting answered myself. I have a horrible project passed down to me, written in old Java, using Struts 1.0, ...
161
votes
17answers
14k 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 ...
161
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 ...
161
votes
19answers
13k views

How do I review my own code? [closed]

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 ...
158
votes
9answers
21k 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, ...
155
votes
16answers
14k 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. ...
153
votes
10answers
19k 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) ...

15 30 50 per page