# All Questions

757 questions
Filter by
Sorted by
Tagged with
33k views

### Why do we count starting from zero?

In computer science, we usually count starting from 0. Is there any effective way to explain why, to new programmers who ask why? I've read a bunch of different sources that list several reasons for ...
48k views

### Should I teach that 1 KB = 1024 bytes or 1000 bytes?

Which conversion should I teach to my undergrad students? That 1KB is 1024 bytes (binary) as everyone learned back in the nineties or the recent industry-led "friendly" conversion that says that 1KB ...
36k views

### Is it better to lie to students or to be pedantic when teaching Intro CS?

When teaching Intro CS in Java, I sometimes tell students things that are not entirely true, such as that, unlike abstract classes, interfaces cannot contain any code. (For those of you unfamiliar ...
25k views

### Is there some meaningful percentage of students who can't learn to program?

A few days ago, I had a high school sophomore (who is now in her third CS class, having passed the prior two) look at this Java code for a solid 3-5 minutes, and was unable to figure out what it did: ...
26k views

### How to explain the concept of a variable to a 9-year old?

My 9 year old daughter is heavily interested in science, robots, computers, … She asked me if I could teach her how to program a computer. So, we started with Scratch, a programming language ...
19k views

### Advances in CS appropriate for CS1 and CS2 made by female computer scientists

Over the course of the CS major at my school, especially in years two and three (roughly equivalent to years 1 and 2 at a university), as I introduce my students to significant advances in Computer ...
17k views

### Is it bad to force my students not to return early?

A fellow teacher of mine is teaching "basic algorithms" course in high school, and we have quite conflicting opinions when it comes to returning from functions. ...
15k views

### What are good examples that actually motivate the study of recursion?

One of the traps of imperative-first is how difficult it becomes to help students make sense of recursion when they finally encounter it. And if those kids are fairly competent iterative programmers, ...
25k views

### How to answer “functional programming is useless”?

I'm a TA for several Bachelor level functional programming courses at my university. In every edition we have problems with some students that have the idea that functional programming is useless, ...
10k views

### How to convey how much computing power has grown since the 1960s?

I was born in 1968 and used dial-up to mainframes back before PCs were available. We got an Apple ][+ when they came out and thought 48K was a lot of memory. I live in constant wonder at the world ...
19k views

### Should CS students be doing their tests on paper?

In some CS courses (especially undergraduate and high school courses) the tests and the final exam are written on paper without the use of a computer. But if the students are in a CS course, shouldn't ...
18k views

### How to teach a person to enjoy programming?

I've been teaching programming to my 13-year old son for over a year now. I'm not satisfied with his progress. I think that one of the reasons is his attitude: He wants to learn programming (he said ...
16k views

### Why do computer-science majors learn calculus?

I am curious why computer-science majors have to learn calculus to receive their bachelor’s degrees. My father worked as a software engineer for twenty years and never used it. It seems to have little ...
15k views

### 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 ...
11k views

### How do I teach git to a teenager

I like Git, or at least the idea of it. However I can not get my head around how to use it. Therefore I would not like to teach it. (This question is about learning to use Git. Not about comparing it ...
29k views

### 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 ...
17k views

### How do you teach something when you don't know it yourself?

Teachers are sometimes called upon to teach something with which they have no experience. Don't laugh. Doctoral level education is often exactly like this. The student's advisor may have no background ...
8k views

### 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 ...
16k views

### 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 ...
7k views

### 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 ...
16k views

### 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 ...
11k views

### 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 ...
11k views

### 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 ...
9k views

### 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 ...
7k views

### Is there any value in teaching goto statement or flowcharts?

I was recently reading a new, and mostly excellent, magazine Hello, World. There is an article on teaching goto. The author states that there is value in teaching <...
4k views

### 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 ...
12k views

### 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 ...
12k views

### Learning fundamental differences between functional programming and Object Oriented Programming

I've been trying to learn the differences between Functional Programming and OOP, but I can't seem to find a comparison of the two. A Google search did not yield any chart or table showing such a ...
14k views

### How to help students avoid being distracted by bells and whistles

I teach Windows Forms programming, and now ASP.Net (essentially the same thing, except you view it in a browser) and I am dismayed that students seem to spend an enormous amount of time straining at ...
5k views

### 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 ...
3k views

### 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 ...
6k views

### How do I convince students to use Boolean algebra?

I have taught Boolean algebra in an upper-level discrete math course for CS majors. I showed them how, using just the axioms (distributive property, etc.), you can derive other properties (such as De ...
3k views

### Teaching binary encoding - using different symbols

I'm teaching some introduction lessons to a classroom of 6-8 year olds about basic 21st century skills. A fundamental part of this is how computers represent numbers, words and images, which all ...
3k views

### How to teach Stack Overflow more efficiently?

As evidenced by the numerous poorly asked questions by students on Stack Overflow, it is clear that many students have difficulty understanding how to ask questions there. Even as teachers, we often ...
6k views

### How to handle students who excel at coding but aren't interested in theory

There are some students who are very good at coding. They can crack any logic problem at their level. But they aren't very good at CS theory. They can code better than their classmates, but they're ...
7k views

### How to prepare students for bias in industry

I teach at Mills, a women's college near Silicon Valley with a high number of students of color. We do a great job of preparing students technically -- they do very well on the job market and then in ...
2k views

### How to teach why indentation is important

I'm trying to teach why indentation is important, but the student doesn't indent. I asked why he doesn't indent, then he answered "That's because it’s a hassle." It's OK to say "you should indent", ...
8k views

### How can we teach good naming practice for students learning Java?

In writing software we name things. In Java we name classes, interfaces, methods, variables, etc. How can we teach both the importance and the skill of choosing good names? What teaching practices ...
7k views

### How do you encourage students to take criticism of their code constructively?

How do you encourage students to benefit from code reviews you give them, rather than being discouraged or responding defensively?
12k views

### How to explain what code is to my parents?

I am an engineering student in computer science and recently my parents asked me to explain a bit what I do, which is their way of asking "What is coding?". They have no idea of what coding is, what ...
3k views

### Should test cases be made available to students for assessed assignments?

A number of the assignments I've completed during the course of my undergraduate degree have been assessed partially using automated tests. These have never been available to students prior to the ...
5k views

### Assisting students with large programming assignments takes too long in class

In university, I was a student in an operating systems programming course in C. Assignment help was offered in tutorials. Students would usually present the tutor(s) with run-time errors and an ...
12k views

### Teaching students that printf() is not the same as return

For a few years, I have been teaching a programming class to first-year electrical engineering students -- thus, this is their first contact with computer programming. The language used is C (although ...
8k views

### How to stop being The Oracle

When I did customer service for an application I was developing, I found that most of the time, if I did NOT answer the phone, the user would figure out their problem and learn more than if I did ...
13k views

### How do I convince my students that visual programming is real programming?

I have been considering taking a visual programming language, such as Snap!, to my high school students as a way to make some of the concepts we delve into a little more fun. The kids themselves ...
5k views

### How do I teach “math equality” vs. “CS assignment” vs. “CS equality logic operator”?

Consider the following three uses of equality: In mathematics, the statement $x = x^2$ In Python, the statement x = x**2 In Python, the expression, ...
3k views

### How to respond when students ask “is recursion good practice”?

Context: CS1-style, intro programming class, using an interpreted language (Python). I will get a hand raised asking "Why are we learning recursion? Is it good programming practice?" My response is ...
2k views

### Programming languages specifically designed for beginners

Is there a good beginner's programming language, specifically designed for learners, maybe even kids? Something beginners can sink their teeth into and get results quickly. Results that are more than ...