SlideShare a Scribd company logo
Hi.
In this video, we are going to show you
how to work on the Programming
assignments.
We show you how to download them, how to
import them into Eclipse, how to test your
code, and how to submit your solutions
using SBT.
Okay, so, let's get started by going to
the Assignments page.
And we open the Getting Started section
and we go to the instructions of the
example assignment.
So, the first thing you need to do is
installing all the required tools.
How to do this is explained on the tools
setup page.
I will quickly show it to you.
And for every Operating System, you can
also have a screen shot which shows you
how to set up the tools.
Since I already installed everything on
this machine, I just go right into the
assignment.
So, the first thing you need to do is
download the assignment archive.
Okay.
We open that file in the Explorer.
And now, I will extract the assignment
archive into my home directory.
So I right click, select Extract All, and
I will create a new directory in my home
folder which I will use for the
programming assignments.
So, I go to my home directory, I create a
new folder, I call it Progfun Assignments.
And I click this right.
So, I closed Explorer window and go back
to the assignment.
And the first thing we are going to do is
start in the Scala record inside the
project that we just created.
How you can do this is explained on the
SBT tutorial website.
So, I opened the SBT tutorial and I follow
the instructions which are on this page.
So, I open a command prompt, I go to the
directory of my assignments.
So, I go to CD Progfun Assignments.
And then here I go CD example, since I am
working on the example assignment, and I
start SBT.
Okay, once that the SBT console has
loaded, you can, from SBT start the Scala
REPL using the console command.
So, you type console, hit Enter, and then
SBT will start the Scala REPL.
Now, we are in the Scala interpreter.
Here, we can type arbitrary Scala
expression, and they will be evaluated on
the fly.
For example, you can say Println, and pass
the string, and the Println command will
be evaluated.
That is how we recommend that you start
the Scala interpreter during this class.
In order to close the Scala interpreter
and get back to the SBT console, you have
to type Control+D.
You will not see anything on the screen
except that the Scala interpreter exits.
Now, we are back in the SBT shell.
Okay, so now, we will go back to the
assignment.
We close the SBT tutorial and we move down
to the next step, which is opening the
project in Eclipse.
So, you start up Eclipse.
In my case, I have a shortcut on my
desktop.
And once you start Eclipse, you have to
choose a work space to work with.
If you already created a work space for
our class, then you can just use that.
Otherwise, you just create a new folder in
your home directory, and use that.
So, my work space is a Progfun web space
in my home directory.
Okay.
Inside Eclipse, you can just import a
project that you extracted in your home
directory.
You do this by going to file, import, and
then in the general section you select
Existing Projects Into Workspace.
You go next and you browse to the
directory, where you've unpacked the
assignment.
So, we go to the Progfun Assignments and
we accept the sample folder which is the
project directory.
Okay.
We click Finish.
And all, we already have the source code
imported into Eclipse.
So, we open up the project, and in the
source folder, source main Scala.
In the package example, you see the file
lists of Scala, which is the file that you
actually have to work on during this
assignment.
Okay, so, let's go back to the
instructions.
So, the next assignment that you have to
do is actually implementing the
assignment.
If you look at the code, there are two
functions that need to be implemented, sum
and max.
Both functions are currently defined with
a triple question mark, which means they
are not yet implemented.
Okay, in this case, I will not do a real
implementation, but just return zero for
both of them, which is obviously wrong.
But I don't want to spoil the solution.
So, let's go back to the assignment.
The next step is running new code.
There are two ways to run new code.
You can start the Scala REPL, and use the
functions that you just implemented in
Eclipse in the Scala REPL.
For that, we go to the Command Prompt.
We go back to the Scala REPL by typing
console.
And now, we have another look at the
source code.
So, the two functions that we just
implemented are defined in an object list,
which, in fact, lives in package example.
So, if you want to use the functions, we
have to either use the full name,
example.list.sum or we can also import the
members of this object into the REPL.
In order to import it, we just type import
example.lists.
Which means everything.
And now, two functions that we defined are
available so we can try them out.
For instance, we can try the sum function,
and type sum of list of one, two, and
three and we get zero because obviously,
our implementation is not correct.
Okay.
Another way to run your code is using a
main object.
This is explained on the, on the
assignment page and I will not go into
details right now.
The next part of the assignment is writing
tests.
So, if you go to Eclipse, you see that
there is a second source folder which is
named Source Tests Scala and this
directory contains tests for our code.
In fact, we already give you a test suite
for the list object.
If you open it up, you will see that the
Lists Tests Suite is a whole tutorial on
how to use Scala test, the tool that we
are using for testing.
It is really important that you work
through this tutorial because we'll be
using testing a lot during all of our
class.
Okay, let's go back to the assignment.
After you're finished testing and
everything is correct, you can submit your
solution.
In order to do that, you have to go back
to SBT, okay?
So, you open the Command Prompt.
And we see, in fact, we are still in the
Scala shell right now, so we type
Control+D and we are back in the SBT
shell, okay?
Now, to submit your solution, the SBT
shell defines a command which is named
Submit.
The Submit command takes two arguments.
The first one is your e-mail address, the
one that you used for registering on
Coursera.
The second argument to the Submit command
is your submission password.
The submission password is not the
password that you use for logging in,
instead the submission password can be
obtained at the Coursera website.
So, we go to the Coursera website and we
scroll up and you have to go to the
Assignments page.
On top of the Assignments page, you see
your user name and your submission
password.
Again, this is not your log in password.
So, we copy the submission password, we go
back to shell and we paste it.
And now, if you type Enter, your solution
will be packed and uploaded to Coursera.
Finally, in order to see your grade, again
go to the Coursera website, you go to the
assignment, and look at the assignment you
just submitted.
I already have a score because I submitted
before.
Note that you can submit the same
assignment as often as you like.
So, if I click on the Score, I will see
the feedback that I received for earlier
submissions that I did.
So, all the feedback below is for
submissions that I did a few days ago.
But you can also see that there is a new
submission, which I did just right now,
which has not yet been graded.
Usually, grading takes between five and
ten minutes.

More Related Content

Viewers also liked

Visita esp toléde_audreycoste
Visita esp toléde_audreycosteVisita esp toléde_audreycoste
Visita esp toléde_audreycosteireogarcia
 
March 2017 Company Overview Presentation by NeoGenomics, (Nasdaq: NEO) a fast...
March 2017 Company Overview Presentation by NeoGenomics, (Nasdaq: NEO) a fast...March 2017 Company Overview Presentation by NeoGenomics, (Nasdaq: NEO) a fast...
March 2017 Company Overview Presentation by NeoGenomics, (Nasdaq: NEO) a fast...
Hawk Associates, Inc.
 
Desarrollo sost nucl-aire - mal-nie- in-s- clara- ferhat- ludivine
Desarrollo sost nucl-aire - mal-nie- in-s- clara- ferhat- ludivineDesarrollo sost nucl-aire - mal-nie- in-s- clara- ferhat- ludivine
Desarrollo sost nucl-aire - mal-nie- in-s- clara- ferhat- ludivineireogarcia
 
成长为一个优秀教师的时间花费
成长为一个优秀教师的时间花费成长为一个优秀教师的时间花费
成长为一个优秀教师的时间花费sxmd
 
การเขียนอ้างอิงอย่างง่าย
การเขียนอ้างอิงอย่างง่ายการเขียนอ้างอิงอย่างง่าย
การเขียนอ้างอิงอย่างง่ายnoukae
 
Diapositivas Del Teatro Griego
Diapositivas Del Teatro GriegoDiapositivas Del Teatro Griego
Diapositivas Del Teatro Griego
carmengm
 

Viewers also liked (7)

Visita esp toléde_audreycoste
Visita esp toléde_audreycosteVisita esp toléde_audreycoste
Visita esp toléde_audreycoste
 
March 2017 Company Overview Presentation by NeoGenomics, (Nasdaq: NEO) a fast...
March 2017 Company Overview Presentation by NeoGenomics, (Nasdaq: NEO) a fast...March 2017 Company Overview Presentation by NeoGenomics, (Nasdaq: NEO) a fast...
March 2017 Company Overview Presentation by NeoGenomics, (Nasdaq: NEO) a fast...
 
Blog sunum 2
Blog sunum 2Blog sunum 2
Blog sunum 2
 
Desarrollo sost nucl-aire - mal-nie- in-s- clara- ferhat- ludivine
Desarrollo sost nucl-aire - mal-nie- in-s- clara- ferhat- ludivineDesarrollo sost nucl-aire - mal-nie- in-s- clara- ferhat- ludivine
Desarrollo sost nucl-aire - mal-nie- in-s- clara- ferhat- ludivine
 
成长为一个优秀教师的时间花费
成长为一个优秀教师的时间花费成长为一个优秀教师的时间花费
成长为一个优秀教师的时间花费
 
การเขียนอ้างอิงอย่างง่าย
การเขียนอ้างอิงอย่างง่ายการเขียนอ้างอิงอย่างง่าย
การเขียนอ้างอิงอย่างง่าย
 
Diapositivas Del Teatro Griego
Diapositivas Del Teatro GriegoDiapositivas Del Teatro Griego
Diapositivas Del Teatro Griego
 

Similar to 5 subtitles (text) for tutorial working on the programming assignments (8-47)

Kleisli Composition
Kleisli CompositionKleisli Composition
Kleisli Composition
Philip Schwarz
 
Principled io in_scala_2019_distribution
Principled io in_scala_2019_distributionPrincipled io in_scala_2019_distribution
Principled io in_scala_2019_distribution
Raymond Tay
 
Objectives Assignment 09 Applications of Stacks COS.docx
Objectives Assignment 09 Applications of Stacks COS.docxObjectives Assignment 09 Applications of Stacks COS.docx
Objectives Assignment 09 Applications of Stacks COS.docx
dunhamadell
 
Class 1
Class 1Class 1
Class 1
Dario Pilozo
 
Class 1
Class 1Class 1
Class 1
Dario Pilozo
 
Class 1 blog
Class 1 blogClass 1 blog
Class 1 blog
Narcisa Velez
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Philip Schwarz
 
Database Management Assignment Help
Database Management Assignment Help Database Management Assignment Help
Database Management Assignment Help
Database Homework Help
 
Real World Haskell: Lecture 1
Real World Haskell: Lecture 1Real World Haskell: Lecture 1
Real World Haskell: Lecture 1
Bryan O'Sullivan
 
Csharp_Chap01
Csharp_Chap01Csharp_Chap01
Csharp_Chap01
Mohamed Krar
 
Automatic reference counting (arc) and memory management in swift
Automatic reference counting (arc) and memory management in swiftAutomatic reference counting (arc) and memory management in swift
Automatic reference counting (arc) and memory management in swift
InnovationM
 
The Expression Problem - Part 2
The Expression Problem - Part 2The Expression Problem - Part 2
The Expression Problem - Part 2
Philip Schwarz
 
Scala tutorial
Scala tutorialScala tutorial
Scala tutorial
Murali Krishna
 
Scala tutorial
Scala tutorialScala tutorial
Scala tutorial
wafianedjma
 
Tutorials on Macro
Tutorials on MacroTutorials on Macro
Tutorials on Macro
Anurag Deb
 
Unit2 java
Unit2 javaUnit2 java
Unit2 java
mrecedu
 
wtst3_pettichord3
wtst3_pettichord3wtst3_pettichord3
wtst3_pettichord3
tutorialsruby
 
wtst3_pettichord3
wtst3_pettichord3wtst3_pettichord3
wtst3_pettichord3
tutorialsruby
 
Advanced java script essentials v1
Advanced java script essentials v1Advanced java script essentials v1
Advanced java script essentials v1
ASHUTOSHPATKAR1
 
Courselab Quick start guide
Courselab Quick start guideCourselab Quick start guide
Courselab Quick start guide
Bob Price
 

Similar to 5 subtitles (text) for tutorial working on the programming assignments (8-47) (20)

Kleisli Composition
Kleisli CompositionKleisli Composition
Kleisli Composition
 
Principled io in_scala_2019_distribution
Principled io in_scala_2019_distributionPrincipled io in_scala_2019_distribution
Principled io in_scala_2019_distribution
 
Objectives Assignment 09 Applications of Stacks COS.docx
Objectives Assignment 09 Applications of Stacks COS.docxObjectives Assignment 09 Applications of Stacks COS.docx
Objectives Assignment 09 Applications of Stacks COS.docx
 
Class 1
Class 1Class 1
Class 1
 
Class 1
Class 1Class 1
Class 1
 
Class 1 blog
Class 1 blogClass 1 blog
Class 1 blog
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
Database Management Assignment Help
Database Management Assignment Help Database Management Assignment Help
Database Management Assignment Help
 
Real World Haskell: Lecture 1
Real World Haskell: Lecture 1Real World Haskell: Lecture 1
Real World Haskell: Lecture 1
 
Csharp_Chap01
Csharp_Chap01Csharp_Chap01
Csharp_Chap01
 
Automatic reference counting (arc) and memory management in swift
Automatic reference counting (arc) and memory management in swiftAutomatic reference counting (arc) and memory management in swift
Automatic reference counting (arc) and memory management in swift
 
The Expression Problem - Part 2
The Expression Problem - Part 2The Expression Problem - Part 2
The Expression Problem - Part 2
 
Scala tutorial
Scala tutorialScala tutorial
Scala tutorial
 
Scala tutorial
Scala tutorialScala tutorial
Scala tutorial
 
Tutorials on Macro
Tutorials on MacroTutorials on Macro
Tutorials on Macro
 
Unit2 java
Unit2 javaUnit2 java
Unit2 java
 
wtst3_pettichord3
wtst3_pettichord3wtst3_pettichord3
wtst3_pettichord3
 
wtst3_pettichord3
wtst3_pettichord3wtst3_pettichord3
wtst3_pettichord3
 
Advanced java script essentials v1
Advanced java script essentials v1Advanced java script essentials v1
Advanced java script essentials v1
 
Courselab Quick start guide
Courselab Quick start guideCourselab Quick start guide
Courselab Quick start guide
 

5 subtitles (text) for tutorial working on the programming assignments (8-47)

  • 1. Hi. In this video, we are going to show you how to work on the Programming assignments. We show you how to download them, how to import them into Eclipse, how to test your code, and how to submit your solutions using SBT. Okay, so, let's get started by going to the Assignments page. And we open the Getting Started section and we go to the instructions of the example assignment. So, the first thing you need to do is installing all the required tools. How to do this is explained on the tools setup page. I will quickly show it to you. And for every Operating System, you can also have a screen shot which shows you how to set up the tools. Since I already installed everything on this machine, I just go right into the assignment. So, the first thing you need to do is download the assignment archive. Okay. We open that file in the Explorer. And now, I will extract the assignment archive into my home directory. So I right click, select Extract All, and I will create a new directory in my home folder which I will use for the programming assignments. So, I go to my home directory, I create a new folder, I call it Progfun Assignments. And I click this right. So, I closed Explorer window and go back to the assignment. And the first thing we are going to do is start in the Scala record inside the project that we just created. How you can do this is explained on the SBT tutorial website. So, I opened the SBT tutorial and I follow the instructions which are on this page. So, I open a command prompt, I go to the directory of my assignments. So, I go to CD Progfun Assignments. And then here I go CD example, since I am working on the example assignment, and I start SBT. Okay, once that the SBT console has loaded, you can, from SBT start the Scala REPL using the console command. So, you type console, hit Enter, and then SBT will start the Scala REPL. Now, we are in the Scala interpreter. Here, we can type arbitrary Scala expression, and they will be evaluated on the fly. For example, you can say Println, and pass the string, and the Println command will
  • 2. be evaluated. That is how we recommend that you start the Scala interpreter during this class. In order to close the Scala interpreter and get back to the SBT console, you have to type Control+D. You will not see anything on the screen except that the Scala interpreter exits. Now, we are back in the SBT shell. Okay, so now, we will go back to the assignment. We close the SBT tutorial and we move down to the next step, which is opening the project in Eclipse. So, you start up Eclipse. In my case, I have a shortcut on my desktop. And once you start Eclipse, you have to choose a work space to work with. If you already created a work space for our class, then you can just use that. Otherwise, you just create a new folder in your home directory, and use that. So, my work space is a Progfun web space in my home directory. Okay. Inside Eclipse, you can just import a project that you extracted in your home directory. You do this by going to file, import, and then in the general section you select Existing Projects Into Workspace. You go next and you browse to the directory, where you've unpacked the assignment. So, we go to the Progfun Assignments and we accept the sample folder which is the project directory. Okay. We click Finish. And all, we already have the source code imported into Eclipse. So, we open up the project, and in the source folder, source main Scala. In the package example, you see the file lists of Scala, which is the file that you actually have to work on during this assignment. Okay, so, let's go back to the instructions. So, the next assignment that you have to do is actually implementing the assignment. If you look at the code, there are two functions that need to be implemented, sum and max. Both functions are currently defined with a triple question mark, which means they are not yet implemented. Okay, in this case, I will not do a real implementation, but just return zero for both of them, which is obviously wrong. But I don't want to spoil the solution. So, let's go back to the assignment.
  • 3. The next step is running new code. There are two ways to run new code. You can start the Scala REPL, and use the functions that you just implemented in Eclipse in the Scala REPL. For that, we go to the Command Prompt. We go back to the Scala REPL by typing console. And now, we have another look at the source code. So, the two functions that we just implemented are defined in an object list, which, in fact, lives in package example. So, if you want to use the functions, we have to either use the full name, example.list.sum or we can also import the members of this object into the REPL. In order to import it, we just type import example.lists. Which means everything. And now, two functions that we defined are available so we can try them out. For instance, we can try the sum function, and type sum of list of one, two, and three and we get zero because obviously, our implementation is not correct. Okay. Another way to run your code is using a main object. This is explained on the, on the assignment page and I will not go into details right now. The next part of the assignment is writing tests. So, if you go to Eclipse, you see that there is a second source folder which is named Source Tests Scala and this directory contains tests for our code. In fact, we already give you a test suite for the list object. If you open it up, you will see that the Lists Tests Suite is a whole tutorial on how to use Scala test, the tool that we are using for testing. It is really important that you work through this tutorial because we'll be using testing a lot during all of our class. Okay, let's go back to the assignment. After you're finished testing and everything is correct, you can submit your solution. In order to do that, you have to go back to SBT, okay? So, you open the Command Prompt. And we see, in fact, we are still in the Scala shell right now, so we type Control+D and we are back in the SBT shell, okay? Now, to submit your solution, the SBT shell defines a command which is named Submit. The Submit command takes two arguments. The first one is your e-mail address, the
  • 4. one that you used for registering on Coursera. The second argument to the Submit command is your submission password. The submission password is not the password that you use for logging in, instead the submission password can be obtained at the Coursera website. So, we go to the Coursera website and we scroll up and you have to go to the Assignments page. On top of the Assignments page, you see your user name and your submission password. Again, this is not your log in password. So, we copy the submission password, we go back to shell and we paste it. And now, if you type Enter, your solution will be packed and uploaded to Coursera. Finally, in order to see your grade, again go to the Coursera website, you go to the assignment, and look at the assignment you just submitted. I already have a score because I submitted before. Note that you can submit the same assignment as often as you like. So, if I click on the Score, I will see the feedback that I received for earlier submissions that I did. So, all the feedback below is for submissions that I did a few days ago. But you can also see that there is a new submission, which I did just right now, which has not yet been graded. Usually, grading takes between five and ten minutes.