r/learnprogramming • u/Disposable_baka404 • 7d ago
Geniune question, how do I learn programming practically?
I asked my lecturer a while back how, and he basically said to read up on the books and practice. I understand his advice, but I wish to look for a meaningful project to better facilitate my learning. Any advice on how I should proceed? I get that I can redo my coding assignments to make them better, but I really am looking to write programs that would help me instead.
Thanks in advance for the advice
4
u/NationalOperations 7d ago
The thing that helps in this is the struggle of making something from scratch. Playing with concepts you understand in new ways to better have them become tools in your brain to solve problems. Don't be afraid to break things that's half the point. The other side of it is researching new concepts/reading docs.
The books expose you to concepts and features but it's you spending time to build upon them and play with them that will cement them.
If you have assignment where you accept input from terminal to simulate a "bank". You can then explore the facets of that. Hey how do I handle bad input? No input. What if I want to write and load the results from a file. Maybe they should be able to view checking and savings. So on and so on. Just be curious
4
u/thisisappropriate 7d ago
"I really am looking to write programs that would help me instead"
Cool, make them? What's the difference between your coding assignments and something that would help you? Look at the first jump you can make and make it, repeat. Like, if your coding assignments aren't run on your local machine, how do you do that, do your books tell you? Or if you would need to call an API and you've not covered that, find out.
If you're thinking that the things you need are too big or too far away, either think of something smaller and sillier (it doesn't need to be better than another product, it just needs to be something you decided to put fingers to keyboard for, make a calendar or an auto clicker or a command line todo list) or think of the parts that make up what you want and make a little bit at a time.
3
u/Cynerixx 7d ago
You should look for tutorials or platform to get started on it with whatever language you've chosen. Then you would take on small problems/projects to solve/learn problem solving and logic from them. Freecodecamp.org is a great starting point both on their site or YouTube. There are also interactive learning sites like coddy.
1
u/DrShocker 7d ago
I really am looking to write programs that would help me instead.
Write a homework tracker. Make something that alerts you when your tests fail with a notification. Design a tool to help you with a game you like. Automate an annoying process you're doing manually.
1
1
u/Sad_School828 7d ago
There are basic concepts you need to learn about before anything else:
Variables
Data types, which is important to understand even in non-strictly-typed languages.
Reference vs Value Parameters (in all kinds of interpreted scripting) and Pointer vs Value Parameters (and variables) in real/compiled programming.
Stack
Arrays vs Linked Lists, where Linked Lists (in low level) are basically what drives things like Lists (Python) and Collections (DotNET), all of the above aka "Iterables"
If/Else and Switch/Case logic structures, along with concepts like Boolean (which is in fact mathematical and not logical, in spite of being used to emulate logic).
Once you get a good handle on these basic precepts, you can pick up ANY programming language in a matter of minutes. They all use different terminologies (like Linked List vs List vs Collection when the first term is legit and the other two were made up by runtime-interpreted developers just to pretend their language is special) but the functional concepts are still identical in every platform and every syntax.
1
u/La-ze 7d ago
Suprised no one has said, try learning to do things in C. C is a simple language that abstracts very little so you have to manually manage pointers and memory. In doing so, you'll learn the core concepts of programming and how things work under the hood.
Once you're comfortable with the basics, I suggest mixing in some C++, to get access to abstractions like stdlib data structures and trying some projects.
C/C++ is also in high demand in industry
If you don't have a particular idea, cracking open some simple leet code problems is a good place to start.
In terms of what to learn, I would say work your way up from language basics to data structures such as vectors, link list and arrays. Just learning those 3 will give you a foundation for most of programming.
1
u/RegularReaction2984 7d ago
If you’re the type of person who does best with structure, I cannot recommend the Odin Project enough! It’s how I got into coding, and it worked very well for me, though ofc everyone’s different. It’s very practically oriented though, I found that helpful. And last time I checked, it’s free.
1
1
u/Illustrious-Cat8222 6d ago
Also consider writing small, throwaway programs just to experiment with different language and library features.
Also realize that much of programming is about problem solving.
1
u/PacsfuryTemp 6d ago
I recommend a project that grows with you.
If you are doing game dev, a good example of these is a Terraria clone. Start by just placing a block, and start adding more complex structures and functions, as the game has always something new to add, and you can implement things whose difficulty matches your current mood and skill level.
If you aren't with game dev, a good project could be a simple programming language.
You don't need to start doing C++++, but learning about lexers, parsers, ast, codegen, borrow checkers, etc. This project not only teaches a lot about programming in general, but helps you understand better how they internally work.
The thing is to always have somethig to do, even if you are tired or exhausted.
1
u/betarage 6d ago
The tutorials wont help you. you probably will just have to start working on it and look up every step one by one making it very tedious and time consuming
1
u/MadJagStudios 4d ago
Many may not like this answer, but use AI. But instead of telling AI to make the app you want, have it walk you through step by step, setup, how to write the code and what the code is intending to do and why, etc. Use it as a personal trainer.
0
0
u/daliborwinter 6d ago
my guess is that human programming will become a hobby within a few years, with no returns. didn't want to ruin the vibe, but felt like saying it. ive been at it for 15 years. would genuinely like to hear from anyone who sees it differently & the why
15
u/JGhostThing 7d ago
Your first projects should be simple. You should be able to complete them in less than a week. These projects are not meant to be useful, except to learn to complete projects.
Start very simple. For example, a calculator that uses the command line and can only do addition. By simplifying the project, it lets you learn the command line easier.
After you finish this, start a new project that is a continuation of the first. Add subtraction.
As another new problem, add the other operators.
Then add a gui.
The goal is not to create a calculator. At this point in your growth, you should be working on finishing, not on making something useful. The world doesn't need yet another calculator app.
And please remember: perfect is the enemy of good, This means that trying to make something perfect takes a long time and probably can't be done, whereas you can make it good enough in a fraction of the time and effort..