Why? What's the objective? When is the code too long? When is it short enough?

That's not how it works here, but maybe you meant to ask for help with the code rather than for the actual code.
...