Notes From Class
Week 1: September 3 and 5, 2008
-
If you do not have a Glue computer account, please get one.
See the FAQ's for step-by-step instructions.
-
I will soon be putting your picture on the
meet the class page.
If you have any objections (e.g., the mug shot isn't up to
your usual GQ/Vogue standards), please let me know.
-
The National Education Association has created a little 6 minute video called
Shift Happens.
Week 2: September 8, 10 and 12, 2008
-
The class reader is now available at the Engineering Copy Center.
Cost is $30.00.
-
Reading
Please read chapters 1 and 2 of Austin/Chancogne.
Although some of the numbers are now six-seven years old,
the underlying story remains the same.
The "problem solving with computers" handout in your blue "class notes"
will one-day be a replacement for Chapters 1 and 2.
-
The campus dialup services are now deceased (June 30, 2007).
If you want remote access your account at school,
then you'll need a high-speed internet connection.
-
You can test the speed of your internet connection with
http://www.dslreports.com/stest .
-
OIT has created a new service
SSH Gateway on the Web .
Note. Students from past semesters tell me that it works,
but it can be very slow!
-
If your machine is running MS Windows then
you are probably better off downloading putty.
-
If you machine is an Apple running Mac OS X,
then you can simply use the Terminal program.
Look under /Applications/Utilities.
-
Here is a link to the
Putty telnet and ssh client program.
Note. It seems that Putty cannot traverse firewalls.
So you make need to add "Putty" as an exemption to your list of
programs that can bypass the firewall on your computer. On Windows XP,
see the security folder inside the control panel.
-
At home I use TurboFTP to transfer files/directories to/from school.
TurboFTP has a very friendly graphical user interface
that shows both the windows and unix files systems.
You can download a trial version
from http://www.tucows.com .
You will need to adjust the program settings so that the
connection to school is secure -- use sftp and socket 22 (not socket 21).
-
If you have downloaded an FTP program to your PC/laptop at home,
then you'll need the IP addresses for computers on the glue system, i.e.,
Site IP addresses
--------------------------------------------------
glue.umd.edu 128.8.10.68
128.8.10.71
--------------------------------------------------
Insert them into the (ftp program) site manager.
Week 3: September 15, 17 and 19, 2008
-
Here is the information on F-Secure SSH for Windows that is free for UMD students.
See instructions for
downloading And installing F-Secure SSH for Windows
and instructions for
usages of the F-Secure SSH FTP Client .
-
Prelude to Homework 1 ....
Make sure that you know how to log in to your glue.
Read the instructions for creating a personal home page (pg. 23 of the blue
class reader). Then start to read the HTML tutorial .. use a text editor (vi or
pico) to type in the minimal html document on pages 27-28 of the class reader.
Then go to the "meet the class page" and make sure that the link from your
entry to your home page works.
-
Here are a few basic UNIX commands:
Unix Commands
--------------------------------------------------------------------------------
1. cd <-- change to home directory
2. cd file1 <-- change to directory file1
3. ls and ls -ls and ls -tl <-- list contents of a directory
4. mkdir file1 <-- make a directory called file1
5. rmdir file1 <-- remove directory file1
6. cp file1 file2 <-- copy file1 to file2
7. mv file1 file2 <-- move file1 to file2
--------------------------------------------------------------------------------
Note. Directories cannot be removed unless they are empty.
Let's suppose that you have created a file and now you want to remove it. Try:
8. rm file1 <-- remove/delete file1
Text editor commands
--------------------------------------------------------------------------------
1. vi filename <-- use vi editor to change contents of filename.
For example, the command sequence:
prompt >> cd ../pub
prompt >> vi Welcome.html
prompt >> vi resume.html
prompt >> vi ce-systems.html
moves your shell to the public directory and then systemantically creates the
HTML files for your home page, resume and trip page. Notice that each file
name has the "html" extension -- web browsers need this information.
The class reader contains a list of basic editor commands.
--------------------------------------------------------------------------------
Week 4: September 22, 24 and 26 2008
-
Homework 1 is available.
Due date is 9am, September 29, 2008.
Week 5: September 29, October 1 and 3, 2008
-
Reading
Please read Sections 2.2 and 2.3 of Austin/Chancogne.
-
Homework 2 is available.
Due date is 9am, October 8, 2008.
-
If your computer does not contain the java development kit (JDK), then you'll
need to
download and install it .
-
There are a couple of ways to approach java programming.
My preference is to use a basic editor (vi) and just type in the source code.
This approach keeps the write-compile-edit cycle is very simple.
The disadvantage of this approach is that in order to get ahead,
you need to know the language.
A second possiblity is to write and develop
programs within an integrated development environment (IDEs).
IDEs simplify a couple of things. First, IDEs know the language syntax.
So if you are a programming novice and make a lot of mistakes,
then the IDE can help you fix them. Second, if you have a compilicated
java program (not in this class), then an IDE will simplify the
task of integrating everything together.
Eclipse and Netbeans are perhaps the two most commonly used IDEs.
Eclipse is widely used in the CS department here at UMCP.
Netbeans provides better support for the construction of graphical
user interfaces than Eclipse. I have used Netbeans but not Eclipse.
For info on downloads
go to the
internet resources page.
-
A note on Java and the FireFox/Mozilla Browsers
If you are using the firefox/mozilla browsers then the spreadsheet may not show up correctly.
Most likely this is because the java run-time environment is not installed.
SUN Microsystems has created a Java plugin to run applets.
See:
http://www.java.com/en/download/windows_xpi.jsp?locale=en&host=www.java.com:80 .
Week 6: October 6, 8 and 10, 2008
-
In class we are covering the eight basic data types in Java.
For a summary of their properties, see the FAQ page (there's also a
copy of it in your "blue" lecture notes).
For a discussion on single and double precision floating point numbers,
see Section 4.4 of Austin/Chancogne. Also see Table 3.2 on pg. 57 of Austin/Chancogne.
-
Homework 3 is available.
Due date is 9am, October 22, 2008.
Week 8: October 20, 22 and 24, 2008
-
We are covering "control of flow" in class.
Control of flow in Java is almost identical to C.
See Table 6.1 in Austin/Chancogne for a list of relational/logical operators.
-
Midterm 1. October 24, 9am.
The midterm will cover Chapters 1 and 2 of the class text,
the tutorials at the beginning of the "blue" lecture notes,
introduction to object-oriented programming concepts and Java,
and anything that was written on the
board during the first seven weeks of class.
Week 9: October 27, 29 and 31, 2008
-
Reading and Information
We are covering Strings and Arrays in class.
For a brief introduction to how Strings are stored, see pg 504 of Austin/Chancogne.
Also see pg's 526-527 for a summary of String methods
and a few simple examples of their usage.
A gentle introduction to one-dimensional arrays can be found
on pg's 527-528.
-
Homework 4 is available.
Due date is 9am, November 10, 2008.
Week 10: November 3, 5 and 7, 2008
-
Reading and Information
We are moving onto classes and objects.
Please read Section 18.8 (pg's 510-518) of Austin/Chancogne.
Also, download, compile and run the Circle.java and ColoredCircle.java
files from the java examples web page.
Week 12: November 17, 19 and 21, 2008
-
If you programmed homework 3 using files like "Degrees" and terms like "hw3pr2" please
see me....thanks.
-
Homework 5 is available.
Due date is 9am, December 8, 2008.
Week 13: November 24, 26 and 28, 2008
-
Midterm 2. November 24, 9am. Open book and open notes.
-
No class on November 26. Use the day to travel to your family.
Week 15: December 8, 10 and 12, 2008
-
Java Collections
Now that we know how to create objects,
the next thing to think about is their organization.
How, for example, do you organize (or aggregate) large numbers of
objects so that things are easy to find and modify?
A good organization will represent data items that form a natural group,
such as:
-
A poker hand (a collection of cards),
-
A mail folder (a collection of letters), or a
-
Telephone directory (a mapping of names to phone numbers).
A
collection
is an object that groups multiple elements into a single unit.
Units include:
-
Sets.
A set is a collection that cannot contain duplicate elements.
-
Lists.
An ordered collection (sometimes called a sequence).
Lists can contain duplicate elements.
The user of a List generally has precise control over
where in the list each element is inserted and can
access elements by their integer index (position).
-
Queues.
Queues typically order elements in a FIFO (first-in-first-out) manner.
-
Maps.
An object that maps keys to values.
A Map cannot contain duplicate keys.
Each key can map to at most one value.
-
SortedSet
A Set that maintains its elements in ascending order.
Several additional operations are provided to take
advantage of the ordering.
Sorted sets are used for naturally ordered sets,
such as word lists and membership rolls.
-
SortedMap
A Map that maintains its mappings in ascending key order.
This is the Map analog of SortedSet.
Sorted maps are used for naturally ordered collections of key/value pairs,
such as dictionaries and telephone directories.
Collections are used to store, retrieve, manipulate, and communicate aggregate data.
Typically, they represent data items that form a natural group.
-
December 12 -- last day of class. Review material for final exam.
Week 17: .....
-
Final Exam
December 18, 8-10 am in our regular classroom.
The exam will be open book and open notes and will be a lot like midterm 2.
Developed in September 2008 by Mark Austin
Copyright © 2008, Department of Civil and Environmental Engineering,
University of Maryland