0% found this document useful (0 votes)
40 views10 pages

Instructions For Using Scala With VSCode

This document provides a step-by-step guide for using Visual Studio Code (VSCode) for Scala development, including launching the application, opening project folders, and executing code. It details the installation of necessary extensions, code completion, and submission processes, along with executing sample tests to validate the solution. The guide emphasizes the importance of following instructions carefully and notes that once submitted, the test cannot be retaken.

Uploaded by

Avijit Manna
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views10 pages

Instructions For Using Scala With VSCode

This document provides a step-by-step guide for using Visual Studio Code (VSCode) for Scala development, including launching the application, opening project folders, and executing code. It details the installation of necessary extensions, code completion, and submission processes, along with executing sample tests to validate the solution. The guide emphasizes the importance of following instructions carefully and notes that once submitted, the test cannot be retaken.

Uploaded by

Avijit Manna
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Guide to use VSCODE for Scala development, sample test

execution, and final submission of the solution.


Step 1 – Launch Visual Studio Code from the Desktop. Allow a couple of minutes for the VS code
to launch.

Step 1

Alternatively, you can launch Visual Studio Code from Applications -> Programming.
The Places menu provides navigational links to other directories. Generally, there are four home
screens. Choose the required screen (bottom-right corner).

Note: It may be useful to open VSCODE in one screen, and project instructions in another.

Home Screen 1

Home Screen 2
Step 2 – Click Open Folder (VSCode home screen).

Step 2

Step 3 – Double-click the Desktop folder.

Step 3
Step 4 – Double-click the Project folder.

Step 4

Step 5 – Select the wings-vgsales-challenge folder, and then click OK.

Note: The folder name may vary during the exam.

Step 5

Step 5
Step 6 – Open the challenge.scala file from the scala -> src -> main -> scala folder.

Note: This file contains code blocks that are left blank intentionally. However, most of the program
flow is already built. You need to enter the code in the blank section as specified in the problem
statement.

Step 6

Step 7 – Install the Scala Syntax (official) extension as shown:

Step 7
Step 8 – As shown in the following, you are provided with an incomplete code block file. Read the
problem statement from Challenge.html, and find the function in challenge.scala where the code
has to be added. Complete the code as per the instructions. Example for Task 1:

Problem Statement from Challenge.html Code implementation in challenge.scala

Step 8

Step 8
Step 8

Step 9 – Execute the code by opening a new terminal Terminal -> New Terminal:

Step 9
Step 10 – Ensure that you are in the scala folder. Else, navigate to the scala folder by executing the
command cd scala in the terminal. Submit the challenge.scala file to the cluster by executing the
command sbt run in the terminal.

Note: Since Scala or Simple Build Tool (SBT) is running for the first time, it may take two to three
minutes to complete execution.

Step 10

Step 11 – On successful execution of the job, the required output files should be created in the
output folder.

Step 11
Step 12 – There is an option to execute a sample test and confirm if you are on the right track.

Note: As the name indicates, these are sample tests. Actual scoring will validate various aspects of
the code and data. Ensure that you are in the challenge folder. Else, navigate to the challenge folder
by executing the command cd .. in the terminal (after Step 10, 11). Submit the sampletest.py file to
the cluster by executing the command spark-submit sampletest.py in the terminal.

Step 12

Step 13 – The results of the execution are displayed in the terminal. If any error is found, ensure
that you revisit the code.
Example- Failed tests:

Step 13
Example- Passed tests:

Step 13

Step 14 – When you are all set, submit the code by clicking the Submit button at the top-right and
then click CONFIRM.

Note: Once you submit, you will not be able to take the test again. Also, when the timer ends, the
solution will be auto-submitted for scoring.

Step 14

Step 14

You might also like