Programming Fundamentals in Java

Welcome Aboard

Welcome to the online modules used in the Programming Concepts offering taught in the BS in Information Technology Program from the Department of Computer Science & Engineering at the University of South Florida.

If you reached this site from the course's Canvas page at USF, you will find that a lot of the material in this First Module page is already in Canvas so, you may jump directly to the Your 1st Week tab.

Otherwise, if you just browsing this website, then get started by watching the following videos;

  • Welcome Aboard - Course Canvas site overview
  • File Link: YouTube
  • This video shows you the layout of our course's Canvas site and lists the various tools & resources we will be using this semester.
  • Welcome Aboard - First Week Module
  • File Link: YouTube
  • This video details the tasks that you will have to complete during your first week of class as part of your "First Week Module".
  • Welcome Aboard - Working on a Typical Module
  • File Link: YouTube
  • This video shows you what the learning modules we are going to use this semester look like. We use an early module, 101, and a module from the 2nd half of the course in order to show you what it will look like when we are using almost all of our tools in a single module.

This course is intended for students with no previous programming experience. It will guide you through learning how to design computational solutions to elementary problems. It will also allow you to learn how to implement such solutions in a programming language and make sure they fullfil the requirements.

In this version of the course, we will start with a very visual programming language that has been developed to ease novice programmers into the fundamentals. We will then introduce you to the widely used Java programming language.

Our goals - Learning Outcomes

In this course, you will learn how to program computers. Sometimes, students, professionals or even instructors tend to view programming as one single skill. You either know how to program completely, or you do not. The problem with this perspective is that it makes it difficult to teach programming, reflect about to improve how we program, or even measure proficiency.

For this reason, we take a different approach in this course. We break down programming into a set of interdependent skills and show you how you need to use them when you write every single line of code. This iterative approach to programming encourages you to write small fragments of code at a time, ensure that they are getting you closer to your goals, and learn from errors at each step of the process. In this process, making mistakes is not a big deal; it is part of refining both your understanding of the requirements and the quality of your solution.

Here is the list of skills that, together, compose the "programming skill" you will develop this semester;

Tracing

We could refer to tracing as "code comprehension", "programming litteracy", or even ability to "read code". This skill is the easiest to acquire through sheer hard work and also the foundation of all other skills.

Implementing

If Tracing is the skill for reading code, then Implementing is the skill that allows you to write code. However, this skill does not require you to be able to come up with the idea of how the program you are writing is able to solve the problem. Instead, you will sometimes be provided a very detailed, step-by-step, description of what your program must do but expressed in plain English. Implementing it successfully means that you will be able to translate this plain English description of the solution into code written in a given programming language; e.g. Java.

Testing

Let us say that you just wrote a program, or were provided one by a colleague. How do you make sure that it is indeed performing as intended and fullfils your client requirements? This skill will allow you to constantly think about how to validate the code you write so as to help you detect any mistake or misinterpretation of the requirements you might have committed.

Debugging

If we use software tests to ensure of the correctness of our programs, this means that we expect the tests to often fail. This is not unusual at all; in fact, it is good as long as you understand why the tests failed, what is the mistake that led to this failure. Once you do, you will be able to change your perspective on how to solve the problem, try to rewrite that part of the program, and finally... you guessed it, test it again until your program behaves as expected.

Refactoring

So what happens when finally the code you wrote works as expected by the requirements and demonstrated by the tests?

Well... now you can take a break, savor your victory, then get back to work :). It is time to think hard about how you may improve the quality of your code, make it easier to understand, maybe faster to execute, document it... In this course, we will refer to such activities as refactoring. This represents the skill of being able to rewrite your code so as to improve it but without adding or removing any of the features you already implemented.

Designing

Last but not least, the last skill we will develop in this course is that of designing programs; i.e. define how they will solve a given problem. Once you have a design, it is relatively easy to implement it, test it, debug it until it work, then finally refactor it. As such, you might be thinking that designing is the hardest skill of the bunch. True enough, but this is also the most intellectually rewarding.

In this course, we will not measure your proficiency in the refactoring skill, leaving it up for later courses. However, we will still make sure to discuss it and get you some foundations in it. All other skills will be taught and your proficiency in them will be a part of your final letter grade for the entire course.

What topics are we going to study?

Since we identified a list of skills that are necessary to know how to program, it would be natural to think that our course will simply go through the list, spending a few weeks mastering each of the skills before to move on to the next one. However, this woud not work due to the fact that, even to write tiny programs correctly, we really need to leverage all of the above skills.

Therefore, we are going to divide our semester into several one week long modules that will each focus on some programming language tools. Inside each module, we will make sure that we cover all of the above listed skills as they relate to the new knowledge we are studying.

For example, Module [102] will focus on how to write code that is able to make decisions; i.e. IF-ELSE statements. As we study the syntax to write such code [Implementing][Tracing], we will also discuss common mistaked [Debugging], different ways to solve typical problems [Designing], and how to make sure our programs meet requirements [Testing].

Every week, on Monday at 11:55pm, a new Module will be released. We will have a total of 12 modules in this course, with exams in between.

If you look at the course structure from a higher level, you will also notice that we are going to cover the most elementary topics twice;

  • The first time, using the Raptor visual programming language. This will allow us to focus on the concepts without having to think too hard about details.
  • A second time, using the Java programming language so that you are able to transfer the concepts you have learned into a more realistic and industry-standard programming language

This will result in the first two parts of our course being composed of 3 modules each. In both parts, the modules will cover the following topics;

Part #1 - Introduction with Raptor
  • Data & Variables
  • Conditional Statements
  • Iterative Statements
Part #2 - Introduction with Java
  • Data & Variables
  • Conditional Statements
  • Iterative Statements
Part #3 - More Java

The last part of the course will then allow us to cover other topics typically studied in an introduction to programming, e.g. arrays, by using the Java programming language.

This redundancy in the introduction part will help us make sure that you have enough time to acquire the fundamentals and that you do so in a progressive manner; i.e. without complex syntaxes, then with a real programming language.

How will you learn and study in this course?

Now that you have an idea of what skills and topics we are going to study, let us discuss briefly about how we will do so. In each module, we are going to use the same set of learning activities;

Lecture Videos and Reading Assignments

These are where the learning will start but they most likely won’t teach you how to program. They will instead prepare you to learn that skill and teach you about programming. This is necessary but not sufficient to succeed in this offering.

The module forum is where you will be able to ask for help in studying this material. You will then be able to assess your understanding of this material via the graded quiz - GQ - available in each module.

Apprenticeship Exercises

You are here to learn the thinking process involved in programming. You need the teaching material to show you this process instead of just the solution. One is more likely to learn to build a house by watching the contractor at work rather than by only watching the house when it’s finished. The same "apprenticeship" learning is necessary for all crafts, programming is no exception.

Unlike the reading assignments, these videos expose how one thinks when programming and provide you with a model you might learn from using cognitive apprenticeship.

The module forum is where you will be able to ask for help in studying this material. You will then be able to assess your understanding of this material via the graded quiz - GQ - available in each module.

Practice Exercises

Learning about programming via lectures is the first step. Learning by watching someone else program is also useful. However, ultimately, you will never be able to program if you do not spend a lot of time programming every week in this offering.

To help us with this need for regular practice, we are going to use two different web applications.

  • Nick Parlante's JavaBat website will allows you to work on Java drill exercises & receive automated feedback as they are executed against a series of tests. The feedback allows you to refine your solution until you get it right.
  • Amruth Kumar's Problets Intelligent Tutoring System will allow you to practice specific aspects of Java syntax.

In addition to the above, which are very focused exercises, we will also use some of the textbook's exercises as practice. Please note that there will be no solutions provided for these exercises. However, the instructor is there to help you reach your own solutions to these. Make sure to use office hours and forums to get help finishing these as they are the next step in your practice to get you ready for exams.

You will also be able to ask for help regarding these exercises in the module forum.

Weekly Modules’ Forums

As an online learner, it is your responsibility to reach out and communicate with others. It is easy to just passively read the material but that will not provide the kind of learning you need to be ready for the exams. No one ever got a degree by watching the discovery channel, ever wondered why?

Make sure you use the forums to ask questions about anything you need help with; readings, videos, exercises...

  • If even slightly unsure that you understood something, post to explain what you think you understood and get the instructor to confirm.
  • If you see questions from other students, chime in! Explain what you think the response ought to be; the instructor will correct you if you are wrong or confirm that you are right. Everyone, almost, think they understand something until they have to apply it or explain it.
  • ...

For whom is this material suitable?

The material on this website has been used for an undergraduate, semester-long, introduction to programming at the University of South Florida. It is suitable to support either a face-to-face flipped classroom setting, or an online offering - whether it is synchronous or asynchronous.

While the material is also suitable for independent learners who want to use this website for self-study, it is worth mentioning that the learning activities were designed to be used with an instructor. Therefore, you will find that many practice activities are meant for students to ask questions to their instructor instead of simply working on them in isolation. If you are browsing this material without such support you might find it benefitial to work with others in order to make the best out of our practice assignments or discussion activities.

Enjoy your learning

You will find below a copy of the syllabus. An updated version of the syllabus will be made available by your instructor the first day of classes on the Learning Management System used by your University; i.e. Canvas for USF.

You are expected to read thoroughly the entire syllabus as soon as the course starts and post questions on the "support forums" so as to ensure you understand it. The following information is just provided to you in this format so that you may refer to it more easily.

Textbook

The videos provided on this site are meant to supplement the following textbook;

Please note that you do not need to subscribe to any online services associated with the textbook. We will be using freely available practice software that has been developed and used nation wide by the computing education research community instead.

Minimal Technological Requirements

During the first week, you will have to install software in order to be ready to start working and writing program as soon as our first module is released.

In order to be able to work in this offering, students are expected to have;

  • Access to a Windows 8 machine
  • Fast & reliable internet connection
  • The ability to install and test, by the first week deadline, all the software that will be used in this course
  • A microphone and webcam to engage in online live meeting as necessary

If you have technical problems, post on the "Support Forum". While we can not guarantee that we will have the resources to troubleshoot every single student's personal systems, we will certainly try to give you a hand.

If you feel that you need more experience with computers before to learn how to program them, talk to your academic advisor about taking a 1000 or 2000 level course on computer technology.

Please note that, since incompatibilities between the required software & your personal systems, or individual technical issues, will not constitute acceptable excuses during the semester. Therefore, you are required to ensure that all necessary software works on your system before the first week's deadline. If your system is not operational by this deadline, we recommend you drop and retake the offering when ready.

This page will detail what you have to do during the first week of class in order to be marked as "present" for purposes of first day attendance policy.

The following subsections will detail the various tasks you have to completed by the first week deadline that will be posted by your instructor as the course starts

Task 1 - Make sure you have a compatible web browser

Not as simple a question we would all hope.

  • When taking exams or quizzes in Canvas, especially the ones proctored online by Proctorio, you will need to use exclusively Google Chrome
  • When working with Problets.org or Epplets.org, see below, you will need to use exclusively Internet Explorer.
Please note that Windows 10 default web browser is Edge, not Internet Explorer. Edge does not play nicely with Java and thus Problets.org and Epplets.org. Therefore, if you use Windows 10, you will need to install Internet Explorer 11 yourself, by hand. Here is an article from WindowsCentral.com on how to find Internet Explorer on Windows 10

Task 2 - Troubleshoot Blackboard Collaborate

Use the "Blackboard Collaborate" link in the course page on the Learning Management System. Enter the "Students Virtual Lounge" virtual room and make sure that both your microphone and webcam are working properly.

If you need assistance, contact help@usf.edu immediately.

Task 3 - Install & Test the Raptor Flowchart Interpreter

We will use two different programming languages this semester. You need to download and test both during the first week.

The Raptor Flowchart Interpreter is a syntax-free way to learn to program. It allows you to work on modules [101] to [103] without having to memorize arbitrary syntax rules. Instead, you design programs visually as flowcharts and execute them inside Raptor itself.

Once Raptor is installed on your system, we need to make sure it is working properly.

  • Test Raptor
  • File Link: YouTube
  • This video will show you how to make sure that Raptor is operational on your system so you may start working with it in our first module

Task 4 - Install & Test both Java & JGrasp

Modules [201] to [303] will focus on the Java programming language. This will allow us to apply everything you learned with Raptor to a modern programming language. As we do so, most of the concepts should remain the same thus allowing us to focus on syntax-related difficulties.

The first step is to make sure you remove older versions of Java from your system.

  • Remove previous versions of Java
  • URL Link: http://java.com/en/download/faq/remove_olderversions.xml
  • The above link is a tool from Java.com which will allow you to remove old versions of Java you might have already installed. Sometimes, having several JRE & JDK installed on a system leads to conflicts; e.g. is your browser using a Java 7 or Java 8 plugin?

The next step is to install the Java Software Development Kit, or JDK, on your machine.

Next, we will need a tool to write, run and debug our programs. When working with Java, we will use a development environment which has been designed to support learning & teaching programming; JGrasp.

  • Download & Install the latest JGrasp
  • URL Link: http://www.jgrasp.org/
  • Download & run the Windows installer from the above website

We are now ready to test both our installation of the Java JDK & of JGrasp.

  • Test Java & JGrasp
  • File Link: YouTube

Task 5 - Get access to JavaBat, Problets & Epplets

As mentioned elsewhere, we will be using Nick Parlante's CodingBat.com web app, previously known as JavaBat, along with Amruth Kumar's Problets.org Intelligent Tutoring System.

  • Test Problets.org & Epplets.org
  • URL Link: Link to be Provided to you by Instructor Announcement
  • This link will allow you to access a JLNP file. Depending on how your browser is setup, it will run it automatically. More than likely, the file will instead be downloaded to your hard drive. No worries, just navigate to where it has been downloaded and double click it to run it. If nothing happens when you double click it, this means that your windows system is not configured to execute these files with the right tool. You can fix this by;
    • Searching for “Change the file type associated with a file extension” using the windows search tool. You will then be able to open a tool presenting you with a huge list of file suffixes.
    • Scroll down to find .jnlp, select it, then click “change program” and select Java Webstart Launcher.
    • Double clicking on a downloaded JNLP file will now work. If you get a security warning prompting you to run the program, just do so.
    Now that you are able to run JNLP files, run the usf.jlnp one and select the “quick test” from the drop down widget. This will allow you to ensure that any Problets will work on your system.
    If you bump into a problem, post on the Support Forum and provide detailed information – including a screenshot if relevant – of the problems you encountered. As you do so, make sure that another student didn’t already report your problem. If so, simply reply to their threads with any additional information you might have.
  • Problets Troubleshooting
  • File Link: PDF
  • If you have issues running problets from your web browser, take a look at this troubleshooting guide. It was authored by Raul Estrada Ballesteros in spring 2018.

We will also be using Nick Parlante's CodingBat.com web app, previously known as JavaBat.

  • Test CodingBat.com
  • URL Link: http://codingbat.com/prob/p116624
  • Use any recent browser to go to the above URL. Modify the code provided to you so that it reads as follows;
    public int diff21(int n) {
      return 0;
    }
    When you are ready, click the "go" button. A table with a list of mostly failed tests will show to the left of your program.

By the first week's deadline, you should have opened an account with CodingBat.com using your USF email address. Failing to do so will prevent you from getting credit for your practice exercises.

Task 6 - Take the First Week Quiz

Before the deadline posted by your instructor, you will have to;

  • Complete the First Week Quiz on the Learning Management System
  • Ensure that you obtained 100% of the available points
This quiz is not like the other we will use in this course;
  • It does not count toward your course letter grade
  • It does not have a time limit
  • You are allowed to take it multiple times until you get it 100% right

From the above you can probably tell that the point is not to test you but rather to provide you with a sort of "checklist", a way for you to confirm that you have done what is expected of you during the first week.

Failure to complete the quiz and obtain maximal score by the first week deadline will result in you being marked as "absent" for the purpose of USF first day attendance policy, and therefore dropped from the course.

This page is not mandatory reading but is instead meant to provide some additional information for those of you who are curious about how this course was developed, the reasons behind the structure we will be working with, or simply who their instructor is.

Instructor Information

Dr. Alessio Gaspar is an Associate Professor with the University of South Florida’s Department of Computer Science & Engineering, director of the USF Computing Education Research & Adult Learning group, and coordinator for the USF BSIT Linux Technologies specialization tracks.

He received his Ph.D. in computer science in 2000 from the University of Nice Sophia-Antipolis (France). Before joining USF, he worked as visiting professor at the ESSI polytechnic and EIVL engineering schools (France), then as postdoctoral researcher at the University of Fribourg’s Computer Science department (Switzerland).

Dr. Gaspar is an ACM SIGCSE, SIGITE and SIGEVO member and regularly serves as reviewer for international journals & conferences and as panelist for various NSF programs.

His research interests include Evolutionary Algorithms and Computing Education Research, with applications to Intelligent Tutoring Systems / Computer Assisted Learning. His teaching interests include System Administration with Linux, Programming, Web App Development in JavaScript and open source in general. For more information feel free to visit his webpage or email him directly at alessio@usf.edu.

Development History

This material has been developed and taught to both USF Information Technology & Computer Science students at the University of South Florida by Alessio Gaspar.

It is now in its 5th major revision & has been originally offered as COP2510 Programming Concepts, then COP2930 IT Programming Concepts for students in the USF BSIT. It is now offered as COP2512 IT Programming Fundamentals.

The online asynchronous version has been initially developed under funding for the USF BSAS in Industrial Operations. It was then certified for online delivery after peer review managed by the USF Lakeland Faculty Technology Integration Institute, led by Dr. Naomi Boyer.

In 2018, the USF Innovative Education team re-certified the course as "meeting all minimal and exceptional standards" of their Quality Matters (tm) based online course evaluation process.

Design notes - Fundamentals-First vs. Objects-first

Previous versions of this offering allowed me to experiment with what is referred to as "object-first" approaches to teaching programming - e.g. using the excellent BlueJ environment. This approach focusses essentially on introducing early on the use of objects to students, followed by object-oriented programming concepts. In the context of the USF BSIT, I observed that, while many students were able to discuss intelligently the OOP concepts, they did not have enough practice with fundamental ccontrol flow structures, e.g. iteration & selection, to be able to solve elementary programming problems.

As a result, this offering evolved toward a fundamentals first pedagogy which allows us to devote more time to acquire the core programming skills. As USF BSIT students are required to take an object oriented programming offering after this one, we delegate OOP concepts to the next offering while spending more time on developing the ability to solve smaller-scale programming problems

Design notes - Redundancy-First?

The 2nd distinguishing feature of this offering, from the perspective of its pedagogy of contents, is the similarity between modules [101] to [103] and [201] to [203]. The term "redundancy-first" was coined in a paper to position this approach with respect to the above-mentioned fundamentals or objects first pedagogies.

In essence, we first introduce the building blocks of programming with the help of a programming language which does not hinder students learning with arbitrary syntax rules; Raptor.

When students have acquired solid programming skills in this syntax-free environment, we then revisit the same topics in three modules where the focus of our efforts is to transpose what we just learned to the Java programming language

This led to some interesting findings regarding the impact of syntax-late pedagogy; see the CEReAL group site for details