Solution using multiple files?

As far as I can tell you need to put all your code in one file in order to submit a solution.

Normal practice is to have one file per class etc. What’s your take on this? Can it be done by uploading a zip or zomething instead?

1 Like

CG belongs to the kind of “solution judging” websites intended for competition, skill tests or training are not normal development projects and cannot use the “normal practice” to have one file per one class.

To keep the architectural design simple, zip files or multiple files will not fit in.

cannot use the “normal practice” to have one file per one class.

I don’t see why this must be true.

Uploading one file is already in place. Adding functionality to upload one zip and extracting it seems like a small change.

It would take away all the useless time you spend on converting the normal practice of multiple files into the one file that CG accepts.

Allowing users to upload files in zip could mean:

  • One can upload third-party libraries and call them in programs
  • One can upload pre-compiled executables and call them to run directly
  • One can upload binary files and let programs load data more efficiently

It is a heaven for hackers and cheaters.
It is a nightmare for employers, competition organizers and CG itself.

It is unfair, insecure, and hard to maintain. This “enhancement” is a costly investment and will most likely discredit CG, by too many loopholes and unstopped negative comments, rather than doing anything good (for the platform and the Company).

All these difficulties and high cost are due to the fact that there is no existing low-cost or open source solution having these features and at the same time reliable enough.
I do not mean it cannot be done.
One can invent this solution and become another legend creator in IT history, if it is done well.

If you’ve selected to use e.g. python, only python files would be accepted in the zip.
So uploading libraries/binary files wouldn’t be a problem.

@java_coffee_cup, btw are you speaking for codingame or are you a regular user like myself?

With my hacker instinct, I would name a binary file as bin.py and let a real py to call it to load and to run.
Hacking is fun. But as a user I don’t want CG to collapse too soon.

I guess you could already today base64-encode a binary and embed it as a string.