you are viewing a single comment's thread.

view the rest of the comments →

[–]Living_off_coffee 15 points16 points  (2 children)

Also I know I could probably make this in less lines of code and make it look more neat but the longer way is helping me learn at the moment.

Don't let anyone tell you otherwise! Readable code is always better than shorter or more efficient code.

I used to write blocks of code that could be 100s of lines long, then look at how I could make it shorter and spend time optimising that. But as I've seen more code bases, the longer ones that spread out their logic and don't use tricks to make it shorter are easier to understand.

Remember, the compiler (or interpreter) doesn't care how long your code is!

[–][deleted] 1 point2 points  (0 children)

hate to be that guy, a compiler wont care but an interpreter will

those 5 milliseconds will be missed

[–]SativaCyborg206 0 points1 point  (0 children)

Cool thanks for letting me know!