r/AskProgrammers • u/Delicious_Impress814 • 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.
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 ?
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/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/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.pyNow make it executable and run it
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...
2
u/manythanksfriend 18h ago
Build your own porn site. Build a multi tenant booking platform. Idk man.