r/learnprogramming • • 23d ago

How do you deal with wanting to code something when you have no idea how to implement it and there isn't any info about it?

I've dropped several projects because I always end up hitting a point where there's a core mechanic I just don't know how to make. I know that's probably a sign that I'm trying to build projects that are above my current skill level, but at the same time I've been making small projects for quite a while and I feel like I'm always using the same set of skills. It feels like I've hit a wall. I don't really feel like I'm improving or learning anything new.

When I try to step outside my comfort zone, I can usually make progress by watching tutorials or reading documentation. The problem is when I can't find a tutorial for the specific thing I'm trying to do. That's when I get completely stuck because I don't know how to approach the problem or figure out the solution on my own.

What do you do in situations like that? How do you learn to build something when there's no guide to follow o information?

30 Upvotes

43 comments sorted by

56

u/Goobly_Goober 23d ago

You break it down until you can deal with it

3

u/Repulsive_Metal_1569 23d ago

Yeah, I know, but sometimes I break those mechanics down into the smallest pieces I can think of and I'm still stuck on how to actually implement them

10

u/ironicperspective 23d ago

Can you give an example? Either you’re going about breaking it down wrong or lacking fundamental knowledge, maybe both.

3

u/Own_Unit_6170 23d ago

If it can be done, then someone has designed a way to do it, so you just have to find it. The most tedious parts are when you need to install twenty different pieces of software just to test it; or when the one key parameter you need hs never been documented by the people who wrote the function, and then you have to make educated guesses, which improve in accuracy with experience. Eventually you can say to yourself, "Hmm, I bet it works like this," and more and more often you discover that you are right.

2

u/burlingk 23d ago

That is when you Google "how to <x> in <language>."

1

u/Goobly_Goober 23d ago

Eventually you'll break it down to the point that someone has dealt with the same problem and there's a solution out there. I usually can't just go "how to stack objects on to a grid and spawn them when I click a button" when im developing a game. I have to break it down to the point that I can look up how to spawn objects in the game or make a grid. What are objects? They are scenes (i work with godot). Ok, how do I load scenes into other scenes? Boom, theres a documentation or tutorial for it. How do I make a grid, there's no grid node. Ok, a grid could just be used with a tile map layer node, boom.

That might be a long winded explanation, but I hope that makes sense. All it is is one big puzzle, and yea it can be annoying, but thats what makes me love it.

1

u/jlanawalt 23d ago

Some things are hard or non-obvious. Sometimes a more capable framework or plugin makes the difficult possible.

3

u/Billy_Twillig 23d ago

Work the problem. Then the one after that…

14

u/[deleted] 23d ago

[removed] — view removed comment

4

u/DezXerneas 23d ago

Also, the smallest bit can be a project of its own too. Just build small pieces until you get where you want to

Personal anecdote. I got mad at trakt and plex recently so I decided to say fuck it and build the entire architecture myself(i know jellyfin and other similar stuff exists), so the first thing I built was literally just TUI to connect to my media server(sshfs is overpowered), and a way to properly scrobble/log every watch from it perfectly with zero variance unlike how every other modern scrobbler(that I know of) does it.

11

u/bizvibe8 23d ago

When tutorials don't exist for a specific mechanic, the issue is usually searching for the feature by name rather than by its underlying computer science pattern.

Here is a practical workflow to unblock yourself when you're stuck on an unfamiliar mechanic:

  1. Translate the feature name into data structures: Mechanics are rarely documented under gameplay or UI names. For example, a turn-order system is usually a priority queue or circular array; an inventory grid is a 2D array with coordinate mapping; a line-of-sight mechanic is raycasting or grid traversal. If you identify the underlying data structure or mathematical operation, standard documentation and algorithms immediately become available.
  2. Define the exact state transition on paper: Before writing any code, list the inputs and the state change. What variables exist before the mechanic triggers (e.g., position, inventory array, health)? What event triggers the change (e.g., keypress, collision)? What exact numbers or flags should change afterwards? Every complex mechanic is just updating a few variables in response to an event.
  3. Build a throwaway isolated prototype: Never attempt an unfamiliar mechanic inside your main project where UI, assets, and existing architecture get in the way. Open a fresh, blank file with zero dependencies and build only the logic with hardcoded data.
  4. Start with a deliberately crude, hardcoded solution: Write the simplest brute-force implementation that achieves the result, even if it uses hardcoded values, nested loops, or repetitive if/else blocks. Having a working ugly prototype gives you immediate visual feedback and a solid base to refactor.

1

u/Repulsive_Metal_1569 23d ago

Thank u for your advice!!

6

u/No_Report_4781 23d ago

I invent it.

3

u/kagato87 23d ago

You use pseudo code, right?

Start with "mechanic rules."

Turn the rules into their decision trees. Not as code, but flowchart or pseudo code. As you do this you'll naturally refine the rules.

Then take the rules and turn them I to proper pseudo code. If you want to "do the thing" but don't know how to define it, then "do the thing" is your pseudo. You'll come back to it. Continue on down.

Learn to use stubs. They're awesome. Pop on a stub, come back and solve it later. Just make sure there's a few unit tests that'll fail on the stub, because you will forget.

Then take your stubs, your poorly designed "do the thing" and break it apart. Doesnt have to be all the way, even just into two pieces is progress. Pseudo in the stub even while it's still returning the palceholder.

Keep going. Eventually your stubs won't be stubs any more, you'll go "howd I do that?" and be filled with an overwhelming sense of accomplishment.

Or just ask Claude. You don't get that growth and accomplishment, but it does get the job done. Sometimes.

5

u/YouPeopleCantBeReal4 23d ago

Nothing is new in software is something I was told a lot by my mentor (senior swe at my current workplace) the issue you most likely have is not breaking down your problem enough. Very few things are novel in this field, chances are someone has dealt with what you are dealing with in some form. Researching and finding it can be the hard part sometimes

2

u/codegems 23d ago

You can ask for help online. Ask as if you already solved it, and someone will be promptly there to correct you.

Cunningham's Law - The best way to get the correct answer on the Internet is not to ask a question, it's to post the wrong answer.

More seriously though, innovation does not occur in a vacuum. But you need to put in the effort to pull the relevant threads from various sources. What are you trying to make? Who are the people who have gotten closest? Are there any university departments doing research on it? Any recent papers, libraries, frameworks that get close? Maybe it's so niche there's only random abandoned GitHub repos about it. Any comments on online forums? What have you discovered on your own? Even more broadly: what field does it fall under? Mathematics? Astronomy? Dentistry? You get the point.

2

u/Own_Unit_6170 23d ago

There's always some source where you can look it up. It used to be printed manuals, then came Google, now it may be an AI. Probably nothing is more readily accessible on the Internet than programming information. Start with something general like "how o I access a database" or "how do I draw a circle on the screen," and narrow it down to more specific questions, until you understand how to write the actual code to do what you want. Chances are that you'll nee to ask lots and lots of questions, and it may take hours for you to gather enough information to write something useful; but the next time around it will be a lot easier.

1

u/chrisrrawr 23d ago

join a community. talk to people. describe your problem and have them ask questions.

you can try to solve it yourself but if you don't have a solid problem solving framework you will not get very far and it will be frustrating.

1

u/itsghostmage 23d ago

Man, I run into this often. I try to break it down as much as I can and use comments to keep track of all the pieces. If I feel like it's just beyond myself, I'll reach out to forums, subreddits, etc. I don't always find the solution but a lot of the time, I just needed experienced outside perspective 🤷🏻‍♂️

1

u/minneyar 23d ago

This is actually the hardest part of software engineering--not writing code, but solving problems that you've never solved before and that nobody else has solved before, either (or at least, nobody who bothered to write a tutorial for how to do it). Working through that is hard, but that is actually the best way to improve.

As others have mentioned, it's all about breaking things down into smaller problems. What are the inputs for the problem, and what are the outputs going to be? If there's no existing library that can do what you want, what would you expect the interface for that library to look like?

1

u/IAteTonysLoMein 23d ago

Start small and iterate. I mean, even breaking it into "it's going to need to iterate through this list, so let's start there" and go from there. As has been mentioned elsewhere, there's nothing new in software development, so break the problem down far enough and you'll start making progress

1

u/BranchLatter4294 23d ago

Break it down into small problems. Solve the small problems. Put them together to solve the big problem.

1

u/WhaleBird1776 23d ago

That’s about the time I whip out the paper and pencil and start breaking it down until I have small pieces I do now how to implement

1

u/Amuro_Ray 23d ago

Have you ever tried to ask for help yourself?

Do you have an example of of something where there is no information on how to do it?

1

u/Rabbit_Brave 23d ago edited 23d ago

I feel like I'm always using the same set of skills. It feels like I've hit a wall. I don't really feel like I'm improving or learning anything new.

When I try to step outside my comfort zone, I can usually make progress by watching tutorials

Do you think that these two points might be related?

It sounds to me like you've been short-circuiting opportunities to practice problem solving on simpler problems, and now you're running into harder problems which are too advanced to be good practice for your level.

1

u/ironicperspective 23d ago

Read the docs for the language you’re working in after breaking down the problem into as small of pieces you can manage.

1

u/grymoire 23d ago

Think about the problem and create a flow-chart. What is the input and what is the output/result?

When does the results change and why?
Write pseudo-code like

If something happens

and if also this happens

then do this thing

If the thing has this, then

do something else.

If you can't describe what you want it to do, you can't write a program. These is nothing wrong with writing code where a part says

#do something here when I learn more

Write the part you know and do the harder parts later.

There are times when you realize your flowchart/pseudo-code is completely wrong. You just start over. That's how you learn. I've worked months on code and realize it is all wrong. Re-writing it from scratch isn't that hard because you now understand the problem and the solution.

Thinking is the card part. Coding is easy.

1

u/One-Trips 23d ago

Same. I just shrink the idea until one piece works, then it's easier to build out from there.

1

u/LukaRozman27 23d ago

The trick is to break the core mechanic into the smallest possible pieces, then Google each sub-part separately. If you hit a wall on step two or three, that's usually where you find out what you actually need to learn next.

1

u/desrtfx 23d ago

Well, exactly coming up with solutions, developing these solutions on your own, by yourself is what programming is about.

Copying tutorials is not programming. It's copying.

Throwing out code is not programming. Developing solutions is.

How did the people do it before the internet existed? They planned. They designed. They tried. They failed. They tried harder. These people (me included) did not have tutorials, nor places like reddit. We had to do everything ourselves. This is what real learning is about. Copying tutorials is not learning.

1

u/ShimonEngineer55 23d ago

What I do is I use formal logic and reasoning to break down how to solve the problem which sits at the root of programming. It’s math. This is why people say learning formal logic is critical to programming. Yes, you don’t need to know it to copy code and string things together, but it’s useful to think this way when problems are abstract and unclear (e.g. no YouTube video to show you how to do something specific).

Basically I approach these situations using formal logic which is naturally how engineering is designed since it is based on formal logic.

1

u/Xtreme_Neon 23d ago

when there's no tutorial, the trick is usually to stop searching for the exact mechanic and search for the general name of the technique behind it. for example "how do i make X" gets nothing, but the underlying idea (a state machine, a spatial hash, a debounce, whatever it is) has tons of writeups. also try finding an open source project that does something similar and just read how they structured it, even if you don't copy anything. a tiny throwaway prototype of only that one mechanic, with no other code around it, makes it way easier to experiment. what's an example of a mechanic you got stuck on?

1

u/Y0uN00b 23d ago

that /plan does

1

u/Blando-Cartesian 23d ago

You seem to be working from impression that software development is a linear process where the whole thing is designed correctly from the start and then implemented part by part. That's not how it works.

Start doing the best implementation you can think of. It doesn't matter how awful it is. You might look up something similar for ideas, but those ideas don't make sense since you don't know why those ideas might be good. Just start implementing it as you thought it could be done. You'll soon start dreaming of ways you should have coded it differently. Then refactor that aspect of it and keep doing that over and over. Do not keep building on top of an implementation you recognized as sucking. You'll only end up with something too big to fix.

1

u/JGhostThing 23d ago

Here is the process I use. This may be of use to you. If you try it once and it has problems for you, maybe this isn't for you. If so, I hope that you find something.

  1. Using pen and paper, I draw diagrams, lots of rectangles and line, to define the date structures I will need. For example, if I want to build a word processor, I might define a paragraph, a page, and some objects for formatting. I draw out the data structures and the interconnections within the structures.
  2. Write pseudo-code for this program.
  3. Write real code (rust, Java, SQL, whatever makes sense).
  4. Write individual unit tests.
  5. Test. Lots of tests. Start with the unit tests and go on to every test you can think of. As part of this, for every bug you find, write a unit test to assure that the bug is gone.

This is my process. I start with data or object definitions, pseudo-code, real-code, lots of unit tests. Testing is best done with many users. As many as you can get. Solve each one of their bugs. For each bug found, write a new unit test. Perhaps you'll have more ideas. Avoid this. Avoid creature feep (feature creep). I recommend finishing this program before making a new product by extending this one.

If this works for you, fine. If this doesn't work for you, also fine; you'll need to find a different process. Different techniques work for different people.

1

u/2daytrending 23d ago

Try breaking the mechanic into smaller parts and testing each one. Sometimes little trial and error teaches more than finding the perfect tutorial.

1

u/Puzzleheaded_Kale_96 23d ago

Das klingt für mich weniger nach fehlenden Tutorials als nach einem Denkfehler beim Einstieg: Du fängst beim Werkzeug an, nicht beim Problem. Probier es mal top-down. Schreib die Kernmechanik als Use Case oder User Story auf, so genau wie möglich. Zum Beispiel: "Als Spieler will ich X tun, damit Y passiert." Dann zerlegst du das in Teilschritte, und plötzlich sind es mehrere kleine Probleme, zu denen es sehr wohl Infos gibt. Dass es kein Tutorial für das große Ganze gibt, ist normal. Das gibt es meist nur für die Einzelteile. Eine KI kann dir dabei helfen, Lücken und Randfälle zu finden, eine grobe Architektur vorzuschlagen und die Teilschritte zu erklären. Wenn du dir einen Prototyp bauen lässt, lass dir jeden Baustein erklären und bau die Kernmechanik danach selbst nach. Sonst hast du einen Prototyp, aber nichts gelernt. Arbeite in kleinen Schritten mit Git und schreib früh Tests. Dann merkst du sofort, ob eine Änderung etwas kaputt macht, und traust dich auch an Dinge, die über deinem Niveau liegen.

1

u/mredding 23d ago

The problem is when I can't find a tutorial for the specific thing I'm trying to do. That's when I get completely stuck because I don't know how to approach the problem or figure out the solution on my own. [...] What do you do in situations like that? How do you learn to build something when there's no guide to follow o information?

Dig deep. Learning to program isn't the same as learning to make a video game. A game is going to require linear algebra, calculus, and physics. Programming alone won't teach you these things. If you have enough FUNCTIONAL knowledge in these domains, more than just rote academic memorization, then you'll be able to apply this knowledge to code and make progress. This suggests you need a certain depth and familiarity with these subject domains, enough to make them functional.

So for whatever problem domain you're interested in, you need to learn the domain fundamentals enough to make that knowledge functional. There's just no rushing it. You don't have enough functional domain knowledge yet, that's what you're telling me.

37 years - I can write robotics, video games, databases, and trading systems all day - for me it's not a project but a chore. But image processing? That's a VERY fascinating subject I kind of need to get into, but I have NO functional knowledge in it - I can't even start. Writing an edge detection algorithm would be a project for me, and a major accomplishment if I did. But I can speak from personal experience - though a tutorial can walk me through the code to write to get the result, that's not the same thing as understanding how or why it works. THAT is the part I need.

And you need the equivalent for whatever it is you're doing. Become a domain expert first.

And I'll give you a hint that you will also want to work on project planning and management. Writing the code is not the first step, and not the most interesting nor difficult part. The PROCESS of managing the project, developing the project is language agnostic. You need to figure stuff out that has nothing to do with actual code. What are the algorithms and processes you need to understand first? Good project development and management skills will help you break the process down so you know you're digging into the questions and finding the answers such that you can measure your progress.

It's hard at first, tedious, but it gets easier as it becomes intuitive.

1

u/goldscurvy 20d ago

Its a challenge. I look for those opportunities. Often you can find tutorials. A more useful method is finding similar projects on github and reading the code.