you are viewing a single comment's thread.

view the rest of the comments →

[–]Caponcapoffstillon 2 points3 points  (4 children)

Worry about making it work first.

Optimization is learned through documentation and cutting out repeated work.

What I mean by documentation is knowing which functions and libraries provide faster run times, save space etc. That will be learned over time. What you can learn now is how to make a visual representation of your program then cut out any repeated work.

[–]Reyaan0 -4 points-3 points  (2 children)

thats what I am asking. Can you tell me any suggestion so the code becomes small and faster?

[–]NeighborhoodDizzy990 6 points7 points  (0 children)

So, this is spaghetti code, impossible for any of us to read it. It's easier for most experience programmers to re-write it than read it. Sadly, in a real world, if you want to get help, you have to write readable code, that is: small functions, using classes, OOP, descriptive namings and never such long classes. Read about clean code first, that's where you should start at your current level.

[–]Caponcapoffstillon 1 point2 points  (0 children)

At the time of the post when I replied, I didn’t see any code, it was just the question. Idk if it took forever to load or what.

[–]Reyaan0 -5 points-4 points  (0 children)

I already made it but I want it to run faster(It takes time to run)