Can sharing learning stats be beneficial to guide beginner students? Context

The main consensus in most compsci programs I have been at is that a sizable amount of students is inherently unable to learn how to code. An old entry on Jeff Atwood's blog summarizing the issue cites this 2006 article by Saeed Dehnadi and Richard Bornat, claiming:


  Formal logical proofs, and therefore programs – formal logical proofs that particular computations
  are possible, expressed in a formal system called a programming language – are utterly meaningless.
  To write a computer program you have to come to terms with this, to accept that whatever you
  might want the program to mean, the machine will blindly follow its meaningless rules and come to
  some meaningless conclusion. In the test the consistent group showed a pre-acceptance of this fact:
  they are capable of seeing mathematical calculation problems in terms of rules, and can follow those
  rules wheresoever they may lead. The inconsistent group, on the other hand, looks for meaning
  where it is not. The blank group knows that it is looking at meaninglessness, and refuses to deal
  with it.


It even goes on as to propose some of the prospective students to be advised away from compsci courses:


  7 Conclusion
  
  There is a test for programming aptitude, or at least for success in a first programming course. We
  have speculated on the reasons for its success, but in truth we don’t understand how it works any
  more than you do.


Today, I found a retraction from Richard Bonat, claiming his conclusions were affected by his mental health issues:


  2 How it happened
  
  Though it’s embarrassing, I feel it’s necessary to explain how and why I came to write “The camel has two
  humps” and its part-retraction in (Bornat et al., 2008). It’s in part a mental health story.
  
  In autumn 2005 I became clinically depressed. My physician put me on the then-standard treatment for
  depression, an SSRI. But she wasn’t aware that for some people an SSRI doesn’t gently treat depression,
  it puts them on the ceiling. I took the SSRI for three months, by which time I was grandiose, extremely
  self-righteous and very combative – myself turned up to one hundred and eleven. I did a number of very
  silly things whilst on the SSRI and some more in the immediate aftermath, amongst them writing “The
  camel has two humps”. I’m fairly sure that I believed, at the time, that there were people who couldn’t learn
  to program and that Dehnadi had proved it. The paper doesn’t exactly make that claim, but it comes pretty
  close. Perhaps I wanted to believe it because it would explain why I’d so often failed to teach them. It was
  an absurd claim because I didn’t have the extraordinary evidence needed to support it. I no longer believe
  it’s true.


Question

I've been a TA for compsci courses in three colleges and, in all of them, transparency was a core value: past exams, classes, and grades were made available from the very beginning. Failure rates were never lower than 30%, often beating failure rates for subjects widely regarded as more difficult, such as physics or calculus. 

On the one hand, some students might feel discouraged to put in the effort to learn knowing that they have a high likelihood of failing. On the other hand, it might be beneficial for them to know hiccups are expected and perhaps compsci might not be the way for them.

My questions are: do students benefit from knowing most of them will likely fail the subject? Should they be informed that there might be a high chance they won't advance past CS101?
We had a question recently that also touched on some of these same issues.

I am a fan of expressing that the material can be difficult, as it sets the tone and prepares students to work hard in a course. However, if failure rates are as high as you suggest, then that suggests something is going seriously wrong.

For context, I teach at a high school where kids apply during 8th grade into 4-year majors. They are tested in math and literacy, and we interview them to see if they are generally engaged kids. We do not evaluate them on programming or CS background, because most of the 8th graders have none.

If accepted, they cannot change their major at any point. That means that our CS kids will have a 4 year CS curriculum that builds upon itself, and it gives us teachers a very powerful motivation not to lose kids at the beginning. It simply isn't a viable option. A freshman who gets lost will probably remain lost for their next 3 years in the school.

Not every kid remains enthusiastic  about CS. That's okay! They applied to the school when they were quite young, and many move on to other interests.  However, over the last 3 years, we have had exactly one student not pass the AP test as a sophomore, and that student was dealing with significant mental health challenges that also brought about high absenteeism.

Now, a university program is not under the same constraints, and not every student at every institution can be classified as "gifted" (whatever that actually means), so I can absolutely accept that our results might be an outlier.

However, virtually everybody can learn to code. It comes down to what work the student puts in, and how well the instructor breaks down the concepts and designs the course materials.

My general advice to achieve high passing rates is to create good supporting materials to use with kids who struggle, and to break things down (and make connections explicit) far beyond what you would think you would need to. I know that that advice is quite vague!

And if you are ever unsure about how to break down an idea really clearly, ask around. (Heck, I could tell you about this one website devoted completely to getting answers to the problems of CS educators ... ;-) But please don't accept a 30% failure rate as the norm, or even as acceptable. So much more is possible!