10
CSE 326: Your Computing Environment Steve Martin Aiman Erbad

CSE 326: Your Computing Environment Steve Martin Aiman Erbad

Embed Size (px)

Citation preview

Page 1: CSE 326: Your Computing Environment Steve Martin Aiman Erbad

CSE 326:Your Computing Environment

Steve Martin

Aiman Erbad

Page 2: CSE 326: Your Computing Environment Steve Martin Aiman Erbad

Starting out. . .

• How to log in to a Linux server– Available servers:

• Tahiti• Fiji• Ceylon• Sumatra

• Use the easy shortcuts:– Start : Programs : Internet and Remote

Connections : SSH : X Connections

Page 4: CSE 326: Your Computing Environment Steve Martin Aiman Erbad

Moving Files Between OSes

• SFTP– Start : Programs : Internet and Remote Connections : SSH :

SFTP Connections

• Samba– Can easily map your home directory to a Win32

network drive!• Very useful if you want to work with a Win32 java editor!

– Start : Run, then \\tahiti.cs.washington.edu (example)– Click on the directory named with your login. This is your

home directory.• To make a network drive, copy the address, right-click on ‘My

Computer’, and select ‘Map Network Drive.’

Page 5: CSE 326: Your Computing Environment Steve Martin Aiman Erbad

CSE 326 Java Programming

• You can do all of your code work in either OS.– All lab machines have Java2 1.4.1 on them, as do the

Linux servers.– However, GRADING WILL BE DONE IN LINUX.

• Map your home directory to a drive, work in Windows, and test in Linux.

• Some good Windows editors. . .• jEdit• Blue Jay• Xemacs for Win32• EditPlus• . . .Notepad. . .

Page 6: CSE 326: Your Computing Environment Steve Martin Aiman Erbad

CSE 326 Java Programming II

• Note that there is no really good debugger (that we know of) for Java apps.– Time to break out the system.out.println mojo.

– Write clear code and document it well with comments, and you’ll be fine.

• Turnins are done in Linux with the turnin command – More on this later.

Page 7: CSE 326: Your Computing Environment Steve Martin Aiman Erbad

Working with code/text in Linux

• . . .We use a text editor. Some of the possibilities are:– Emacs

• Most popular• Many features• Easy to learn• Available for many, many OSes

– Vim• Also powerful• A bit harder to learn. . .

– Pico• Very simple, barebones editor

Page 8: CSE 326: Your Computing Environment Steve Martin Aiman Erbad

An Introduction to Emacs

• To start up:• [stevaroo@tahiti]$ emacs &• [stevaroo@tahiti]$ emacs <filename> &

• Some basic commands:• [CNTRL]-x s = SAVE• [CNTRL]-x f = OPEN FILE• [CNTRL]-x c = QUIT• [CNTRL]-s = SEARCH• [CNTRL]-k = CUT• [CNTRL]-y = PASTE• [CNTRL]-a/d = GOTO beginning/end of line• [CNTRL]-g = EXIT COMMAND BUFFER (at bottom)

Page 9: CSE 326: Your Computing Environment Steve Martin Aiman Erbad

More Emacs. . .

• How to turn on syntax highlighting (2 ways)– Create a .emacs file in your home directory with the

following line:• (global-font-lock-mode)

– In emacs:• Hit ‘ESC’ then ‘x’. Type ‘global-font-lock-mode’

• How to split your window:• [CNTRL]-x 2 = Split Horizontally

• [CNTRL]-x 3 = Split Vertically

• [CNTRL]-x 1 = Go back into 1 window

Page 10: CSE 326: Your Computing Environment Steve Martin Aiman Erbad

Turning Stuff In

• We use the turnin command from the command line.

turnin: usage [-hlsvV] [-c course[=section]] [-p project] [files]

c course specify the course to use

h print this help message

i output shell commands to set user's environment

l list projects active for the selected course

p project specify the project to submit to

s list courses the envoker is enrolled in

v be verbose (also passed to tar)

V show version information

files list of files to submit