Difference between revisions of "EGR 103 Startup"

From PrattWiki
Jump to navigation Jump to search
Line 7: Line 7:
 
The following will be a comprehensive list of the tools we will be using for the class, how to access or install them, and how to configure them.
 
The following will be a comprehensive list of the tools we will be using for the class, how to access or install them, and how to configure them.
  
== File Storage ==
+
== File Storage - Box ==
 
You will be working with files on your own computer but you will be backing them up with a system called Box.  Duke students have 50 GB of free storage for academic purposes on the box system.  Furthermore, you can have box sync up with your local files (as long as you put them in the right place)!  If you need to work offline, you can, and when you are back on the Duke network, Box will automatically back up your files.  You will also be able to share files with TAs if necessary.
 
You will be working with files on your own computer but you will be backing them up with a system called Box.  Duke students have 50 GB of free storage for academic purposes on the box system.  Furthermore, you can have box sync up with your local files (as long as you put them in the right place)!  If you need to work offline, you can, and when you are back on the Duke network, Box will automatically back up your files.  You will also be able to share files with TAs if necessary.
  
Line 30: Line 30:
 
* You will never need to set this up again for the computer you are currently working on, but if you end up working on a different computer you will need to install Drive.  This also means you can work from public or other computers as your files will always be on Box.
 
* You will never need to set this up again for the computer you are currently working on, but if you end up working on a different computer you will need to install Drive.  This also means you can work from public or other computers as your files will always be on Box.
  
== Overleaf ==
+
=== Document Preparation - Overleaf ===
 
This semester, we will be using a freemium tool called Overleaf for making lab documents.  We will only need the free features for work this semester.  Overleaf is a [[LaTeX]] editing and processing program. One drawback is that it cannot access files directly on your drive but rather needs you to upload them.  As you go through the course, you will get a better and better idea of which files need to be uploaded.   
 
This semester, we will be using a freemium tool called Overleaf for making lab documents.  We will only need the free features for work this semester.  Overleaf is a [[LaTeX]] editing and processing program. One drawback is that it cannot access files directly on your drive but rather needs you to upload them.  As you go through the course, you will get a better and better idea of which files need to be uploaded.   
  
=== Starting Up ===
+
==== Starting Up ====
 
* If you do not already have an Overleaf account, go to [https://www.overleaf.com/ https://www.overleaf.com/] and register.  Duke does not have an account, but you can still use your duke.edu address.  If you already have an Overleaf account with a different login, you can certainly continue to use that.
 
* If you do not already have an Overleaf account, go to [https://www.overleaf.com/ https://www.overleaf.com/] and register.  Duke does not have an account, but you can still use your duke.edu address.  If you already have an Overleaf account with a different login, you can certainly continue to use that.
 
* Once you have logged in, you will have the option to look at some [https://www.overleaf.com/templates templates] or the [https://www.overleaf.com/learn Help Guide].  We will look at those in lab on my computer, so go ahead and progress straight to creating your first LaTeX project.  Make it a blank project, and call it <code>EGR103LAB01</code>.  Overleaf will create a main document with some boilerplate information in it.
 
* Once you have logged in, you will have the option to look at some [https://www.overleaf.com/templates templates] or the [https://www.overleaf.com/learn Help Guide].  We will look at those in lab on my computer, so go ahead and progress straight to creating your first LaTeX project.  Make it a blank project, and call it <code>EGR103LAB01</code>.  Overleaf will create a main document with some boilerplate information in it.
  
 +
=== Connecting Box and Overleaf - GIT ===
 +
This semester, we will be using a version control program called '''git''' to bridge the gap between the Box drive and the Overleaf projects. 
 +
 +
==== Starting Up ====
 +
You will need to install git if you do not already have it -- there are instructions at [https://git-scm.com/book/en/v2/Getting-Started-Installing-Git https://git-scm.com/book/en/v2/Getting-Started-Installing-Git].  You may also want to familiarize yourself with the basics of git with the [https://git-scm.com/book/en/v2 Pro Git Book].  I recommend reading through the "Getting Started" chapter and also I will mention that there will likely be many, many terms that do not make sense.  Don't worry about that!  Also, I would recommend '''not''' trying to configure things or even using git until we have talked about it more in lab 1.
 +
 +
=== Accessing (some) Assignments and (some) Readings - Connect ===
 +
The book for this semester is an electronic book hosted on McGraw-Hill's Connect system.  You should have received an e-mail from the Sakai page about where to find it.
 +
 +
=== Turning (some) Things in - Gradescope ===
 +
Some of the assignments for this semester will be graded using a system called Gradescope.  Gradescope has many powerful features, including the ability to automatically grade some programming assignments! 
 +
 +
==== Starting up ====
 +
To access Gradescope, go to [https://www.gradescope.com/ https://www.gradescope.com/].  On the opening page, choose "School Credentials" and then "Duke NetID".  If you are enrolled in the course (and if Sakai has had a chance to update the roster) EGR 103 should be one of the classes you see.
 +
 +
=== Writing and Running Code - Anaconda ===
 +
Finally (!) we will be using the Anaconda distribution of Python for this semester.  The Anaconda package comes with several development environments and other features that are useful to us. 
 +
 +
==== Starting up ====
 +
See [[Installing Anaconda and Spyder]] for information.
 +
 +
<!--
 
=== Getting Starter Files ===
 
=== Getting Starter Files ===
 
* Each week, I will give you access to at least the lab skeleton.  This week, there are actually several files you will need.  Here's how to get them:
 
* Each week, I will give you access to at least the lab skeleton.  This week, there are actually several files you will need.  Here's how to get them:
Line 47: Line 69:
 
** Now you need to tell Overleaf to change the primary tex document.  Click the Menu button at the top left of Overleaf.  In the main document drop down, select the <code>lab1.tex</code> file.   
 
** Now you need to tell Overleaf to change the primary tex document.  Click the Menu button at the top left of Overleaf.  In the main document drop down, select the <code>lab1.tex</code> file.   
 
** Finally, you need to recompile your project since the main document changed.  Click the Recompile button and the lab skeleton will compile.
 
** Finally, you need to recompile your project since the main document changed.  Click the Recompile button and the lab skeleton will compile.
 
+
-->
  
  
Line 53: Line 75:
 
See the page [[How To Get Work Done]]
 
See the page [[How To Get Work Done]]
  
== One-time-only activities ==
 
There are a couple things you will do during the in-lab time part of lab 1 that you (should) only have to do once.  They are:
 
* Setting up your UNIX account - this will be done in lab.
 
* Setting up permissions for your directories - this process is described at [[User:DukeEgr93/WindowsPermission]] and will also be completed during lab.
 
* Setting up the default paper sizes for [[LaTeX]].  This must be done since he default case for the dvips and dvipdf commands is to use A4 paper. To correct this, log into a Teer machine (login-teer.oit.duke.edu) and type
 
texconfig
 
: Press return to continue, then in the window that comes up, arrow down to the second row, PAPER. Hit return, then arrow down to LETTER and hit return. You may need to press return to continue after some configuration files have been changed. When you get back to the colorful window, hit return to EXIT.
 
 
== Other activities ==
 
To work on the lab from your own computer, follow these steps:
 
* If on Windows, start [[MobaXterm]]; If on Mac, start the Terminal program in the [[XQuartz]] package.  Use the terminal to connect to the login-teer machines. 
 
* Test the graphics connection by typing <code>xterm &</code>
 
** If the xterm window comes up - great!  If not, note the following:
 
*** For Macs, you need to type <code>xhost +</code> in a terminal window once -- this generally stays in place for the rest of the time you own that computer...
 
* Once connected to a terminal and testing the graphics, change into your lab 1 directory with:
 
<source lang="text">
 
cd EGR103
 
cd lab1
 
</source>
 
Note: the EGR103 directory will be created during Lab 1.
 
* Edit your lab report with [[emacs]] using
 
<source lang="text">
 
emacs lab1.tex &
 
</source>
 
:Don't forget the &!
 
* After saving the file with [[emacs]], process the [[LaTeX]] file with
 
<source lang="text">
 
latex lab1.tex
 
</source>
 
:Make sure LaTeX compiles!  If not, check what kind of error there is:
 
** If LaTeX can't see lab1.tex or sits there with two asterisks, hit CTRL-D and figure out where the file is.
 
** If it is some other error, hit CTRL-D and identify the error.  Fix the problem in [[emacs]] and run again.
 
*Once LaTeX succeeds, run [[dvipdf]] with:
 
<source lang="text">
 
dvipdf lab1.dvi
 
</source>
 
to create a PostScript file.
 
* Finally, use [[evince]] to view the pdf file:
 
<source lang="text">
 
evince lab1.pdf &
 
</source>
 
:Don't forget the &!  There may be a bunch of little warnings and errors that pop up. 
 
*To print, use the print command in evince and select the "lp0" printer.  If your documents are not showing up in your ePrint queue when you swipe your card, see the [[ePrint]] page for troubleshooting info. 
 
  
As you are editing your document, you should add a little to the .tex file in the emacs window, save the .tex file, and process it with LaTeX.  If that works, then run the dvipdf command -- if evince is open and viewing the PDF file, it will detect a change in the PDF file and automatically load the latest version.
 
  
 
== Troubleshooting ==
 
== Troubleshooting ==

Revision as of 23:08, 19 January 2021

This page will eventually be a guide to how to get working on things for EGR 103.

Resources

The main resources for EGR 103 are listed on the bottom of that page. There is also Pratt Pundit's Category:EGR 103, which collects pages of special interest to EGR 103 students.

Tools

The following will be a comprehensive list of the tools we will be using for the class, how to access or install them, and how to configure them.

File Storage - Box

You will be working with files on your own computer but you will be backing them up with a system called Box. Duke students have 50 GB of free storage for academic purposes on the box system. Furthermore, you can have box sync up with your local files (as long as you put them in the right place)! If you need to work offline, you can, and when you are back on the Duke network, Box will automatically back up your files. You will also be able to share files with TAs if necessary.

Box Setup

  • Go to https://box.duke.edu/.
  • Click the LOG IN button.
  • If asked if you are Part of Duke? Click Continue.
  • Log In using your Duke credentials.
  • You should now see your Duke Box - it may be entirely empty.

Local Folder Setup

Next you will create a folder on your local computer to synchronize with your Box folder.

  • Go to https://duke.app.box.com/services/browse/newest/box_drive for information about Box Drive and for the download links for Windows and Mac.
  • Download the appropriate file and install it.
  • Keep track of where the Box folder is placed on your drive.
    • For Windows it is likely a spur off the main File Explorer window and located specifically at C:\Users\USER\Box where USER is your Windows user name.
    • For Mac, a Box drive will be mounted.
  • To see it work, on your computer go into your Box folder on your computer, create a new folder within it, and call it EGR103S21 in all caps with no spaces. After you have created it, refresh the browser that is looking at your Box account and the folder should show up in your list!
  • Box Drive generally works when you are online and thus keeps things in the cloud and only pulls them down when you need them. To make sure that you have access when you are offline, and to mitigate any internet connectivity issues, you will want to tell Drive to make your folders available offline:
    • In the File Explorer or Finder, open your Box folder. Right-click EGR103S21 and in the context box find "Make Available Offline"
    • Once things have synchronized, there should be a green check by the folder - that is the sign that the folder will be available offline.
  • You will never need to set this up again for the computer you are currently working on, but if you end up working on a different computer you will need to install Drive. This also means you can work from public or other computers as your files will always be on Box.

Document Preparation - Overleaf

This semester, we will be using a freemium tool called Overleaf for making lab documents. We will only need the free features for work this semester. Overleaf is a LaTeX editing and processing program. One drawback is that it cannot access files directly on your drive but rather needs you to upload them. As you go through the course, you will get a better and better idea of which files need to be uploaded.

Starting Up

  • If you do not already have an Overleaf account, go to https://www.overleaf.com/ and register. Duke does not have an account, but you can still use your duke.edu address. If you already have an Overleaf account with a different login, you can certainly continue to use that.
  • Once you have logged in, you will have the option to look at some templates or the Help Guide. We will look at those in lab on my computer, so go ahead and progress straight to creating your first LaTeX project. Make it a blank project, and call it EGR103LAB01. Overleaf will create a main document with some boilerplate information in it.

Connecting Box and Overleaf - GIT

This semester, we will be using a version control program called git to bridge the gap between the Box drive and the Overleaf projects.

Starting Up

You will need to install git if you do not already have it -- there are instructions at https://git-scm.com/book/en/v2/Getting-Started-Installing-Git. You may also want to familiarize yourself with the basics of git with the Pro Git Book. I recommend reading through the "Getting Started" chapter and also I will mention that there will likely be many, many terms that do not make sense. Don't worry about that! Also, I would recommend not trying to configure things or even using git until we have talked about it more in lab 1.

Accessing (some) Assignments and (some) Readings - Connect

The book for this semester is an electronic book hosted on McGraw-Hill's Connect system. You should have received an e-mail from the Sakai page about where to find it.

Turning (some) Things in - Gradescope

Some of the assignments for this semester will be graded using a system called Gradescope. Gradescope has many powerful features, including the ability to automatically grade some programming assignments!

Starting up

To access Gradescope, go to https://www.gradescope.com/. On the opening page, choose "School Credentials" and then "Duke NetID". If you are enrolled in the course (and if Sakai has had a chance to update the roster) EGR 103 should be one of the classes you see.

Writing and Running Code - Anaconda

Finally (!) we will be using the Anaconda distribution of Python for this semester. The Anaconda package comes with several development environments and other features that are useful to us.

Starting up

See Installing Anaconda and Spyder for information.


Getting Work Done

See the page How To Get Work Done


Troubleshooting

Blank Document

If

emacs lab1.tex & 

command brings up a blank document! You probably forgot to get into your lab1 directory. Be sure to type both parts of

cd EGR103
cd lab1

Windows Don't Show Up

The

emacs lab1.tex &

command doesn't seem to do anything. You probably do not have graphics set correctly. To check, type

xterm

without an ampersand. If you get an error message about the display not being set or localhost not working or something like that, you need to re-do your session to accept graphics. For both MobaXterm and XQuartz, make sure you have the -XY part of the line of code you are typing in to connect to a Teer machine.

The File is Locked

If you try to open a file in emacs and at the bottom of the window you get a message:

 ".../EGR103/lab1/lab1.tex locked by NetID@login-t... (pid nnnn): (s, q, p, ?)?" 

This usually happens if your connection closed unexpectedly while editing the document. Navigate to the folder and type:

ls

If there is a file similar to the one you are editing but surrounded by hashtags, that is what is causing the problem. The easiest solution is, in that little emacs window with the message above, type "s"

Python Errors

If you encounter problems in Python, or you are new to programming, you may find it useful to check Python:Common Mistakes for help.

Questions

Post your questions by editing the discussion page of this article. Edit the page, then scroll to the bottom and add a question by putting in the characters *{{Q}}, followed by your question and finally your signature (with four tildes, i.e. ~~~~). Using the {{Q}} will automatically put the page in the category of pages with questions - other editors hoping to help out can then go to that category page to see where the questions are. See the page for Template:Q for details and examples.

External Links

References