8

šŸ™‹šŸ»ā€ā™€ļøHello! This is Julyā€™s installment of UX research updates for Meta! You can check out past installments here, or last monthā€™s data science update here.

Today, Iā€™ll be talking about findings from user research we conducted about how people are learning to code and teaching others how to code.

Research background

This research was motivated by questions of how Stack Overflow may better serve people new to programming. More specifically:

  • What motivates new developers to learn to code, and how are they learning? What tools or communities are they using, and what do their workflows look like?

  • How are code teachers teaching people to code? Any best practices, what resources do they share with their students, and what do their workflows look like?

We conducted interviews with people sourced from our social networks and the community. Participants included people with less than 3 years of programming experience, a college Python instructor, Stack Overflow moderators and answerers, and leaders of various technology communities. Out of respect for peopleā€™s privacy, any quotes Iā€™ve included here have been combined or paraphrased.

What motivates new developers to learn to code, and how are they learning?

The new coders I spoke to were driven to learn code so they could make career changes. They are self-taught and used a wide range of resources to learn, including online courses, YouTube videos, blogs, demos, and Twitter. They initiated their learning process via online courses (discovered via Google), and organically amassed resources over time.

ā€œI found resources by googling ā€œlearning to code python.ā€ One of the resources I found showed me an online course. Then I found out about Code Academy. Iā€™ve progressed from online courses to books to YouTube channels. The more confident I become, I [learned] that following tech people on Twitter is a great way to figure out how to get new resources.ā€ - New coder, 3 years experience

ā€œIā€™m learning because I want to leave clinical medicine and go into research/policy analysis. I started using Datacamp last spring to learn R.ā€ - New coder, 1 year experience

New coders describe being overwhelmed at the beginning of their learning process ā€“ everything from vocabulary to the research process was new. This insight was strongly reflected in the experiences of those teaching code, who described the need to scaffold information for their students and to teach them how to gather information properly.

ā€œI take 5 min to find something, evaluate 30 pages, looked at 5, spend 1-2 min on each, and navigated to one. Whatever time it takes me to deal with it, itā€™ll take a novice 10x. If I have to go through 30 pages of search results then what do you expect of a novice? It takes learning to put natural language vocab to a coding question; those are you words you donā€™t have yet.ā€ - College instructor

ā€œSometimes you donā€™t even know what to search for. Sometimes copy and pasting an error helps, other times you come up with your own keyword search. When youā€™re learning itā€™s hard to know what to doā€¦ What people consider normal tech language can be super overwhelming. [On SO sometimes people say] ā€˜donā€™t ask questions you havenā€™t tried to find an answer forā€™. It would be nice if they could elaborate on ways to search the site.ā€ - New coder, 1 year experience

What motivates people to teach and lead code communities, and how do they teach?

Those teaching others to code are cautious about referring students to Stack Overflow. They described good teachers as being skilled in deconstructing student questions and scaffolding information.

ā€œCan you scaffold them to get there when teaching -- you canā€™t just throw them the whole thing. Iā€™m thinking about the problem differently than how a learner is learning about the problem. Can I try to understand the learners POV and how to break it down? What scaffolding will they need?ā€ - Leader in technology community

ā€œStudents need a safe space to ask questions. A question from a novice is not just about technical clarification. A noviceā€™s mental model is what has to be correctedā€¦ I usually caution against them using SO because the discussions there are working at a higher level than they need to be worrying about.ā€ - College instructor

People are incentivized to donate their time to Stack Overflow, open source communities, and teaching for philanthropic and practical reasons: to develop their careers, receive professional recognition, and to give back to communities that benefited them.

ā€œ[I got involved in open source] because I wanted to engage in activities that signaled my professional credibility.ā€ - Leader in technology community

ā€œSome people have the time capacity and [like the] philanthropic aspects. Others will require more incentive. I usually [answer questions] to help out and as a resume builder.ā€ - Stack Overflow answerer

Next steps

This research is being used to help us to continue improving the guidance we provide to question askers. Itā€™s also informing initiatives outside of the Community product team. If youā€™d like to participate in future user research sessions, you can join the research email list via your email settings.

šŸ¤˜Thanks for reading! Whatā€™s been your experience learning to code or teaching others to code? What do you wish you knew when you started to program or learn a new technology?

48
  • 92
    Learning and teaching is a fundamentally different activity than Q&A. I worry that this kind of research points to a desire from TPTB to make the site a tutoring platform.
    – Dan Bron
    Commented Jul 16, 2019 at 20:12
  • 17
    @DanBron I don't see this post suggesting that. Considering matters of learning and teaching can be entirely relevant for the purposes of clarifying the limits of what can be done within the Q&A format, and dealing with the new user expectations issue.
    – duplode
    Commented Jul 16, 2019 at 20:25
  • 58
    @DanBron That's to be expected. To oversimplify things a bit: SE has indirectly admitted that it is their intention to turn SO into a tutoring site for help vampires - even if it means changing the fundamentals of the site and driving away everybody who made the site the way it is. So we should be expecting more and more of these.
    – Mysticial
    Commented Jul 16, 2019 at 20:29
  • 14
    @Zoe Start here: meta.stackoverflow.com/questions/386584/…
    – Mysticial
    Commented Jul 16, 2019 at 20:32
  • 36
    @DanBron as far as I know, we're not making SO into a tutoring platform, and that wasn't the motivator for this research. To Duplode's point, understanding how people learn and teach outside of SO is important for us so we know where Q&A fits into their learning/teaching process and how we can better guide folks new to programming.
    – Donna StaffMod
    Commented Jul 16, 2019 at 20:40
  • 49
    I am eagerly looking forward for research on the topic of how professional programmers use Stack Overflow to solve their coding problems. Because this is how I use this site
    – gnat
    Commented Jul 16, 2019 at 20:40
  • 17
    @Mysticial itā€™s quite a leap from Timā€™s opinion on that post and ā€œturning SO into a tutoring siteā€. Have you got better evidence?
    – Martijn Pieters Mod
    Commented Jul 16, 2019 at 20:53
  • 15
    @fbueckert Maybe they mean <3 ? :) Commented Jul 16, 2019 at 21:21
  • 14
    @Mysticial Iā€™m going to insist: whatā€™s your evidence? Just a feeling you have? Because that link to Timā€™s response feels like you are only pointing sentiment that confirms a bias, to put it bluntly.
    – Martijn Pieters Mod
    Commented Jul 16, 2019 at 21:29
  • 28
    @Mysticial Iā€™m sorry, but I am rather fed up with that myth. Itā€™s not true, itā€™s never been insinuated or stated by the company that thatā€™s their goal. Rather, there have been some (in my view) enormous over-reactions thrown by community members that have given rise to this idea, but without any proof. And you were the one perpetuating it here, so you are now the one Iā€™m calling out. If you donā€™t have proof for that assessment, please stop repeating it.
    – Martijn Pieters Mod
    Commented Jul 16, 2019 at 21:42
  • 13
    @MartijnPieters I'm offering to show you the (admittedly circumstantial) proof in chat. Take it or leave it. I'm willing to be convinced otherwise, but given the information I have and the observations of the site, I stand firm on my position.
    – Mysticial
    Commented Jul 16, 2019 at 21:44
  • 32
    I get that this ain't popular, but close voting it, really?`
    – Magisch
    Commented Jul 17, 2019 at 6:37
  • 59
    "This research was motivated by questions of how Stack Overflow may better serve people new to programming" - yeah, lately everything SE does seems to be motivated by that. If I were you I would start some research on how to avoid becoming the next Yahoo Answers, because that's where you're going to end up if you only focus on "people new to programming" instead of the "professional and enthusiast programmers" which were instrumental in making this site popular.
    – l4mpi
    Commented Jul 17, 2019 at 10:40
  • 9
    @Trilarion 'It's not like we have something against them learning how to program here, but if they do it here, they have to make it in an accepted way.' - But that's the only issue that I see. In my time on SO, very rarely have I seen someone genuinely be "unwelcoming" to new users when they post questions. What new users class ad "unwelcoming" is the actual dvs/cvs and that, to my knowledge hasn't been addressed by SO recently stating that it isn't "unwelcoming" to dv/cv. This leaves us, the active folks in the community in a pickle. Damned if you do, damned if you don't.
    – Script47
    Commented Jul 17, 2019 at 10:41
  • 12
    @MartijnPieters Looks like Mysticial's impression is definitely coming from official sources, "We will empower our long time users to become mentors and teachers in order to bring the spirit of Stack Overflow back to what it was in the beginning, a place where people come to share and learn."
    – Booga Roo
    Commented Jul 19, 2019 at 1:51

6 Answers 6

88

Here, I will focus on this quote:

ā€œStudents need a safe space to ask questions. A question from a novice is not just about technical clarification. A noviceā€™s mental model is what has to be correctedā€¦ I usually caution against them using SO because the discussions there are working at a higher level than they need to be worrying about.ā€ - College instructor

The instructor recognises SO for what it is, and steers their novice students away from it, because it is not what they need at such an early stage of their learning. Forming the basic mental models requires a sort of work and of one-to-one guidance that we are not in a good position to supply.

That much is well known, and follows directly from the site's core principles. There is, however, a second aspect of the situation well worth highlighting: the instructor actively cautions students away from SO in order to counter the natural draw of learners towards a place where answers are posted. That doing so is necessary follows from a tension inherent to how SO works: the site aims at producing a library of reference posts aimed at a general audience by inviting specific questions from individual users. That being so, it is not surprising that some users assume the site is a platform for individual guidance. (For a more fleshed out discussion of that theme, see Travis J's excellent Content, rules, and perceptions).

In a nutshell, this is the new user expectations problem: how can the initial user experience be adjusted so that pitfalls are avoided, and nature of the site gets conveyed more effectively? Shedding light on that would be a very valuable outcome of the research being undertaken.

8
  • 25
    I've been saying for a long time that the core issue is how we introduce ourselves to new users. We, to be blunt, suck at properly setting expectations, and that's not just limited to SO; every site on the network will have that problem, to a greater or lesser degree.
    – fbueckert
    Commented Jul 16, 2019 at 23:54
  • 7
    I think there's cognitive dissonance at work. People can't believe that the site that helps them and consists of questions asked by individual users doesn't exist to help them individually. So when they read instructions which tell them not to ask what they want to ask, their minds edit it out. That would explain the disconnect. It seems like the instructions are perfectly clear and people are ignoring them. And some of them are. But to say that all of them are deliberately ignoring instructions because they want to get downvoted doesn't make sense. It requires another explanation. Commented Jul 17, 2019 at 1:31
  • 27
    @ScottHannen That's one way of framing it. The flip side of the coin, however, is that we need people to believe in something which is quite nontrivial. For instance, I believe "think of your question as a contribution to a public Wiki" is fairly reasonable advice to a new user. Does the user interface align with such an expectation? Hardly: it looks, first and foremost, as a tool for individuals to ask questions. My point, I guess, is that the dissonance is not just in the minds of the users. Though I don't think it can be fully eliminated, it is well worth it to try attenuating it.
    – duplode
    Commented Jul 17, 2019 at 3:21
  • 7
    Then should there be a separate "Stack Overflow Babies" sister site where you are guided through simple programming questions? (I think not.) Or a specialized Ask Question Wizard which focuses on drilling down to "I think I have an incorrect mental model here, can you spot it?" (I think maybe?) Should there be a major clarification as to how you can be "not unwelcoming" but still demanding? (I think definitely! But we don't need that - they do. The people who felt we were unwelcoming).
    – tripleee
    Commented Jul 17, 2019 at 4:50
  • 4
    Can we be more welcoming by managing expectations?
    – Raedwald
    Commented Jul 17, 2019 at 9:13
  • 11
    Thatā€™s a good analysis, thanks for sharing your thoughts. I agree re: our product doing a better job of setting clear expectations. I think there is also still room to explore how/if SO can be more useful to students - eg. a tutorial about how to research would be a pretty straightforward one, since that is a skill that we found many students struggling with yet it's a core expectation on our site. It may not be enough for total novices but it's the type of thing that could help a more advanced student be slightly more likely to post a good question.
    – Donna StaffMod
    Commented Jul 17, 2019 at 15:57
  • @Donna Thanks; I plan to post a second, more personal, answer later. I like your remark on more advanced students: there definitely is a grey zone between people whose immediate needs can't be met by the SO format and people who feel at home here right from the outset.
    – duplode
    Commented Jul 17, 2019 at 16:50
  • 2
    @Raedwald That's a very similar diagnosis, though I'd rather frame the interventions to address it in a different way. (I feel the message should focus on the content -- what are we trying to accomplish -- rather than on the people --who we'd want to attract. That point is perhaps a bit tangential in the context of this question, though.)
    – duplode
    Commented Jul 17, 2019 at 16:57
70

I found this response interesting, emphasis mine:

"Sometimes you donā€™t even know what to search for. Sometimes copy and pasting an error helps, other times you come up with your own keyword search. [...] What people consider normal tech language can be super overwhelming. [On SO sometimes people say] 'don't ask questions you havenā€™t tried to find an answer for'. It would be nice if they could elaborate on ways to search the site." - New coder, 1 year experience

Thinking of new ways to search for information is an increasingly more demanding challenge, and that does not only apply to learning developers. As the amount of data increases at an overwhelming speed (whether on Stack Overflow or across the various domains), the expected requirements of an information system will also become more demanding.

It's a known fact that the site's search capabilities are subpar, to the point that searching the site via Google or Duck Duck Go will often provide better results. One might argue that (1) people are supposed to find the solutions to their problems from those search engines in the first place, and that (2) as people know that these search engines work well, they can just use that instead and they can leave it at that. I do not disagree entirely, although from a UX perspective, this leaves the site with a cornerstone component sitting off-premises, which does not couple that well with the site's Ask a Question wizard using its own search engine to discover duplicates automatically, nor does it currently cope well with experts searching for duplicate targets to recent questions.

In the end, it's hard for me to grasp how this research can contribute to better asking, but at least it ought to highlight the importance of searching before asking, and that the current tools have rough edges that make the task of finding answers harder in many situations. If there is any hope in Stack Overflow to maintain its place as a repository of quality questions and answers, there should be greater research investments in information retrieval methods. This would eventually require user oriented experiments just the same, and allow us to obtain quantitative metrics of how successfully are developers finding solutions to their problems.

15
  • 41
    Meta alone offers hundreds, of not thousands of problems with the site. I don't understand why they need research when they already have a massive backlog/list. Commented Jul 16, 2019 at 20:43
  • @Zoe Oh, right. This is just an extended version of what would become a Twitter thread. Meta doesn't count, right? :)
    – E_net4
    Commented Jul 16, 2019 at 20:45
  • 6
    Apparently not. Commented Jul 16, 2019 at 20:46
  • 2
    On a slightly more serious tone, I followed this line of thought to point out that research can take a challenging (and hopefully fruitful) focus.
    – E_net4
    Commented Jul 16, 2019 at 20:49
  • 2
    What do you wish you knew when you started to program or learn a new technology, and why was it "which book I should read"? Commented Jul 16, 2019 at 20:55
  • 25
    I think that example hits a very specific note; for years, we've been saying that SO isn't the place to be taught how to program, that there's a barrier to entry, and that it's deliberate. At least, that's the assumptions I've been making, and have been reinforced by SE. So, if there's going to be a change to that...we sorta need to know about it.
    – fbueckert
    Commented Jul 16, 2019 at 21:18
  • 16
    "It's a known fact that the site's search capabilities are subpar". Well known and old. See this 10 year old post identifying search as the single biggest barrier to entry on Stack Overflow.
    – Dhaust
    Commented Jul 16, 2019 at 23:27
  • 5
    @Zoe: Research isn't oriented toward finding the problems, but solutions. Very few of the problem reports come with a solution that is technically feasible, let alone a good idea.
    – Ben Voigt
    Commented Jul 17, 2019 at 5:26
  • 2
    @BenVoigt That doesn't seem true. All of the research Qs I've seen posted on Meta by Julia, et al are focused on problems. As for the problem reports on Meta, it may be true that solutions are difficult, but I think no one will agree with you that "very few" are good ideas or are technically feasible to fix. And the cost is similar to that of climate change. Expensive to fix in the short term, but absolutely unaffordable not to in the long term. The effect of not implementing any fixes or solutions for the barrage of issues reported over the last 10 years is simply the death of SO.
    – TylerH
    Commented Jul 17, 2019 at 15:15
  • 1
    @TylerH: I'm not saying to ignore the problems. I am saying not to have a knee-jerk reaction and make the change suggested in the first comment that appears. Most of the offered solutions are terrible ideas. For just one example: "mandatory comments when voting" (or even "eliminate downvoting") gets proposed over and over by people who see a problem but haven't done any research on the intricacies.
    – Ben Voigt
    Commented Jul 17, 2019 at 15:19
  • 2
    @TylerH: And I'm not saying that this post and similar ones by Julia are doing the right research. I was just responding to Zoe who questioned whether any research is needed, since we (metazens) already have such a long list of known problems.
    – Ben Voigt
    Commented Jul 17, 2019 at 15:21
  • 2
    "It's a known fact that the site's search capabilities are subpar" I've sort of come to expect that on-site search features are bad - everything from Reddit, Thingiverse, to SO, has crappy search. And, IMHO, when a vast majority of your search traffic comes from google and the like, and not from on-site search, fixing the on-site search doesn't need to be a priority. Money is be better spent on other features and improvements. Doing search well if you're not a search engine is hard and expensive. Commented Jul 18, 2019 at 9:18
  • 1
    in Cletus's 10 year old post "Anything that's worse than a Google custom site search should be replaced by a Google custom site search." -- huh... why doesn't SE just use a Google custom search? Does it have an API they could link to the Q/A wizard? That sounds pretty good actually.
    – jrh
    Commented Jul 18, 2019 at 13:49
  • 4
    @jrh The one thing SO search has over Google are the SO-specific operators (the advanced search ones, as well as tag filtering), which are quite helpful for curation purposes.
    – duplode
    Commented Jul 18, 2019 at 20:20
  • 2
    @jrh simple reason: I'm pretty certain that the companies that pay for their 'Q&A for work' or use the on-premise installation of SO would definetly not approve of their search queries and results being routed through google. So an internal search engine is needed and at that point one might as well use it for all users to find more bugs and make it easier to test new stuff. Commented Jul 19, 2019 at 7:26
55

I tutor on the side - it started out being a tutor in college, not having students to tutor or help people out (which led me here to begin with), but I now effectively coach people who want to transition into software engineering.

It seems apparent that Stack Overflow wishes to shift its focus to mentoring, but the hard and undeniable truth about mentoring is that it requires dedication. Both parties have to be dedicated to actually learn something. In the same fashion that a lazy student won't bother with assignments or course work, a lazy teacher or tutor serves as more of an obstacle rather than a benefit.

Thus, the ones who are truly dedicated to wanting to make a change or a tweak to their lifestyle would take the time to amass all of those resources. This is not news; we've all done this before when studying up for some test or even getting information about a specific social event. Information is king.

The main disconnect I have with this is that...well...the professor's timely advice - about the conversations here being at a "higher" level are accurate, if not slightly misphrased - is at high risk of being overlooked. Conversations at a "high" level are general and abstract; conversations at a lower level involve heavy implementation and are very explicit with details and concepts would be lost on beginners (e.g. streams in Java are not a loop replacement yet that's how they're often taught). Let's not forget that we're trying to answer all questions for professionals too; if a beginner has a question we can answer and that they understand, awesome! That shouldn't stop us from answering the low-level questions.

I get the impression that Stack Overflow really wants to nurture and mentor this next generation of coders. I said it before, that's how I got started here. I feel like I've changed my direction here in that mentorship is what I do now as a by-product, but it isn't the specific focus since there's not enough hours in the day (and I don't get paid like I do when I tutor). The issue that Stack Overflow is about to face with a goal like this: allowing students to leverage a resource such as this for mentorship will drain it of the resources which made it good in the first place.

22
  • 3
    "I don't get paid" - I have an interesting idea, what if there would be "Ask Jon Skeet" button for premium accounts or even directly "Pay 10$" to get answer from those top users or even "Buy more reputation points"? =D
    – Sinatr
    Commented Jul 17, 2019 at 9:47
  • 12
    @Sinatr I'd be very leery of any feature that allows askers to pay; that sends a message and changes how people approach the site. Especially when a paid account or question gets moderated; how do you reconcile the fact that the account is paid for, but still posts absolutely horrible questions? It just doesn't work.
    – fbueckert
    Commented Jul 17, 2019 at 13:16
  • 1
    @Sinatr: "... to get answer from those top users". Should the result be public? Commented Jul 17, 2019 at 14:01
  • 3
    @Sinatr "Buy more reputation points" That would undermine the whole concept, wouldn't it? Commented Jul 17, 2019 at 14:03
  • 1
    @Sinatr "even directly "Pay 10$" to get answer" Could maybe integrated with the bounty system. Bounties with real $$ and StackExchange takes a cut for providing the platform. Commented Jul 17, 2019 at 14:29
  • 1
    Perhaps instead of dedication the right word is commitment. Both parties must be committed to the tutoring process. That's a challenge. I like to provide short-term help on SO, but I also like being able to back away like a total stranger. I'd be interested in trying a tutoring approach, but I suspect that it will come back to a similar problem. Instead of low-quality questions, you'd have (this sounds so horrible) low-quality recipients. Downvoting questions is hard sometimes. How do you downvote a person? Commented Jul 17, 2019 at 14:30
  • 10
    You raise great points and the issue you raised around dedication on both sides is spot on. Mentorship is certainly a direction weā€™ve explored and are continuing to explore, but based on the issues you pointed out, I'm personally not sure where/how it fits in to our current system and if it could succeed. Thanks for sharing your thoughts.
    – Donna StaffMod
    Commented Jul 17, 2019 at 15:51
  • 1
    @ScottHannen: I suppose my word choice is a matter of semantics. The way I see it, you can be committed to your everyday survival but not dedicated to improve or expand upon it. Note that nowhere in my answer did I point anything out about "voting", since when you're mentoring, being rated or judged is actually quite counterproductive.
    – Makoto
    Commented Jul 17, 2019 at 16:15
  • 3
    @ScottHannen - further to the point of "downvoting" a person, I would say that I've had a few hard conversations with those I've tutored or mentored, and have had to tell them that this just wasn't for them. That isn't a downvote since it's honest and constructive feedback. Once you divorce the notion of voting from mentoring, this becomes a lot simpler to consider and a lot easier to see why it's actually not gonna work on a site like Stack Overflow.
    – Makoto
    Commented Jul 17, 2019 at 16:17
  • 1
    @Makoto - while I think it's helpful to talk about a tutoring/learning solution, it's a given that it wouldn't mix with the QA site well. It might make sense if it was affiliated or connected, though. I don't really think that we would downvote people. But we already know that there are types of people we can't help, or can't help on this site. I can see the same or similar problems arising on that site. I still think it's a potentially good idea. There are already sites for it, like codementor.io. Commented Jul 17, 2019 at 16:44
  • 11
    @ScottHannen: And you have subtly stumbled upon my point. Stack Overflow isn't going to ever be a mentoring site; its strength is Q&A. By trying to shoehorn or make it even related to mentoring, the site will lose the charm that brought about its notoriety. Worse, you may even have a mass exodus from those who just want to answer questions but don't have the luxury of time or other resources to actually mentor anyone.
    – Makoto
    Commented Jul 17, 2019 at 19:25
  • 1
    @Sinatr if people would be willing to pay they would simply pay and not come to SO... (obviously you should be talking about actually paying for help at reasonable rate starting 100-200$/hour... making it rather 30-50$ per answer to basic question and not your coffee-cup suggestion) Commented Jul 18, 2019 at 5:15
  • 2
    @ScottHannen: Both employees of McDonalds and Amazon have paid employees and staff to support shifts and changes in market demand, so it would make business sense for McDonalds to create a coffee counter if that's what their customers wanted, and it makes sense for Amazon to diversify its portfolio to beyond books. However, Stack Overflow volunteers are simply that - volunteers. We don't get paid, so there's little to no incentive to actually move away from the part of the platform we started with to another platform with what would be more work and less enjoyment.
    – Makoto
    Commented Jul 18, 2019 at 14:59
  • 3
    @ScottHannen: You can't ignore the value of someone's time, which is why I charge a nominal amount to college students for my services. It's not enough to break the bank or anything like that, but it is enough to symbolize that we both respect and value each other's time. There's no model here at Stack Exchange to even come close to doing that, and there's no clean way to shoehorn one in lest we become like Experts-Exchange.
    – Makoto
    Commented Jul 18, 2019 at 15:00
  • 4
    @ScottHannen: The only remark I wish to leave with this discussion is, someone will be in the room with this same mentality that thinks that the Stack Overflow model can be applied to mentoring (paid mentoring at that, since that's also what codementor offers), and I fear there won't be enough people in the room the the mentality of "no, this really isn't going to work". I feel that I've explained my stance on this, so I will not be further elaborating.
    – Makoto
    Commented Jul 18, 2019 at 16:11
18

Learning to program is learning to debug. When the code you wrote to solve a particular problem "doesn't work", you can have one of these problems:

  • A) You have a syntax error, so your program won't even compile or run.
  • B) Your solution and syntax are correct, but you made an implementation error (off by one, comparing with the wrong variable, ...).
  • C) Your observations or test methods are incorrect (you have an input error but you think it's an output error, you're looking at the wrong [version of your] program, you're actually writing the file you expected to read, you're looking at the wrong database, ...).
  • D) You have engineered the wrong solution for said problem; this approach won't solve it (not ever, or not under certain conditions).
  • E) Your solution and implementation thereof are correct, and your verification method is correct, but there's an external problem (the compiler, runtime, CPU, environment, third-party library you rely on, ...).

So when you're writing a program and you want to verify it's working, you:

  1. Note what behavior you want to observe under the conditions you want to verify
  2. Run your program, providing the conditions you want to test
  3. Validate the output or result

This goes for entire programs, or web pages, or forms, but also single methods or even single statements. Now if your output doesn't match your expectations, you will need to learn to debug. Set breakpoints, execute your code line by line, and verify during each step that the (intermediate) variables still contain the values you expect, thereby verifying that your implementation matches your apprehended solution. If that matches up, then it's time to take a step back and reevaluate whether your solution is actually the appropriate solution for the original problem.

When learning to program, you get through the steps A-E, generally in that order. I myself, with more than twenty years of programming experience, on a daily basis still go through A-E (mostly D though, thanks for unit tests).

Now what does this have to do with Stack Overflow? Each question generally falls under one of these five categories. What's the problem with them?

  • A) Is just plain offensive. Don't dump your code and compiler errors, show that you have tried to resolve them. For each compiler error, there's a multitude of Q&As already on the site. Did none of them solve your problem?
  • B) You need to learn to debug. When I learned to program, there was no Internet (in our home). So when my output didn't match my expectations, I stepped through my code, line by line, and inspected my variables to hold them against my expectations. Were my expectations wrong, or was it my implementation? Learning to debug is, I think, something one must do on their own. There are tons of resources online teaching you how to do so. Sure, it can be extremely satisfying to be able to spot a typo or mixup in someone else's code and help them along, but are we really here for such one-off questions that help nobody else?
  • C) This is just a question of accuracy. Make sure you look at the right things, and know how to recognize the right things.
  • D) This is where I think the interesting questions start. But someone asking about such a problem should explain why they think their solution solves their original problem. Lots of XY problem questions here.
  • E) Firewalls blocking outgoing requests, library authors not thinking about your use case, a runtime update that solves one bug but causes another ... this is where the knowledge base part of Stack Overflow stands out the most.

So what am I trying to say with all this? I'm not sure. Maybe that I'm becoming a grumpy old man who thinks everyone should have spent at least a few hundred hours shouting at their CRT monitor in the blue QBasic screen, searching for that mismatched { that actually needed to be a [, instead of posting your code and error message (if we're lucky) online.

Because there is absolutely (and unfortunately!) no lack of users who can copy-paste or write answers to questions about errors. Be it syntax errors, implementation errors or even errors in solutions. But yada yada fish and yada yada set a man on fire and stuff, there is a terrible lack of teachers, people who can politely and patiently take someone by the hand and point out where they went wrong in their thinking or actions, and so teaching them to solve this problem by themselves the next time.

I do not think that an online massive platform is the place to do the latter. You need dedication to do so, both from pupil and teacher. Given we don't really know the asker and their ulterior motive, and an answerer can run after having dumped their solution, this platform is not the place to teach debugging.

11
  • 5
    Iā€™m glad you linked to ELU, because this is indeed a network-wise problem. There are equivalents to your A-E for English problems, e.g.. On EL&U, remediation (A) is *open a $%#! dictionary *.
    – Dan Bron
    Commented Jul 18, 2019 at 11:03
  • The issue I see with this prescription of solutions to A through E is that they smack of 'back-in-my-day-ism'. Not to say you are old (I don't know your age), maybe there is a better term for this, but the suggested 'responses' to each scenario seem very dogmatic and dependent upon your personality, and thus, dependent upon the way you were raised and educated, and the environment and culture you lived in during that time.
    – TylerH
    Commented Jul 18, 2019 at 18:11
  • For example, "We didn't have the internet at home when I started" OK, but people today do. Kids today become familiar with the internet before they learn how to do long division (and in the US they don't even teach long division anymore to kids...). They are going to turn to the internet to find out why they have a problem because that's what they have been taught to do. For example, my sister teaches high school English. When she asks them to go to a website such as Facebook, they go to Google and type that website in the search bar, instead of typing in facebook.com (this is a true story).
    – TylerH
    Commented Jul 18, 2019 at 18:15
  • To challenge this kind of approach to problem-solving is to try and spite the weather; it's futile. Times are changing, and we have to adapt. Now I'm not saying we have to cater to the lowest common denominator, but expecting people to learn the way you did just because it's the way you learned... well, someone in that camp won't even realize they're alone when they run off the edge of the cliff, due to the blinders they're wearing.
    – TylerH
    Commented Jul 18, 2019 at 18:17
  • 1
    As for the rest of the post, I only sort of agree with it -- it misses a whole portion of content and behavior on the site by only focusing on debugging-type questions.
    – TylerH
    Commented Jul 18, 2019 at 18:17
  • 5
    I don't believe the newer generation have to learn the same way we do, @TylerH. It's not so much how they learn, but the fact that certain skills can't be learned here, and the expectations we have is that users have those skills. At some point, we need to draw a line as to what we can help with, and what we can't. Turning SO from a repository of knowledge into a mentoring service is a huge shift. It changes expectations, goals, approaches, and a whole lot of other stuff. Stuff that most long term users didn't sign up for.
    – fbueckert
    Commented Jul 18, 2019 at 18:23
  • All questions are the result of a failure in debugging.
    – Kevin B
    Commented Jul 18, 2019 at 19:07
  • 1
    @KevinB There are more than just debugging-type questions. Insufficient knowledge questions for example. Commented Jul 18, 2019 at 20:18
  • @Trilarion that defines pretty much every question. If you have a question you can't answer, it's because you don't have the knowledge to debug it properly. it's still a failure to debug.
    – Kevin B
    Commented Jul 18, 2019 at 20:19
  • 2
    @KevinB What do you mean by debuging if there is no code? I could ask for an algorithm, or about the behavior of a language feature or many other different things? Commented Jul 18, 2019 at 21:11
  • 1
    deciding to not do any debugging at all and ask here instead is still a failure to debug.
    – Kevin B
    Commented Jul 18, 2019 at 21:11
13

My teaching experience stems from entering small development teams as a Tech Lead or Team Leader with a focus on fixing development culture or improving code quality.

Most of these teams were made up from junior developers, or developers who are, or at least were relative juniors in .Net and C# specifically when they joined the team. In all cases there has been an absence of a Senior or a .Net seasoned developer to offer guidance and review or to mentor the other developers starting their .Net journey.

In these environments, even the developers with 20 years experience in other languages fell into the same trap as the new developers who were straight out of college.

When faced with the requirement to learn a new development language while on the job and produce results there is often not enough time afforded to adequately research and learn the skills before they need to be implemented

My observation is that the time pressures of this scenario (learning on the job without a mentor) leads to a Lazy pattern of learning that becomes almost Rote learning, like this:

  1. Search the current code base for examples similar to your immediate task
  2. if none found, search the internet for 'how-tos'
  3. Copy and paste the code example into your application
    • Note that Stack Overflow is likely to be a primary source of these code examples if found online.
  4. Keep trying online examples until you find one that works.

Rote learning is not all bad, after repetitively finding and using the same code patterns you might eventually remember them, but if you do not understand the code that you reference, you cannot be sure that you are implementing it in the correct manner.

Rote learning is not really learning at all in this sense, it helps you remember, but does little to assist you to understand or actually learn about the code you are writing.

What is worse is that if you accidentally stumble across a bad example, perhaps an implementation that leads to catastrophic performance issues or the code example is out of date in a way that it will hinder optimisations or injections... that example can quickly become the standard that all other developers in your team will adopt when they don't already understand how to complete the task.

This is a bad learning behaviour that can be detrimental to the learning of any new language.

This can quickly spiral out of control, and I suspect Stack Overflow and indeed the greater Stack Exchange community may need to find another mechanism for us to rate both questions and answers. Because lets face it, for some tags SO has hit a saturation point where most of the questions that learning developers are going to ask have most likely already been asked on SO in a dozen different ways.

If enough fledgling developers are able to get by and benefit from low quality or less than best practise solutions posted on SO, then they are likely to up-vote the solutions that they found to work, due to search optimisations, these developers are only likely to see answers to existing and outdated questions that already have high vote counts, or are marked as the accepted solutions even if a more recent solution is posted that may be much better practise than the accepted one.

So as accidental as it is, SO is interpreted and used by the wider community as a tutorial site first.

I for one would love to see a feature added to SO where a "Verified" badge could be awarded by users who have high rep in the given tags or a separate vote tally like votes in last 12 months was visible to users and encorporated into the default filtering.

It is important to also be able to verify questions themselves, for questions against older versions of frameworks and software packages that have matured, many scenarios can no longer be reproduced. It would be nice to be able to filter out those questions from some searches, the question is still valid in many cases, and there are likely to be very insightful responses that we don't want to lose by removing the question altogether, but it would improve the quality of new Developers across the globe if we could quickly flag certain questions as no longer relevent.

For instance, I read many questions and this is the first response that pops into my head.

If you are asking that question today, you are clearly starting with an outdated version of that [runtime|package|framwork]

Even if I post an answer with a flower version of that comment, with links to all sorts of reference material or other SO questions to back it up, my answer is not likely to be deemed useful when or if reviewed by the SO community.

Perhaps this verified feature should be an internal list where trusted users can "verify" the solution (and indeed the question) against a specific framework or component version. The search experience would be similar to questions with bounties, but geared to the user who wants to find the best existing answer to their question, where as bounties are offered to attract new answers to unsolved questions.

Verified questions then become the "Tutorial" side of SO, while still allowing the Q&A aspect to flourish.

Verify in this scenario should also allow trusted users to list specific versions that the question (or answer) does NOT apply to.

2
  • 6
    I found a bit of myself in the answer you posted there. The "Search for it in the existing code base or otherwise on SO" was basically how I learned all of my programming, with some extra steps to try & understand what I was adapting from and into. Your idea may be a boon to others who learn like that.
    – Magisch
    Commented Jul 18, 2019 at 7:45
  • Your "verified" feature feels close to what Tim Post discusses in this answer.
    – duplode
    Commented Jul 20, 2019 at 0:42
11

A different intersection that might be worth exploring is the potential role of answering as part of one's learning process.

My views are perhaps tinted by the fact that explaining things in writing has been an integral part of how I learn from early on. In particular, I began to teach myself Haskell many moons ago using the Haskell Wikibook, and Wikibooks encourages readers to comment on and tweak the text whenever they find something confusing (the site as a whole also invites learner participation in other ways, such as being open to class projects in which students create or improve books). That attitude translated naturally to Stack Overflow when I created my account here some time later, being at that point not exactly a beginner but still quite inexperienced.

Personal idiosyncrasies aside, I don't think I'm alone in seeing answering as a possible way of learning (to pick one Meta expression of that feeling I can recall right now, consider the advice to new users in this answer). After all, active engagement with a problem can become a rich learning experience, as long as the problem is close enough to the current limit of one's abilities. The tricky part here lies in being able to identify what one's current limit is, and how it relates to what is being carried out in the site. Developing such abilities is part of the formative work the educators from your quotes allude to.

(By the way, it is certainly possible for this kind of active engagement to happen while asking a question, and in fact we need that to happen so that questions and answers become full-bodied, complementary parts of the library. The main difference is that, in practice, it is a fair bit more likely for the engagement to be completely missing when someone asks rather than answers.)

On a closing note, I feel it is worth mentioning Using Stack Overflow to teach students to debug programs, a really interesting Meta Q&A from a couple months ago. Under the lens we are adopting here, that discussion can be read as an exploration of what does it take for a student to become a contributor, and of what sort of guidance is needed to bridge the gap that will inevitably exist at first.

3
  • 2
    Well yes and no. I stopped blogging about things I was learning about, because I saw a pattern: if you blog while you learn (or answer while you learn), you're just getting started with something. You don't know the ins and outs, you don't know the best practices or whether you're doing something wrong, and I recognize this with a lot of other blogs: people just dumped what problems they encountered when doing something. Yes, it might be useful for others, but at the same time it may not be the best advice you're giving out.
    – CodeCaster
    Commented Jul 18, 2019 at 10:00
  • 3
    @CodeCaster It indeed isn't always easy to tell when a topic is a challenge you are well equipped to tackle in this way from when it is over your head in ways you might not quite realise yet. In the Haskell community, we even have a specific manifestation of that phenomenon as part of our lore: the monad tutorial fallacy. That said, SO is probably a better platform than an open-ended blog to keep that under control, because it encourages objective, self-contained posts and technical feedback.
    – duplode
    Commented Jul 18, 2019 at 10:54
  • @CodeCaster Answering questions can help you learn about aspects of things you are generally very familiar with. An attempt to answer a question can lead you to reading transcripts of lectures, scientific papers, official documentation and code repositories. Such an answer has the potential of being better than that of a person that has stopped learning after achieving mastery. And even if it gives bad advise, there's still others around to point that out.
    – shmee
    Commented Jul 18, 2019 at 10:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .