mattiaferdeghini.com

IT · Leggi in italiano
Back to Playground
Harvard shield above the words "This is CS50." on a white backgroundComputer Science

CS50x: Harvard's Introduction to Computer Science

Harvard's introduction to computer science, which I worked through in the gaps between university courses. Ten problem sets covering C, Python, SQL and the web, plus a final project that turns a contact book into an interactive graph.

Where it startedLink to this section

CS50x is Harvard's introduction to computer science, taught by David J. Malan: ten problem sets and one final project. I signed up as a mechanical engineering student who wanted to know what actually happens underneath the software I use every day. It turned out to be one of the hardest things I have done outside my degree, and one of the most satisfying.

The course, step by stepLink to this section

It opens almost as a game, with Scratch, and then drops you straight into C. That is where you finally learn what a variable, a loop and (later on) a pointer are. From there the difficulty climbs steadily: arrays and algorithms, what one extra loop costs you, sorting and searching, and then memory itself. malloc, the stack, the heap, and the dread of a segmentation fault.

Halfway through, the course switches to Python, and everything you fought for in C suddenly feels easy. After that come data structures, SQL and databases, and finally the web: HTML, CSS, JavaScript and Flask.

The surprise for me was SQL. Working with databases, structuring data, querying it and getting it to answer real questions, was the part that came most naturally. I like managing data, and I did not expect to.

The final projectLink to this section

For the final project I wanted something I would actually use: an interactive contact book. It is a personal address book redrawn as a network, inspired by the graph view in Obsidian.

Every contact is a node, and every relationship is a link: a friend, a colleague, a family member, the person who introduced you to someone else. Instead of scrolling through hundreds of names in a flat list, you get a map of your own network that you can read at a glance.

Contact graph from the final project, with a central "Tu" (you) node and linked contact nodes around it; the contacts' names are blurred and their initials hidden
The final project running: each contact is a node and each relationship is a link, so you see the whole network at once. I blurred the contacts' names and hid their initials.

Laid out as a graph, the structure of your relationships becomes obvious: who knows whom, which groups exist, and who connects different circles. Seeing it as a graph helps me keep track of the people I already know.

How it worksLink to this section

The backend is Flask, in Python. It manages the contacts and the relationships between them and serves a front end written in HTML, CSS and JavaScript. The interface draws the network as an interactive graph, so you can drag nodes, follow links and explore the connections right in the browser.

The certificateLink to this section

It was a long road, and a broken-up one. I fit it into the gaps between my main university courses: a problem set here, a lecture there, whenever I could find the time. I still got to the end, and it was worth it.

Finishing all ten problem sets and the final project earned me the official CS50 certificate, signed by David J. Malan. You can verify it on Harvard's CS50 website.

Details

Course
CS50x · Harvard
Completed
2026
Workload
10 problem sets + final project
Stack
Flask · JavaScript · HTML/CSS
  • Computer Science
  • C
  • Python
  • SQL
  • Flask
  • JavaScript

More side quests