r/AskProgrammers • • 19h ago

"Learn through projects"

What does that even mean?

How does someone learn to code (python) by building a project they know nothing about? When I first open Pycharm and have an idea of what I want to build, what do I even google?

Do I watch someone create the same project from scratch via youtube?

This is like telling a non-English speaker to learn English by going up to someone and speak English to them. HOW do they speak English!? Where do they begin!?

Sorry if I seem like a snob. I am just frustrated.

EDIT: I now understand that while trying to apply this advice (and failing), I lack the ability to understand the "logic" and workflow behind creating a program. That's what I need to focus on when building a project. I'm going to leave this up in case anyone who's also having such a silly mental block like me needs a bit of guidance.

3 Upvotes

40 comments sorted by

6

u/ninhaomah 18h ago

I give you an example then.

How to learn how to drive if I have never drive a car before ?

I have learn the gears , steering wheel , accelerator , brakes first right ?

Then ?

I drive like a Hollywood stuntman around car park.

Then one I get confident , I drive to supermarket.

Then I drive to nearest town.

Then highway.

Etc etc

No ?

1

u/Delicious_Impress814 18h ago

I understand this analogy because I am familiar with driving a car.

I also understand it within the lens of learning python; start slow and learn the basics.

My issue is about what comes after the basics. The main advice given is to build projects, but what exactly do I look up? Should I just watch someone else build it then study the code?

2

u/ninhaomah 18h ago

Aren't you slightly ahead of yourself ?

Ok , have you started on the Python basic first ? Or pls let us know where you are and issues you are having etc 

I mean , if I want to drive like James Bond , you will also be asking me to learn till I can do parallel parking right ?

Then we talk about drifting and so on and on. But if I can't even parallel park then what else we talk about ?

3

u/Delicious_Impress814 18h ago

I'd consider myself a beginner. I understand the basics, but absolutely nothing advanced just yet.

Yes, I may be ahead of myself. You're right.

I learned from another comment that what I'm failing to articulate here is my inability to understand the pseudocode; the logic/workflow of what I'm trying to build.

I think that clicked something into place for me. I appreciate your input as well!

1

u/ninhaomah 18h ago • Heartwarming

Good luck :)

1

u/Nice_Try4389 18h ago

I mean just find challenges or use examples from like code academy.  They all give you projects to just make to learn like how to make a magic eight ball, or a rock paper scissors game, etc.

1

u/symbiatch 15h ago

If you have nothing to build why do you want to learn it?

It’s like saying “I want to learn to paint but there’s nothing in the world I want to paint.” So why?

You must have something you want to build. It’s not for others to tell you. That’s not how it works.

1

u/Delicious_Impress814 15h ago

You may have misread.

I never said I didn't have anything to build. I said I didn't know where to start learning how to build what I wanted.

0

u/Strong_General6771 17h ago

That works till the supermarket moves every week and the brakes are written in a language you don't speak yet.

2

u/TashLai 18h ago

Well. I learned English by speaking English. It's actually the perfect analogy. No one starts speaking new languages by first memorizing the entire dictionary and all the rules. Practice beats pure theory.

1

u/Delicious_Impress814 18h ago

But you didn't learn English by going up to someone and speaking English immediately. Because you couldn't speak English.

I guess I'm just frustrated because I'm trying to teach myself outside of a structured course-like environment, with tests and quizzes and a lecturer who provides guidance.

I also only speak one language, so part of me believes I simply lack the intuition of learning one.

2

u/DanielTrebuchet 18h ago

I hate to tell you, but the vast majority of programmers are self-taught. You are at no disadvantage compared to the rest of us. You're simply walking the path most of us already have.

The language analogy is the best, frankly, because it's more than an analogy. It's quite literal. You have to slowly learn the vocabulary and grammar needed to communicate what you want. Learn the very basics, then figure out what you "want to say," and use that as direction to expand on your knowledge.

The way I did it was to learn a skill, figure out how to implement it, then look at ways I could utilize that skill but in a way that felt slightly out of reach. "I think I could get 75% complete with what I know, so I'll dive in and figure out the other 25% along the way." It can be painful and frustrating, but that's how you grow, and that's a great way to learn this stuff.

And, be prepared, because it's not easy. If you don't find it difficult and frustrating most days, you are likely just setting yourself up for failure. Just as you couldn't go learn Chinese in a few months, neither will you be "fluent" with a programming language in that amount of time. It took me several years just to reach the peak of the Dunning-Kruger curve, only to start understanding how little I actually knew. 20+ years of daily programming and constant self-guided education, and I still learn new things most days, as it should be.

Just stick with it. If you aren't enjoying it along the way, it might not be for you. It will definitely be a challenge, but the end is worth it, and the willingness to push through that discomfort is what separates the successful programmers from the ones who are being replaced by AI right now.

1

u/Living_Cell7304 18h ago

You need to understand what you want to build, then research how it works internally.

Once you know that, you should be able to start thinking about the pseudocode in your head, which you should be able to translate into python or whatever you’re using.

Computer programs just move data around and operate on it.

1

u/Delicious_Impress814 18h ago

This is what I am failing to articulate!! The pseudocode; the logic/workflow of it all.

Thank you.

I feel like an idiot.

1

u/xarop_pa_toss 14h ago • Bravo

Because you learned python syntax and not actual core software creation skills. Go on Google and look those up or ask an LLM to teach you how to make a first plan for your program

It's very important to understand one thing: the code you write is not the solution to the problem, it is only a translation of the solution. You define the problem, you break it down into smaller parts and systems that interact with each other, you solve those problems on paper with pseudocode, or flowcharts or whatever other means you want, then you "translate" those solutions into code.

Learning if statements and for loops is needed yes, because that's the syntax you need to write Python. But I can go and define the different systems for a kiosk machine or Todo app right now and write them in 4 different languages. The code will be very very similar on all four because the language doesn't really matter when I already solved the problem on paper.

1

u/alphaglosined 18h ago

There are books that provide projects to work on i.e. https://www.amazon.com/Big-Book-Small-Python-Programming/dp/1718501242

There is also sites like: https://leetcode.com/ and https://www.codecademy.com/code-challenges

Also there is: https://rosettacode.org/wiki/Category:Programming_Tasks

But yeah you can watch youtube, but it'll be questionable in quality.

2

u/Available_Safe1818 16h ago

> This is like telling a non-English speaker to learn English by going up to someone and speak English to them. HOW do they speak English!? Where do they begin!?

That's a good example. You'd have to listen to and try to speak a ton of your target language. You'd also want classes or other learning materials.

How do you think all the students who learn a programming language in a university class manage to do it?

2

u/No_Profession_3125 15h ago edited 12h ago

Today it means absolutely nothing because AI makes the project, so nothing changed in your brain by the time you get a functional output. But I guarantee it used to mean something very important until just a few years ago. 

One of my first software projects, back in 1997 when I was 12, was a silly little game made in Microsoft QBasic: you had to target a point on the screen and a cannon would shoot a projectile hitting the target following a parabolic curve trajectory. I learned insane amounts of geometry and calculus for my age: how to interpolate the curve from three points, how to interpolate it from one point and one line (the line of the cannon), how to plot it on the screen distributing the points uniformly... One of the best experiences of my life.

2

u/xarop_pa_toss 14h ago

A terminal calculator is a project. Tic tac toe is a project. Microsoft Excel was definitely a project on paper too at some point.

Also your analogy makes no sense. You say you know the basics right? So if you were to learn English already knowing the basics, you would need someone to speed English with. They might need to start speaking slowly, and explaining specific vocabulary, but if you know the basics you can put those things together.

Have you made any programs at all?

1

u/nacnud_uk 18h ago

You have to type There is no way around that. Get the basics, maybe, or even just how instructions work, and just type. When you can go from the typed form to the running form, no matter what that is, you will have made progress. Line by line.

Have fun along the way. Remember, this is a short fully formed python program

print("This is not a string")

That's it.

Put it in a file, and run it. When you can do that, you're on your way.

Without practice, typing in this case, you're doomed.

1

u/funbike 18h ago

Jesus, calm down. Start small. Very small. Now, whatever you are thinking, smaller than that.

File: app.py

#!/usr/bin/python

print("Hello")

Now make it executable and run it

$ chmod +x app.py
$ ./app.py

Good job, your first project! INCREMENTALLY add to it. Bit by bit, add tiny things as you learn them.

1

u/armahillo 18h ago

“learn through projects” is an exit from tutorial hell, once you’ve learned some basic concepts.

if you were learning a new verbal language, “projects” would be like “poetry” or “essays”. The vocabulary and syntax you learn during a class is like the keywords and syntax you learn initially in programming

1

u/korywithawhy 17h ago

Honestly start by asking google the first thing you don’t know, then if you don’t understand any part about what it said, ask about each part of the conversation that you didn’t understand. Doo that for long enough and you’ll have enough information and understanding to know where to start. Then start, and if you get stuck ask google about the first thing you don’t understand, and so on. Trial by fire 🔥

1

u/dld2517 16h ago

When people talk about doing “projects” what they mean is making small programs and then modifying those programs to add features and functionality so that you stretch your development skills.

Example: let’s say I assign a value to a variable. The next logical step would be to either output that variable, or perform some action to modify it. Then I might want to compare the two and make a decision. In order to do this I will need to add a data structure, another variable, and at a minimum a comparison statement (if).

Ok so that’s one idea. Now how might I create an extension. Perhaps I would ask my user to give me input? Maybe I would take my input from the command line by reading the argument list? Perhaps I would read the input from a data file (now we have a whole new area to work: files and file handles). Do you see what is happening? Every extension that we create in our mind to stretch our problem set means we have to add some functionality to our codebase.

Next I may want to begin to generalize what I’m trying to do. So then I can add functions and stored procedure. Next is error handling so I use some try/except statements. Maybe I want to add some control sequences so I might use a case statement.

This is how you learn and build. Once you create you can then solve larger and larger and more structured problems with the same code constructs.

1

u/NewInflation2121 14h ago

Break down the problem into smaller chunks... Didn't you guys learn how to do this in grade school?

1

u/AIcarrerLab 12h ago

I think the part people often leave out when they say "learn by building projects" is that you're not supposed to know how to build the whole thing from the beginning.

Let's say you want to make a simple expense tracker. Don't start by trying to build the entire app.

First, figure out how to take an expense as input. Then learn how to store it. Then display all the expenses. After that, maybe add categories or a monthly total.

You'll probably get stuck at every step, and that's normal. Search for that specific problem, read the documentation, try a solution, and see why it works.

And yes, watching someone build a similar project can help. Just try not to copy the whole thing line by line. Pause, change something, and see if you can make it work yourself.

The goal isn't to build something impressive on day one. It's to get comfortable solving one small problem at a time.

1

u/IronmanMatth 12h ago

You open python. You do some basic tutorials. Now it's time to get out of tutorial-hell and make a project.

What project? That's yours to decide.

Are you a gamer? Make yourself a text-based RPG. Set up an actor class, inherit it to enemies and players. Give them stats. Make a damage and defense formula. Set up a combat simulator where A fight B in a turn based setting. Set up levelling up with xp, equipment and equipment slots, different quality of weapon and weapon types. Expand, expand, expand.

Want something simpler maybe? Make hang-man. A classic.

Want somethiung more practical? Maybe look into some UI automation and start there. I want my program to do X. Start with that.

Once you are a tenth of the way done with this you are doing what a project in suppose to make you do; you are problem solving. You are not just looking at a tutorial that tells you what to do.

That's the hard part any new programmer needs to learn. Programming is a tool to solve problems. You need to learn to find the problems and translate them into a logic you understand, and then find the solution.

To use your own analogy; a project for programming is like you being told to speak English after a few courses. You have no clue what you are doing. Every words you say is translated from your own language to English in your head. But you are now actually learning to speak English. Do it enough, and you stop translating. You stop using your own native languages grammar. You are fluent. This does not happen by doing glossaries for years upon years. It happens when you speak it -- and it is extremely awkward in the start. You are, in many ways, problem solving there too. You are trying to use the words you know, the grammar you know, and your own language into usable english. This takes time and effort -- but it all starts with you awkwardly trying to form any sentence.

And just to tack on, a bit out of order:

>Do I watch someone create the same project from scratch via youtube?

Use that as a reference if you want. But if you only copy, you stay in tutorial-hell. You need to problem solve yourself.

And yes. It sucks. You often get in a position of "I have literally no clue what the fuck to do?". That's the point. That is your prime "I am learning" phase. You then try, research, test and redo. Iterating that over and over.

Eventually you'll be comfortable in that zone. heck, you'll be happy when you reach the stage of "wtf? I got no idea how to even start". Because you know you are about to learn

1

u/Square-Yam-3772 16h ago

it is nonsense. the learning is really done via reading/studying/memorization/etc. It is a proper subject like anything else.

the average redditor self caught coder is allergic to textbooks or reading in general so their preferred approach is diving into a project head first and smash their heads into stuff until something sticks.

they basically want to suffer first, find out why they are suffering and then they feel motivated enough to read the one particular thing that would help them overcome their headache (and then not reading anything else). And then they rinse and repeat until they feel like they learn something.

and then they come around and ask reddit "why do I feel like an imposter" or "why wouldn't anyone hire me as a coder"

like seriously, just look up a curriculum and grind through those textbooks/tutorials like everyone else.

but redditors do what redditors do so whatever...

0

u/coolio965 15h ago

this is sarcasm right?

2

u/Square-Yam-3772 15h ago

nope. curriculum from unis can be found easily online and the textbook pdfs are available online. Some uni even have free courses on youtube. redditors just have to do things their own way because they hate school or something. shrug

I found the DIY/self-taught coder culture on reddit weird. Judging from the posts, it doesn't even work all that well but it is just what redditors like apparently

1

u/coolio965 15h ago

if you are genuinely under the impression you can learn to become a competent programmer from just reading books/text books im afraid you are mistaken. just like the majority of other skills programming is something you learn with experience not just by learning syntax or "design patterns"

2

u/Square-Yam-3772 15h ago edited 15h ago

it is reading books/text books, doing exercises, doing practice projects.

the point is "structured learning"... if you just follow any random programming textbook, the learning is segmented into different topic with exercises/tests/projects/whatever

redditors ignoring all of that and randomly jumping into some project is just counterproductive. programming is not some new subject... they don't have to rediscover how to learn the knowledge...

self taught redditors are basically training each other to become a bunch of tribal hacks. its just a weird culture.

EDIT: I should probably just leave subs like these tbh. I am probably going to roll my eyes again when I see another post titled "how do I start learning this or that language? HOW?" like OP is going after some mystical knowledge when the textbooks/tutorials are literally on the internet

1

u/coolio965 15h ago

as someone who is both self taught and has had formal education. the programmers that learned from text books where hopeless. even things as simple as programming a graphing calculator with drawpixel and line drawcommands was too much.

i think aslong as someone has a grasp of the basics of programming doing actual projects (and with that im not talking about a tutorial project) is infinitely more valuable than text book lessons. its the friction of figuring out how to solve the problems you run into that teaches you programming. its also going to teach someone what are good and bad habits because those bad habits will bite you in the ass later. the "friction" in learning a new skill is what actually teaches and science backs this up

2

u/Square-Yam-3772 15h ago

...except you had formal education. Typically, students of programming would be equipped with some baseline knowledge first aka. formal education before they run into those "friction"

people like you who had formal education encouraging people with no formal education to dive head first into these "friction" is just ridiculous

"even things as simple as programming a graphing calculator with drawpixel and line drawcommands was too much" yeah, I dont know where you get this idea... making a simple calculator app can be someone's semester-end project. That's literally a tutorial project.

even people who had courses would experience with these "friction"; why is it better to skip over the reading and the learning and dive into these "friction"? what are the benefits?

1

u/coolio965 15h ago

even in the first class my skill level in programming was above the skill level of all the top achievers that relied on just assignments.

and a graphing calculator is not a "end of semester project" you can whip one up in 2 hours in javascript and thats with no libraries or AI. i've tutored multible interns now majority of those didn't even any programming related education before. within a year they were writing C with zero issues and able to write complex programs. and the first "language" i make them program isn't C or javascript. its either Z80 or Arm assembly. modern education around programming is complete garbage learning syntax isn't the same as learning to program

1

u/Square-Yam-3772 14h ago

good for you but that clearly doesn't work for some people on reddit. so why is redditing promoting this approach so hard? what is wrong with reading some basic knowledge BEFORE starting a non-trivial project? I still dont see the logic in it

a graphic calculator project can be as complicated as teacher wants. it depends on the feature list and the requirements. I think you are tunnel visioning on the draw calls

"i've tutored multible interns now majority of those didn't even any programming related education before" you realized that YOU are providing the education for them, right? that's not the same as redditors randomly doing things as self taught coders

"i make them program isn't C or javascript. its either Z80 or Arm assembly. modern education around programming is complete garbage" I find that ironic. One of the courses I hated in the past was an introductory course for assembly languages. So you think its garbage but you are basically proposing the same thing.

1

u/coolio965 14h ago

you can hate assembly all you want (and many people do) but it does a great job at teaching someone to think Like a computer and why some things are the way they are (like why arrays decay to pointers). and my "teaching" of interns boils down to explaining what some basic assembly instructions do and giving them a task to program with said instructions. and i never said having basic knowledge before starting a project is a bad thing. but claiming formal text books can teach you how to become a programmer is a massive stretch.

"a graphic calculator project can be as complicated as teacher wants. it depends on the feature list and the requirements. I think you are tunnel visioning on the draw calls" my guy its a glorified FOR loop recursivly drawing the result of an equation to a screen.

this idea of programming being something you can pick up from a bootcamp or book is why so many modern Devs are incompetent and why so much software is such a shitshow. with AI making it even worse

→ More replies

2

u/manythanksfriend 18h ago

Build your own porn site. Build a multi tenant booking platform. Idk man.