Member-only story
Diary Entry — Aug. 5th, 2024
Today, I got somewhat close to finishing the lecture of week 0 in CS50x, but I just… didn’t. I hate saying this, but that’s what happened.
Disclaimer: The layout of this article does not represent the actual order in which any content made by others was presented.
Today, I got somewhat close to finishing the lecture of week 0 in CS50x, but I just… didn’t. I hate saying I almost finished something. Anyway, I did finish a good part of it, and in that part, professor David J. Malan, the instructor of the course (above), starts talking about one practical medium (pun intended) where we can apply the ideas that have been covered in the lecture so far.
Week 0 Continued: Almost Done With Lecture
Pseudocode
When I picked up where I left off yesterday in the lecture, professor Malan started talking about how we can translate our ideas into something a computer can do. However, he first starts talking about pseudocode, which he claims has no formal meaning although I looked it up to check its spelling and it had a definition in Oxford Languages, and I reckon this counts as formal acknowledgement of the term. As professor Malan explains, pseudocode can be written in any human language, but is different in that it is written such that ideas are illustrated tersely and succinctly, yet precisely enough to describe ideas that, as you might have noticed in the last diary entry, are difficult to explain in a human language without deformation and, if not explained carefully, can be vague. The purpose of pseudocode here is that you describe these same ideas more clearly and correctly (as in not leaving out details), while being efficient in doing so by not using too many words.
Professor Malan immediately gives an example on what pseudocode might look like, by writing some about the binary search algorithm that I described in plain English in the last entry:
Pick up phone book
Open to middle of phone book
Look at page
If person is on page
Call person
Else if person is earlier in book
Open to middle of left half of book
Go back to line 3
Else if person is later in book
Open to middle of right half of…