Most Popular
1162 questions
55
votes
15 answers
Why did the percentage of CS bachelor's degrees going to women peak in 1984?
As shown by the following graph, the percentage of bachelor's degrees going to women in the US has increased over time in almost every major, with the dramatic exception of CS, which peaked in 1984 at 37%, then fell drastically, never to rise again…

Ellen Spertus
- 7,630
- 4
- 31
- 54
53
votes
11 answers
How bad is a Computer Science course that doesn't teach Design Patterns?
I'm at final year of my graduation in Computer Science in Brazil. The university that I study is one of the best in the country and my passion is for Software Engineering. It disappoints me, in Software Engineering classes, that no Design Patterns…

olegario
- 643
- 1
- 5
- 7
53
votes
12 answers
What are healthy, productive ways to encourage students to progress to more advanced constructs as opposed to staying with the familiar?
In my experience, there are always students who are resistant to moving to more advanced constructs. They want to stay with what they already know. For example, when they are taught arrays, they continue to use individual variables when they are…

Java Jive
- 2,349
- 1
- 15
- 24
52
votes
14 answers
Interesting Programming Exercises to Teach Inheritance?
I originally asked this over on Stack Overflow, but they suggested I look here instead:
I'm currently teaching my students about the concept of inheritance (we're using Python 3) but am unable to think up (or find) any meaningful programming…

Patch
- 631
- 1
- 5
- 6
50
votes
8 answers
Students can solve programming exercises but not explain their solutions. What to do?
I've seen too many cases when a student has completed a programming exercise (without cheating) but can't say, for example, what type of values a variable contains during program runtime (in case of Python programs).
It looks like the ability to…

Aivar
- 603
- 1
- 5
- 6
48
votes
17 answers
Why is computer science hard?
Data pretty regularly shows that computer science programs have among the highest failure and dropout rates of any college program. A number of sources all echo the finding that roughly one-third of incoming CS majors do not progress to a second…

Daniel R. Collins
- 1,252
- 1
- 6
- 14
45
votes
22 answers
If a program does not compile, should it get a mark of zero?
Following a discussion on the Academia SE, I would like to seek views here among Computer Science Educators on whether a mark of zero should be awarded if a student submits a program that does not compile for an undergraduate programming assignment.…

Dikran Marsupial
- 803
- 1
- 3
- 14
45
votes
21 answers
Real life examples of 0-indexing
It can be perplexing for students to begin counting at 0 when they enter a CS class. I made it a point over and over to talk about "Day 0" and "Week 0" in the opening days and weeks just to build familiarity with the idea. Even so, I sought when…

Peter
- 9,082
- 2
- 22
- 61
44
votes
22 answers
How to teach the value of the command line in high school?
Part of what I love about the particular adaptation I use for AP CS Principles — CS50 AP — is that my curriculum teaches students basic Linux shell commands in the Cloud9 IDE. Students learn things like cp, mv, mkdir, cd, ls, and zip (just to name a…

Peter
- 9,082
- 2
- 22
- 61
43
votes
16 answers
What is good age to start learning programming?
I am thinking of offering classes for people, maybe take 5 to 10 at the time. There would be 4 hours every Saturday, twice a month, for three months. So in total 6 such sessions. The language thought would be Javascript (and HTML, CSS).
I was…

Ska
- 571
- 1
- 4
- 5
43
votes
14 answers
Why don't more universities teach revision control?
In the answers to this question, it's suggested that one of the most common things that CS graduates still need to learn to be employable developers is revision control, and by inference that many CS graduates don't learn how to use it while at…

walrus
- 541
- 1
- 4
- 9
42
votes
15 answers
What advantages do students who learn how to touch type have?
Would a student's overall CS education benefit by having such a skill, and if so why not make it a required prerequisite?
An editor notes that there are three (at least) different ideas here that may be confused.
Does the user hunt and peck…

user 726941
- 633
- 1
- 6
- 9
42
votes
31 answers
Analogy for teaching recursion
When teaching recursion, what is the best analogy people use to teach the idea of recursion. There are some nice artistic representations
And the idea of repeatedly cutting a phone book or dictionary in half until you find a number/word (basically…

pluke
- 735
- 6
- 13
41
votes
14 answers
Teaching the humble for loop
So, in C-style languages, the for loop has a funny little syntax:
for (int i = 0; i < 100; i++) {
// do something
}
If we order these sections in a natural, intuitive fashion, we would get something like:
for (1; 2; 3) {
4
}
... which is…

Ben I.
- 32,726
- 11
- 68
- 151
40
votes
20 answers
Is it important to teach pointers in a first course using Java?
Many instructors teaching with Java started their education using earlier languages such as C or C++ in which pointers are essential. Pointers, however, are not a Java concept, though those same instructors may think of, for example, object…

Buffy
- 35,808
- 10
- 62
- 115