Joel Spolsky: How to ask more experienced programmers questions correctly

The Faddish and Brainwashing Usenet, Burning Man, and Stack Overflow Rules


image


Joel Spolsky, April 2018

There is a popular bike among developers that if your code doesn’t work, then you need to take a rubber duck and tell her - yes, duck - how this code should work: explain each line what should happen, what came out in the end, etc. The developers, who have tested this life hack on themselves, argue that in the process of detailed discussion of the problem, the inanimate object often manages to find its solution.

This is one of the tricks that can help solve the problem on your own during the programming process. Another way is to learn how to debug a program (debugging) on ​​a “divide and conquer” basis.. It is not possible to break a thousand lines of code for a single error. But you can divide the code into two parts and see what happens in the first half, and what happens in the second. Do it five to six times and you will reach the very line with the error.

Based on the foregoing, it is interesting to read John Skeet's checklist for writing the perfect question . John asks: “Have you carefully read the question in order to appreciate its intelligibility and understandability for a person who hasn’t seen the information that you have in your eyes?” By and large, this is a test with a rubber duck. Another option: “If code is included in the question, have you entered it in a complete but short program?” The emphasis on the short program is, in fact, a test of whether you tried to “divide and conquer” or not.

Roughly speaking, John’s checklist suggests that people first try to do what experienced programmers have already tried, and then ask others for help.

Unfortunately, not everyone has heard of this checklist. Or maybe he heard, but chose to ignore. The person has a problem with the code, he knows that there is a Stack Overflow question and answer system that can help him, and he does not have time to read the protocol of some nerd about how to ask questions.

Often there are discussions about whether Stack Overflow should allow questions from newcomers to programming.

When Jeff and I discussed the initial design of the system, I told him about a group about the C programming language, popular in the 80s on the Usenet network. It was called comp.lang.c .

C is a simple and limited programming language. You can find the C compiler only 100Kb , so, as you might guess, if you create a discussion exclusively for C, then the topics for conversation end very quickly.

And one more thing. In the 90s, C was a language for students who were just starting to get involved in programming. And these same students most often had the most primitive problems with C.. And they immediately ran with questions in comp.lang.c.

And the old people were bored there. Very boring. They are sick of nausea of ​​students who enter the group every September and ask why they cannot return an array of characters from a function, etc. Each. September.

These old-timers also invented the concept of FAQ (Frequently Asked Questions). Thus, they seemed to say “for God's sake, stop asking what Usenet has already been answered a hundred times”, that is, the old-school people wanted to answer only the most wondrous and esoteric questions that 99% of ordinary C programmers generally were not needed. The news group was fading because, in fact, it served only a small group of people who had been hanging around for about a decade.

That's what Jeff and I talked about. What should we do with questions from beginners?
In the end, it was decided that newcomers should be. Stack Overflow doesn’t have the concept of “too simple” questions ... But still, it’s best to first find the answer yourself before going to others for help.

We understood that some more “advanced” programmers might find it boring to read the same simple questions and they won’t contact us anymore. It's okay - Stack Overflow does not oblige anyone to sit there for life. Tired of reading newbie questions about the fact that they do not return local arrays of characters (“it works for me!”), And would you rather spend the rest of your life sorting music albums? As you wish, your right.

The fact that you are just joining the programming does not mean that your question does not have a place to be on Stack Overflow. I even specifically asked the question “But how to move the turtle in LOGO ? ”To show that website designers are happy to see absolute beginners at home.

But as always, according to the law of unintended consequences, this question almost caused a scandal - and not at all because of its simplicity. The problem is that I approached this matter in bad faith. Jeff Atwood said well in this regard : “A simple question is not bad. It’s bad when there is no effort to find an answer. ” ( Ah, well, that ).

For beginners, the number of points that must be filled before asking a question seems unnecessary, and sometimes simply strange. It's like a Burning Man festival. Do you think that you are going to an incendiary party somewhere in the desert, and upon arrival they shout in your face about some 10 principles, “Radical self-expression” and in the same vein, therefore, after washing the dishes, you need to collect every drop of water from the dry lake and take home - to hand over if necessary. Each community has its own rules, and at first they may seem bizarre and fun, or, if you're just trying to get some code to work, weird and abstruse.

Many of the Burning Man rules that make the festival so successful seem very abstract, but they make sense. The U.S. Land Administration Bureau, which allows for a desert festival, requires that no contaminated water be poured onto the ground because clay soil does not absorb well, which can lead to microbial growth and disease, but why explain it all if you can just to say that if visitors do not take away the water, then the festival will no longer take place?

Same thing with Stack Overflow. We do not allow too abstract questions to be published (“How to compose a program?”). Our general rule is: if the answer to your question is the size of a whole book, then you want too much. It’s like if you write “My kidney seems to hurt. How to cut it? ” Such a question sounds inadequate and even offensive to surgeons who have been learning how to do this for ten years.

What bothers me is that in trying to educate a new generation of developers, relying on diversity and inclusiveness, we are also building barriers to those who want to learn programming. Indeed, in many ways, the specific rules of Stack Overflow are just an obstacle. But even worse is the neglect and rudeness of newcomers to the forums.

I am very worried about this. As a developer, you have an unprecedented opportunity to create future scenarios . And the limitations that Stack Overflow throws in the face of young programmers harm not only them, but the Stack Overflow system itself, scaring away potential members of the community. Programming is not without problems; our goal is to make it easier.

Next year we plan to work hard on this area. We cannot change other people, make them be kinder. But I think we can improve some aspects of the Stack Overflow user interface that will motivate people to be more cultured; for example, we can tweak the prompts on the “Ask a Question” page or work on reactive moderation so that community members themselves can flag and complain about rude comments, which is currently not happening.

We are also working on a new feature, thanks to which you can send your question to a small group of people from your own team, which, perhaps, will help to create a certain friendly atmosphere in a huge metropolis, which is Stack Overflow.

Despite the fact that we strive to make Stack Overflow more comfortable, our main goal has always been to create the best resource in the world for program developers.

The average static programmer calls us 340 times. That is our strength. There are other sources of information about writing programs, but there is only one site that developers trust so much and need to take care of - it is like the Library of Congress for programmers.



image
Learn the details of how to get a sought-after profession from scratch or Level Up in skills and salary by taking SkillFactory online courses:



Read more



All Articles