1 minute read

Understanding CS50

Recently, edX was giving out free signups for HarvardX CS50. So I thought to retake and review the course once again but this time paying for the certificate. What I immediately noticed, was the improvement in walkthroughs and guides. There is even a video guide which gives you the hints on how to answer the pset statements. What I liked about CS50 was that for the C programming component, there is the CS50.h library which essentially mimics some of the functions of python.

Usually for C programming you would use

But with CS50.h you can use, similar to what you would do with Python.

Then with pset0 where you have to build a program using Scratch here is my project a memory sequence game.

Moving on we learnt about how conditional statements, data types, and how loops work in C. Out of boredom, I created a custom tax calculator which covers pretty much what pset1 taught. I won't post the answers for pset1 as its readily available since its so widely known now, however I discourage looking for answers before you even attempt.

As you progress through Week0 - Week1, you learn just the basic syntax of C and how you create loops and iterate which is the key concept in every programming language. Being able to iterate through lists/arrays/maps enables you to create wonders. In pset2, CS50 covers functions/arrays/CLI. Some basic CLI commands you should remember always :

One quirk of C is that functions (user-defined) can be placed above the main function or below the main function.

If you reverse the positions of the function printstuff(); won't work. This is because a computer reads line-by-line from top to bottom. You can however, declare the function by telling the computer in C that there is a function and you intend to use it later.

So far I've covered week0,week1,week2 of CS50. I'll post again for the next few weeks.

RELATED POSTS |Development, Learning

Get in touch 👋

Feel free to email me about anything. I'd love to hear from you!

You can also reach me at: GitHub or LinkedIn