Time & Place: | Ref No. 54660: Monday & Wednesday, 5:30–7:05
PM, via Zoom
Ref No. 48327: Tuesday & Thursday, 7:15–8:50 PM, via Zoom | ||||||
---|---|---|---|---|---|---|---|
Instructor: |
Name: Wayne Pollock E-mail: Internet: Office & Phone: DTEC–404, 253–7213 View my Office Hours.
Skype
ID: wpollock@hccfl.edu
Homepage URL:
https://wpollock.com/
|
||||||
Text: |
Liang, Y. Daniel, Introduction to Java Programming, Brief Version
11th Edition ©2018 Pearson/Prentice-Hall: ISBN-10: 0-13-461103-9, ISBN-13: 978-0-13-461103-7 (There may be PDF versions or book rentals available, to save money. There may also be a possibly cheaper international edition, but despite vendors' claims, the content is not always exactly the same.) | ||||||
Description: |
(This course is 3 credit hours long.)
“A continuation of COP 2800.
The focus is on software development workflow tasks (requirements, design,
testing, deployment).
Topics include advanced object orientated and functional programming in Java,
collections, multi-threading, files, database use, and other features of
modern Java.”
Instructional Methodology: The class format will be lecture and discussion; class participation is strongly encouraged. In addition, there will be numerous examples and some in-class group programming exercises (model solutions to these and all projects will be provided.) Assignments will be mostly group programming projects. While some time will be provided in class, most assignments will require several hours per week outside of class. Students are expected to prepare for each class by completing all reading assignments, reviewing examples and model solutions provided, and practicing programming outside of class. (This is important — you can't learn a skill such as Java programming only by attending class and reading a book. You must practice, practice, practice, several hours each week! If you won't have enough time available, consider auditing the course.) | ||||||
Objectives: | The student will demonstrate a knowledge of the following topics
through objective tests, hands-on activities, and projects:
| ||||||
Prerequisite: | COP 2800, or permission of the instructor. Students enrolled in a degree or college credit certificate program must complete all prerequisites. Note! HCC registration computers may not check for all prerequisites before allowing you to enroll. Be certain you have all required prerequisites or you won't have much of a chance of success. Also you may be dropped from the class. | ||||||
Canvas and Software: | The course materials are available online; you will need to have a computer
which meets the minimum requirements as stated in the Canvas Student Guide and
Internet access in order to complete the course.
You will need to use Zoom. While Zoom can be used from a web browser, I recommend installing Zoom on your computer. Some features such as breakout rooms are not available from a web browser. Download Zoom from Zoom.us. You can then read Zoom user guides. Be sure to keep your Zoom software up to date! Students are responsible for accessing Canvas and Zoom and familiarizing themselves with navigation of the web site. The instructor is not responsible for the breakdown of technology including, but not limited to any of the following: inability to submit assignments, downtime of the Canvas server, operating system breakdowns, incompatible software, Internet connections; nor any personal challenges you may face while dealing with the 'online' delivery system. All assignments can be performed on any computer that supports version 11 or newer of the Java development kit (JDK). You can obtain a “JDK”, including all tools and documentation, for free from various sources such as www.oracle.com/technetwork/java/ or other places discussed in class. You will use other Java development tools, such as Eclipse IDE. All required. software is available free for Windows, Linux, and Macintosh. |
||||||
HCC Facilities and Resources: |
You can use HawkNet
(WebAdvisor)
to obtain your final grade for the course.
You can use your assigned Hawkmail (Hawkmail365) email address or
use Canvas, if you wish to discuss your grades via email.
(Note, it may be possible to setup your Hawkmail account to forward all
received emails to some outside email account; but you still must send mail
from your official HCC account to discuss grades.)
Most college systems now (or will in the future) use a single sign-on user ID, known as HCC “NetID”. Visit netid.hccfl.edu to register and to update your credentials. (Your initial password is your uppercase first name initial, lowercase last name initial, and your seven digit student ID number.) Note, the quickest way to resolve login issues is the HCC Live Web Portal (hcclive.hccfl.edu).
The college provides wireless network connections for students and guests
on Dale Mabry campus.
For students, select the network
“ Hawk Alert text messaging service allows you to receive important information regarding campus closures or emergencies. You may also sign up for financial aid notifications and registration and payment deadlines. This is a free service, although some fees may be applied by your cellular service provider or plan for text messages. For more information, visit https://www.hccfl.edu/support-services/hawk-alert. HCC DM Open LabComputers with JDK (and other tools, such as Eclipse) are located in the Dale Mabry campus computer science department open lab, in DTEC–462. Lab hours are:
For Remote Assistance Call 813-253-7330, or send email to dteclab@hccfl.edu. Some tutoring services for some courses are offered: CGS-1000 Intro to Computers and Tech, CET-1172C PC Upgrade and Repair-Hardware, CET-1174C PC Upgrade and Repair-Software, CET-1600 Cisco Network Fundamentals, CET-1610 Cisco Router Technology, CTS-1303 Microsoft Beginning Server I, and CTS-1106 Intro to UNIX/Linux. Rules for Using HCC Facilities
| ||||||
Grading: |
Grading scale:
A=90-100, B=80-89, C=70-79, D=65-69, F=0-64
| ||||||
Policies: |
| ||||||
Projects: |
Projects will be assigned from the class web page at various times.
You will have sufficient time to complete the projects,
at least a week but usually two weeks.
All projects except the first two will be group programming projects.
You must work on projects mostly outside of regular class hours, although
some time during class will be devoted to group project work.
While you should work individually on the first two projects, you must work in a group of two to four students on all other projects, unless approved by your instructor. From project #3 on, projects will be submitted to a group's designated GitHub repository for that project. (Each group will have one official repo for each of their projects; this will be explained before project #3 is assigned.) Each group member must do their share of the work and make individual commits. Your grade will depend mostly on your code as shown by your commits to the project repository for your group. Students will make their code contributions in their own branches. (Using repositories will be covered in class, and practiced in project #2.) All students will need to push all their commits (in their own branches) to the group's repository on GitHub. This is required because not all student's commits will be included in the group's final submission, and I will need to see the code produced by every student. Only group-approved commits will be merged into the master branch. The final version of the master branch that you want graded for a project will have an appropriate “tag”. (All this will be explained in class.) There are several ways to organize and run a group. How you do so is a decision for your group, but here are some suggestions:
Projects are graded on the following scale:
A = 95% (Excellent: Good design with good comments, style, and extras) Minor extras worth +5 points, minor omissions or poor design worth -5. Projects are graded according to their design (25%), how well they compile and run (20%), how well your project meets the requirements specifications (20%), the coding style (15%), the amount (and quality) of your comments (10%), and your creativity in extending the project usefully or an innovative design that uses the features taught in class well (10%). Projects are not graded when turned in. They are graded all at once, sometime after the project deadline has passed (usually the following weekend). Every effort will be made to grade projects within a week of the due date, or as soon thereafter as possible. (See also submitting assignments below.) (Be aware that some employers reportedly check on-line code repos of perspective employees. While you should not be embarrassed by code produced when first learning, remember you do have the option at the end of the term, once your grades have been verified by you, to delete any on-line repos. I suggest making a clone of your repos on your personal computer, first.) | ||||||
Submitting Assignments: |
All group assignments (except when noted) must be submitted
to the designated GitHub.com repository.
When ready for grading, submit a link to your repo (to the tagged
version I am to grade) to the project dropbox on Canvas.
(Only the group leader needs to submit to Canvas.)
Individual assignments (the first couple) are submitted to Canvas by
each student.
Most assignments will be graded directly from your group's GitHub code repository. You will still need to submit some parts of assignments to Canvas. Such project submissions should include a URL to the GitHub.com repo hosting your group's submission. Remember, that repo should also include all group members' code in individual branches. In the event a student submits more than once for the same assignment, I will ignore all but the last one received up to the deadline. Assignments submitted after the deadline will not count toward your grade except as allowed by the course late policy. Also, you cannot resubmit an assignment once it has been graded. Always keep a copy of your submitted projects, until you are certain they have been received and the grade recorded correctly. |
HCC Academic Calendar: | |
---|---|
Classes Begin: | Monday 1/11/2021 |
Add-Drop Ends: | Friday 1/15/2021 |
Orientation Period Ends: | Wednesday 1/20/2021 |
Last Day to Withdraw: | Sunday 3/28/2021 |
Classes End: | Monday 5/10/2021 (Last scheduled day: 5/6/2021) |
Grades Available: |
Wednesday 5/12/2021
(from HawkNet)
|
HCC is closed on: |
Monday 1/18/2021 (Martin Luther King Jr. Day), Monday 2/15/2021 (Presidents' Day), Monday–Sunday 3/15/2021–3/21/2021 (Mid-Term Break), Friday–Sunday 4/2/2021–4/4/2021 (Spring Day), Friday 4/16/2021 (All College Day)
Monday 2/8/2021 (Superbowl 2021 at Raymond James stadium). |
Consequences of Dropping or Withdrawing
Dropping or withdrawing may have an impact on financial aid, veteran’s benefits, or international student visa status. Students are encouraged to consult with a financial aid, the VA certifying official, or the international student advisor, as appropriate, prior to dropping or withdrawing from class.
Requests For Accommodations
If, to participate in this course, you require an accommodation due to a physical disability or learning impairment, you must contact the Office of Services to Students with Disabilities, Dale Mabry campus: Student Services Building (DSTU) Room 102, voice phone: (813) 259–6035, FAX: (813) 253–7336.
HCC has a religious observance policy that accommodates the religious observance, practices, and beliefs of students. Should students need to miss class or postpone examinations and assignments due to religious observances, they must notify their instructor at least one week prior to a religious observance.
Quotes: | “Tell me and I'll listen. Show me and I'll understand. Involve me and I'll learn.” | — Lakota Indian saying | |
---|---|---|---|
“Learning is not a spectator sport!” | — Chickering & Gamson |
Dates Tue Thu |
Topics | Readings |
---|---|---|
1/12 1/14
1/19
| Review: Course policies. Understanding .class files, JREs, and byte code. IDE (Eclipse, IntelliJ IDEA, and NetBeans) and common tool-chains (JDK, Maven, code review tools, continuous integration (CI) tools. Professional ethics, software licensing, and intellectual property rights. |
Chapters 1.11, 1.12 (NetBeans and Eclipse), 2.16 (Software Development process),
Liang online supplements: III-E (Packages), III-W
(Java profiler), II-B through II-E (Netbeans and Eclipse Overviews),
Eclipse documentation (the “Workbench User Guide” and
“Java development user guide” sections),
IntelliJ IDEA
documentation (the “Running IntelliJ IDEA for the First Time”
video),
NetBeans documentation (the “Java Quick Start Tutorial”
and “Developing General Java Applications”),
Maven by Example
(chapters 1–3),
Software Engineering
Code of Ethics,
Five Things Every Software Developer Should Know About Intellectual Property.
Additional Links online Maven resources, Eclipse, IntelliJ IDEA, NetBeans (also netbeans.apache.org), Another Eclipse tutorial, Apache NetBeans documentation (not yet complete), online ethics and licensing resources |
1/21
1/26 1/28
|
Versioning (or revision) control systems (VCS), especially Git,
and using them with IDEs.
Using GitHub.
Git workflow, creating and using pull requests and patches.
Exceptions: checked vs. unchecked, using
and defining, try-catch-finally blocks,
using try-with-resources (Java 7).
System.exit , finalizers, and shutdown hooks. Jar files (and sealed packages). Basic security (including public-key encryption) and code-signing (using keytool and jarsigner). Project #1 (IDE) due 1/26 |
Chapters 12.1-12.9 (Exceptions),
Liang online Java supplements: III-N (jars),
Eclipse Git User Guide - GitHub Tutorial,
Eclipse Git User Guide - Starting from Existing Git Repositories,
Git Tutorial for NetBeans
Additional Links online VCS and Git resources, online Exception demos, online code signing demos and learning resources, Jar tool and manifest file lecture notes |
2/2 2/4
2/9 2/11 |
System properties.
Boxing and unboxing.
Interfaces.
Initialization blocks.
static import .
Clone method, copy constructors, and
advanced object construction techniques.
Enums.
Annotations.
Covariant return types.
Varargs.
Reflection.
Project #2 (Git) due 2/9 |
Chapters 13.5-13.8 (interfaces), Appendix I (enums),
Liang online Java supplements: III-I (initialization blocks),
Oracle Java tutorials for: “Initializing Fields” (including static
initialization blocks), “Using Package Members” (including static
import),“Enum Types”, “Annotations”,
“The Numbers Classes” (for boxing/unboxing), and
“Passing Information to a Method or a Constructor” (varargs);
covariant return types tutorial
)PDF),
Oracle's Reflection tutorial
Additional Links online Exception demos, online properties, boxing, enum, initialization blocks, annotations, covariant, and reflection resources |
2/16 | Exam #1 via Canvas — Covers from .class files through Jar files | |
2/16 2/18
2/23 2/25 |
Persistent storage, CRUD
operations and applications.
Choosing file formats (or data management system): text,
XML, JSON, binary, etc).
Designing file (and message) formats, including magic strings, version
numbers, encoding, and other factors. Files and I/O ( java.io , java.nio ),
JFileChooser .
Object serialization.
Database access using JDBC
(SQL) and
using JPA.
Using the Preferences (java.util.prefs )
API.
Project #3 (Search Engine part 1: Workflow Setup, System Architecture, UI) due 2/23 |
Chapters 12.10–12.13 (text I/O), 17 (binary I/O),
Database Concepts
(PDF)
Additional Links Liang online supplements V-C and V-D (XML), Oracle Java Tutorial for I/O, online file and I/O resources, online XML and JSON resources, Liang online supplements IV-E, IV-H (databases), online database resources |
3/2 3/4 |
Java Collections: arrays (review), types/interfaces (List, Set, Map),
common implementations (Linked List, Hash, Tree).
Creating proper equals , hashCode , and
compareTo methods (used by collections).
java.util.Collections utility methods.
|
Chapter 11.11 - 11.12 (ArrayList),
IBM Developerworks Java Collections tutorial
Additional Links Oracle Java Collections tutorial, online Collections resources |
3/9 3/11 |
Generics.
Aggregate operations (Java 8 streams); using Optional to
handle null values.
The garbage collector and Java memory model,
weak/soft references, WeakHashMaps.
|
generics.pdf
(tutorial from Joshua Bloch's Effective Java),
Aggregate Operations - The Java Tutorial,
Reference types tutorial (skip Reference Queues and
Phantom References)
Additional Links online Generics and Streams resources, and online memory, garbage collection, and Reference resources |
3/15 – 3/21 | Mid-Term Break — HCC closed | |
3/23 3/25
3/30
|
Testing software.
Using JUnit testing framework.
Using Java assertions.
Logging for Java.
Project #4 (Search Engine part 2: Persistence) due 3/25 |
Liang online supplements III-R (Junit), III-M
(assertions), III-X (logging),
(Short) JUnit tutorial,
Java logging tutorial,
Additional Links online testing resources, logging demos |
4/1 | Exam #2 via Canvas — Covers from security through set operations (in Collections) | |
Fri – Sun
4/2 – 4/4 | Spring Day Weekend — HCC closed | |
4/1
4/6
|
Encoding (Unicode, UTF-8,
ISO 8859-1).
Secure, safe coding practices (normalization, sanitation, and
validation of data crossing trust boundaries).
Internationalization (I18N), Localization (L10N),
Locales, java.text.* , resource bundles, property files.
Project #5 (Search Engine part 3: Collections) due 4/6 |
Internationalization
tutorial from Oracle
Additional Links online I18N resources |
4/8
4/13 4/15
4/20
|
Object-oriented analysis and design.
Modules, micro-services, and API design (including RESTful
APIs).
Introduction to design patterns.
Model-View-Controller (MVC) and other design patterns.
Enterprise applications and data centers (Docker containers, clouds, etc.).
UML.
Code reviews.
Project #6 (Unit Testing) due 4/20 |
Chapter 10 (Thinking in Objects), Pages 325-326, 329, 334-335,
376-377 (UML diagrams),
Liang online supplements III-N (Design Patterns)
and III-X (UML),
CRC Cards,
UML Tutorial
Additional Links online design resources, online code review resources, online UML resources |
4/22
4/27 4/29
|
Multi-threading concepts and issues: object locks, synchronized
blocks.
Legacy primitives: wait , notify ,
notifyAll .
Map-Reduce, Fork-Join, and other newer Java concurrency features.
Timer classes.
Project #7 (RFP) due 4/29 |
Oracle's Concurrency Tutorial (especially “High Level Concurrency
Objects”)
Additional Links online Multi-threading resources (which include several much more readable tutorials) |
5/4 5/6 |
Time permitting:
Service monitoring and management.
Incident response.
Management and monitoring of applications and the JVM.
Java EE web applications (overview) and WAR files. | Monitoring using Jconsole (Oracle.com), monitoring demos, online Java EE resources, online ITSM, monitoring, and incident response resources |
5/7 (Friday!) |
Final Exam via Canvas
— Covers from ??? through ???
Project #8 (Mini-Golf: requirements and design) due 5/7 |
Resources | |||||
Bytecode Demo | Bytecode Demo using javap | Pack.java | Demo of bitwise operators | ||
GraalVM Demo | GraalVM Demo of creating a native executable | ||||
Java Setup | Instructions for re-creating the Java setup of our classroom, including the install of NetBeans, Eclipse, JDK, Ant, Maven, JUnit, Derby database, and other tools | OpenMeetings | Apache project, used to facilitate group communications (when working on group projects, for example) | ||
Windows free hex editor Neo | A good hex editor, useful for examining class and other non-text files (Another good one is Cygnus Hex Editor) | Groovy | A Java-like scripting language for the JVM | ||
Dealing with Poisonous People | An interesting read about working on open-source projects, but much of the advice applies to any software team | Dinosaur Brains: Dealing with All THOSE Impossible People at Work | A good book (See also Dealing with difficult team members and 20 Ways to Deal with Difficult Co-Workers) | ||
Soft Skills | A discussion of certifications, job interviewing tips, and required “soft skills” | Working with Difficult People | A good tutorial, from www.webucator.com | ||
Apache Maven Home | Information and downloads about the Maven project management and build tool | Maven books online | Free books from Sonatype.com (See especially Maven by Example to start learning Maven) | ||
Maven Demos | A typescript of using Maven, sample POM files, and more | Maven Central Repository | The standard maven repository at Maven.org (See also MvnRepository.com) | ||
Gradle Demo | A typescript of using Gradle | ||||
Software Engineering Code of Ethics | ACM code of ethics and professional conduct (See also the IEEE code of conduct and code of ethics) | Online Ethics Center | Information and case studies | ||
SCU Markkula Center | Santa Clara University Markkula Center for Applied Ethics | Using the ACM Code of Ethics | Some case studies (See also the original version of this article downloaded from dl.acm.org) | ||
The code I’m still ashamed of by Bill Sourour | Story of what happens when you violate professional ethics | Oasis Open Standards | Certifies some standards as open (Other sources of open standards include RFCs, ANSI, and ISO) | ||
Open Source Licenses | A comparison, listing, and description of most licenses from Open Source Initiative See also ChooseALicense.com and tldrlegal.com, for “at-a-glance” license info | GNU/FSF Open Source License Comparison | A comparison of many licenses to the GNU GPL, including the CDDL used by OpenSolaris | ||
Articles on open source licenses from ACM Queue Magazine | From the May 2004 Issue: There's No Such Thing as a Free (Software) Lunch, Is Open Source Right for You?, and Open Source to the Core | www.openhub.net | FLOSS project evaluation; shows codebase statistics, number of contributors, reviews, and other information you can use to compare and evaluate projects (formerly, www.ohloh.net) | ||
FLOSS Chart 1 | Compares licenses from free as in beer viewpoint. | FLOSS Chart 2 | Compares licenses from free as in freedom viewpoint. | ||
A Concise Introduction to Free and Open Source Software | An overview and history | fairuse.stanford.edu | A good resource for copyright and licensing issues (For example, this Copyright Overview and FAQ) | ||
Five Things Every Software Developer Should Know About Intellectual Property | A short overview | Copyright quiz | Informative and fun, and includes the answers | ||
User Guide to EULAs | A consumer guide from the EFF (See also this EULA cautionary video) | Copyright Crash Course | An overview of copyright and licensing | ||
Git home | The Git version control system | GitHub.com | Easy to use public (or private) Git repository (See also GitHub for Windows) | ||
“Pro Git” book | Good, through book on Git (free online read) | GitHub Guides | Several good tutorials for using GitHub | ||
Sample Git repo visualization and log | A demo showing a small repo that had two branches (which were merged) | Git for beginners: The definitive practical guide | A nice collection of how-to information from StackOverflow.com | ||
Learning Git | An interactive website that visually teaches Git | Git commands visualized | Nice animations of many Git commands | ||
Sample global .gitconfig | A sample configuration with several extras shown | Interactive Git Rebase | A step-by step demo showing interactive rebasing, squashing, and merging | ||
Git From the Bottom Up | A short, readable introduction to Git concepts (See also the Git tutorial man page) | Everyday Git with 20 Commands or so | Brief explanations and examples of the most used Git commands | ||
Git for ages 4 and up | Excellent YouTube video that makes Git make sense (See also the Git Overview YouTube videos (four of them, teaching VCS concepts with Git) | GitHub Overview | More YouTube videos for GitHub and Git basics (See also this highly recommended YouTube video series for Git and GitHub) | ||
Pull Requests and Patches | A tutorial explaining use of pull requests and patches | Branching Patterns | Explaining use of different Git workflows (ways to use branches) | ||
Eclipse Git (“EGit”) User Guide | See also this Git tutorial for Eclipse YouTube video | GitRef.org | A tutorial-style reference (See also Git manual page with many links) | ||
Git Tutorial for NetBeans | All you need to know (if you already know Git) | Subversion home | Subversion version control system | ||
Mercurial Tutorial | A tutorial on Mercurial, and for DVCSs in general | CVS home | See also CVS Tutorial for NetBeans | ||
ExceptionDemo.java | Demo of catching and throwing exceptions (See also ExceptionDemo2.java) | TryWithResources.java | Demo of using Java7 automatic resource management (try-with-resources) | ||
ShutdownHookDemo.java | Demo of using shutdown hooks | Finalizer.java | Demo of Finalizers | ||
WebStart Demo | Demo of using WebStart (JNLP) for a file viewer app | JNLP Developer Resources | WebStart and JNLP docs, including API examples, FAQ, and other information | ||
Code Signing Demo | Demo and tutorial of Applet code signing | Security tutorial | Tutorial on security and public-key encryption, from Netscape.com's DevEdge site (from the Internet Archive) | ||
OWASP ESAPI | Security framework for web-based enterprise applications (including for Java EE) | OWASP CSRFguard | A popular Java library to help prevent CSRF attacks in web-based applications | ||
Professional Certificate in Secure Software Development Fundamentals | Provided by the Linux Foundation and EdX.org, a set of three excellent courses (Free if you don't want a certificate at the end) | SafeCode.org | Older but free video training for secure coding | ||
BoxUnbox.java | Demo of Java 5 auto-boxing | IfaceDemo | Interface demo (shows default method use) | ||
ShowProps.java | Lists Java system properties and their values | InitBlockDemo.java | Initialization block demo (See also InitTraceDemo.java) | ||
Student.java | Demo of the telescoping constructors pattern | StudentPQ.java | Slightly more complete (“production quality”) example of Student.java | ||
StudentBuilderDemo.java | Demo of the builder pattern to replace complex constructors | CoinPurse.java | Demo of enums | ||
Enum in Java 5 | Tutorial on Java 5 enums | MetadataDemo.java | Java 5 Annotations demo | ||
Checker Framework | Univ. of Washington fromework using annotations to support extra checking; endorsed by Oracle | ||||
VarArgs.java | Simple varargs Demo | Annotations | Java 5 Annotations lecture notes | ||
CloneDemo.java | Shows how to implement clone, using covariant return types | ReflectionDemo.java | Simple Reflection Demo | ||
Java Tutorial for I/O | Official Oracle Java tutorial, including old (streams) and NIO (including Java 7 NIO.2) | FileKit.java | Shows how to calculate the MD5 checksum of a file | ||
Greet2.java | Shows non-GUI input with Scanner | FileDemo.java | Shows reading, writing files with encodings (Download UTF-8-demo.txt for FileDemo.java) | ||
DirList.java | Prints a directory listing | CharsetDemo.java | Shows default and available text encodings ("charsets") | ||
Person.java | A short demo to open, read, parse a file of data, and create a List of objects | People.txt | A (very) short text file to use with Person.java | ||
RandomAccessDemo.java | A short demo to open, read, and write to an ASCII text data file | RandomAccess.dat | A (very) short text file to use with RandomAccessDemo.java | ||
DeepCopy.java | A short demo of serialization, used to make deep copies of arrays and other objects | NIO Tutorial (PDF) | from IBM DeveloperWorks | ||
NioDemo.java | Uses java.nio classes to copy a file |
Tutorial for Java NIO (PDF) | A shorter (but slightly more readable) version of the
IBM tutorial on using java.nio |
||
MemMapDemo.java | Uses java.nio memory-mapped I/O
(use with the sample file MemMapData.txt) |
Tutorial for NIO.2 | Short NIO.2 tutorial (with example code) from IBM DeveloperWorks | ||
JfileChooserDemo | Shows a GUI file chooser dialog | ParseCSV.java | Shows how to read, parse, and process a CSV file
(Download data.csv ) |
||
XML and JSON Lecture Notes (PDF) | A copy of my lecture notes (See also these XML sample files and demos) | XML Tutorial | An excellent “hands-on” tutorial, from w3schools.com | ||
UseDOM.java | XML Demo of DOM API | HelloXML.java | XML Demo of SAX2 API | ||
DOMDemo.java | Demo of XML DOM parsing | JAXB XML Demo | Demo of XML marshalling (object to XML) using JAXB | ||
XML-XSL-Demo | XSL (XML Style Sheets) Demo | YAML.org/start | Sample YAML file (See www.yaml.org for links to the specification and for downloads) | ||
TOML | Tom's Obvious Minimal Language, a popular alternative to YAML | ||||
json.org | JSON documentation and references (See also RFC 4627) | Sample JSON text | Found on Adobe Labs GitHub site | ||
GsonDemo.java | Demo of using Google's FOSS JSON library (Requires the gson-<latest-version>.jar file to be put into your extensions directory; click the “jar” link) | Gson Home | Google's JSON library home (See also the Gson User Guide. You can also download the Gson API docs (click the “javadoc.jar” link) and extract the docs locally for reference) | ||
org.json Library | A simple JSON library for Java; download the latest version by clicking the link “jar” (and optionally the API docs “javadoc.jar”) | JSONdemo.java | Demo of using org.json library
(Requires the json-<version>.jar file
to be found on CLASSPATH) |
||
JacksonDemo.java | Demo of using the popular JSON library (Requires four Jar files (it's modular): jackson-core, jackson-annoations, jackson-databind, and jackson-jsr310) | Jackson Home | FasterXML JSON library home | ||
Avro Demo | Demo of Apache Avro binary file processing (The zip file contains the all files, including the four Jar files needed) | Avro Getting Started Guide | The two Jackson JSON Jar files can be downloaded from Maven Central repos (You need jackson-core and Data Mapper for Jackson (Jackson home is at GitHub.com/FasterXML/jackson) | ||
Database Lecture Notes (PDF) | A brief overview of database concepts, and how to use databases in Java | Databases for System Administrators | Similar to the lecture notes, but with information appropriate for system administrators. (It does include a worked example of normalization) | ||
Introduction to Apache Derby | Tutorial from IBM DeveloperWorks, showing how to use the database from a Java EE server | ||||
Coffee Database | Directions to create an ODBC Text database on Windows (Note that ODBC is not supported as of Java 8.) | SquirrelSQL.org | A (free) GUI Java database client, to work with (nearly) any type of database | ||
DBDump.java | Simple JDBC demo, displays a table from a database | Grades.java | MultiThreaded Swing GUI and JDBC Demo | ||
JPADemo | Simple Java SE application, showing JPA (with EclipseLink) to create and use a JavaDB (Apache Derby) embedded database. | Derby Docs | Tutorials and reference for Apache Derby | ||
DerbyDemo.java | Fancy JDBC demo of the embedded Derby database | PrefsDemo.java | Shows the Java Preferences API | ||
Collections Tutorial from IBM Developerworks | Short tutorial on using Collections (copy on archive.org) | Oracle Java Collections Tutorial | A more through tutorial on Collections | ||
Collections tutorial | Another Collections Tutorial from IBM DeveloperWorks | Oracle Guide to Java Collections | Additional Java Collection resources | ||
CollectionsDemo.java | Demo of using various Java collections | CollectionSortingDemo.java | Demo of using Java 8 features to sort a List | ||
Point.java | Simple class to demonstrate proper equals, hashCode, toString, and compareTo methods | HashCodes | Steps to create your own hashCode methods |
||
Destutter.java | Demo List and some java.util.Arrays methods, to remove adjacent duplicates | NestedMap.java | Demo using complex data structures (nested collections) and also a generic class | ||
generics.pdf | Excellent tutorial on using Generics from Joshua Bloch's Effective Java | Generics tutorial | Generics Tutorial from IBM DeveloperWorks (See also Generics Without Pain) | ||
Generics Tutorial from Oracle | Tutorial and complete reference to using Generics (See also this older but somewhat simpler Sun Generics Tutorial from Oracle) | GenericDemo.java | Demo of a generic method | ||
StreamDemo.java | Demo of using Java 8 Streams (aggregate operations) | DestutterStream.java | Demo using streams to remove adjacent duplicates | ||
FibonacciStream.java | Demo of using Java 8 Streams (See also Fibonacci.java) | ||||
RAM layout | Shows how primitives and objects are referenced | java.lang.ref Package Description | Java 23 API docs for Reference objects | ||
Java Reference Objects | A short but through tutorial on Java's memory model, garbage collection,
and References (especially SoftReference and WeakReference ) |
RefDemo.java | Simple demo of using WeakReferences | ||
Modern Microprocessors | A relatively short and easily read article by Jason Robert Carey Patterson, written in 2001 but updated in 2016, it provides an excellent overview of modern hardware (including memory). | Understanding the Processor | Chapter 7 of the book Rust Atomics and Locks: Low-Level Concurrency in Practice, by Mara Bos, and published in 2023 by O'Reilly. (The book is about the Rust programming language but his chapter is about the hardware and not so much about any particular programming language. | ||
What every programmer should know about memory, Part 1 | Written in 2007 by Ulrich Drepper, maybe 95% still applies today (2023). | What every programmer should know about memory, Part 2 | Part 2 is all about how caching works | ||
GenericRefDemo.java | Demo of a generic Cache class that uses SoftReferences, and a demo of WeakHashMaps | ReferenceDemo.java | Example of weak and soft reference use | ||
Java Garbage Collection references | Discusses the various GC algorithms used with the HotSpot JVM and how to select one, and tune it for performance (See especially the Memory Management Whitepaper (PDF)) | Java (HotSpot JVM) non-standard option reference | Describes some (possibly no longer supported) non-standard options, useful to improve performance (of the garbage collector for example) | ||
Testing Overview | Lecture Notes on Testing, also logging, tracing, and application management | Test Case Self-Assessment | Attempt to generate sufficient test cases for a simple program | ||
ACTS | Automated Combinatorial Testing for Software (ACTS) tool from NIST.gov (See also this short combinatorial testing example and tutorial) | JUnit 4 Testing Demo | Demonstrates using JUnit for the sample program (“Triangles”) from the Test Case Self-Assessment (See also Natural Order Comparator for another example, that shows coverage too) | ||
PICT | Microsoft's ancient but good command line test generator tool, version 3.3 (MSI installer; includes a user guide) | A list of pairwise tools | A list of popular test generation tools; the site also has tutorials and other resources (See also the older list at PairWise.org) | ||
JUnit.org | Junit Testing | JUnit 4 API Java docs | Online JavaDocs for JUnit 4 API | ||
www.vogella.com JUnit 4 Tutorial | A pretty good JUnit 4 Tutorial | JUnit FAQ | Almost a complete tutorial for JUnit 4 | ||
TextKitTestSuite.java | JUnit Testing Example for TextKit.java class | Java Code Checker | PMD can report (likely) logic errors in your code (See also SpotBugs for a similar tool) | ||
Mockito.org | Mockito is a library that allows you to easily create mock Java objects for testing | BankAccount.java | Demo using assertions for pre-, post-conditions, invariants | ||
SQLite Testing | Real-world product testing information | Testing horror story | A blog post from an Oracle developer, giving a fascinating look at the daily life of a developer as they try to update and test really old code. | ||
Programming With Assertions | Java tutorial for using assertions | Assertion Usage Notes | Examples of appropriate and inappropriate use of assertions | ||
AssertionDemo.java | Trivial example of assertion use | Sample Trace Output | The trace output of running the date program on Linux |
||
Debug Strategy | Excellent advice from Patricia Shanahan on debugging | Code Coverage Tools | Various tools to show how much of your code was covered during unit tests | ||
Arquillian | Java EE testing tool | Marathon | A test tool for swing GUIs | ||
TDD with Java | Some info on test-driven development in Java with |
TDD walk-through for realistic Java task | Using TDD to design and implement Java code that can parse the query-string part of a URL | ||
Selenium | A tool to automate web browsers via scripts (useful for testing web based applications); get the Selenium Firefox add-on from addons.mozilla.org | CodeHunt.com | A game designed to teach using testing results to design code (source: GitHub.com/Microsoft/Code-Hunt) | ||
Software Tester Walks into a Bar | An old joke, but still funny | ||||
LoggingDemo.java | Short demo showing Java SE logging API (See also Oracle's Java logging tutorial, and Another logging tutorial) | Apache logging home | Download or read about log4j, logging in general, and the GUI log viewer chainsaw | ||
SLF4J.org | Simple logging facade for Java home (See also the Maven Central SLF4J download site) | Logging and Metrics Demo | A Maven project showing how to use SLF4J for logging to the console, and collecting metrics using metrics.dropwizard.io (also reporting to the console). | ||
I18N (Internationalization Tutorial from Sun) | Tutorial on using I18N, Locales, and Resource Bundles | ISO-216 international paper sizes | A clear explanation of A4 and other international standard paper sizes | ||
Java internationalization basics | A readable tutorial on I18N and L10N, from IBM DeveloperWorks | Locales and I18N | Some notes about using Locales and internationalizing programs | ||
ISO-639 | English (and French) language names, and the standard 2 and 3 letter codes | ISO-3166 Country Codes | The official list of two and three letter country codes, used in locales | ||
The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets | Readable post on JoelOnSoftware.com | Natural Order Comparator | A demo project (complete with API documentation, unit tests, Git repo log, and code coverage metrics) for a natural sort order comparator | ||
Encodings and Character Sets | More information then you want to know about Unicode, encodings, etc. | Font concepts | Explains Font terms and concepts as used in Java | ||
Markdown | A style of text that can be easily converted to attractive HTML | Markdown Cheatsheet - GitHub (PDF) | A quick reference for Markdown, with GitHub's extensions included (From guides.GitHub.com) | ||
CodePointDemo.java | Shows how to work with I18N Strings | ShowFonts.java | Show all local fonts, list font families | ||
IGreet.java | Uses Locales, ListRecourceBundles for I18N | Stocks.java | An Internationalized Applet | ||
Version.java | Displays the JVM version in your browser | Unicode symbols | Applet showing Unicode font listings, plus a few symbols | ||
BreakIterDemo.java | Demo showing Unicode String processing, one character at a time | Palindrome2.java | Another demo showing Unicode String processing; this demo shows Unicode normalization, String sanitation, and using BreakIterator and Collator to compare Unicode characters | ||
SafeInput.java | A Simple JavaFX form showing how to normalize, sanitize, and validate Unicode text | ||||
Regular Expressions for Regular Folk | A nice tutorial for beginners | ||||
Top 25 Errors | A list of common security-related coding errors, from SANS.org and CWE.Mitre.org, a large list of weaknesses in software and hardware (See also CERT Secure Coding Standards for Java and other languages) | ISO 27000 (Wikipedia) | The ISO/IEC 27000-series (also known as “ISO27k” for short) comprises information security standards (Some of these standards are freely available here) | ||
SEI Software Development | Information from the Software Engineering Institute (See also their software Architecture and their certification information) | IEEE Computer Society Software Professional Certification | Information about the software professional certifications | ||
Software Engineering (Wikipedia) | This article discusses certifications and legal requirements | SWEBOK | The Software Engineering Body Of Knowledge defines what every software engineer should know (design, testing, and similar topics) | ||
Professional Software Engineering Exam information (PDF) | The NCEES (the National Council of Examiners for Engineering and Surveying) will start exams in 4/2013 for software engineers; some states will require practitioners to hold this license (10 so far) (Software PE exam study materials are available from the IEEE) | ISO 9000 (Wikipedia) | This standard refers to the process of creating software (certified compliance is required for software sold in the European Union) (For project management the most widely recognized certification is Project Management Professional (PMP)) | ||
ISO 12207 (Wikipedia) | A popular ISO standard for software lifecycle processes | IEEE computer society software professional certifications | Based on the SEBOK, these IEEE certifications are currently the best way to prove your competency | ||
Bad design and its consequences | Story about Toyota's killer firmware (See also ComputingCases.org for other case studies) | Therac-25 | The story of the deadly design flaws in hospital radiation equipment | ||
Xerox Workcenter copiers change numbers | Story about Xerox copier bug that changes data in the copies | Internet IP Geomapping design flaw | The story of a design flaw that associates millions of IP addresses with incorrect addresses | ||
Project Proposal for a voice mail system | A project proposal | Object Categories | A guide to finding objects | ||
Use Case Tutorial | An overview of creating use cases (See also this ACM Queue article on Use Case 2.0) | SRS template and sample | A template for requirements docs, designed by the IEEE, with no graphics (downloaded from www.cs.gmu.edu) | ||
Sample GUI Use Cases | Some sample use case diagrams for requirements of a simple phone system | Narrative Use Case Example | Sample text (non-GUI) use case diagram for design of an ATM (cash machine) system | ||
Sample Requirements Documentation | A sample software requirements specification (SRS document; download from AlvinAlexander.com) | Sample Requirements Documentation (2) | A sample software requirements specification (SRS document (download from www.student.cs.uwaterloo.ca) | ||
Painless Functional Specifications | A readable four-part tutorial on why and how to create SRS (functional specifications), from Joel on Software | ||||
CRC Cards | The original paper describing the CRC design method. (Another example.) | OOD Guide | OOA and OOD study guide (lecture notes) | ||
Code review guidelines | Good overview, from www.codeproject.com | Four Ways to a Practical Code Review | Describes the process of code reviews | ||
Security code reviews | A free online book (PDF) from owasp.org | Java Code Review Checklist | An article from java.dzone.com | ||
Code review example | A part of a real code review | Peer Code Review Tips | Some great tips from IBM Developerworks | ||
Formal code review | A YouTube video showing a part of a formal, face-to-face code review | ||||
ChecklStyle | An open source tool that checks Java code for style violations (An IDE plug-in is available as well) | Code Review Checklist for Java (PDF) | A good starting point | ||
NASA Software Safety Guidebook (PDF) | Software Engineering best practices for safety critical systems | Secure Coding Guidelines for Java | Best security coding practices from Oracle (See also The CERT Oracle Secure Coding Standard for Java, from CERT's SecureCoding site) | ||
Synopses of Design Patterns | A brief description of many Java patterns | Design Patterns | Tutorials, FAQs, and more | ||
Software Architecture Guide | An overview of the system architecture (high-level) design | Common Software Architectural Patterns | A short (and readable) list of common patterns, with the pros and cons (and examples) of each | ||
ootips.org | A large collection of OO tips, techniques, and design patterns | Java Design Patterns 101 | A tutorial on common design patterns from IBM Developerworks | ||
Spring framework | A popular family of application frameworks (See also this Spring framework tutorial) | Design Pattern List | A list of Java design patterns, with links to explanations and examples, and to some good books (alt link) | ||
AlertDemo.java | A demo of the State pattern | ||||
javax.inject | The Java EE javax.inject package, which
provides a good description and comparison of the factory pattern and
the dependency injection pattern |
Dependency Injection | Another good description of dependency injection (DI), from the Guice DI framework | ||
DI Demo (zip) | A demo of dependency injection for Java SE, using the Weld DI framework | Manual DI Demo | A Maven project using JUnit to manually perform DI, which hopefully will clearly illustrat the techniques (propery, setter, and constructor injection) | ||
How not to Design a Program | A humorous look at over-engineering how to compute factorials (See also How To Write Unmaintainable Code; Ensure a job for life - PDF) | How to Design a Program | An over your shoulder look at thinking about design | ||
How to Design a Good, Regular API | Advice and examples of API design (See also this funny YouTube video on bad RESTful design) | API design - Microsoft Azure | Describes RESTful design (See also Designing, building, and operating microservices on Azure, A Beginner's Tutorial for Understanding RESTful API, and REST CookBook) | ||
UML.org | Many UML resources | IBM Developerworks UMLtutorial | A good tutorial from IBM | ||
UML Quick Reference (PDF) | An excellent reference card showing one each of everything | UML Reference (PDF) | A more complete UML reference | ||
UML Resource Center - IBM | UML tutorial (See also these UML tutorials from IBM/Rational) | Sample UML class diagram | UML class diagram of a simple Banking Simulation | ||
Violet UML Editor | Originally written by Cay Horstman, this free Java application (a runnable jar file) is a simple but useful UML diagram editor | ArgoUML | Free UML diagramming tool that can produce code from the diagrams. (Not well maintained, but there is an Eclipse plug-in for it.) A similar tool is nClass | ||
Dia | Free diagramming tool (for UML and a lot more) | StarUML | The best UML modeler and diagramming tool I've found so far, but it isn't free | ||
Multi-Threading Lecture Notes (PDF) | A discussion of the concepts and issues of using Threads | Java Concurrency / Multithreading Tutorial | A terse but good tutorial, includes Java 7 additions | ||
Oracle Tutorial on Concurrency | Discusses multi-threading features of Java | Java Concurrency Tutorial - jenkov.com | A through tutorial, good overview sections for beginners (but covers up to Java 6 features only) | ||
Concurrency Concepts | A short tutorial on the basic concepts, from walivi.wordpress.com | JavaWord Concurrency Tutorial Series | A multi-part tutorial covering the Java 5 and newer techniques and APIs, with links to tutorials for the older material (See also this other good JavaWorld multithreading tutorial) | ||
Multithreading in Java | An good tutorial from JavaTPoint.com, but covers up to Java 6 only | ThreadLocal.java | Demo of ThreadLocal variables | ||
DiningPhilosophers | Sun's DeadLock Thread Demo | Sort algorithm race | Sun's Multi-thread Sorting Demo | ||
PServer1.java | Pseudocode of a Print Server | PServer2.java | Improved pseudocode of a Print Server | ||
Oops.java | Demo of pausing inside of an event handler (and why it's not a good idea) | Threads.java | Mutli-threaded Demo showing suspend, resume, and stop | ||
HoopsApp.java | Simple Animation using a Thread | Ssjava1.java | Swing animation, uses Timer |
||
TimerRes.java | Program to measure your system's timer resolution (granularity) (This changes depending on what else is running; see these sample timing results) | ||||
Bank.java | Demo of (un)synchronized threads
(Download runnable jar file) |
TimerDemo.java | Demo of java.util.Timer class | ||
Java Monitoring tutorial | See also Java Management and Monitoring resources | Management and Monitoring Demo | Shows how to run a managed application and how to monitor it. (See also docs for jconsole and VisualVM tools) See also this tutorial on using VisualVM | ||
An Overview of ITSM (PDF) | A good 84-page technical overview of ITIL 2011 (version 3), obtained from www.tsoshop.co.uk | Incident Response sample how-to (PDF) | The actual plan used by Oklahoma's Office of State Finance Information Services | ||
Ant.Apache.org | Home of the Apache Ant build tool | Apache Ant manual | Includes both a reference and tutorials | ||
build.xml | A sample Ant build.xml file for a “hello, world” application | Apache Ant | from WikiBooks.org. See also this Ant Overview (PDF), an excerpt from “Beginning POJOs” by Brian Sam-Bodden, Apress.com | ||
Excerpts from Java Programming with Ant | Includes tutorial chapter and an Ant task reference | Ant Best Practices | 15 good tips, from O'Reilly (See also Make Ant easy with Eclipse, from IBM DeveloperWorks) | ||
myServlet.war | Example WAR (Web application ARchive) with a Servlet | Java EE Home | Sun Java EE site | ||
Java EE Overview | Draft lecture notes | Hello, World RMI demo | Simple, basic RMI demo from Sun | ||
JNDI Tutorial | Sun's JNDI online tutorial | Mastering Enterprise JavaBeans, 3rd Ed. | A great EJB book, for free as a PDF download | ||
Designing Java EE Applications | A Sun Blueprint Article | Java EE Tutorial | A Sun Java EE Tutorial | ||
Java EE Technology Center | Oracle Java EE developer resources | ||||
TheServerSide.com | A Java EE site with many tutorials | Java EE Architect's Handbook | A pretty good Java EE book, available for free from here | ||
Wildfly Home | Red Hat's Java EE Application Server, renamed from JBoss for the Java EE 7 version (The older Java EE 6 version can be found at JBoss.org) | WebSphere | IBM's Java EE application server | ||
Tomcat Setup | Apache's Tomcat web application server install help for Windows (See also the popular Jetty web application server) | Credit Card Processing | A brief overview of e-commerce payment processing | ||
CopyTest.java | Shows Graphic contexts are copies | HeavyLight.java | Shows difference of Heavy and Light weight components | ||
Logo2D | Java2D Graphics Demo | Jade.java | Fancy Text Rendering | ||
Smile2.java | Multimedia (with sound) applet | Smile.java | Display graphics, bundled in a runnable Jar | ||
Printing Demos | Several examples of Java printing | ||||
AWT - Swing Demo.java | Simple Swing demo, compares with AWT version | IntCalc.java | Interest Calculator with Swing “PLAF” demo | ||
SwingDemo1.java | Simple Swing demo | LblDemo.java | Swing JLabel demo | ||
MultiLineDemo.java | Shows how to draw text with styles | ||||
Ssjava2.java | Swing animation, uses JLayerPane |
developer.mozilla.org | The MDN is best source of information and tutorials on web-based technology (HTML, CSS, JavaScript, etc.) | ||
JTableDemo.java | Simple JTable Demo | ClipEx.java | Demo of copy/paste clipboard access | ||
SimpleBean.java | A Simple JavaBean Tutorial | Marquee | Marquee Java Bean | ||
SBean.java | Simple Java Bean with BeanInfo, runnable jar | Download the BeanBuilder | A GUI Bean Development Kit (This project is no longer supported) | ||
JavaBeans home page | Read the Specifications and find other related resources | Download the BDK | The Bean Development Kit (platform independent version from Sun) is interesting but obsolete | ||
JavaME step by step (PDF) | Tutorial on JavaME (Java Micro Edition) | ||||
ChatServer | Chat room Server | JavaScriptDemo.java | A JavaScript expression evaluator | ||
Java Security | Tutorial on Java Security from Oracle | WriteFile.java | A signed Applet to create a file on the local system | ||
Model Solutions to Assigned Projects | |||||
---|---|---|---|---|---|
Logo2D | Java2D Graphics Demo | Office Hours Project | Model Solution to Office Hours project #1 |