The CS2040S teaching experience
Table of Contents
Introduction
This is a reflection that is quite overdue! I was a little busy throughout the May-July vacation period, and could only find time to update my blog now. Better late than never, I suppose! Just a warning though, there is a lot of text, and almost no pictures in this post.
CS2040S is NUS’ Data Structures and Algorithms course. Originally, there were only two variants of the module, CS2040 and CS2040C. The CS2040S variant is introduced this recent academic year (AY19/20) as a means for module management of the growing computing cohort (or so I heard). More specifically, it is compulsory for Computer Science undergraduates matriculating in AY19/20 to take this variant of the module. The module uses Java for the problem sets, but written exams allow usage of pseudocode.
This recent semester (AY19/20 Semester 2), the module is taught under Prof Seth Gilbert, Prof Ben Leong, and Prof Soo Yuen Jien (also known as Uncle Soo). Prof Seth does the main delivery of content, while Prof Ben and Uncle Soo handle the administrative matters of the module. The module does not always have the same lecturer(s). When I was taking the module in AY19/20 Sem 1, it was taught under Prof Harold Soh. Future semesters might also be different.
I was a teaching assistant (TA) who taught a weekly 2-hour tutorial (discussion group) sessions of 12 students. I’ll write about my experience in this blog, while making some comparisons with my experience teaching CS1101S in the previous semester. Take note that this post is not meant to be a review of the module.
Making-of and Motivation
When I was teaching CS1101S in the earlier semester, there were some students who asked me whether I will resume teaching CS1101S, or try teaching more advanced modules. We joked that I could be a CS2040S TA and I will be seeing them again, since many people would take CS1101S and CS2040S in succession. At that point, my heart was set in either not teaching, or just teaching CS1101S (since I had my materials prepared already, why not?). I was pretty sure that I did not want to be a CS2040S TA. But here I am, writing this blog post.
It was a series of various events happening in the last few weeks of the semester (Week 13 and Reading Week) which eventually led me to decide to apply. For one, I was having lunch with my TA and some friends in Week 13, and that was when my TA recommended me to teach. Around that period too, emails by the department were sent out to inform students that the portal to apply for teaching positions was open. I was also going for internship interviews where some of the questions were algorithmic in nature. I thought it would be nice to continue revising my Data Structures and Algorithms. Finally, I was also curious on how the module would be like under Prof Seth, especially after hearing stories of the now-discontinued CS2020 (Data Structures and Algorithms Accelerated) and the graduate-level modules he taught. All of these factors combined together eventually led to my decision to apply for the TA position.
I emailed Prof Ben indicating my interest. I am not sure whether it is crazy or not, but at that point it was still Reading Week, and I was still taking CS2040S. That meant that when I was emailing Prof Ben, I had not even sat for my CS2040S finals. Unsurprisingly, Prof Ben, told me that we would have to wait for my results. He also asked for my transcript, and fortunately my results thus far were decent enough that I wasn’t immediately out of consideration. It was exciting, but also kind of nerve-wracking because to me it meant that my finals held more weight, and I felt more pressure to do well.
In the last few paragraphs of my previous blog post on being a CS1101S Avenger, I wrote this: “Would I be teaching CS1101S again in the future? Maybe. I’d love to. Actually, I indicated my interest to teach next semester, but it’s contingent on whether I get something else that is still pending. So, we’ll see!”. That ‘something else’ is actually my application as a CS2040S TA!
Fast-forward to results release, I was going to focus only on my CS2040S results, and fortunately I did well! It was quite surprising because I didn’t think that I did very well in the finals, at least not as well as my continuous assessment components. I think what was extra nice was that I did well for the semester as a whole, better than I had expected. Full of excitement, I sent my follow-up email to Prof Ben. I still remember that day, my Wi-Fi was down, so I used my mobile personal hotspot (I have a quota of 2GB per month) to access the relevant portals, screenshot my results, and send the email. For some reason, I almost used up all my quota (maybe because of background apps), but all that to send this application email!
Results release was on Christmas Eve, and that day night I was flying off to Japan for vacation. I was of course excited for the trip, but I couldn’t get the thought of applying for the role off my head. I kept checking my emails anxiously waiting for Prof Ben’s response. It was Christmas Eve and Christmas, so naturally he would not be working. That was my only consolation whenever I did not receive a reply hahaha. The response finally came on the 26th and spoiler alert, I got the job! I was really nervous and excited, but I looked forward to being a CS2040S TA in the semester.
CS2040S in the semester
Compared to back when I was teaching CS1101S, I might have not started off teaching CS2040S with as many goals and teaching structure in mind. But of course I generally still had certain things planned out. I wanted to learn more about Data Structures and Algorithms, and reinforce my knowledge of them. I also wanted to ensure that my students would at least be comfortable with the basic contents. Deep down, I also know that I enjoyed teaching the freshmen cohort then, from my experience in CS1101S. So in a sense, I also wanted to follow them in their journey, like a guide.
Preparation
I continued preparing slides as I did back in CS1101S. I think in CS2040S, there is really much room where having slides really helped in conveying the ideas. Especially in terms of showing examples of how an algorithm executes, e.g. sorting algorithms. I think preparing slides also helped me structure the flow of my classes, and it can also serve to remind me of some of the things that I want to say in the class.
Unfortunately, preparing slides takes up a lot of time. My preparation is actually as early as before the semester started. I know sorting algorithms and Binary Search Trees would most definitely be covered, so I had prepared the slides for these two topics before the semester started, but it was not enough. There were times when I stayed up to 3AM (I usually try to sleep by 12AM) just to prepare my slides, and there was even a time when I was still editing and adding content to my slides just minutes before my tutorial started. It is difficult to juggle the work with my own school work, and there was even a time I wanted to let go of having detailed slides so I could focus on my studies. Fortunately though, I had received help from some other TAs. I borrowed the contents of their slides and used their diagrams with permission, and I am thankful for that. Perhaps this reminded me that I am not alone in all this, and it is all right to seek help from others. At the end of the day, it’s about giving a good learning experience for the students.
Despite struggling in striking a balance, I might have had too much fun preparing some slides. This is one of the fun slides I had (that’s my face btw). I’m not sure what I was thinking when I prepared this, but the inner machinations of my mind are an enigma:

The materials I have shared with my students can be found here. For future students reading this, do take note that content may differ. More on the course content in a subsection below!
Going on to the tutorial questions I have to go through, some of the questions on the data structures and algorithms I already knew were reasonably difficult. Not to mention, there is also additional content which I had to learn during the module itself. These questions challenged me, and truth be told, I could not answer some of them the first time I saw them.
Every week, what I would try to do is to sit down and attempt the tutorial questions myself first. It’s quite frustrating sometimes, and I feel slightly ashamed that as a TA I was not able to solve some of the questions. But I suppose, that’s where I got value out of being a TA - I too get challenged and grow as both a TA and a CS student. Another reason why I spend some time doing this is to ensure that I can explain my thoughts to some students as well. More often than not, there are multiple valid solutions to a problem. I also want to identify some potential common mistakes early, so I know how to respond to them when asked in class without spending too long thinking.
Teaching in-class tutorials
The tutorial-teaching experience was also slightly different from CS1101S. In CS1101S, we would sit in a circle with just a monitor for me to present my content. It was much more like a discussion group back then. However, in CS2040S, I got a classroom that pretty much made it like a regular teacher-students setting (although I did try to make it more like a discussion group). It was quite nerve-wracking at first, as I had to stand in front of the class in front of 12 students. I was also not used to this kind of teaching. Not to mention that there were several technical hiccups at first. Simple things such as using the projector, and even putting down the screen was a little struggle at first. I still remember during the first tutorial, I made the projector work by turning it off and on again, hahaha. Classic.
Another key difference is that now there is much space to move around, and it is not easy to walk around while controlling one slide to the next. For the first tutorial, I used my wireless mouse in order to overcome this, but it is limited in the sense that I could not use the Google Slides pointer feature effectively, nor could I go back a slide if I overshoot (unless I place my mouse on a flat surface and click on ‘previous’). I bought a clicker online, and this turned out to be one of the best investments I made. It has a laser pointer, and on top of that it also has a feature to blank the screen.
However with all that, there were some things that I could not present on the slides as well as I had hoped, and I had to turn to the whiteboard. To be honest, I think whiteboard-ing to teach is a skill by itself, especially if it is done impromptu. Things like space-management and ensuring visibility to everyone in the class are some factors that I tried to be conscious about. For my class, we have a mini whiteboard by the side, so I was able to use that one instead of lifting my projector screen. Pretty nice! On a small sidenote, the teaching markers in the room are horrible. Some TAs joked that the whiteboard in the room is like a graveyard of markers, because all ran out of ink. I resorted to buying my own set of whiteboard markers, and this also turned out to be one of the good investments I made as not only it helped me in teaching, but it also helped me in my own work too. For example, discussing group projects and working out a solution to a challenging question.
Beyond the classroom experience, I also chose a seemingly-undesirable slot of Friday 4-6pm. While I recognise that students might not like this slot at all, I chose this slot because this is the only slot when I have some free time after class to answer questions. As a TA, I think it is important to be available for your students outside class hours as well, and from my CS1101S experience, one of the best times to do so is right after class. That is why I was willing to take up this slot. Another partial reason was because I was hoping that I could go for a meal after class with some of them to get to know them better, like I did with my 10am-12pm timing back in CS1101S. Unfortunately, this never happened; it was too big a group and it was a little bit awkward to ask. However, I did manage to make use of the fact that I am free after class quite a lot. For several weeks, I spent some 30 minutes after class to attend to some queries. For starters, some of the tutorial questions might not be very clearly conveyed the first time I did it, and I would spend more effort in trying to make sure that I explain better the second time. Sometimes I would also help clarify the lecture examples, and things like proofs. Since only a few of them would stay back, this also allowed me to ensure that I can suit my pace to their needs.
I’ll now talk about how I conduct classes. Firstly, it is quite fortunate that most (if not all) of my students were willing to stay for the entire 2 hours. Perhaps it helped that I was teaching the last slot of the week. So I usually structure my class in the following way:
- The first 5 minutes to wait for latecomers. I would also use this time to interact a little with them and check up on them.
- 25-30 minutes of content review. This is usually relevant to the topic for the day. I strive to finish by the 30-minute mark but this varies by topic.
- Another 30 minutes of discussion time. I would ask them to go into small groups and discuss the questions. I think this duration of time is important for me to gauge how comfortable they are with the material, and it also allows the people who have not attempted to at least be familiar with the questions. As a side-effect, it also allows the students to interact with their peers. I have seen friendships formed from interactions in the class and I thought that was really nice. Also at first, I didn’t assign questions to groups, but later received feedback that it might be more effective that way. I started doing that and I think at least some of them found something to focus on.
- The remaining ~1 hour will be used to go through the tutorial questions. Unlike in CS1101S, I did not have time for them to present to the board (and a bigger audience might mean they are more shy). But I generally would allow them to share their ideas, and comment on it before I reveal what solutions have been prepared by the teaching team.
I would like to think that this format is quite ideal and helpful so that they would at least get something out of the class. I had a student who came in my Binary Search Tree (BST) class never having watched the lecture, and I think he at least got the basics of my BST through my recap session.
Often times, I was unable to cover all the questions in the tutorial. While this might be a concern, I personally think that it is better that they understand a good portion of the questions really well. I also value giving them discussion time to tackle the problems rather than me doing all the work potentially explaining all the questions, but leaving them confused due to pacing or information overload.
Teaching online tutorials
What I shared so far were things related to conducting physical classes. I taught in the first semester affected by COVID-19. Most of my tutorials were physical, except for the last 2 tutorials when it became compulsory to go online. I was not against going online, I just much prefer to have physical classes because there was whiteboard support and I get to gauge their reaction in person. To prepare for my first lesson using Zoom, I had tried out the features with my friends and ensured that I was somewhat familiar with it first. Another TA was kind enough to lend me his Wacom so I could at least draw on Zoom if I needed some form of whiteboard support. Going online also meant that it was even more crucial for me to prepare good slides so that I don’t have to resort to drawing when I can. As I have shared before, this takes time and it was difficult that the online classes happened during the week when all the submission deadlines bunched together.
Moving on to my first Zoom class, I think it was quite fortunate that I got to know them pretty well already by then. I had requested them to switch on their video cameras, and they were fine with that. Though one thing I cannot get used to is the deafening silence while I am going through the content because everyone is muted. I did ask them to speak up if they have any questions. While most of the time they didn’t speak, they did communicate over the chat, which I suppose is good enough!
Discussion became quite tricky though, and I tried to use the breakout room feature. This worked generally quite well, but a limitation for the class size I had last time was that I could not assign them into the groups they are comfortable with (which I think is okay), and had to assign them in random groups to save time. But the most major difficulty is I cannot be present in all the groups at the same time. I kept jumping left and right during the breakout room sessions. I also don’t know which group might require my help (I heard Zoom has a feature to signal the host from within the breakout room, but I haven’t tried it yet). Another difficulty is that at least one person in the group had to take the initiative to start the discussions. So this really depended on who is in which breakout rooms.
Overall, I think conducting online classes is much more challenging than physical classes. For some reason, it is much more draining as well, and there is minimal face-to-face interaction which is one of the things I enjoyed while teaching. I don’t think online classes are going away anytime soon, and we have no choice but to get used to it.
Module content
Moving on to the course implementation by itself. Aside from tutorials which cover the “standard” content of CS2040 variants, there are also recitations taught by the Professors and Graduate students which can cover content not usually found in a regular CS2040 syllabus. Some of the content covered are (a, b)-trees, B-Trees, Merkle Trees, Rolling Hash Functions, etc. These are things that I almost never got to touch before (except for B-Trees). As much as I would like to learn them as well, my time during the semester was really limited. If I do decide to teach under Prof Seth again in the future, I do plan to ensure that I would be prepared for these topics as well.
Just by covering the tutorials, I had to learn more things as well! Some of the new things I had to teach were Skip Lists, Tries, and Boruvka’s Algorithm for Minimum Spanning Trees. Since I had not learnt them prior to the module, I joked with my students that some of them might even know the topic longer than I do (if they had watched the lecture before I did). I hope they did not find it weird or anything that the TAs are just learning the topic though!
The CS2040S content covered by Prof Seth is overall much more rigorous than the other implementations of CS2040/S that I am aware of. I still learnt a lot as a TA, and I think students taking CS2040S in this particular semester would be quite well-prepared for more advanced algorithm classes. However, I feel that the course might be slightly too fast-paced. I have seen many students struggling to keep up. I do wonder whether the rigour of the module should be kept as it is for future iterations, but I’d say keeping it like this would show the potential intensity of computer science as a major to the students.
Checking, setting-up, and grading problem sets
As for the administrative matters, TAs are sent on rotation to set-up and check problem sets. I was sent pretty early on to check the second problem set on binary search. The problem set was pretty fun, though I faced some hiccups in the beginning because binary search is always tricky to write. I was also assigned to set-up the problem set on Markov Models. I am not sure what the problem set was for, but it seems like it was meant for students to practice writing code using hash maps. It was a fairly easy problem set, so setting it up was not difficult either and I had fun setting some test cases. I might be called evil for this but I was happy when students couldn’t pass some of the edge cases I had set, hahaha. It could have been the joy that at least the test cases I had prepared were not very weak. I’m sorry to those students! Also luckily for me, I was tasked to set this up during recess week, so it did not really clash with midterms week. I mostly improved the wording of the PDF, and my student gave me feedback that instructions were quite clear! I spent at least a day or two off my recess week which was critical to prepare for my own midterms to set up the problem set, so I’m really glad to hear the effort paid off.
All in all, there were 9 problem sets and most of them are fine, save some problem sets which had really tricky implementations. Every TAs are tasked to mark for their own classes, so for every problem set, I need to grade 12 students. I will just straight up say that grading is not that fun. It is easy to grade those that are obviously correct, but sometimes there are implementations that are not very well-written. It would fall in this grey zone where even after looking at the grading scheme, I would still have to think really hard. Not to mention, the platform Coursemology we are using does not really capture the time complexity well. A linear search implementation still passes when we are expecting a binary search. So, I have to do an analysis of their own solution.
Thinking about it now, I might want to ask future students to give a runtime analysis of their own implementation. That way, they get to practice studying their own solutions, and I get to identify potential gaps too. Another thing that I think I could have done better is in the comments I gave. Most of the working implementation is only given “Good job!” or something like that. It shouldn’t hurt to be more critical of their implementations and give proper suggestions for further improvements. This is something that I think I should be working on in the future.
Going above and beyond
On top of all of these standard responsibilities as a TA, I try to do slightly beyond. For one, I make sure that I am as readily available as I can, and this is through setting up of Telegram groups. I heard that several TAs don’t even give out their contacts (I respect their privacy should they do that, though), and it made it difficult for their students to contact them. I don’t want such an experience for my students. However, learning my lessons from teaching CS1101S, I tried to be less prompt in my replies. This is for several reasons, first of all being that I am also a student and I cannot possibly attend to all 12 students all the time. The other reason is that I feel that sometimes after asking your TA questions, magically you would gain some more insights which allow you to solve the problems. So I would rather give them some time to think about what they asked before replying. This worked surprisingly well, because I have had situations when they would then add on that they have resolved whatever problem they had!
Same as in CS1101S, I would encourage my students to discuss in my Telegram group rather than messaging me directly. I would accept direct messages, but if I find something worthy to be discussed in the group, I would encourage them to send it to the group instead. Again, this helps free some time for me, and everyone gets to learn from the discussion. However, this only works if the others are willing to participate in the discussion as well. I was fortunate that my CS2040S students are very participative, and it made my life much easier.
Something interesting that happened is that 2 other TAs are also in my Telegram group, and they have been helping me a lot in answering some questions. I am really grateful for that! I do hang with some of the other TAs, but when I first started teaching, never would I imagine having other TAs in the Telegram group. I definitely learnt a lot from them too.
One thing I did throughout the semester is that I would attend the lessons from other TAs and learn from how they conduct the tutorials. It is quite advantageous that my teaching slot is on Friday on the last slot, so I am able to attend some classes on Thursday and make further preparations for the following day. It helped me prepare for several of the more challenging topics, and it helped me identify some possible questions which might get thrown during the lesson.
I also spoke about the short sessions I would have after my class earlier on, and I actually conducted one full-day consultation session the weekend before their midterm exam. I opened this for anybody to come, and even invited my ex-students from CS1101S. Funnily enough, at one point there were more people not from my class than people actually from my class. That was a pretty tiring session, but I am glad that I could at least do something for them. I would have done the same for finals if not for COVID-19, but I did manage to hold one 2-hour (which eventually stretched to 3, haha) session over zoom the week before their finals.
Unfortunately, there were some things which I had to cancel due to the pandemic. One little thing I did in the first tutorial session is to give them cards for them to write to themselves, which I would have returned to them in the final tutorial. At the time of writing, I still hold on to their cards because I was unable to meet them in person in the last few weeks of school. So I have to make do by taking pictures of their cards and sending to them personally over Telegram.
Back in CS1101S final tutorial, I held a Pizza party for my class. I would have done it too but this didn’t happen either for CS2040S once we had to move online. The last thing which I felt was a pity it didn’t happen due to COVID was a final-tutorial game that my own CS2040S TA and I wanted to do. When I was a student, he conducted this game during the final tutorial, and this time around he proposed co-hosting it with me for my class. I was really looking forward to it, but unfortunately it could not happen. Oh well..
Speaking of my TA, I think it was also interesting that I was also working as a TA together with people who had been TAs when I was a student. Two of them were my actual TAs, and several others were TAs I had received some help from. I definitely still respected them, but all in all it was quite an interesting experience. It was something I did not really feel back when I was teaching CS1101S, as my own TAs weren’t teaching when I taught and I did not really know the other senior TAs.
Conclusion
All in all, aside from the hiccups due to COVID-19, I think it was a fantastic experience I had teaching CS2040S. I get to review some of the things I had learnt, while getting to learn some new cool things as well! I also got to know some of my students better, and I still talk to some of them even after the semester ended. It’s also definitely a different experience to teach a different module and to work under a different professor.
One little thing I realised is that is I am much more comfortable discussing the algorithm ideas ala conducting tutorials / discussion groups. I don’t think that coding the algorithm itself might be something I am strong in (and I am ashamed to say this as a TA). Another thing is that during tutorials, I would find it difficult to counter suggestions from students sometimes. These are usually solution proposals that I am very sure would be wrong, but I couldn’t come up with a counterexample fast enough. However, I will definitely work on this, so that I can be a better TA in the future!
Like last semester when I was teaching CS1101S, I think I might have spent and dedicated too much time in this craft. But at least judging from the feedback I received at the end of the semester, I would like to think that all my efforts weren’t for naught! Students from other classes have also dropped by my class several times, and this was especially convenient during the online tutorial period as they could just enter through the Zoom link. This is quite reassuring to me as it meant that people were willing to listen to me ramble, and gave me confidence that I’m doing something right. I spoke to one of my (actual) students, and she told me that she wasn’t even sure who her actual classmates were anymore, hahaha.
Admittedly, I feel pretty drained, and I have chosen to take a teaching break in the upcoming semester (AY20/21 Semester 1) in order to focus on my own studies and pursue other things. However, I don’t see myself stopping from teaching. Perhaps I will still be assisting people from the sides, but just not officially as a TA! Perhaps in the future I would also like to come back to teach CS2040S under Prof Seth again. But then again, plans often change, just like how I initially did not want to teach CS2040S. So I suppose we will see soon enough!
To wrap up this post, I would like to give thanks to all my students (both official and unofficial) for making my experience really enjoyable! I also owe a lot to the other TAs whom I have received help from throughout the semester. It’s been a memorable semester! I took this screenshot of my Zoom class before the semester ended; too bad we couldn’t take a picture in-person:

It’s yet another long post, and whether you have read through the entire monstrosity of the text or just few sections, thank you very much!