Write down in notes: Everyone should share a screenshot of VScode open – help folks figure it out if it won’t install. If someone gets stuck, take a screenshot of the error message or point at which they are stuck so we can help them figure it out later, and they can decide to keep trying (potentially with the tutor helping) or move on.
Then if you’re on Windows: install git
for Windows, which comes with some useful tools we need:
Once installed, use the steps in this post to set your default terminal to use the newly-installed git bash
in Visual Studio Code:
Using Bash on Windows in VScode
(That’s all the special instructions for Windows users). Then, to run commands, open a terminal in VScode. (Ctrl or Command + `, or use the Terminal → New Terminal menu option). Try running some of the commands we learned in earlier labs and lectures on this computer.
Write down in notes:
ls
? What’s the absolute path to that folder?ssh
with your course-specific username and password from the terminal in VScode to log into ieng6
? Refer to lab 2 to recall the commands you used.Take a few screenshots of what you tried, and discuss how this environment differs from EdStem.
Repeat the steps from lab 2 for building and running the server, but this time do them on your computer.
That means:
git clone
the repositorycd
into the correct directoryjavac
and java
on the appropriate filesOnce you run java
and the server starts, you can open up a browser on your computer and visit http://localhost:4000
(assuming you chose 4000
as the port when you started the server).
If the java
command isn’t found when you try this, you should install Java.
There are a few definitions worth discussing here for introducing/reminding you of a few concepts:
Write down in notes: Show a screenshot of the server running on your computer.
With the setup we’ve used so far this quarter, each time you log in to your course-specific account, you have to type the password. You might have noticed that during the skill demonstration you didn’t have to type the password for our instructor accounts! Here, you’ll learn how to configure that for yourself (it will save lots of time).
ssh-keygen
<Enter>
until the program shows some text it calls the “randomart image”.ieng6
with ssh
(using your password as usual)mkdir .ssh
in the terminal.ssh
directory you just created, in a file called authorized_keys
.Your public key has been saved in: <path to your public SSH key>
, copy the path. Make sure you get the public key file, ending in .pub
, here, not the private file.scp <path to your public SSH key> cs15lfa23__@ieng6.ucsd.edu:~/.ssh/authorized_keys
(make sure to fill in your actual username)Write down in notes: This part introduced two new commands: scp
and mkdir
. Describe what you think they do in notes.
Then, look them up online. You can do a Google or similar search for scp command
and mkdir command
. What do you learn about them?
Then, look them up using the man
(short for “manual”) command. Run man scp
and man mkdir
from the command line. What do you learn about them?
You’ll be introduced to new commands all the time; a course like CSE15L can’t cover them all in 10 weeks!
On future labs and assignments, you can choose whether to start from EdStem or from Visual Studio Code on your own setup.
Instructions coming soon! If you’re reading ahead, try logging into https://us.prairietest.com/ with your UCSD Google Account to see if it’s set up for you. There’s nothing else to do until the day of lab.
As with the first lab report, you’ll write this as a Github Pages page, then print that page to PDF and upload to Gradescope. There are 3 parts:
Write a web server called StringServer
that supports the path and behavior described below. It should keep track of a single string that gets added to by incoming requests. The requests should look like this:
/add-message?s=<string>
The effect of this request is to concatenate a new line (\n
), the next number in sequence (starting at 1), and the string after =
to the running string, and then respond with the entire string so far.
So, for example, after
/add-message?s=Hello
The page should show
1. Hello
and after
/add-message?s=How are you
the page should show
1. Hello
2. How are you
Show the code for your StringServer
, and two screenshots of using /add-message
.
For each of the two screenshots, describe:
By values, we mean specific String
s, int
s, URI
s, and so on. "abc"
is a value, 456
is a value, new URI("http://...")
is a value, and so on.)
Using the command line, show with ls
and take screenshots of:
ieng6
(on your computer or on the home directory of the lab computer)ieng6
(within your account on ieng6
)ieng6
with your course-specific account without being asked for a password.In a couple of sentences, describe something you learned from lab in week 2 or 3 that you didn’t know before.