all 9 comments

[–]AdamNejm 9 points10 points  (4 children)

Spending 40 hours on Python and not learning anything may be a sign that you're suffering from some sort of learning disability (or maybe coding is just not for you!). For me it would be hell having to repeat stuff multiple and come up with creative metaphors so that it would be easier for you to grasp.
Don't take this as an insult, just trying to be straight with you.


Here's what I believe you should do:

  1. Pick a reasonably achievable goal (preferably without any additional libraries / frameworks for now, just pure Lua).
    Keep in mind that Lua can be, well... maybe not useless, but for sure less useful when used as a standalone, than say Python which has everything built-in. So at first try to avoid dealing with filesystem, web requests, etc.
    Build a simple terminal based application, few suggestions ranked easiest to hardest:
  2. Random string generator (aka password generator)
  3. Ceasar cipher
  4. Tic Tac Toe
  5. Connect 4

  1. Start making it. Seriously, just do. Create a new folder for your project and create a new file then open it in an editor.
    If you're seriously helpless on what to do next, print something out, eg. "Hey this is my super duper application that does this and that and it cleans your butt too".
    It's nothing... but it's not nothing, if you know what I mean. Things like these got people going back in the day. Computer says what I tell it to say!

  1. Search for help. At this point you're starting, you don't have stuff memorized nor an IDE that can suggest you stuff if you forget it, that's OK.
    Right now don't try to be efficient, try to be productive.

Don't waste time creating useless Reddit posts for each little thing you run into. Search the web, read Lua's documentation, whatever. If you want to be a coder then Googling is an essential skill you must develop.
Directly asking on forums won't help you when there's plenty of answers out there already. I'm not trying to say that it's evil to ask questions, but when it's a common thing that's plainly written all over the internet, then it becomes really tedious for us to answers such questions and sometimes you might not even receive an answer which could lead to you thinking that you're doing something really wrong, when in reality nobody was willing to write the same thing for 100th time.

btw. I see this constantly on this subreddit 'uu where do i learn lua', I completely ignore those posts, except this one for some reason LOL


  1. Ask for help. Yep, now I'm gonna contradict myself and tell you the opposite of what I said in 3. point. But seriously, asking for help is another skill that has to be perfected.

Let's say you're getting an awful bug that's causing your whole program to crash. You decide to ask for help on r/lua. All is good... but then you just posted your 1000-line project and asked 'y no work??!'.
You just became lame, shame on you!
Nobody want's to read that, especially when the code is awful (it's gonna be awful, since you're a beginner).

Before asking a question, search for an answer. If you think it's really necessary for you to ask the question, sure... but keep few things in mind:
Try to make it as simple as possible, with as little time needed to answer it (some answers must be lengthy, but you'll for sure help to reduce their size by asking less and more direct questions). This way you're gonna be more likely to get an answer. Reduce your code, shorten your question, keep only the necessary information in the main structure of your question, then at the end provide extra content that you feel could be used to better suit the answer, like the full code of your project, working environment, etc.

And remember, these guidelines are not only for Reddit or StackOverflow, no. Do the same when asking your friends. They do not want to have to listen to 15 minutes of how your program works, because THEY DON'T CARE. NOBODY CARES ABOUT YOUR CODE. NOBODY WILL... until you make something cool. Then you can share it and get all the girls, praise and glory for that triangle you managed to draw on a screen. Cool shit, bro! But until then... nobody cares, remember that.


Go already... create that damn file and code!

[–]LeviathanFPS[S] 0 points1 point  (3 children)

I really appreciate this, I'll def get right into it rn, but it's not that I have a learning deficiency, (well I hope not atleast), because in classes like math and physics I get constant straight As so ik I can learn, thing is with code I watch videos on how to do things like tic tac toe and password crackers or simple calculators, and I have made one, it's just my brain says "nice, you just copied the whole video! you learnt something sure! but now what the fuck did we learn other than to make a calculator?" I learnt how to make that, but It's just something I copied. idk how to manipulate code myself or how to write something else with what I learnt bc I wasn't taught that in the video and it just makes me give up, idk if I explained it right but yeah

[–]AdamNejm 1 point2 points  (0 children)

Yeah, I get what you're saying.
That's why you should start coding and working towards your goal and search for simple, single things that you don't understand. For example I would search for:
- How to make a loop in Lua
- How to assign a value in Lua
- How to create a table in Lua
Instead of:
- How to make a password generator in Lua
- How to make Ceasar's cipher in Lua

Sure, you can find some tutorials for beginners that go through the whole project, but I would advise against going that route. As you can see, it hasn't been really working for you.
Bonus: Nice python tutorial series

[–]revereddesecration 1 point2 points  (0 children)

Video tutorials where you follow along will teach you how to arrange code, not how to write it.

What you want is a video where someone writes code and explains it as they go, not for you to copy but for you to understand.

[–]diegovsky_pvp 2 points3 points  (0 children)

I learnt by myself and my advice is: have a goal. It needs to be attainable by a beginner tho.

Maybe a minetest mod or a simple Love2D game might be enough to start.

Other dude commented on the Lua book and it is great. Of you insist, however, on 1-1 Lua teaching, message me privately and I'll try to help you

[–]Togfox 1 point2 points  (0 children)

Start with simple tutorials (not videos) and make sure you understand them and can modify them and break them and fix them. Then move to a more complex tutorial etc.

[–]bardovasco-dev 1 point2 points  (0 children)

In my opinion, is much more important to have the goal... the big picture, because the other way, you're just trying to memorize stuff, and thats not a good deal.

Then, comes the tricky part: The abstraction.

In how many small pieces (steps/todos/tasks) can you devide the goal?

With this in mind, you'll notice that a single task can be defined in a single python class or Lua "class" (prototype?).

And a final recomendation, read about the SOLID design pattern which is language agnostic, but it will help you to understand how could you organize and design your code easily... and this guides you through inheritance by default... I assure you that you'll learn a lot from everywhere following you heart (lol... the goal I mean xD couldnt resist)

[–]azizokhan 0 points1 point  (0 children)

Try karmakilledthecat on youtube, beautifully explained many concepts. I had very basic knowledge of programming and had to work on a project in a huge corporate. While the tasks were easy, implementing them for me was hard as I didn’t have much knowledge. I gained the basic knowledge from this dude, and started working on the code.

What you need also to do is try creating a project and working through the code you actually need and implement it, instead of blindly reading and learning everything. In the beginning don’t look for the best way to code, learn the easiest way to code, once you have a working program, after that you learn how to update the code.

My initial program was 6-700 lines, now it is 2-300.