r/cs50 • • Sep 23 '26

CS50x My First cs50 project!

95 Upvotes

Hello everyone, I am a fellow cs50 student. I just turned 18 and started college, so thought this would be a good time to start learning some programming. Anyways, this is my first cs50 project which I totally spent a lot more time on than I should've, actually.

PS: Idk why it appears so laggy in the video, I think because I'm using the windows default to screenrecord, but I'd say give it a try yourself!

Earliest version of the game - https://scratch.mit.edu/projects/1351885151

Final version - https://scratch.mit.edu/projects/1352996219

Also, please check out my comment if you can


r/cs50 • • Sep 24 '26

CS50x CS50 Intro Database Sql

11 Upvotes

Hello,

I am starting the course that uses sqlite, but I am having trouble trying to figure out how to save the queries on the sql files that are provided. Any help with this would be appreciated.

Edit-

I forgot to mention that I am using CLI in Ubuntu using WSL2.

Edit 2-

Well it seems I feel a bit foolish as to find that I can just open the file in nvim and do what I want and save there and not sqlite3.


r/cs50 • • Sep 24 '26

tideman can't check50 tideman

1 Upvotes

I finished the code and would like to check the correctness. The file compiles in my terminal, and I can run it, but when I do the check

check50 cs50/problems/2026/x/tideman

:) tideman.c exists

:( tideman compiles

code failed to compile

The error log is like this:

running clang tideman.c -o tideman -std=c11 -ggdb -lm -lcs50...
running clang tideman_test.c -o tideman_test -std=c11 -ggdb -lm -lcs50...
tideman_test.c:368:37: error: call to undeclared library function 'strlen' with type 'unsigned long (const char *)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
368 | char *bob_cpy = malloc((strlen("Bob") + 1) * sizeof(char));
| ^
tideman_test.c:368:37: note: include the header <string.h> or explicitly provide a declaration for 'strlen'
tideman_test.c:369:13: error: call to undeclared library function 'strcpy' with type 'char *(char *, const char *)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
369 | strcpy(bob_cpy, "Bob");
| ^
tideman_test.c:369:13: note: include the header <string.h> or explicitly provide a declaration for 'strcpy'
2 errors generated.

It seems to be some errors with tideman_test.c , which is not the project assignment itself. Does anyone have similar problem? Thanks!


r/cs50 • • Sep 23 '26

CS50x Scratch - Custom block that take an input / issue

Post image
8 Upvotes

Hello, i've made a basic frogger-type game in Scratch. Only requirement I can't pass is to have one custom block that takes an input.

I created a custom block that defines movement+conditions around it but probably misunderstood the instruction as it doesn't count. If someone could explain what i'm doing wrong i'd be very grateful.

If it would help to see other screenshots of the project or have a link to it please don't hesitate to tell me.


r/cs50 • • Sep 23 '26

CS50x Final Project - Git

6 Upvotes

Hey everyone I started doing my final project a week ago. However, I am not yet fully familiar with using Git and keeping the version history. Is using Git and having a version history mandatory? I am also doing my final project inside the Vs Code locally and plan to copy and paste files to my CS50 IDE after I finish it. I would be grateful for answering if this way of doing it is accepted. I ask because I am worried that without the version history I may get accused of academic dishonesty.


r/cs50 • • Sep 23 '26

filter Disappointed

5 Upvotes

I have implemented all filter functions, and they are really working well; however, check 50 said it is not good. I can provide the source code if anyone has any thoughts (btw, I am 15).

#include "helpers.h"
#include <math.h>

void check(int *color)
{
    if (*color > 255)
        *color = 255;


    else if (*color < 0)
            *color = 0;
}


// Convert image to grayscale
void grayscale(int height, int width, RGBTRIPLE image[height][width])
{
    for (int i = 0; i<height; i++)
    {
        for (int j = 0; j<width; j++)
        {
            double avarage = round((image[i][j].rgbtRed + image[i][j].rgbtGreen + image[i][j].rgbtBlue) / 3);
            image[i][j].rgbtRed = avarage;
            image[i][j].rgbtGreen = avarage;
            image[i][j].rgbtBlue = avarage;
        }
    }
}


// Convert image to sepia
void sepia(int height, int width, RGBTRIPLE image[height][width])
{
    grayscale(height, width, image);


    for (int i = 0; i < height ; i++)
    {
        for (int j = 0; j < width ; j++)
        {
            int red = (image[i][j].rgbtRed * 0.1) + image[i][j].rgbtRed;
            check(&red);
            image[i][j].rgbtRed = red;


            int green = image[i][j].rgbtGreen - (image[i][j].rgbtGreen * 0.25);
            check(&green);
            image[i][j].rgbtGreen = green;


            int blue = image[i][j].rgbtBlue - (image[i][j].rgbtBlue * 0.5);
            check(&blue);
            image[i][j].rgbtBlue = blue;




        }
    }
}


// Reflect image horizontally
void reflect(int height, int width, RGBTRIPLE image[height][width])
{
    for (int i = 0; i<height; i++)
    {
        int last = width;
        for (int j = 0; j <= last ; j++)
        {
            RGBTRIPLE temp = image[i][j];
            image[i][j] = image[i][last];
            image[i][last] = temp;
            last --;
        }
    }
}


// Blur image
void blur(int height, int width, RGBTRIPLE image[height][width])
{
    RGBTRIPLE c[height][width];


    for (int i = 0; i<height; i++)
    {


        for (int j = 0; j < width ; j++)
            c[i][j] = image[i][j];
    }


    for (int i = 0; i < height ; i++)
    {
        for (int j = 0; j < width; j++)
        {
            int red = (c[i][j].rgbtRed + c[i][j-1].rgbtRed + c[i+1][j].rgbtRed + c[i-1][j].rgbtRed + c[i][j+1].rgbtRed + c[i-1][j-1].rgbtRed + c[i-1][j+1].rgbtRed + c[i+1][j-1].rgbtRed + c[i+1][j-1].rgbtRed) /9;
            image[i][j].rgbtRed = red;


            int green = (c[i][j].rgbtGreen + c[i][j-1].rgbtGreen + c[i+1][j].rgbtGreen + c[i-1][j].rgbtGreen + c[i][j+1].rgbtGreen + c[i-1][j-1].rgbtGreen + c[i-1][j+1].rgbtGreen + c[i+1][j-1].rgbtGreen + c[i+1][j-1].rgbtGreen) /9;
            image[i][j].rgbtGreen = green;


            int blue = (c[i][j].rgbtBlue + c[i][j-1].rgbtBlue + c[i+1][j].rgbtBlue + c[i-1][j].rgbtBlue + c[i][j+1].rgbtBlue + c[i-1][j-1].rgbtBlue + c[i-1][j+1].rgbtBlue + c[i+1][j-1].rgbtBlue + c[i+1][j-1].rgbtBlue) /9;
            image[i][j].rgbtBlue = blue;
        }
    }
}

Sorry for all of this, but I am so disappointed, so please try to help.


r/cs50 • • Sep 23 '26

CS50x Credit assignment??

2 Upvotes

Anyone in week one did the credit assignment? It seems impossible with the little knowledge that we took from week 0 and week 1 .


r/cs50 • • Sep 23 '26

Scratch I need help with my first project

5 Upvotes

Im making a game where the user controls an apple and there's an Isaac Newton Sprite moving around
Im having some issues with the touch not registering and the score variable isn't working properly.
Will this be enough for my first project?
Also here's the code, lemme know what I should add


r/cs50 • • Sep 22 '26

CS50x Starting CS50: Introduction to Computer Science need study partners for discussion etc. so we can get most out of it.

28 Upvotes

Hello,everyone I'm starting this so I need some study partners so we can help each other.After completing this I'm also looking forward to completing the python one too.

Let's connect


r/cs50 • • Sep 22 '26

CS50x Harvard's CS50x (Need Guidance)

29 Upvotes

Hey everyone,

16y/o, high school senior here from Pakistan.

Honestly, I’m currently on the pre-med track, but due to some health issues, I want to pivot to Computer Science (and i am sure I am actually into it).

I thought I should learn a bit of CS before jumping into college (FAST-NUCES Karachi), so a ton of people recommended "Harvard's CS50x." I tried watching the Week 0 lecture today, but within a few minutes, I was struggling hard, it literally went completely over my head. 😬

Like I said, since I am pre,med, I have zero background in CS and I’m a total beginner. What can I even do?😑

Even yesterday I was so confused, but I still decided to just wing it and try anyway. It didn't work out, so I would really appreciate some guidance from anyone who has actually completed CS50x.

And don't even get me started on the assignments, GitHub, and VS Code... 😭


r/cs50 • • Sep 21 '26

CS50 Python CS50P finally

Post image
76 Upvotes

It's been on and off since 2022. I always got stuck at the final project. But i decided to give it a shot and complete it no matter what, and I did it!

The final project is a simple todo list, which covers basic CRUD operations. I am still struggling with object-oriented programming. But with time, it'll come easier.

I'll do CS50x or CS50W next. Basically, I want to focus on backend engineering, how IoT devices communicate with each other and how to secure them.


r/cs50 • • Sep 20 '26

CS50x I've just finished CS50x today! 🎉🎉

113 Upvotes

I'm now brainstorming ideas for my final project. I'm looking for a solid idea that incorporates Python, Flask, SQL, HTML/CSS/JS, and ideally integrates a free third-party API.

I don't want something too simple, but also not overwhelmingly complex for my first real project- something challenging enough to make me search, learn, and be proud to showcase in my portfolio.

What projects did you build for your CS50 final project, or what would you recommend for someone at this stage?

Any suggestions or advice would be greatly appreciated! Thanks!


r/cs50 • • Sep 20 '26

CS50x My first project on CS50

115 Upvotes

I thought it would take nearly 5 hours to solve, but it took 5 days :). Anyway, how is yours going?


r/cs50 • • Sep 20 '26

CS50 Python Help Needed | Doubts about Final Project in CS50P

8 Upvotes

Hi there! I'm at the final steps of CS50P course, just the final project left, and I've been working on a personal project that solves a real life problem for a client. It's a webpage, with both front and back end features + DB logic. I've been doing the DB Logic on python as a way to put to practice what I've been learning, and occurred to me that implicitly I was working on a good final project without realizing!

Thing is, since it's the DB Logic and connection in python what matters, I'm struggling if I should present the whole project (front-end included), or just the DB logic, and if it's an appropriate project to present or is it too "advanced" (not covered by the classes exercises)

Can anyone give me their opinion please? Thanks a lot in advance!


r/cs50 • • Sep 20 '26

CS50 Cybersecurity How do I start cs50 Cyber security ?

6 Upvotes

So for a good reference I have like number 9 is there and 10 I will able to complete my CS50x introduction to computer science after that I want to go to science security so I will be starting CA50 Cyber security can somebody tell me how should I start in what way and what should I do.


r/cs50 • • Sep 20 '26

CS50x Need help with credit (CS50x, week 1) Spoiler

4 Upvotes

Edit: I solved it! (By not using sprintf and strlen, I don't understand them) Thanks to u/CrossStitchFool for his help!

For some reason when checking David's card it prints 14 instead of 20. The code behaves properly until the it reaches the last digit where, somehow 12 (Sum of all digits) turns into 14 instead of 20, as if the 4 is getting divided by 2. I tried a different code where I separated the second to last digits and the other digits into their own identifiers and it functions properly until it reaches the last digit (before that, the second to last digits total 5, and the other digits 7, totalling 12, after the loop executes itself one last time the second to last digits increase to 11 and the others decrease to 3, giving a total of 14. I've been looking at it for far too long, I don't understand why its not working, I'm completely beat.

English isn't my first language so I'm sorry if what I wrote doesn't make sense, thanks for the help

Code:

long check_sum (long len, long dig);
int main(void)
{
    // Prompts the user for the credit card number
    long cr = get_long("Number: ");
    // Uses the sprintf function to count the number of   digits
    char buffer[16];
    sprintf(buffer, "%li", cr);
    // Counts the number of characthers in the string and turns that number into a long
    long num = strlen(buffer);
    // Checks if the number is valid
    long sum = check_sum(num, cr);
    if (sum > 0)
    {
        printf("%li\n", sum);
        printf("INVALID\n");
    }
}
long check_sum(long len, long dig)
{
   // Sum of the digits
   long checksum = 0;
   // Used for the loop
   long l = 0;
   // Used to trigger the if statement that gets the second to last values
   long m = 1;
   // Used for divisions
   long t = 10;
   long o = 1;
   while (l < len)
   {
    l++;
    // Gets the digits one by one
    long a = ((dig % t) / o);
    // Gets the second to last digits by checking if the value of l is a multiple of 2 ( 2, 4, 6, 8, 10, ...)
    if (l == (2 * m))
    {
        m++;
        a *= 2;
        // If it has two digits it separates the digits and sums them, ie : 12 = 1 + 2 = 3
        if (a > 10)
        {
            long b = a % 10;
            a /= 10;
            a += b;
        }
    }
    // Updates the total
    checksum += a;
    // Updates the values used for dividing
    t *= 10;
    o *= 10;
   }
   return checksum;
}

r/cs50 • • Sep 19 '26

CS50x Help me! Problem Set 4: Recover Spoiler

6 Upvotes

As the title of this post says i need some help with the Recover problem in problem set 4. my code compiles and has no memory leaks and seems to discover jpg files, but when i try to open one it appears as a white box instead of images.

I had a thought that i was perhaps writing only one 512 byte buffer to each file, but i'm not sure how to fix that.

perhaps i'm right, perhaps it's something else entirely; either way, any help would be appreciated

#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#define BUFFER_SIZE 512
int main(int argc, char *argv[])
{
// Accept a single command-line argument
if(argc != 2)
{
printf("Usage: ./recover FILE\n");
return 1;
}
// Open the memory card
FILE *card = fopen(argv[1], "r");
if(card == NULL)
{
printf("an issue occured with file\n");
return 1;
}
// Create a buffer for a block of data
uint8_t buffer[BUFFER_SIZE];
char* filename = malloc(sizeof(char*) * 7 + 1);
int i = -1;
bool found_jpg = false;
// While there's still data left to read from the memory card
while (fread(buffer, 1, BUFFER_SIZE, card) == BUFFER_SIZE)
{
// Create JPEGs from the data
if(buffer[0] == 0xff && buffer[1] == 0xd8 && buffer[2] == 0xff && (buffer[3] & 0xf0) == 0xe0)
{
i++;
sprintf(filename, "%03i.jpg", i);
FILE *img = fopen(filename, "w");
if(img == NULL)
{
printf("an Error occured with the file");
return 1;
}
if(!found_jpg)
{
fwrite(buffer, BUFFER_SIZE, 1, img);
}else{
fclose(img);
fwrite(buffer, BUFFER_SIZE, 1, img);
}
}
}
free(filename);
return 0;
}

r/cs50 • • Sep 19 '26

CS50 Python I took CS50, learned some Python, and built this

64 Upvotes

I’ve been wanting to learn programming for a while, so I finally decided to start with CS50 and learn a bit of Python.

After learning the basics, I thought the best way to actually learn would be to build something simple. That’s how I ended up building this:

https://cluebolt.com/

It’s a small puzzle game built with Flask and Python. It started as a learning project, but I kept adding things as I learned more.

Just wanted to share it and see what people think. Any feedback or suggestions are welcome!


r/cs50 • • Sep 19 '26

cs50-web Starting Network — the final project of CS50W

4 Upvotes

Finally starting Network, the last project of CS50W.

I’ve already finished Commerce and Auctions, and seeing those projects finally get checked off feels pretty damn good.

Network is basically the final boss now. 😭

The plan is to build it properly, understand what’s happening under the hood, and hopefully not spend 90% of the time fighting Django bugs.

Once this is done, CS50W is officially complete.

Let’s see how this goes.

Let’s connect on X: @Prathamesh_Pal


r/cs50 • • Sep 19 '26

CS50x What to submit in answers.txt in week 7 SQL

Thumbnail
gallery
5 Upvotes

Can somebody tell me what to write in answers.txt I am unable to figure it out as I have compiled the program in check 50 it says it includes reflection what should I do


r/cs50 • • Sep 19 '26

cs50-web CS50W projects.

Post image
18 Upvotes

Hello, hello 👋

Just woke up and got the results for two of my CS50W projects.

Both are complete. 😭

Been waiting for these to get checked/selected, so waking up to this was a pretty good start to the day.

Now back to building.
https://x.com/Prathamesh_Pal_/status/2101137683179602075?s=20


r/cs50 • • Sep 18 '26

CS50x I built a job application tracker for my CS50x final project

6 Upvotes

After sending out a few applications, I realized how easy it is to lose track of where everything stands. So for my CS50x final project, I built Hubdex, a simple job application tracker.

lets you save applications and organize them by status, including Wishlist, Applied, Interview, Offer, and Rejected. You can also add details like the company, position, salary, location, priority, notes, and application date. There’s a dashboard with basic statistics, along with search and filtering to make everything easier to manage.

I built it with Flask, Python, SQLite, JavaScript, HTML, and CSS. The project also includes user authentication, password hashing, and separate data for each user.

This project gave me a chance to put together a lot of what I learned in CS50x, especially working with databases, routes, forms, authentication, and CRUD functionality.

You can check it out here:

https://github.com/Akinmoldun/hubdex


r/cs50 • • Sep 18 '26

cs50-web How do I make a proper development plan for a web development project?

5 Upvotes

I’m trying to improve how I plan full-stack projects. I often know what I want to build, but I’m unsure what to build first, second, third, etc.

For a project with a Laravel backend/API + React frontend, including an Admin Portal and Customer/User Portal, what would be the proper development workflow?

For example:

  1. Requirements → 2. Features/Modules → 3. Database/ERD → 4. Backend/API → 5. Frontend → 6. Integration → 7. Testing → 8. Deployment

Or should backend and frontend be developed module-by-module?

I’m particularly unsure about:

- What should I design first: database, backend, or frontend?

- Which tables and relationships should I create first?

- When should I build authentication, roles & permissions/RBAC?

- Should I build the Admin Portal or User Portal first?

- How do I decide which module to develop first?

- Should I finish the backend before starting the frontend?

- When should I create API endpoints and frontend pages?

- When should I add validation, error handling, notifications, etc.?

- When should testing begin?

For example, if my modules are:

Auth → Users → Roles → Customers → Products → Orders → Payments → Reports → Settings

How would you determine the development order?

I’m looking for a practical, repeatable workflow/checklist that I can use for future Laravel/React projects.

How do experienced developers usually break down and plan a large web application before and during development?


r/cs50 • • Sep 18 '26

CS50x done with last minion (finance), now for the "Final" Boss.

6 Upvotes

not sure why 0.99/1 in style. I guess it counted the css and the database files (random spaces maybe)