During the last contest (Smash The Code), some people said (on the chat) they were doing most of the testing locally on their own machine, without running the code in the CodinGame IDE.
And some contestants apparently made their own renderer of the game to be able to test more easily, which is really cool but probably time consuming!
On my side, I only use (for now) the CodinGame Chrome extension for writing code in my own editor, but still running it through the CodinGame IDE.
I feel like it would be much more productive to be able to set breakpoints and step through the code, but I haven’t got any other idea on how to do it than scraping the inputs / outputs of a particular game manually (printf and copy pasting, quite tedious), save them to a local file and run the program against that file.
So yeah, I was just curious how you worked on your bot, not the strategy, but more about the workflow, debugging, iteration and tools.
Don’t hesitate to share your tips and tricks
Thanks!
For this contest, I only had a local simulator with outputs of the grid in ASCII in the console. For the previous contest, I wrote a graphic visualization using cairo to help me debugging my simulations, but that’s usually much more work (although I now have a simple framework for that).
Even if its good enough for coding simple puzzle, I feel like the browser IDE is too slow and lacks my favorite edit shortcuts compared to Sublime Text for example. it’s also much faster to try to compile locally to see if there’s any problem with the code compared to the online compilation, which takes some time.
Last thing, I also splitted my code in several modules locally, that i merge together before submitting the code in the IDE. It’s not very convenient to have to preprocess the code before being able to submit it, but at least I have some reusable modules that I can leverage on other contests and puzzles.
If there’s one thing that I would love to see, and I believe the idea was raised already in another topic, it would be to have the possibility to create separate include files associated with your account and that you could include in any puzzle or contest.
Regarding the editor performance and convenience, I believe that there’s not much to do about it and editing a file locally will always be easier.
It’s true that it can really take some time to compile when the CG servers are loaded…
That would be really great if CG could provide us with a simple local frame work for testing purpose.
Probably difficult to include all the languages, but if it was even just with c++ that would be great
It would not only be nice for us but would also relieve CG servers from a bunch of load.
Why would it need to be different for different languages? Just upload a binary taking 2 binaries as argument (or even just a stdin/stdout and play against one of the NPC bosses)…
It would be good for the servers, and also for the clients (the visualizer was quite painful to use for this contest, due to pĂ´or synchronization between GUI and console output and the fact that the game board is cleared when losing), even disregarding performance issues.