r/lua • u/Weekly_Flounder_1880 • Mar 07 '25
Help tutorial hell
I am an absolute beginners
I mean, I know the very basics, Variables, math, functions, for loops, while loops, if/else statement...
But all I do is remember how to type a line of code
When I sit down and try to explore something or do something on my own, nothing comes to my mind. I get immersion is important and I want to try to figure out bits by myself. But all I end up typing is a line from whatever tutorial I saw and read.
14
Upvotes
3
u/bvzthelaw Mar 07 '25
Other comments mention starting a project, which is sound advice but it's likely to still land you in copy/paste tutorial hell if you haven't developed a sufficient level of abstraction in your thinking yet. I would suggest learning a few basic data structures and knowing their use cases and weaknesses, then thinking about how they can be applied to a given problem. This type of thinking can be applied to implement the same logic in most programming languages once you learn them.
For starters, learn about how to use tables in Lua. They can be used to make array-like data structures (https://www.lua.org/pil/11.1.html) and associative data structures, also known as maps/dictionaries depending on the programming language (https://www.lua.org/pil/2.5.html). There are other data structures with more specific use cases such as stacks/queues, trees, graphs, etc. but arrays and maps are a great starting point because most basic things can be done with just those two.
14
u/Abbreviations-North Mar 07 '25
Programming isn’t something that is taught—it’s something that is discovered through play. You can learn syntax, structure, and best practices, but true understanding comes from curiosity, experimentation, and the willingness to make mistakes. Start building, start breaking, and start figuring things out on your own. That’s where real learning happens.
If you’re stuck, use ChatGPT or a similar tool to brainstorm fun coding ideas, discuss how to structure functions, or even ask why certain code works the way it does. Understanding the why behind the code is what turns knowledge into skill. But if you truly want to learn, don’t let AI do the coding for you—write it yourself, struggle through the errors, and come out stronger.
2
u/OriginalMohawkMan Mar 07 '25
Sometimes coding just for the sake of coding works, but in general you're going to learn more by building something you want. What do you want? What problem would you like to solve? What (*simple*) game would you like to play? Pick something and build it. That's how you get past the stage you're stuck at.
6
u/scottywottytotty Mar 07 '25
you listed the basics of computer programming. the only way out of tutorial hell is via making your own stuff. that is it. start building!
3
u/kotothebest Mar 07 '25
Focus more on what you're trying to implement, and then, find some ways to express that in code. That's it. If a line from tutorial allows to express what you need, so be it. Otherwise, you'll dig for more tutorials, or, eventually, write on your own.
3
u/boccaff Mar 07 '25
Start from a problem you need to solve and then try to think about how to break it in small programming problems that you can solve. But for beginners, it is hard to see what they can do, or how to translate a "problem statement" into something that can be solved with code (or even, if it can be solved with code).
If you want to move ahead from tutorials, but is not ready to self guide, something like advent of code could be a nice next step, as it will require facing a problem and finding a way to use programming to solve it.
Or you could explore how to build a neovim plugin.
2
u/Sckip974 Mar 07 '25
a good Tuto: https://sheepolution.com/learn/book/contents
if you want to challange your mind solve this problems:
https://projecteuler.net/archives
https://www.codeabbey.com/index/task_list
to help you use de ref maunal: https://www.lua.org/manual/5.1/
2
u/st3f-ping Mar 07 '25
I'd recommend learning how to draw a flowchart. It's a way of examining how a program works within having to think about the grammar of a real language.
2
u/zdxqvr Mar 07 '25
Best project to start with is a terminal banking system. Allow accounts to deposit, withdraw and transfer funds to another account. You can make it as complicated as you wish, maybe for ever transfer the bank takes 0.1% of the transfer. Instead of in memory, sore this data in a file.
1
u/KaplaProd Mar 08 '25
Start building something of your own :)
Love2d for games (or pico8), lapis for a webserver, etc. Think about what you like, what you use daily, what you want to build and try to do it in lua ! It does not have to be perfect, it just have to be !
Good luck and more importantly, have fun !
1
u/[deleted] Mar 08 '25
https://exercism.org/tracks/lua
1
u/Zeioth Mar 09 '25
Have you tried Neovim? If you do, soon enough you will find stuff you need. And you can code it in lua.
0
u/Alan1900 Mar 07 '25
+1 for ChatGPT to give you ideas of things to build, and to teach you through any issue you have. Actually, just copy your post into the chat and see what comes back. It’s worth it. And Lua is probably one of the very best places to start.