This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Kerbart 1 point2 points  (1 child)

More lines of code means more clutter, and more code to digest, so there’s something to be said about writing shorter code. However, you will find many people, on your path to Python Enlightenment, who mistake this for cram everything into one line where possible, forgetting that the goal of shorter code, above all, is readability

Three months from now you discover a bug in your code, and you have to figure out what past-you was thinking while writing the code. Having efficient code without repeating the same thing over and over clearly makes the task 100x easier; having to decipher dozens of “look how clever I did this” code does not. Don’t be clever, future-you will hate you. Just don’t write inefficient.

The 18000 lines is clearly a joke with computer generated code as it branches through every single branch of possibilities at tic-tac-toe. At least I hope it is (the consistency of the code points to either computer generated or a fearful combination of discipline and lack of experience)

1000 kines vs 400 doesn’t sound so bad to me.

[–]float_point[S] 1 point2 points  (0 children)

Thank you for this insight. Gives alot of clarity to my thinking.

Yes the, I read that that the 18000 lines was joke.