The Code Expert Documentation for Students
This documentation is not complete. If you have suggestions or improvements do not hesitate to contact us.
Code Expert is a web-bases integrated development environment (IDE) for the exercises. You can work at any computer providing internet access.
You log into the submission system using the following URL: https://expert.ethz.ch. To login, use your regular ETH credentials (nethz username and password).
You need to follow the individual enrollment url, which is provided to you by your lecturer. This link allows you to enroll in the exercise group.
Performing a programming task is generally done in the following steps:
Of course, you can go back to a previous step if you are not satisfied with the result. The following sections explain the above steps in more detail.
Some of the tasks will not require any coding. In this case, the IDE turns from a coding environment into a relatively simple text editor to write your answer. Within this editor you can also upload attachments. For example you can upload screenshot images if asked in the task description.
The first time you log into the system, and select a programming task of this course you are automatically enrolled in the online exercise submission of this course. Before you can start working on the task, you have to find and select your exercise group.
The overview page shows the available exercises and your progress on completion of the programming tasks. You reach the overview page by selecting overview in the top right menu or if you login to the system via https://expert.ethz.ch. In the overview, you can see the course that you are enrolled in and your group assignment. For each exercise you can see the handout date and the due date. The due date is not strictly enforced by the system to allow exceptions (e.g., late hand-ins due to sickness). In the exercise section you see the links to the programming tasks. Clicking on a programming task link opens the programming environment. For each programming task, the overview page shows its submission status. Section Submission contains an overview of the different submission statuses.
By clicking on a programming task link in the overview page you will open the specific task in the programming environment. The screen looks like this:
The file overview to the left lets you select a file to edit. The file is then opened in the editor. The name of the file that is important for the programming task is usually mentioned in the exercise task description. In the editor, you will write the actual code. If you have multiple files open, you can switch between them by using the tabs above the editor. After you wrote your program, you have to compile it . Compile time errors are listed in the output area. If your program compiles without errors, you can execute it by clicking on the run button . To test your solution, you can run it against a set of predefined test inputs. This is done by pressing the test button .
During program and test execution, the terminal shows the output of your program.
Use return to send the input to your program.
The task area shows the programming task you are currently working on, the result of your previous submissions, and a short description of the task. With the task rider to the right you can switch on / off the task description. With the history rider to the right you can switch to the history.
With you can leave the IDE and return to the overview page. With the slider and you can switch between dark and light mode of the ide.
In the history panel you can click on any snapshot to view the snapshot.
The currently submitted snapshot is highlighted by blue text color and the achieved autoscore is displayed.
You can filter the snapshots via “Filter Settings…”.
With you make the snapshot the current version. With you move the snapshot in the trash. With you can restore the snapshot.
|Ctrl-L||Go to line|
|Ctrl-Space||Show code completion|
To have a simple code completion use
ctrl-space. This will show you your local variables, some snippets or some keywords.
The system tests your program using multiple test cases. Each test case consists of an input and an expected output. Your program passes a test if it produces an actual output for an input that matches the expected output of the test case. The comparison is quite tolerant. It is performed line by line and ignores redundant lines such as ”Please enter a number:”. Further, the comparison ignores white space such as spaces and newlines and the casing of words.
The result of a test case can be:
To submit your programming task, use the submit button in the programming environment. The system automatically enables the tests and uses them to rate your solution according to the score assigned to each test case. Note that your assistant is only required to look at the last submitted version of each programming task, so make sure that your last submitted version is the one you want to be corrected.
A programming task can have the following submission statuses:
Reviewed with comment. This task is submitted and reviewed. Your teaching assistant left a comment. This is indicated by a small mail icon the right hand side of the score.
The debugger interface of code expert is currently a experimental feature. Please give us feedback, that we can improve it in the future.
For java programs we execute the executable via jdb.
The jdb debugger is not able to pass input to the program executed. If you use system input in your code, this will not work with the debugger. To avoid this set the values during the debugging direct, instead of using system input.
Breakpoints for multiple classes or inline classes:
You can only set breakpoints via the UI for Java files which only contain one class. If you have multiple classes or inline classes you need to set up the breakpoints via the jdb console, as setting breakpoints in the ui will not work.
For python we use the pdb debugger.
For C and C++ we use the gdb debugger
To generate files in Code Expert it is required that the files are written into the folder
These files can then be downloaded via the link displayed in the file view.
./cx_outwill be saved