Ask HN: Old CS lecturer looking for advice from current and recent students

392 points by geophile ↗ HN
I am 61, with an academic background in computer science, and many years in industry, mostly startups. I taught many years ago, and have resumed teaching, a database course: data modeling, relational algebra, SQL, application programming and architecture (e.g. 2-tier vs. 3-tier, web & mobile), database internals.

Student evaluations were pretty good for the most part, but quite a few students found the presentation a bit dry: I prepared every lecture as HTML ahead of time, made it available online, and presented it in class. A couple of times, I would do interactive things, e.g. tuning queries using EXPLAIN and playing with indexes. That proved pretty popular, but of course, it's difficult to capture this material, (I recorded a log of the session, but extemperaneous discussion was not captured).

Looking for advice on how to balance prepared material and more spontaneous things. Also, any other advice on how to make material of this sort (theory + practice) easier to absorb.

182 comments

[ 4.8 ms ] story [ 243 ms ] thread
I think we all love stories about how a certain technique was applied in practice to reduce memory or speed complexity. You can even play with their intuitions, asking how much memory or time they can save by switching an algorithm. And then revealing the truth!
I always wanted my CS lecturers/professors to start with a business case and work backwards. For example, like, “Lets build an e-commerce site”. What are the tools we need here? What kind of database? How should we design the front end? What tools for front end? etc. etc.

I’m not sure about others but i would have found such an approach very involving. Instead i was taught chapter by chapter of preset text book syllabus followed by standardized exams.

I hope this helps:

I wouldn't want academia to focus on business. That's more technical than academical. If I see a CS (computer "science") course teaching the latest front end JS tech, I would be disappointed.
Precisely! I'd rather want to see the materials being presented with both theoretical and applied motivations.
Right, so I have a mix of theoretical background and practice, including both toy examples, and not case studies, but brief discussions of real situations from experience.

Now my question is how to combine prepared notes (the HTML lectures), live sessions, and perhaps other techniques in class.

Examples aplenty of companies that have serious problems because they did not understand the impact of their early decisions due to insufficient cs knowledge.

Those are great cases to review, and then to work backwards to the root cause and to discuss possible fixes. That's both CS and practical knowledge in a way that it sticks, the best school I've found to be other people's mistakes.

Do you just give lectures, or can you also do laboratories? I've found having one session a week dedicated to practical exercises - using pre-prepared virtual machines where appropriate has been a very good teaching method - and popular with the students who can see themselves achieving the tasks.
For something beyond mere toy examples, I would look into online language-specific playgrounds.

Those allow you to run code directly from browser - and if you include basic instrumentation (timing, step counters, item/memory use counters, ...) then it becomes really easy to show how a simple change makes things either better or worse.

To keep things language agnostic, you can cherrypick a different language for different purposes. That way you get to ensure that the lessons are not tied a particular language and the concepts have to apply universally.[1] For an interesting twist, maybe pick some historical examples too, to show how things have evolved in languages over time.

Then, when the basic concept of the lesson is [hopefully] understood, expand to a short case study to show why the dry theory matters in practice. For example, there's an old DoS attack against DNS servers, where a 56k modem could take down a root server due to unbounded O(n^2) worst-case complexity in the hash table implementations.[0]

0: https://www.usenix.org/legacy/publications/library/proceedin...

1: For extra points, you can pick examples where a particular language has chosen an implementation with amusing problems.

You've also surely got loads of anecdotes on how not to do it and tales from the coalface from your years in industry.

I'm sure you can sprinkle some of those into the classes to give a little light relief if the students are really finding things too dry. You don't have to go as far as recreating TheDailyWTF. Perhaps use some to provide worked examples of designing yourself into blind alleys and how to get out again, or just to provide awareness of a few real world issues that might come up with whatever topic is the day's lecture.

Most people will go to industry after graduation, though.

When I hire I prefer to Herve someone with some practical knowledge rather than the capacity to build a compiler.

So having the "let's build something" experience is useful in the real world afterwards.

> So having the "let's build something" experience is useful in the real world afterwards.

It is, but it’s not the job of academia to teach it. You have side-projects, internships, and your whole life to learn practice.

Where did this whole thought process of it’s not the job of college to help you become employable?
It's also worth asking 'Where did this whole thought process of "it is the job of college to help you become employable" come from?' There are long-established, deeply-entrenched advocates for both viewpoints, but the 'it is the job' viewpoint is the new one. It's worth understanding the debate.
When students go to college and either thier parents spend between $40K and 120K for a four year degree or a student takes out a loan, what do you think thier expectations are?

If I have a choice between a hiring a junior developer who has a computer science degree and only knows theory and a junior whose only experience is a boot camp where they learned practical skills. I’m going to hire the boot camp graduate first. Yes I have a “computer science” degree in the early 90s from an unknown state school, didn’t learn anything and the only reason I was employable was due to my prior knowledge from years programming in AppleSoft Basic and assembly language and I fell in love with C and stayed on the comp.lang.c newsgroups.

> If I have a choice between a hiring a junior developer who has a computer science degree and only knows theory and a junior whose only experience is a boot camp where they learned practical skills. I’m going to hire the boot camp graduate first.

Google, Faceebok and many others don't seem to agree with that statement.

Also, would your answer change if your company's goal was to develop better machine learning algorithms, or network technologies, etc.?

There is life outside of Silicon Valley. There are 60,000 computer science graduates every year in the US [1] most software developers aren’t working for the FAANG companies or the cool startups trying to change the world. They are working boring corporate jobs writing bespoked internal apps and yet another software as a service offering. Yes I know there are others writing embedded apps, mobile apps, game developers, etc. But most of those companies also are interested in people who can hit the ground running.

[1] https://qz.com/929275/you-probably-should-have-majored-in-co...

My point is not that "we should do what SV wants" (I'm not even American).

My point is... where would people get the education that bootstraps them to understand the state of the art then? To me that is the University's goal. In CS that means learning lots that may not be practical for a regular job (advanced algebra/calculus, computer architecture, data structure theory, etc.). However, in the long run this should leave you better prepared for the "boring jobs" too.

Now, you argue that this kind of education may not be the most efficient training process to regular job excellence? I totally agree. College as devised today is designed as the first step into eventually being able to contribute to the world's knowledge, or at least making good use of it. It is not devised as a way to prepare you for the job world, where immediate applicability trumps everything (in general).

I don't know the US system enough, but here in Spain (and at least in France and Germany) there are alternatives to College tuned to that goal. However, most parents (in Spain) still want their children to go the College route. Why? Because College is socially reputable (there are non-college educated leaders, but they are the exception, not the norm), and data shows that college educated people do have a higher expected income throughout their lives. It is percieved as a ladder up the social chain.

(comment deleted)
I claim no authority on this, but my understanding was that community college and professional schools were the institutions designed to teach people directly employable skills, and that the university existed to allow people to explore academic subject material for its own inherent value.
Do you think parents or students are paying 10s of thousands of dollars and going in debt for the “inherent value” or with the hopes that they will be more employable? Relatively few people can afford to spend that kind of money to be a “better citizen of the world” without expecting a return.
The institutions GP suggested do have that role are significantly cheaper.
And companies would much rather higher someone from a four year school than a two year college and some jobs require a four year degree.
It comes from afar, and is an ever-ongoing discussion. I would recommend reading [1] if you are really interested. If you are but no so much, the last paragraph is revealing:

"If we seek guidance from the past, it is better to see the 'idea of the university' not as a fixed set of characteristics, but as a set of tensions, permanently present, but resolved differently according to time and place. Tensions between teaching and research, and between autonomy and accountability, most obviously. [...] between the transmission of established knowledge, and the search for original truth; between the inevitable connection of universities with the state and the centres of economic and social power, and the need to maintain critical distance; between reproducing the existing occupational structure, and renewing it from below by promoting social mobility; between serving the economy, and providing a space free from immediate utilitarian pressures; between teaching as the encouragement of open and critical attitudes, and society's expectation that universities will impart qualifications and skills. To come down too heavily on one side of these balances will usually mean that the aims of the university are being simplified and distorted."

[1] http://www.historyandpolicy.org/policy-papers/papers/the-ide...

I don’t have a problem in theory, but with the median household income in the US being $60K a year[1] how many families can afford to invest in college for any other reason besides trying to give thier children a better opportunity?

[1] https://www.thebalance.com/what-is-average-income-in-usa-fam...

College should be a right, not an investment.

http://www.internationale-studierende.de/en/prepare_your_stu...

What should happen and what does happen is completely different. In the US, if you are spending 10s of thousands of dollars on an education and where the only real way for most people to have upward social mobility is a college education thst gives them practical skills, you need to be able to hit the ground running.

If college doesn’t give you real world skills and companies won’t train employees (https://www.washingtonpost.com/news/on-leadership/wp/2014/09...) where does that leave a college graduate?

I don't know how to respond to this. Companies are being more aggressive in off-loading their costs onto the workers. And given the consolidation in tech, the employers have even more power to dictate the terms.

We are seeing similar behavior with unpaid internships.

I have experience with FANG companies and most employees have huge gaps in social,life,cultural and historial experiences. When it comes to a Liberal Education, they skipped leg day.

Are you saying that new grads need to understand packer, docker, 3-way git merges and react?

What I’m saying is quite simple - understand the world or at least the U.S. for what it is and act accordingly.

There is no loyalty from any company. The days where there was an understood social contract between corporate America where they would take you in a train you and where you could work your way up the ranks and stay there for years is long gone. Corporate America is only interested in “increasing shareholder value”.

Since corporate America has no loyalty to you and will not train you - it’s your responsibility to train yourself and be ready to either jump ship for a better opportunity at the first chance you get or be ready to swim to the next opportunity when corporate America throws you off the boat.

The reality is that whether you believe that a college education is “a right” and that people shouldn’t have to go into tens of thousands of debt for a chance at a better life, American society disagrees. If you are investing tens of thousands of dollars for college, your reward can’t be just “being a better member of society”, it has to be - can I get a job to provide my own income, health care, retirement etc and have enough saved to provide my own safety net.

A liberal education if you are a software developer won’t help you achieve those goals.

Why is it so crazy that a college should teach you how to use source control? No matter what type of software development you are doing, you’re going to need it. What’s wrong with teaching you whichever is the most popular marketable front end MVC framework during your senior year so you can be productive on a job that’s not going to train you?

True you have to be a life long learner but six months after you graduate from college you’re going to have to start paying that student loan back and the way the government is trying to overturn the ACA, you’re not going to be able to stay on mommy and daddy’s health insurance after you get out of college - if they even have health insurance.

Well did you choose a vocational course at college, or did you choose a degree at a University.

The former is for learning a job/role, the latter is for learning about a subject. The academic development in a subject/subjects may make you better for some jobs but that is not their primary purpose; you often need to add on your own extras if you want to be career ready.

I chose a degree in the early 90s. My first job out of college in 1996 was as a computer operator. Shortly after I was hired, they got a new contract where they needed someone to build a fairly complicated data entry system. I was the only person who knew how to program. I got it done, put it on my resume and got another job two years later.

I had no training and my university degree didn’t prepare me for it. While I already knew how to program, had played around with assembly on both my //e and later my Mac and taught myself C, and really only went to my little unknown state college for the piece of paper and not to learn, where would I have been if I had expected to actually learn something useful in college?

No one tells any other profession that they shouldn’t go to college expecting to get s job, why is CS different? Are you really going to say that most college students and parents spend tens of thousands of dollars on a college education just so they can be “a better member of society”?

>No one tells any other profession that they shouldn’t go to college expecting to get s job //

Erm, isn't it your choice, study a subject or get a vocational qualification. I realise there's middle ground, they're the poles.

Why should we ruin universities just so businesses don't have to filter candidates, train recruits from a younger age, or have apprenticeships?

Seems better to use universities to expand human knowledge (individually and universally) than it does to use them as a hugely expensive way to do a first filter on company recruitment processes.

Why should we ruin universities just so businesses don't have to filter candidates, train recruits from a younger age, or have apprenticeships?

It’s not about should, it’s about reality. The corporations have already spoken. We can either accept reality for what it is or graduate a bunch of students with CS degrees that are saddled with debt that have a hard time finding a job. In the immortal words of Kosh, “Once the avalanche has started, the pebbles no longer have a vote”.

CS grads coming out of college are competing with foreign developers who were trained to get a job, have more experience and that will work for less.

> It is, but it’s not the job of academia to teach it. You have side-projects, internships, and your whole life to learn practice.

and then you get employers saying they dont get skilled people.

> and then you get employers saying they dont get skilled people.

That’s not the problem of academia.

yes it is - the aim of academia is to prepare people for what they will do in the future, not some reality-disconnected curriculum.
> yes it is - the aim of academia is to prepare people for what they will do in the future, not some reality-disconnected curriculum.

They already do that. The fact that some people believe going in class and doing nothing on the side will suffice is the issue here, not academia itself.

It should be, try telling students and their parents that the degree which you got after going in debt wont help you in getting a job.
It helps tremendously. But is it sufficient in getting you a job? No, you have to work on the side in order to practice what you learn. Employers often care more about your GitHub than your degree.
Yes students need to work on the side as well but you cannot just wash your hands off and say "That’s not the problem of academia."
> Yes students need to work on the side as well but you cannot just wash your hands off and say "That’s not the problem of academia."

My point is that academia must priorize theory over practice: 1- knowing the theory makes learning the practice easy, and not the other way around. 2- the theory is useful for your whole career. 3- Languages and frameworks evolve quickly, quicker than university courses [1].

[1]: In the university I was in they (re)define all courses every 3 years. That mean if you want to teach practice you must find something stable enough to be relevant for at the very least 3 years. They teach Java as a first language, Python for scripting; PHP for the Web; C for system stuff; OCaml then Scala as a functional language. As far as I remember it was roughly 80% theory 20% general practice (i.e. writing vanilla PHP instead of learning a Web framework).

This was a constant discussion when I was in school for mechanical engineering. How do you balance learning theory and learning how to apply that theory, given the limited amount of time available? It came down to a common gripe that we didn’t get enough time in the shop actually fabricating, and the refrained response was that we learn that stuff on the job.

My take was always that a strong theoretical understanding is what differentiates and engineering degree from a technical or trade degree that focuses more (or sometimes solely) on application and practical knowledge. In my mind, the ideal engineering degree focuses on the theory and provides just enough practical instruction to give you a starting point to begin applying what you’ve learned. I’m open to discussion on that though.

For me this is the other way round: an engineer must know how to do things, the theory is a nice to have.

I am an engineer, with a PhD in physics. The theory had exactly zero use as soon as I quit academia.

> I am an engineer, with a PhD in physics. The theory had exactly zero use as soon as I quit academia.

Counter-example: I have a M.Sc in CS, with a specialization in programming languages. I know how to build a compiler, and it helps me almost every day. I’m not building a compiler every day, but the things I’ve learnt from compilers influence every piece of code I write. I can better optimize my code knowing how it’ll be compiled/interpreted by the machine.

In fact, I spent a lot of time at the university complaining I was learning useless stuff. Nowadays I’m super-grateful to my teachers for providing me all that knowledge I use every day, even if it’s not a direct application.

Someone with the capacity to build a compiler will be smart enough to pick up whatever toy frontend/backend languages/frameworks are currently in vogue. The real question is do they _really_ have the capacity to build a compiler, or are they just saying they do.
I do not think so. I can talk two semesters about quantum mechanics but would not be able ti build a nuclear plant.
Your analogy is backwards imo but I totally get where you are coming from. I would still say though that it is a lot harder to write a compiler than it is to write a web app, at least in general. Building your own compiler is like building a nuclear power plant. Building a web app, from an engineering perspective, is like drunk texting your friend about quantum mechanics, and I say this as someone who works on web apps every day. Every once in a while a real problem does crop up, but the vast majority of problems faced by web apps are just about finding the right existing tool for the job, doing frontend stuff, tweaking SQL queries, and making CRUD endpoints.

You are right in one sense though. Being good at engineering doesn't mean you have a good eye for design and good common sense for UX, but programmers are expected to more and more these days. This is why it's still important to get a well-rounded liberal arts education instead of going all-in on engineering and coming out with no creative/artistic ability.

> I wouldn't want academia to focus on business.

I don't believe that OP's comment counts as focusing on business. To me, it's an effective way to engage students with a real-world use of the tech they are about to learn, thus establishing a baseline to gain perspective of how the academical part matters.

Otherwise you risk concentrating the course on a perspective taken from the top of the proverbial ivory tower that leads students to just go through the course without taking anything out of it.

What exactly do you do with a computer science degree that doesn’t make you hireable?
Same as what you do with the degree, say, in physics. You become a software engineer.
Maybe what the OP was getting at is that before a topic is presented, it needs to be contextualized.

For a single presentation, you do this by presenting some motivation and the surrounding space before diving in.

For courses, the best I've seen is to present the structure at the beginning, and continuously revisit that as the semester progresses. What's the purpose of the course? To build to a solution to X or understand problem space Y.

Most of the courses I have had have followed this structure, and whether I enjoyed the topic or not, it was engaging enough. Unfortunately, I've had a few courses by people who clearly didn't care and started the class by telling me why they are smart and I should follow them, then reading off slides prepared by the book author or whomever, without understanding the purpose or direction of the course themselves.

> it needs to be contextualized

Contextualization can and should occur not just by need, as in where are we going with this, but also

    * Where did this come from
    * How hard was it to get there
    * When was it discovered
    * How was it discovered
    * When was it accepted
Often times areas of Mathematics or Physics are presented in way that is completely disjoint from their history, that these n-pages of results actually took 50+ years are more to discover and argue over. That careers diverged and were ended over who was on what side.

Too many concepts are communicated as a series of steps, do A, do B, do C ... but you have no idea that you are actually baking a cake. If it isn't a surprise, tell the other party the destination.

We had a class (mid-2000s, UMBC) that was I think part of the required major courses that taught design processes. The semester long part of the course involved getting paired as a small group with a professor who acted as a business user, and you had to acquire business use cases and build an mvp product for them. It was definitely a great course and provided this kind of real-world applicable knowledge without every course needing to be coached into the same setup, which would have become redundant and kinda not the point of university.
It sounds like a well done class! I've seen that many lectures follow a pattern of starting in the low-level details of a topic and slowly working up to something useful by the end. I find I don't appreciate or particularly remember the details because I don't understand the motivation. So, I prefer an approach which starts out with the big picture of what cool thing is possible, and then the details take on more value and meaning for me.
This is huge. It's difficult to learn the process of solving a problem without having a deep understanding of the problem itself first.
I used to like active exercises - moderately difficult task, exercise or activity that is asked by the end of lecture and you can ponder about it in free time (so that I have chance to solve it before someone yells the answer).

Or some kind of questions answers quiz in that html, simple exercises to train etc. Having simple problems to he solved by yourself works great for learning.

I think one cool thing teachers are doing is making the homework assignments available as jupyter notebooks. You can have the coding exercises there and a little write up about what they need to make happen and they can try things in real time.

I think CS can be a dry topic and not everyone will enjoy it. I think adding some visualizations like the videos from 3Blue1Brown can be cool. It's sometimes hard to visualize how an algorithm works by reading it. https://www.youtube.com/channel/UCYO_jab_esuFRV4b17AJtAw

Best of luck

I actually dislike this trend toward Jupyter notebooks. I think they are only useful in the same contexts as a GitHub gist — in particular a notebook is only good if you can assume it can be entirely thrown away and never needs to persist as a long-term reference.

For pedagogy, if it needs to be interactive, it should just be source code that will be executed in whatever is the idiomatic manner for the underlying language or tool. (But very often, things don’t need to be interactive anyway, and only are shoehorned into it because it’s trendy.)

For example, the Scala extension to Jupyter is painful. Absolute hindrance to learning or teaching or working. Compared with just writing source in a powerful editor and then using sbt, it’s night and day.

I say this as someone who has spent many years working with IPython and Jupyter, including writing 0MQ kernels to use IPython with a company’s in-house language, and working on large data science and machine learning teams.

Thinking of notebooks as discrete units of sharable work, I think, is absolutely eroding many more sincere collaboration, pedagogy and reproducibility skills.

It reminds me in some ways of the early 00’s MATLAB fad, especially how The Mathworks targeted students to get them hooked on this one way of working (with MATLAB as IDE, interpreter, presentation tool, etc.) to create a pressure on employers to offer MATLAB as a standard working environment.

Could you explain in a bit more detail what's wrong about notebook-style interfaces? I'm interested in them, but haven't used them extensively.
It depends on which intended domain of usage you are thinking about.

For "reproducibility" or "experimentation" in a production-like R&D environment or university lab, there is one set of downsides. For pedagogy there is another.

From a reproducibility point of view, notebooks are bad because you'll always need the underlying software you're writing to have good modularity anyway. One-off helper functions or any pieces of important business logic, etc., need to be factored out into separate packages or libraries that can be imported anywhere they are needed. "Hard coding" implementations into a notebook is very bad for this, because if you don't exercise an unrealistic degree of care, then certain cells or definitions will rely implicitly on values or imports from other cells, and the interdependencies are a mess to untangle if you are trying port the code from the notebook into a more modular form. Experience has shown me that you don't gain any boost in productivity or speed for experimentation or tinkering if you ignore this and try to make things more modular later on. You just end up writing really sloppy notebooks that have to function as standalone scripts, and you waste some other engineer's time who has to go back and undo the mess.

If you just start out developing in source files in the natural and idiomatic package / library approach of your underlying language, it gets you 90% of the way there for zero extra effort.

The other big thing is that regardless of whether you are writing experimental code to test an idea or a prototype, or you are writing production code, you should be using code review in both cases. Particularly in the experimental case, as in machine learning or statistics, many of the mistakes that make you go back and waste a lot of time are because of methodological errors or diagnostic errors that should have been reviewed by other researchers before you execute the experiment or prototype -- which means you want your code in a good format for simple code review tools, like PRs in GitHub or analyzing diffs. Notebook formats are notoriously bad for this, and since you can accomplish any of the same dev tasks without a notebook anyway, it's an argument against trying to shoehorn a code review process to use some extra type of tooling for analyzing code review artifacts directly from a notebook file.

Along the same lines, notebooks end up encouraging you to have a large block of imports that implicitly define your dependencies, including resources, settings, environment variables, local files, URL settings, etc. etc. This stuff should always be factored out into a maintainable settings artifact of some type that can also be version-controlled and reviewed.

So once you refactor any kind of reusable logical components, refactor any hard-coded settings, use proper dependency management, and put anything of any importance into source files that facilitate easier packaging / sharing / code review ... all you're left with in the notebook is shallow plotting code, which can just as easily be in a source file as well.

Once at that point, I don't think it matters if it's a notebook or not, and it would be fine to use notebooks as extremely shallow presentation tools that do nothing but import other source packages and produce plots / tables / etc. But again, if you've gone that far, there are better ways to produce the same plotting artifacts, etc., and to get away from reliance on the browser as the display medium, and to improve code review even of the plotting artifacts.

For pedagogy I think the problems are different. First you have to think about what is the goal? If the goal is to teach programming concepts, then you are better off teaching them in the idiomatic execution paradigm of whatever language you're using. So distribute source files and instructions to students, rather than isolated notebook cells. Consuming this stuff by looking at it through a web br...

Some institutions still haven't been weened off of MATLAB. In this case, introducing notebooks feels like one way of moving to something that "sucks less".
One advantage of this approach is that the instructor can provide scaffolding to get the students started and later provide solutions where they can see where they went wrong.

A second advantage is that the students have a written record to study. This should help motivated students with the drive to learn the material. Without such a drive, nothing you do will make a difference.

A third benefit to this approach is the ability to add links to good explanations of difficult concepts in the notebook.

Have you gone through SIGCSE related materials? Checked out the CS Ed Researcher's Facebook group? Maybe looked into the CS Ed Stack Exchange? There's a whole, deep world of CS Ed pedagogy and practice that can probably dramatically improve your teaching.

Not to insult Hacker News, but I think you can get A LOT more from the expert teacher community than the expert software engineering community.

I figured there were people here for whom the pain was fresh :)

Thanks for the pointers, I will check out those resources.

I once attended a CS education seminar. Part of the required reading was 'How Learning Works: Seven Research-Based Principles for Smart Teaching', Ambrose, et al. Out of the flood of materials acbart refers to, I'd suggest it as a starting point and a useful addition to the toolkit.
Observation 1: You can’t please everyone.

Observation 2: If you can prepare something detailed in writing in advance, it’s more efficient to just give it to the students in advance and let them read or view it on their own time.

Observation 3: Interactive discussions are the one thing that classrooms are optimized for.

Don’t stop the prep work. But if you can lead classroom discussions with safe cold calling, the students with get more out of it. Don’t worry about capturing the results. You could record it, but it’s the process of struggling and discussing that creates learning. Written artifacts are supplementary.

I commend you for both teaching, and for caring enough about your craft to ask for help. The Lifetime value your students can get is enormous.

+1 for cold-calling. What is "safe" cold-calling?
It's of course the kind of cold-calling where you will never have to worry about type-safety or memory-safety. You will never endure a dangling pointer, a use-after-free, or any other kind of Undefined Behavior.
I find it better to develop strategies for 'safe' handling of student input than to resort to cold calling. If a student feels embarrassed because of a response, then not only will they never raise their hand again, but neither will anyone else.

The best way to do this is to try to identify the good part or motivation in a student's statement, regardless of anything wrong that might be in there too. Provide positive reinforcement on that part, and then turn the question back to the group again, with that extra foothold that the first student provided.

Example: Me: "If we wanted to look at every relationship between these objects pairs of these objects, how many relationships would we have?

Student A: "N squared!"

Me: "Sure that's a good start; there's N squared possible two-ples you can form. But I think you may be overcounting a bit; can anyone suggest a way to cut it down?"

Student B: "You don't need to pair objects with themselves."

Me: "Great; so how many are we at, then?

Student B: "N^2 - N".

Me: "Awesome; I feel like we can still cut it down more. Any more ideas? Anyone want to try a small example?"

etc etc...

---

Other bits of advice that come back to me with some writing:

* Provide seeds for ideas, and let the students fill out the flesh.

* Keep the conversation moving around the room. Try to engage a variety of voices.

* Provide at least some positive feedback for everyone who participates. Modulate for effect: eg, bigger praise for more complete, well communicated answers, or for people contributing for the first time.

* If the Super Student blurts out the final answer, take it back to the class and ask if anyone can explain it in more detail.

* Choose good questions. It's easy to ask a question that only you know the answer to... Mix up easy and hard questions, and use the easy questions as a way to 'onboard' quieter students.

Do it well, and there's always going to be enough hands to avoid cold calling. If I genuinely get no hands on a question, it generally means I've asked a bad question; rephrase and ask again. (And on day one, I have a dumb joke where I have everyone "raise your hand if you have a hand" and then do 'reverse' hand raising...)

In my experience, as recent student in the UK, even with that style of questioning people are reluctant to give answers. Certainly it is better than some lecturers that will just pick on people to ask though.
Totally. There's a relationship between the teacher and the classroom, and the students come in with a lot of expectations based on prior classes, too. A big part of the job is building and maintaining that relationship, and changing the expectations in your classroom.
> The best way to do this is to try to identify the good part or motivation in a student's statement, regardless of anything wrong that might be in there too

Your example sounds very reasonable to me, but do you think that this is ever taken too far?

Coming to the US as a student from Europe (not the UK), I noticed that some instructors (mostly TAs) took this effort to give a "positive" response to any answer in class to quite an extreme. I can think of many instances where a student's answer showed a very serious lack of understanding, and the instructor would say something like "okay, that would be one way to think about it, but how about... " without every correcting the student.

Two negative consequences I saw were 1) a lot of missed opportunities for correcting students' misunderstandings 2) students seemed overly sensitive to any kind criticism (I had a German friend who was a TA and had quite a bit of trouble with this)

Again, none of this is incompatible with your advice, I just wanted to take the opportunity to see if anyone has noticed this as a common problem.

Yes, there is a risk there. You need to make sure that you put some phrase in there indicating that the student's answer wasn't really right. Just saying "that's one way to think about it" without clarifying that it's not quite correct for reason X will definitely do more damage than good.

The trick is telling them they're wrong without making it sound like you are calling them stupid.

Yeah, I hear that.

My question in the 'serious misunderstanding' realm would be whether this is a problem that this individual student is having, or is it a common misunderstanding across the class? In the latter case, I turn the question back out to the class, eg, "Who thinks that's the right answer, who thinks it's Something Else?" And then we demonstrate the the individual student isn't alone in the Serious Misunderstanding, and provide a bit of personal buffer between the response and the correction.

I want students to come away with a self-description of "I have lots of ideas, and they need to be carefully checked because sometimes they're wrong," as opposed to the incredibly prevalent "I'm bad at math."

Polls in general are a good buffer to make a safe guess and involve everyone.
It means there’s no shame for a wrong answer. You aren’t grading the response. (I’ve seen classes where participation grades were based on getting facts correct rather than group discussion)
One of my favorite classes in college was a physics course taught in this way:

1. Before class, we were assigned to read a chapter from the textbook, understand the material, and complete two or three homework problems from the material we had just self-learned.

2. After submitting homework, lectures focused on discussing the concepts more in-depth. Everybody already had a baseline knowledge, so the professor would highlight the important takeaways, applications, live demonstrations of concepts, etc. I found these lectures engaging because I had already learned the material - and the lectures focused on mastering it.

3. Sometimes there would be follow-up homework problems focusing on advanced applications or derivations. These advanced problems were closest to exam questions.

Some takeaways for me:

- If we didn't have homework to do before class, I doubt I would have consistently learned the material before lecture.

- Lectures taught us more than the "what" - it taught us the "why" and how these concepts related to other areas.

- Lectures focused on answering questions, exploring curiosities (like "what if" questions), demonstrations/experiments, and mastery. The professor added value beyond the written material!

I hope this helps OP because it sounds like they have material prepared beforehand, which means that the lectures could go beyond the material.

Hey, mathattack and philip1209, those are really useful points of view, thank you.
I like this model, but it puts a huge workload on the TA to help with questions about the homework, since the students don't get to hear the professor explain the material until after.
if a student can't learn from a book, the have to first learn to learn from a book.
This method sounds appealing and reasonable. My question would be- did you have a good sense of how many of your peers did in fact do the homework ahead of class- my instinctual fear is that due to this ‘different approach’ many students may not be bothered to do this?
> My question would be- did you have a good sense of how many of your peers did in fact do the homework ahead of class- my instinctual fear is that due to this ‘different approach’ many students may not be bothered to do this?

I took part in an online course where you had to answer 3/5 quick questions correctly before you were admitted to the lecture room.

I think it resulted in an engaged and knowledgeable class.

I've also taken a course where you can't proceed to the next lecture unless you get more than 70% grade on homework from the previous lecture (which you could submit multiple times but it was not multiple choice). This also worked really well.

Homework was required and graded, so I assume everybody did it! It also forced you to attend every lecture because you had to hand in homework on the way in. The professor claimed he would throw away homework from those who dropped it off and walked out. (In reality, with prior communication he was always flexible. )
This sounds fantastic .... but in my experience many students do not read the material as assigned. How did the lecturer manage to overcome that?
> Before class, we were assigned to read a chapter from the textbook, understand the material, and complete two or three homework problems from the material we had just self-learned. [Emphasis mine.]

Grade the students on this?

My favorite course ever had the same structure. It was an elective, with only about 15 3d and 4th year students. Those not up for the reading dropped out. We covered about 20 high quality economic papers in 6 months, quite impressive for a teacher to accomplish that with students. I can pretty much still remember the contents of the course.
There was homework due before class from the material!
I had classes with the same structure. The homework was one of those online setups, and our professor had a policy that we should be ready with questions. If the questions stopped during class, the homework grade would be replaced by the grade on a quiz. The quizzes were fair game every day,were limited in scope,and only happened if the professor decided there was too little engagement.
I took a physics class taught like that last year, and my experience was the opposite. Because the teaching team expected that students had read and understood the material before class (hint: very few people read it, even fewer understood it), the TAs and professors went waaay faster than they should have, and the class was one of the most stressful experiences I've had at college. Nobody liked it.
I had mixed results like that years ago, it was 'repaired' later on by repeating the stuff you should already know, mostly as a verification, but the people that might not have read what they were supposed to read would have a chance to catch up.

Ultimately, it is of course the responsibility of the student to decide what they want to do. If you don't want to learn, see learning as a side-job, or live in an environment that does not leave room for learning outside of college hours, then you might be in more generic trouble anyway ;-)

Why not just include interactive exercices/puzzles into the html documents? I took a db course not to long ago and would have loved it to be more "hands on".
I was thinking about online exercises, although not integrated into the lectures. I'd rather have students stay with the material than wander off to questions.
If you can explain how different textbook scenarios are from real life that would be great. E.g. why linked list are not often used due to cache misses, what's the advantage of one DB brand over the other etc. Even though manufacturer-dependent knowledge is not as useful general purpose theoretical CS, it's still pretty important as ultimately that's what you will be working with in the real world.
One thing that could spice it up is maybe exploring cloud databases and scalability. Like, what happens when you need to serve thousands of requests a second. How do you need to change your configuration to adapt to that kind of load. That might make the use of EXPLAIN more apparent as the the need to shave milliseconds off your response becomes more necessary.
Various advice.

Prepare an evaluation form at the end of the class to have a better assessment of your class from the students. Write the questions such that you can get constructive feedback from them.

Try to balance the boring stuff you can avoid with more engaging material. Break the pace with questions or exercises.

If you can, do a lot of labs to "gamify" your class. Programming/hacking can be fun and addictive so it's a great opportunity to make students happy and learning something at the same time. However, it takes time to write good labs.

I noticed that no matter the content, students are satisfied if the difficulty is adequate.

The university solicited feedback, and the questions and answers were quite detailed. That was the basis for my question posted here.
One suggestion is to also do your own survey somewhere in the middle of the course. Each group of students is going to be somewhat different and getting feedback early so you can adapt to that particular group is invaluable. Importantly, if you do this, the survey should be incredibly short. One suggestion I got from my father which I tried the last time I was teaching was basically these three questions:

1) What should I keep doing? 2) What should I stop doing? 3) What should I start doing?

The goal here is not detailed feedback, but a high response rate that will give you enough data to course correct.

Are you sure that you should be focusing on your lecture style/content?

I recently graduated from a top tier CS school that emphasizes systems programming (C/C++, OS concepts, embedded systems, etc) and found that the overwhelming majority of learning happens when working through implementations and actually writing code (10+ hrs/week). Lectures (2-3 hrs/week) are really just a supplemental overview of concepts, the quality of a course is largely a function of the quality/rigor of the projects – the exception may be courses for students new to CS, who need lectures to understand fundamentals.

Well designed projects with detailed writeups, built-in tests, and live scoreboards created an effective curriculum. As did factoring program performance (runtime, memory utilization, cycle count, etc) into the grade (in addition to correctness).

Really appreciate your willingness to take feedback and your desire to improve, especially given that you already have a wealth of experience. Your students are lucky to have you! Best of luck.

There were five lengthy assignments, three of which involved programming. I think that could be stepped up a little, but what I've already concluded I need more of next time is more rapid feedback through smaller, quicker assignments.
Even just splitting the longer assignments into distinct parts so that feedback could be attained part way through would help. That said, 5 for I assume one semester is still pretty good, at least compared to my experience where it would often be 1 or 2.
I want to second this idea - usually not getting feedback quickly is one way students don't realize how far behind they are. In this regard, I think it's worth it to take a look at your assignments and see how you can make them easier on you (e.g. an automated test suite / well defined inputs and outputs or goals that runs on shared infrastructure and unambiguously tests "works or not" goes a long way)
Ask a student to come up and explain a small portion of the material. It will expose holes in your explanation and make that individual feel important.
I wouldn't worry too much about student feedback. I have got feedback like "This class was terribly organised." and "This class was extremely clear and well organised." from the exact same class, just look for the general trends.

Interactive activities are great! Do be aware that even with a very interactive activity there may be lots of students who are not actively participating. Two or three students who loudly share their opinions can easily make you forget about the silent majority.

Don't worry too much about capturing the interactive parts and demonstrations. The key thing is they are unique enough to stick in people's memory. I still remember demos from my college days and the basic principles they were espousing, even if the technical jargon and equations are now long gone.

I agree not to put too much weight on the end-of-class course evaluations, although some universities use them formally so you might not be able to avoid caring about them. I do think student feedback is useful, but end of course feedback is often too myopic, primarily influenced by student perceptions of grading: easy classes without much work tend to get high ratings, even if nobody learns much.

I personally had very different opinions about my university courses even 1-2 years after graduation vs. right at the time of taking them. Wish there was some more systematic way of collecting that kind of student feedback with a little more hindsight.

Not a teacher or student (for a long time), but you might benefit from general training on giving presentations. There are plenty of YouTube videos discussing this, mostly for business, but I’m sure many concepts could apply in the classroom as well. General concepts on what to put on slides (not too much), how to get discussion going, etc.
Some students learn most by being teached/shown by someone else, others prefer written material/transcripts, and others to try out things themselves. There is so much documentation/guides/... online that I think especially for a database course it would make sense to provide students with pointers on how to play around with a database/dataset at home. Tasks like "optimize xy as best as you can, for pointers see here, here, here" can really spur a student's ambition. You could probably also arrange your "live sessions" around those (extra? -- you didn't mention if students have to do mandatory homework for your course) assignments.
I’m in a somewhat unique position of being a current undergraduate student, but also a TA, so I can somewhat comment from both the student and the teacher side of things.

* Making the lectures available in an accessible format (I have a slight preference for PDF, but HTML is just fine too) is a huge benefit. Before exams I like to aggregate all of the lecture materials to date into a single monolithic document so I can ctrl+f the whole thing while studying. If you have a proper hierarchy / table of contents this is even easier.

* Learning from a book / lecture along is really hard. It’s important to not just show examples, but show me how I can run the examples on my computer myself. Something I can interact with live, tweak, play with, add code to is hugely useful for building understanding.

* Don’t assume that I understand the boilerplate, tools, and so on. I’ve had a lot of professors who explain the core material well, but not how to actually open up a text editor / IDE, write code, compile it, and run it. I had already been using UNIX for years before starting college so this didn’t affect me that much, but tooling is one of the #1 issues I see my peers (and the students in courses I TA) struggle with.

* Use lecture to explain concepts, not code as much as possible. If you show me code in lecture I’m probably not going to remember it well enough or write it down in my notes well enough to replicate your example if it’s at all non trivial. Instead, make video/HTML/PDF tutorials that walk the student through the code example. If you want to show a code example in lecture, walk through one of those tutorials in lecture! Make sure these tutorials explain how to go from sitting at my desktop with nothing open to writing code and having it run, especially early in the course. See [1] and [2] as concrete examples. If you spontaneously come up with a cool demo or something, go for it, but try to record your screen / terminal, and if it you can’t get it working, move on quickly. When I TAed my institution’s intro to UNIX systems class, I kept a terminal open on the projector at all times with a `script` session running. I would upload the transcript after each lab sessions so the students could reference it.

* If it is possible, set aside scheduled time for the students to be in a computer lab working on assignments that you or a TA will be there to help them if they have questions. It can be hard to articulate code problems during lecture or in office hours without being in front of a computer with an IDE/editor open. If you have large class sections this may not be a viable option though.

* For assignments and homework, include a clear list of deliverables which the student should turn in. For example “I want a zip file where /myprog.c implements the API described on page X of the homework 3 assignment sheet” and so on.

* If you want students to do something, attach a grade to it. In my experience, ungraded exercises usually result in the exercises remaining undone by the majority of the class.

* Provide a reference library on your course site of functioning code examples, each with a README explaining how to run it, what it does, and so on. Ideally try to demonstrate one concept per sample. This will both provide students with working examples to learn from, as well as be a valuable resource when you get asked questions in lecture and need to demonstrate a particular function call or technique off the cuff.

* Something that one of my past professors did which I found very valuable was to have an "A" and a "B" version of each assignment. Essentially the "A" version would be "get it to compile and implement some trivial facet of the assignment", and the "B" version would be "implement everything in the assignment sheet". The A version would always be due a few days after the assignment was posted, and the B version a week or two later. The A version would be worth like 10% of the ass...

This sounds quite reasonable. The biggest criticism I would have of some of my lecturers would be that the only time some material would be available would be in lectures, this doesn't work for everyone and certainly didn't for me. I found it much better when there were good materials that could be accessed outside of lectures, before or after.

I always found lectures more engaging when they provided something more than the essential course content. Demos and live examples can work well but they can end up being rather lengthy which can be a bad thing. Reading through slides or course notes that are available anyway doesn't really help.

As I mentioned elsewhere on this thread, discussion was in my experience a mixed bag. Some lecturers tried to get discussion or class participation by asking specific people at random, I think this caused people to just avoid these lectures for fear of being picked. On the other hand, just asking questions can result in a long silence before anyone decides to answer, perhaps this is a thing more in the UK, I'm not honestly sure. It certainly can work and it's definitely better with smaller groups.

I found practical assignments were better when they felt less synthetic, it's much easier to motivate to learn for something when the task seems more authentic. For theory, it's always good to have the opportunity to ask questions if given homework, my lecturers were varied in this regard. Questions in lectures can work but some will be reluctant to ask in case it's a "silly" question. My university ran labs with TAs for most units with a practical element, I think these were a better environment as it meant that you didn't have to announce your question in front of everyone else. We had tutorials for some more theory heavy units which provided the same facility.

> I found practical assignments were better when they felt less synthetic, it's much easier to motivate to learn for something when the task seems more authentic.

So much this.

When I was doing organic chem back in the day, I found a lab textbook that pitched each lab specifically in the context of "You are an [petroleum engineer] hired to analyze whether this sample of [whatever] contains [something]," and built up a whole - surprisingly detailed - business context for what you were doing, and why you were doing it that way. It was like OChem: the RPG. It made the actual assignment feel engaging and useful - like leveling up - rather than being a random hoop to jump through because someone somewhere decided this was something that needed learning.

Feeling useless is one of the worst things in the world. Grounding things in reality, building things in the context of what you'd actually utilize it for, is amazing. I wish every class did.

I'm a current student taking CS classes. I find there's 2 types of CS classes for me:

1. Classes where the content is better presented on Youtube, so I don't go to class and just watch the youtube videos on it. There are some really great Youtube videos on a lot of CS content, so it might even make sense to assign that to students so you aren't wasting your time re-explaining basic content that's already well documented.

2. Classes where the content is highly interactive, and most of the class is us digging into a topic together as a class.

I think the most interesting classes are the ones where the teacher just asks questions, and then only provides answers when the class is stuck. I think it'd be a good exercise to ponder how you could structure your classes such that you only ask questions. You may find that it's easier when they present a guess or 2 at an answer, and then you help out with any logical jumps necessary, or show them how specifically it works in a particular database.

I think there's a tipping point with asking questions in class—if you ask too few, students aren't really in their "question answering" mode, and they won't want to interact. But if you ask enough, there will always be at least a few students offering ideas. It also helps to have many softball questions, especially in the beginning, so students who might not be following as closely can still hop in.

It also might help for the students to review some material before class to be ready for it.

Best of luck!

Depending on what school you're working in, a lot of them have an academic technology office or whatever, that will come and record classes for you: both your screen and you talking, and if you're really lucky, you'll get a camera-person focusing on the person talking when in-class discussion is happening. Absent that, you can get very far by just doing your class on youtube live or google hangouts with recording enabled - and just repeating questions for the mic.

Whatever the difficulty in recording though, I really would encourage you to keep that format, as it's much more engaging and also educational than a lecture. When someone in class poses a question and others answer, that causes a natural segue into a thinking and questioning process in every student that otherwise requires a laser-focus and also reasoning while also listening to material.

I'll second philip1209's comment elsewhere in this thread though, during my undergrad and my master's, my favourite classes were always very discussion heavy. Some of them required reading up ahead and a menial task to make sure you actually did it e.g. read a paper or a chapter, then summarize it in half a page to a page and submit online. Then the rest of the class is mostly q and a where the professor steers the agenda. In graduate level ones sometimes the students had to present each class and then everyone discusses during.

One thing that discourages teachers often is that it's difficult to get students to say anything. Believe me that this changes quickly if it's nurtured. One prof had a goofy question mark face symbol and explicitly said he expected a discussion whenever you saw that logo when he was teaching. The first few times he had to sit and awkwardly wait for a whole minute or two before someone said a word - like a game of awkwardness chicken, where someone eventually can't take it anymore and blurts out something, which is exactly what you want, so you can build the discussion on that. Once someone says something the ball gets rolling. He also did a thing where he'd gradually simplify the question every time no one answered ("ok well how would this work if you didn't have to worry about ..."), to the point where often the question would be something self-evident that was hard to not answer. Another tactic was to never shame a "silly" answer but to pull out a good bit about it and use it to direct the next question.

One thing that probably helped was that these were often graduate or junior/senior level classes, so people had mostly chosen to be there. Another thing was that the premise of the class was that it was mostly discussion based with some presenting in the middle, which works a lot better than mostly presenting with a tiny bit of discussion, because of the overhead of effort of getting the ball rolling in a discussion environment. Finally, there was a no laptops or phones rule made very clear during class selection period, which really did do wonders. The justification was "we tried it a million times and it just doesn't work" - apparently it's really hard to maintain attention for an hour and a half when distraction is a glance away, and you don't want to miss anything or it's easy to get left behind.

To add to this, even in non-discussion classes, what helps a lot is structuring things like:

- what is our problem (queries are slow) - why do we have this problem (scanning the whole table takes a lot of I/O which is expensive) - how can we solve this problem (indexes help know where content is so you can do less I/O) - demo of it - when does this not work (when your indexes aren't selective, sometimes they can be slower than just a scan, or when it's hurting insertion speed)

etc etc.

Even if you mentioned what we were trying to do once in the beginning of the class (or worse, beginning of the semester), it helps a lot to go back and keep referring to it every time you introduce some new thing just so we know how this new little tidbit helps with the original issue.

You're probably a wonderful person and I mean absolutely no mean spiritedness whatsoever. But why do we actually need new lectures anymore? Nowadays any time limited and only locally accessible lecture will have to compete with the globally maximal presentation style, namely whatever stanford or harvard or whoever creates. If you don't think you can do better than that, why not just borrow what they've already done and use your time more appropriately, e.g. by spending time with one-on-one meetings with students; something that online resources rarely if ever provide.
If lectures are only treated as talking heads, you might have a valid point. However, I think lectures ideally involve a lot of interaction between students and the lecturer which you can't get with pre-recorded material.
Assuming you're lecturing at a university, many institutions now have a "centre for teaching and learning" or similar office ("teaching innovation", etc.) where lecturers can receive support and feedback on lecturing skills and course design (among other things). Not all CTLs are well promoted on their campuses, so you may need to ask around.

Re: some of the other commenters' suggestions, you might want to research the "flipped classroom", which is the popular term for the model they're discussing (students read materials pre-lecture, and lecture time is re-purposed for discussion and engagement activities).

THIS!

I would add that they can also come in and observe and confidentially give you input.

Not just flipped classroom...which some students find annoying / 'cheating' ...look at active learning as well.

The advice i got from an observation for a big presentation was invaluable. I talk too fast and, somewhat weirdly, hardly move my jaw
Look, the material is dry, A lot of is boring boring work. How many times we (HN) collectively started with sign up/log in functionality on a project? The first time it is fun but after that your just re-writing code you have written before.

Honestly - if a student thinks your class is dry they are not going to make it to 10 years of experience to get to the actual work.

Current student here!

I really the prepare ahead type of course layout. It gives me the chance to read through, maybe code up a couple of examples and come to class with questions. It also seems like that format of class leads to more interesting discussions on how concepts can be used.

Another thing that I've come to appreciate in University courses is a professor who was in the industry for a while. One professor in particular had a lot of stories about his time at IBM, talked about perspectives on building large systems in teams, thoughts on how to deal with management as well as the actual concepts. It's very neat to hear about what practicing computer science looks like off campus.

> I really the prepare

It seems like you're missing a worried here.

My recollection is that I usually found the lectures to be as exciting as the lecturer did. So if he was excited, so was I.

Are you perhaps not sufficiently conveying your interest in the topics to the students?