By: Dr Alan Guedes, School of Mathematical, Physical and Computational Sciences, a.guedes@reading.ac.uk
As a computer science lecturer, I am required to show programming source codes in my lectures, particularly for in-class activities like quizzes (e.g. “Determine the output of the following code” or “Identify the logical error within this code”). These quizzes allow me a do an in-class knowledge check for the students.
The recent support for Padlet at the University of Reading prompted me an investigation into an effective approach for displaying a source code in Padlet. However, it became apparent that Padlet is not explicitly designed for this purpose. My initial attempt involved directly placing the source code into a post’s title (image below), but this revealed the limitation of Padlet titles do not support multi-line text. In the following sections, I will share some options I discovered.

Option 1: Uploading code as a text file
This approach involves using two Padlet posts (image below), where one post is dedicated to an uploaded source code file and other for the poll. The advantage of this method is that it generates syntax colouring for the code, which significantly enhances student readability. However, it presents two drawbacks. First, it requires an additional post solely for the poll, since a single post cannot accommodate both the file and the poll. So, the second post should “refer” to the one before. Second, it suffers from resolution degradation when viewed on mobile devices, what may require students do a second click to “open the file” and improve readability.

Option 2: Code block in the body
This solution involves use only post, which has the code inside its body (Figure 1.3). The post title should remain concise and directly address the quiz query. The source code is then added as a “code block” within the body of the post. This method ensures student readability by preserving indentation and utilizing a monospace font, characteristics common in programming editors.
While this represents a good solution, it has one drawback: it has been observed that Padlet’s default layouts may automatically wrap longer lines of code (Figure 1.4). This can complicate student readability.


To mitigate this issue, the “stream” layout is identified as the optimal configuration. This layout (Figures 1.5 & 1.6) will render content vertically without unnecessary text wrapping, thereby maintaining the readability of the source code.


Final remarks
In conclusion, while Padlet may not be inherently designed for showing source code, the file upload and code block options are viable for displaying source code. These methods can be beneficial for lecturers conducting in-class activities involving source code.
If you have a query about the institutional Padlet, please raise a ticket with the TEL Team.
If you’re a University of Reading staff member, you can watch the recording of Alan’s presentation about notation in Padlet by selecting the following link: TEL: Showcase: Power Up your Teaching with Padlet.