Skip to content

CS2030S

Programming Methodology II (NUSMods)

Last Update: 05/22/2025

CS2030S is a continuation to CS1101S, covering common programming language features like type systems, OOP, and FP. I felt that the module was more about teaching how to use Java, and was frustrated with having to use Java programming, however a lot of the content covered in this module is applicable to other programming languages.

Module components

This module has a few graded components. There is a self diagnostic quiz every week that covers the lecture contents, there are infinite attempts so theres no reason not to get the free marks. This module also has labs, and some of the labs have a graded lab sheet, so if you choose to miss a lab make sure to ask around and check theres no lab sheet for that week. There are three practical tests (first test is only 1%), which is done through ssh into a Programming Environment (PE). Lastly, there are also written midterms and finals, which test on your theoretical understanding of the module contents.

The module notes are online here, each lecture covered a few units but you can just go at your own pace, I personally did not really listen to the lectures except in some cases to clarify a few doubts where the notes were not sufficient.

AssessmentPercentage
Quizzes5%
Labs5%
Practical Test 01%
Practical Test 115%
Practical Test 125%
Midterms20%
Finals30%
Overall89.05%

Note that the 1% from Practical Test 0 is only given if one does not achieve full marks for Practical Test 1 & 2.

Using the PE node

There are also optional exercises that can be done through the PE, however in the PE you are forced into using bash with vanilla vim (but you are allowed and encouraged to edit the .vimrc). You also can't really install any packages without sudo access, what I did was scp'd the tar release for nvim into the PE and extracted it there, then copied over my nvim configs. However I found that the PE node was too slow to run my Java language server so in the end I just scp'd the files out of the PE and worked on it locally, before scp-ing them back.

If you are unfamiliar or have never used vim, I would not recommend doing what I did, as you still have to use vim in the practical test. Using vim in the practical test is also painfully slow, as they have syntastic set up so that it compiles your code on write every time to check for style warnings and errors. I tried to disable this by removing the lines for syntastic in the .vimrc but for some reason it did not work (possible skill issue).

To be efficient during the practical test, I would suggest getting used to using split windows or tabs in vim. I personally used tabs during the test and I was able to code much faster than others as I could just switch between the tabs to navigate between files (opening and closing files were very time consuming due to syntastic). To compile and run your code you can just use the command :term which will open up a terminal within vim. Of course you also have to be used to vim motions to code efficiently during the test, if you don't use vim as your default editor, I would suggest at least installing some vim keybind plugin on your preferred IDE.

Lastly you need to be familiar with your bash commands, for example if you needed to check the code in the file but not write to it, you can just run cat <file name> rather than opening it in vim. In one of my practical tests, they required us to copy a file to another folder and continue working on it there, and I heard of people complaining that they forgot how to copy files in bash and had to manually rewrite their code every time.

Type systems and OOP

The module starts off with an introduction to the Java type system, namely what types are and how subtyping relations work. The module then spends a few units teaching about some fundamental OOP principles, namely encapsulation, inheritance, polymorphism, abstraction, and the Liskov Substitution Principle.

Java constructs

The next few units touched on a few programming constructs found in Java, such as abstract classes, interfaces, and generics. While these are also common in other languages, I didn't like that a lot of the focus during these units were on the quirks with the Java implementation of these constructs, such as dynamic binding and type erasure. There was even one question in the midterm that expected us to remember that interface fields default to public access, which tripped me up as I expected it to be protected. While I understand the importance of knowing these quirks in the language, I don't believe that so much importance should be placed on remembering how these quirks work.

Functional Programming

This was my favourite part of the module and was the most value add to my programming abilities. These units introduce classes with monadic operations, namely Maybe (analog to Optional) and Lazy (stores lazily evaluated values). These units also talk about lazy evaluation and streams, I had previously rarely or never used any of these constructs due to a lack of clear understanding of what they do and how to use them properly, but using them in the optional exercises gave me a new appreciation of them.

Concurrency and parallelism

Lastly the module briefly touches on concurrency and parallelism in Java. I also found this really useful as I did not have a good understanding of how these work under the hood, especially things like worker threads and ForkJoinPool.

Conclusion

Overall I felt that this module was well conducted by the teaching team. It sufficiently covers a lot of programming language features in a Java context and the exercises were fun to do, I would definitely recommend beginners to work on the exercises earnestly as you would need that experience with Java programming for future modules. If you already had programming experience with Java, this module shouldn't be difficult for you.

AssessmentMarksLQMedUQ
Quizzes4.81/55/55/55/5
Labs3.38/54.65/55/55/5
Practical Test 026/2615.5/2624/2626/26
Practical Test 130/4013/4021/4027/40
Practical Test 140/4021/4030/4037/40
Midterms55/7039/7045/7051/70
Finals93/10058/10069/10079/100
Overall89.05%

Expected grade: A/A+
Final grade: A+