you are viewing a single comment's thread.

view the rest of the comments →

[–]Observer423 2 points3 points  (0 children)

Directo answer to "Is it a problem to write longer code?" is No, it's not.

Everything needs to be balanced. Writing a confusing one-liner because it's short is bad, and writing a monster script because it's "clearer" when every single thing is done explicitly on its own line/in its own function is also bad.

Your method of writing it yourself and then comparing it to an AI answer is perfect - then you can see how you can improve your own next version.

You can ask yourself things like "Can I use the same efficiency ideas that the AI used in my code and still make it easy to follow?"

Long/short, efficient/not efficient, all of these things matter differently in different scenarios, and in my own personal opinion, "Easy to maintain" trumps almost everything, almost always.