How do you approach a project that is far beyond your current understanding?

August 6, 2026 4 answers
Asked by MellowCedar42
I recently finished a Python book and built a small single-user forum as my first substantial project. It supports creating posts, replying, viewing boards, and similar features, but only one person can use it at a time. Now I want to make it multiplayer so multiple people can connect. The problem is that I barely understand networking. I can write a very simple client and server, but I don't yet have a solid mental model for sockets, concurrency, select(), threads, or how all those pieces fit together. I tried breaking the project into smaller tasks and reading about networking, but each new thing exposed another gap. When I combined what I had learned, the result was a messy script with the event loop and threads organized incorrectly. A friend eventually had to rewrite much of it, which made me wonder whether I am approaching this the wrong way. Should I pause the forum and build something simpler, such as a chat client, or is there a better way to tackle a project that is currently beyond my understanding?

Answers

BrightMango7
Start by designing the system before writing more code. Write down what the server does, how clients connect, how messages are delivered, and what information must be stored. Then divide the forum into small, testable pieces: one client connecting to one server, multiple clients connecting, sending a message, broadcasting it, and only later adding accounts, authentication, and permissions. Use small proof-of-concept programs to learn unfamiliar ideas, and rely on established networking libraries rather than trying to implement protocols yourself. The goal is to build a useful mental model first, then assemble the working pieces like building blocks.

MellowCedar42: That makes sense. I think I started coding before I had clearly described what the server and clients were supposed to do.

Reply to this answer
SunnyPebble5
You do not need to understand every layer of computer science before making progress. Learn the narrow slice needed for the next step, build a tiny experiment, and let the problems you encounter tell you what to study next. Reading is useful, but it should support a small working program rather than become an endless preparation phase.
Reply to this answer
QuietRiver19
Reduce the number of new concepts you introduce at once. Keep a copy of the working single-user version, then make the smallest possible client-server version of the same functionality. After that, run two clients against one server and hard-code the users for now. Once communication works, add features one at a time, such as login, registration, and persistence. Your first attempt is allowed to be messy. Building a rough version to discover what you do not understand is normal; you can then rebuild it with a better structure. A simpler chat program is a perfectly good stepping stone if it gives you scaffolding and lets you focus on one new idea at a time.
Reply to this answer
CopperFinch88
For a basic synchronous server, avoid adding threads until you understand the event loop. Put the listening socket and all connected client sockets in one collection, call select() once per loop iteration, accept new connections when the listening socket is readable, and process incoming data from whichever client sockets are ready. Start from a small, known-working echo-server structure and replace its message handling gradually. Threads added to an already-confusing select() design can introduce race conditions and make the underlying problem harder to see.
Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions