I have four programs, which are very good, it seems like i would need a comment on every line, i see a lot of variables and its been tough trying to figure out what they stand for. Is there any place on the internet where i can upload the program and get a genius to add comments until i get good enough to decode them myself ? Does anyone have any suggestions ?..
Go here find bad samples of noobs like me and try to understand what the user tried to write. I’ll give you links in a moment:
Edit:
https://codea.io/talk/discussion/7043/moved-to-general-tokouts-cool-work
https://codea.io/talk/discussion/7136/tokouts-collection
https://codea.io/talk/discussion/7731/mine-field-version-1-0-1-alpha
https://codea.io/talk/discussion/8690/cc-documents [Forgotten Topic]
Project which topic died:
https://github.com/TokOut/InOneClass/tree/master/Win5
I hope that’s what you asked for
@kendog400 I have a suggestion, try doing it yourself. Yes, it will be hard in the beginning, but after awhile it will get easier. If you don’t try, you’ll never learn how to do it yourself. Not everyone puts comments in their code, me included.
PS. Commenting a program isn’t fun. Commenting someone else’s program is even less fun.
I’ve been trying to figure out what the variables are in the programs…
I been putting comments in myself, it hasen’t been easy…I would like to show 1 segment of the program, and point to a variable…
@kendog400 If you want to show a section of code you’re having trouble with, I’m sure you’ll get plenty of help. But to comment a small section of code without seeing how that section relates to the whole program might be hard.
I think I have an idea : How bout I put comments on every line, and then someone tells me where I’m wrong ? I like to put comments in red, so its easy to see its a comment, but I dont see a way to change the text color on the fourm. Which is ok, since I like to be greatful for what little (or alot) I get…
@kendog400 I have to agree with @dave1707: I strongly recommend doing this yourself.
Although I might differ from him in regards to commenting other people’s code. I find it enjoyable inasmuch as it is like putting together a puzzle, having to figure out what this single-letter variable name does as opposed to that other single-letter variable name.
I will try to summarize how I tackle the problem:
- first I look for anything I do understand, and start with a comment marking it off
- then I take the variable names in that code and turn them into understandable names, so for example “s” might become “stringsForTouches” or something like that
- then I search out all the other places “s” is referenced and replace them with the clearer name
- sometimes that has a cascade effect, where understanding the variable in one area helps me understand a variable in another area, and then I rename the other variable, and it leads me somewhere else, etc etc. when this happens it is very helpful
- when I understand a section of code I try to pull it out of where it sits and turn it into a single function that can be called from the place it used to be. So for example if there was a loop that iterated over the variable “s” to extract any strings that began with “the”, I would turn it into a function like “function extractStringsStartingWithThe(stringsToExamine)”
- doing this bit by bit can be painstaking but gradually the code comes into focus, and that is extremely rewarding.
Does anyone know where I cud find or download a Gud lua cheat-sheet, I would like to know things like if math.randon is the same as RND, and other lua short cuts…
@kendog400 - just search the net - the one below is a good place to start:
Thanks
@kendog400 help me out here, please. i’m thinking about writing some introductory stuff about codea. can you tell me a bit about any prior programming experience you’ve had? it would help me think about the problem. thanks!
Fuze for Nintendo switch, no x=x+1, its x+=1, no do to call a fx, just brackets ( )…
Fuze is not better or worse than Lua…I think it’s all about mastering the programming language, there’s a lot of sprite usage in Fuze…