Using Code Runner within an IDE

Using Code Runner within an IDE

por Kenneth Johnson -
Número de respuestas: 2

Dear CodeRunner community

I've been using CodeRunner as part of my teaching in a first year Object-Oriented Programming class in Java for a few semesters now

Part of the learning objectives for this course translate into the requirement that students gain skills using IDEs such as Eclipse, for debugging and testing their code. Currently, I've been asking students to write their code in Eclipse, and pasting it in CodeRunner to mark. I've needed to limit access to CodeRunner so students use Eclipse.

However, the obvious problem occurs -- CodeRunner has rigid requirements; so a misspelled method or a package declaration can return errors that confuse and frustrate the beginner student. For them, "the code works in Eclipse, but not in Code Runner".

My question: Is there anything technical prohibiting CodeRunner integration within an IDE?
Ideally this is Eclipse, but any IDE with debugging functionality will do!

The best solution to my teaching problem is to have a button the student clicks to send their code to be assessed from within an IDE. The code is evaluated against  test cases and the mark stored; with feedback piped back to the IDE

Thank you

Ken

En respuesta a Kenneth Johnson

Re: Using Code Runner within an IDE

por Mike McDowell -
Students can attach files that are evaluated against the test cases. Would that workflow work well enough for you?

I’ve often imagined a vscode extension that interfaced with CR, but I don’t have any spare time kicking around for something like that.

Ultimately CR is pitching the code to Jobe and evaluating the result using php. I can’t think of a technical limitation as to why it couldn’t be done.
En respuesta a Kenneth Johnson

Re: Using Code Runner within an IDE

por Richard Lobb -
CodeRunner is very tightly integrated within Moodle and there is no API for remote question submission. Grading is initiated by a button click within a question in a quiz and there are lots of Moodle-related constraints. Obviously the student must be enrolled in the course but they also need to be currently attempting that quiz, and must not have exceeded the time limit set on their attempt. The need to be currently logged into the server and their session key accompanies the POST of the submission. So I think the short answer to your question is that while anything is possible in principle, remote submission in the way you're hoping for is not practicable.

Comments along the lines of "the code works when I run it, why doesn't it work in CodeRunner?" are to some extent inevitable. Beginner students often hack away at their code until it works on the example tests they're given and are then annoyed when it fails additional tests. They often refer to the additional tests as "hidden" (expressing their indignation) even though they're exposed (usually) in the result table.

"Passing when I run it, failing in CodeRunner" is even more inevitable in our courses, as we add extra tests that are not available in the IDE. We require code to be compliant with industry standard style checkers (currently pylint in the case of Python although we're shifting to ruff next year) and it's not practicable to ask students to install such style checkers on their home machine. We also impose lots of other checks, such as on function length, use of global variables, mandated closing of files etc.

We start students off using the Scratchpad UI, which allows them to program directly in the web page. We also don't impose any style checks initially. When we do turn on style checking we also turn on prechecking, so that the style checks are all done penalty-free, prior to running their code against tests. About a third of the way through the course we disable the scratchpad (we call it "removing the training wheels") and require the students to develop in an IDE instead. By now they are, hopefully, used to the idea of extra tests on style as well as test-based correctness.