31 Jul 2025
 |
German Shorthaired Pointer Dog |
Well, this is not a post about a dog or dogs, but yes, it is about pointers. The nervousness with which I started Week 4 Memory, was justified. One of the instructors explicitly said that the topic of pointers was probably going to be the most challenging topic to be tackled in CS50. malloc() was lingering in my memory as I started this Week 4’s topic.
Prof. Malan brought literal training wheels to class which he threw to the ground to demonstrate things were being escalated i.e. opening the fire hose.
The highlight this week was learning about Hexadecimals (base-16). The shots video on Hexadecimal really brought me to understand the system versus the coverage in the main lecture. It brought the light-bulb moment when I saw the notation and a recall of some computer science literature I have come across , 0xADC et. al.
Learning Hard Topics
I ‘sat’ through the pointers lecture (shots) in order to get it! I was in no rush to get this topic over with, nor rush to the Problem Set to move along the course. I wanted to develop my ability/ resilience to learn difficult stuff. As Doug Lloyd pointed out
pointers take a lot of practice to master. But the benefit we get from their correct use, far outweighs the effort it takes to learn and master them.
Doug’s quick take really exposed the fundamentals of pointers and the topic sunk in. The main consolation was learning about their utility in File I/O. An area which should excite any enthusiast as it avails the programmer power to manipulate files!
Getting through Problem Set 4 was through small progressively victories, getting through one function at a time. Through it all, I got to understand nested loops and 2 dimensional arrays even better. There were a lot of those with this pset. Victory run, solving an upper limit case for the image manipulation routine, by investigating the output from the program. The correct program control and condition selection was the sticking point. More learning.
 |
Sepia Problems - Pixel Values > 255 |
Taking from the lecture, I had opportunity to investigate memory issues when my code was found faulty by the check50, using Valgrind
 |
Memory Issues |
What I learnt About Pointers
- Entirely within the content of CS50, (i’m certain anywhere else,)
Pointers are just addresses . Addresses to memory where variables live.
-
Pointers allow us to pass data back and forth between functions. Overcoming the limitation of local variable scope.
-
A lot of doodling with arrows helps expose the foundational concept of what is happening when dealing with pointers.
- A single pass of the topic might not be sufficient to get what pointers are all about. Several and alternative takes on the subject will most likely bring the point home. In the course there are three!
15 Jul 2025
Last week’s Caesar challenge pushed my schedule out by a few days and I had to pick-up pace this week, Week 3. Had the content been entirely new, I would have needed more time on arrays. This week’s focus was on thinking about solving problems better, thinking algorithmic-ally. A end-of class animation comparing Selection Sort, Bubble Sort and Merge Sort was priceless, succinctly illustrating good program design and efficiency in algorithms.
 |
Execution Time |
This week’s content was overally easy going and comprehensible. I could correctly identify and distinguish, first time, the three sorting algorithms by analysing the run-times, sketched on the study note above.
While working through the Problem Set 3, the small wins really kept the morale and drive to continue high. Incorrect use of a comparison operator can be code breaking. Using a debugging technique learnt in the course, viz printing output at certain points of the code, I was able to identify the problem with my code without using the IDE’s Debugging Tools.
Wheels Off . . . Collaborate
-
Problem Set 3, tasks were increasing challenging. With the first two being quick wins and quite a warm up. With the third of the problems, the training wheels where completely-off! One could leverage on the previous task completed and that ws it. Just the first rung of a complex ladder system. Programmatic and algorithmic thinking were scaled a notch. Two dimensional arrays were to be employed. The Runoff task, challenged one’s ability to think in the abstract.
-
For the first time I went out to look for help in a Slack Community, one of the many CS50 communities. It wasn’t long till I had a break and cracked the functions which were to be implemented.
-
Due to pressing work commitments. I have to renage my week on week plan for the course. I will continue on Week 4 in a week’s time. Wow! That was a lot of weeks in a few sentences. Not very good design.
06 Jul 2025
 |
Let’s code. |
This week I saw more and more of that screen above = spend more time in the coding environment. I also had time to go back to Week 1 to work on, and submit an optional challenge, “mario-more”. This gave me an even better understanding of ‘for’ loops. Prof. Malan mentioned something in this week’s lecture that grabbed my attention and spurred me on, on this journey, paraphrased:
“When you’re done with the course, you’ll have this bottom-up understanding of what’s going on. You’ll get techniques and a mindset for solving real world problems.”
Debugging The Way to a Solution
Most fascinating this week was the section of debugging - using CS50’s ‘Debug50’ . I like seeing ‘under-the-hood’. It turned out I had to use this tool extensively for one of the Challenges of the Problem Set. Watching variables change dynamically, albeit slowly, helps one quickly identify issues with the code. I notice with the course resource material (Main Lecture, Section and Shots), concepts are rehashed several times and from various angles, you will eventually ‘get it.’
The theme of Good Program Design kept popping up and code was edited ‘live’ and several approaches demonstrated.
I had some ecstatic moments of glory and self celebration, having coded a word capitaliser from scratch. Through a self imposed coding sprint, I tackled one of the challenges - Readability from start to finish without first looking at the hints and helps that come with the problem specs. Much time was spend with Debug50 as the program passed some and failed other correctness tests. When I eventually looked at the proposed approach, it was satisfying to notice my approach was not that much different.
 |
Popping the hood - Debugging Code with CS50’s Debug50 |
Thinking Programmatically, This Week’s Take-Aways
-
One of the challenges this week, Scrabble, pushed my limits of programmatic thinking. I couldn’t quickly crack the problem and find an approach. I had to go through the solution guide without a ready approach of my own. I learnt that it’s okay to not know and it is all part of developing programmatic thinking muscle. My understanding of arrays improved as I could understand the solution easily, but getting the idea/ approach is what I lacked.
-
Pseudo-coding really helps with the thought process and helps break down the problem into bite-sized parts. You quickly realise where functions can be employed and you’re able to abstract as much as possible. This isolation of ‘small solutions’ makes the problem look much smaller and surmountable.
-
This week the training wheels are still on but the pushes and directions are became fewer and fewer. A very ‘weak’ framework to tackling the problem set is provided. I had a lot of Rubber-ducking, with CS50 Duck Debugger and a lot of Debug50 as well. With the third task of the problem set, it took me a while to notice a variable assignment error which produced partially correct output. It was an exciting time debugging and similarly frustrating since I knew the code was correct, that’s when the Duck really helped.
-
With a ‘correct’ and functioning program at hand I asked the AI to check design, design50. My program worked alright but there we a number of design change suggestions. My programmatic thinking is improving. I should focus as well on improving design.
28 Jun 2025
At the end of week 1 (Week 2 actually), my enthusiasm about the course is still the same, if not more. Most exciting was writing code in the Visual Studio Code IDE, which I quickly customised to a dark mode theme! The course content reached deep into my long term memory, as concepts I learnt years ago, via a self-paced study through Sams Teach Yourself C in 21 Days, surfaced and got reinforced. I watched all the Shots and Section video which gave solid learning to solving Problem Set 1.
Fundamentals & C
The C Programming Language is introduced gently in the lecture video and a consistent comparison with Scratch made the transition very easy. Steadily the lecturer goes into depth with the language, without any sharp curves though. One key concept that I understood better this time, which I couldn’t wrap my head around when I first learned C, was Function Prototyping.
The command line (CLI) was covered foundationally as the lecturer demo’ed code. There is a Shots that goes into detail on the subject on Week 1 recommended material. Having dabbled with Linux, at one time attempting a collection of distros that could fit on a 1.44MB Floppy disk, to spinning a PosgreSQL instance on Digital Ocean inorder to toil with PostGIS. I know better that hands-on is the best way to take when it comes to the Command Line.
Measuring Grit with Problem Set 1
Following recommendations from the web, I decided to use only the course material to maintain focus. So far they have really proved to be sufficient to equip one to tackle the Problem Set.

The partial screen capture above was the beginning of an exhilarating experience of coding. While following a live (pre-recorded) coding session, the Section Video, I demonstrated grit, pausing the video and getting the solution myself first before revealing the Preceptor’s approach. I learnt to analyse code and comprehending what the program was doing through unintended consequence/ output. I took my first shot using ddb (duckdebugger) to better understand the loops I was using to implement a solution.
Through pure grit I solved the second of Problem Set 1 , going through the code, iterating and learning from unintended consequence. I stuck to the coding screen as I knew the solution was not far, I was just not getting something/ quite understanding what the code was doing. Albeit gently, my Computation Thinking is developing.
It was a satisfying experience to finally see the output as expected, a right justified pyramid!

Reflections
-
This week I quickly realised more time needs to be committed to study to allow for tangential learning and deep dives in some areas.
-
I learnt that you don’t have to get the solution at first go, at least as a beginner. Having walked from a problem for a few minutes …only to return with a clear mind which presented the solution as obvious, without rubber ducking.
-
It helped that I have some programming experience, I would have needed more time to ‘get it’ on the theory part.
-
Even though code compiles and executes, through use of CS50’s Design50 tool, it became apparent there was room for better design, one of the three, CORRECTNESS - DESIGN - STYLE, areas to give attention to when coding as learnt in the lecture.

Onward to Week 2…potentially revisiting this week’s submissions for better design.
23 Jun 2025
The first lecture of almost 2 hours by Professor David J. Malan was fascinating. Took me some time to adjust to how fast the Prof. talks. I paused and replayed at a few places, to digest, for instance, “one can count up to 31 using a single hand’s fingers.” .The course’s aim is to teach one, Computational Thinking. That gave me a new mindset when looking at the course. I had several moments of refreshes to my knowledge of computer science topics like algorithms and functions. One huge takeaway was the concept of rubber ducking. Closing the lecture game playing on stage, was my namesake, Erick from Philadelphia. How coincidental!
Problem Set 0: Starting from Scratch
Problem set 0 was
to implement in Scratch, at scratch.mit.edu, any project of your choice
subject to some requirements. This caught me off guard a bit as I was expecting to solve a pre-determined problem. I eventually settled on an falling object avoidance game - Save Gobo.
Some takeaways I got from this challenge
- Not enough knowledge of the solution development environment (language) can be a barrier to a speed implementation of a solution.
I came to understand the need to read documentation to know what’s available and as to what a tool/ function does and what it is most useful for. Often I had to read-up/ review the lecture, to find out how to do achieve a particular objective.
-
As you keep iterating the solution, the approach to a particular goal changes, often improves.
-
Start with smaller blocks and then compound
The idea of working with smaller blocks/ simpler code had been brought up and recommended in the video lecture by Prof. Malan. As I progressed with my game development challenge, I saw my code grow and becoming a little complex each time.
A First Submission - Save Gobo
Although CS50 is introduced as an entry-level course and suitable for anyone without prior programming experience, it helped that I had a GitHub account. One is needed when submitting assignments and connecting with the learning platform EdX

Authorise for the course gradebook

Authorise for submission

On submitting My Scratch Program, it was a satisfying experience to get 8/8 on this first submission. Confirming that my program met all the requirements per the assignment.

Reflections
The greatest challenge this week has been to find enough time for this course. Though I did week 0 in one week! As a family man and working professional that is expected. Going forward I need a more strict study routine as I foresee greater depth into topics as I move into Week 1.