This is my first web dev side project and it's in early stage. As an interviewer in the tech industry, I often find myself cannot spot that subtle bug in candidates' code during phone screening, so I build this website which lets me do collaborative editing and also run the code. You may find it useful too.
Please help try it out and provide some feedback. No registration is required (because I have yet to implement the user system).
An engineer on my team years ago felt the same as you and built his own solution for us to use during interview, eventually spinning it into a very successful business. Check out coderpad.io if you wanna get some inspiration. They took a similar technical approach as you described, at least for the first versions.
Do you have any abuse prevention mechanisms implemented? For instance, preventing users from running infinite loops, consuming too much resources and so on?
I built a similar service as a personal project and I am interested how to properly handle situations like that.
Yes, currently the execution time is limited to 10s and 10s compilation time for compiled languages. Memory limit is 256M. It runs user code in docker container, I leverage docker for restricting resources, more info at https://docs.docker.com/config/containers/resource_constrain...
No, I don't have plans to open source it currently. I am not sure where open source will take this project to and the source code is a bit messy. I may write about how I built it in the future.
The cost really depends on the scale. I started out to build and use it as an interview tool and language playground for myself, and I only have a single pretty standard cloud VM.
The first snippet is a fork bomb and will cause the container to run out of memory before the timeout. It does terminate since I have set a 256M memory limit. However, it is not sending the correct response in this case and the message in the output tab is not updated properly.
Thanks for the security reminder, I have blocked IMDS access, need to learn more about security. I'll also set up email so that I can put in the about page.
This is my first web dev side project and it's in early stage. As an interviewer in the tech industry, I often find myself cannot spot that subtle bug in candidates' code during phone screening, so I build this website which lets me do collaborative editing and also run the code. You may find it useful too.
Please help try it out and provide some feedback. No registration is required (because I have yet to implement the user system).