The Stack Overflow podcast is back! Listen to an interview with our new CEO.
153

There is more to a CS degree than programming and more to programming than Design Patterns. I'm actually an expert in such things and have designed and published a few as a committed member of the patterns community. If I were teaching you programming in some object-oriented language you would certainly learn about and use many such patterns, but you might ...


52

I'm afraid that there is no single silver bullet. The problem you've pointed to is very real, and isn't limited to students. All of us tend to stick to our own familiar toolsets because, well, it's easier. We know how to use them already. Enter the Motivating Example. This mythical thing makes a new topic so useful that the new topic is practically a ...


52

Buffy's answer perfectly addresses your question about design patterns. I would just like to add a bit of perspective about CS curricula in general. Computer Science (CS) is very young compared to other scientific disciplines. For example maths or biology are strongly structured disciplines which rely on a quite well defined corpus of must-know basics. Of ...


41

Please don't... ...give the students who are ahead more of the same kind of work to do. Please. That's just boring. If they get it, they get it. ...make groups by mixing the students who are ahead with the students who are behind - often, the students who are ahead won't teach the behind students, but will just do the whole thing themselves. I say this from ...


32

It has been well known for decades by anyone coming out of University that, as you say, "the problems in the real world, both in academia and in the industry, can be more easily handled with a good choice of design pattern". And it has been well known for almost as long that this claim is wrong. When you have a problem, you come up with a way to solve it ...


31

I have seen my share of this 'program gets output' but the programmer has no clue how she/he got there. It's funny how that happens so many times. This is what I have done to at least handle the issue. Before assessments, I break down the evaluation to include the following. Simply getting the output gets them the bare passing grade. Those who can use ...


31

I think that the purpose of such a course is not to teach you a language. After all, Scheme, with its abstract syntax, is pretty minimal as a language. The purpose of a course like that is to teach you to think abstractly. If you can do that now, several years later, you can probably thank the course for getting you started. Abstraction, after all, is the ...


27

I see no reason to teach binary in an introductory programming class. It is not generally needed (see exceptions below) when programming in high-level languages, which is usually what is taught to freshmen students. If you have extra time in your course, rather than introducing binary, why not introduce them to other areas of CS that freshmen don't usually ...


24

One good overall educational strategy is to teach the same thing to students repeatedly, using a Spiral approach, in which each turn of the spiral teaches at a deeper level. Don't expect the students to completely get much of anything at the first mention of it, but reinforce the ideas and deepen the knowledge. You can do this for many things in one course, ...


24

I'm not sure the following will work for all students, but I remember this being a transformative "aha" moment in my own education: Show them your code. Preferably contrasted against a functioning but god-awful student submission from the previous term. Show them how its an order of magnitude simpler than their shotgun-formatted needlessly complex mess. ...


23

Binary is fundamental to programming, but this has a lot more to do with logic than just with data storage. Computers work on "yes greater than no" or "no greater than yes." There are only two choices. Boolean logic has only two truth values, "true" or "false." Boolean logic is fundamental to computers. In more advanced CS subjects such as information ...


23

You can find a fair amount of information about accredited programs in the US here, including links to schools that have one or the other programs. In general, Software Engineering is more directed at the processes involved in creating software, and Computer Science is more generally focused on the underlying theory. But, I'd suggest that both programs ...


22

There's one more reason I'd like to add to those here, less high-minded, but also a genuine consideration. One of the practical difficulties of teaching an introductory course is that the students come in at vastly different levels. Some are quite competent already, and some are brand new. It is rare for kids to come in with any experience outside of ...


21

When I was teaching and mentoring first-time students, what got them really excited for the first time was seeing their name in lights. Write a program that allows a student to enter their name, then print it on the screen 10 times (or 10,000). It introduces the concept of variables and variable types It shows how computers interact with the outside word by ...


21

If I understand your problem correctly, it's that students can create programs that behave correctly without understanding why they behave correctly. I assume that they do this by some combination of brute force trying things and SO search. Using program correctness for grading has the desirable qualities of being objective and automation friendly. So how ...


20

General overview on updating to Java: First, a general observation about updating to Java. Previous versions of Java used to be released about once two years or so. As of 2017, Java has switched to a bi-yearly release schedule: there will be a new version of Java released every March and September. Each release is also guaranteed to receive two updates (one ...


19

I think there is very limited benefit in teaching assembly so early, and it's more likely to just scare away your students. When I started learning programming, I thought bare-metal OS development was really interesting, and I started to learn about it (mainly through OSDev). But frankly, assembly was far beyond my level at that point, and it was hard to ...


19

I don't believe that your question is entirely valid; some languages require jumping. The first principle, therefore, is to follow the norms of your language. However, I suspect that you are asking about languages that discourage (but do not ban) jumping, such as Java, or C++. In these cases, I agree with Peter that the solution is to give them the ...


17

Every second you spend explaining a programming language is a second you are not teaching programming, software development, software engineering, software design, or computer science. You can teach the entirety of Scheme in a single lesson. You can probably teach the entirety of Scheme in 10 minutes. Python is significantly more complex than Scheme, so, ...


15

I'm going to begin by quoting Ken Thompson's Turing Award Lecture "Reflections on Trusting Trust" (link). To what extent should one trust a statement that a program is free of Trojan horses? Perhaps it is more important to trust the people who wrote the software. In my mind the first and most foundational lesson to impart is this: software, computers,...


15

With Scheme, you start teaching programming concepts on day 1 - and also implementing them as working code on day 1. With a typical procedural language (C++, Java, etc) you first have to crawl through the swamp formed around 20+ years of accumulated obsolescent and deprecated syntax. The survivors from that experience might get to learn some concepts ...


14

There are a number of facets to this question. But the first thing you need to remember is that students (like anyone) will tend to apply solutions that they are most familiar with. In the student context that means, often enough, the things they learned earliest and have been practicing with the most. This effect is most pronounced on hard problems that may ...


13

Rather than trying to motivate the students, or the reluctant ones, to progress into using your new tool (foreach after for), and finding a new motivating example every time, try to motivate them to be self-interested, lazy coders. Now that I'm under the tar and feathers, I'll explain. People like to find the easiest way, not the best way. Earlier postings ...


13

I took both the AI and (basic) ML undergrad courses at Princeton and currently teach an AI elective at the HS level for some very bright students. I've seen some good online material from Berkeley (CS188) and MIT (6.034), and of course Stanford's ML lecture series is amazing. Russell & Norvig's textbook is basically the bible for these sorts of courses. ...


13

Buffy has stated much of what I would have, so I won't repeat. But do read that answer carefully. The first point is, university is for proper formal education, which means heavy theory and less practicals. University is not for job training (there are lesser schools for that). That is what makes a university education better than a job training school, and ...


12

I introduce binary on Day 1 (if not Day 0). However, in my class, learning binary is not an end in and of itself: it is a means for understanding the fundamental concept of abstraction. As a teacher of AP CS Principles, I follow the College Board standards for the course. In that sense I have to teach binary, decimal, and hexadecimal, and conversions ...


12

Simplicity You can write the definition of scheme on the back of a postage stamp. Therefore as @Buffy says, you don't have to learn the language at the same time as learning the concepts. It is a pure functional language. You will be a better programmer, because you learnt functional. Better to do it first, few people learn functional second. Education ...


12

In general, a good education is one that teaches you to think. A good computer science education isn’t one that teaches you any specific language or technique but one that exposes you to many different concepts such as algorithms and data stuctures, as well as theories such as functional, logical programming, and objected-oriented programming, and relational ...


12

From my experience, you don't get good at coding while in college. You'll learn to code, but writing good code comes, in my opinion, much more from experience than education (and I say this as a student who has work experience). These two majors focus more on things around the code, so choosing your major will really depend on what you want to do next. ...


11

I think you might be underselling your sessions a bit -- understanding how to effectively independently learn is a non-trivial skill that not everybody has mastered, and just being available to facilitate things and answer questions can be very valuable to your students. Having regular sessions that impose some structure and providing a small community of ...


Only top voted, non community-wiki answers of a minimum length are eligible