Monday, July 2, 2007

Java resources

Here are some resources students might find useful for learning Java.

Project based learning

The programming course will be taught as a "project based course". All students should select a project and form a group of students who will work together on that project.

The recommended group size is 3-5 students. However, we may be able waive the size for those who are unable to find sufficient members for their project.

I would like everyone to finalize their projects as well as groups by Friday 6th July, 2007.

Mail the project description on the newsgroup and also identify a list of resources (books as well as online resources) to help you with the project.

Sunday, July 1, 2007

Mode of teaching and learning

The programming in Java course will be conducted as a hybrid course.

We will have traditional lectures in the classroom. We will also have online lectures Skype or a similar service. I will publish screencasts as well as audio conversations with software developers on programming in Java. We have a newsgroup for this course on which students can ask as well as answer questions. Beyond this exchange of knowledge and information, everyone will be encouraged to learn by way of practice. Code... code ... and even more code.

Let me quickly explain why it is important to engage in this form of learning.

The study of programming consists of understanding the syntax of a language and understanding proper usage and programming idioms. Understanding the syntax is explained reasonably well in text books, but understanding usage and best practices comes by practice and conversations with other practitioners. Hence, this course will have a very string focus on practice and conversations.

In this day and age the internet offers a very good platform for communication. Here are some ways in which I communicate. However, do not feel limited by what I have listed. Everyone can choose whatever works best for them.
  • Newsgroups and forums are a very good place to ask as well as answer questions. Remember answering other's questions is as important as asking them. Just like the community helps us by answering our questions, we must give back to the community by helping others. Also teaching someone else is a very good way of learning. When you answer someone else's questions, you will also learn something valuable in the process.
  • Personal blogs are a very good way of reflecting (and penning your reflections), building your reputation, and an ad-hoc community of developers. Think of your blog as an interactive academic journal, but with a slight difference. The blog is a journal which is work that is constantly in progress, and it's work on which other people, your friends or even people you do not know may comment and converse with with you.
Let us utilize all the tools we have at our disposal to create a unique and enriching learning experience.


I hope everyone in this class has a very successful career as software developers.

Saturday, June 30, 2007

Programming in Java

This course will prepare students for developing software programs in Java. The primary purpose of the course is to give students basic knowledge of programming constructs and best practices, which they can utilize for writing desktop programs.


I look forward for an informative and engaging semester with all the students. Details of the course have been listed below. If you have any questions, please post them as comments to this post.

Programming in Java Syllabus:

  • Introduction of the programming platform, it's main benefits and drawbacks

    • Motivation for creating the Java platform

    • Primary benefits of using the Java platform

    • Drawbacks of the Java platform

  • Structure of programs on the programming platform (a simple HelloWorld example)

    • Explain how to create a simple class that will print “Hello World”

  • Compiling and running a program

    • Show how to compile and run the HelloWorld program

    • Explain basic compiler and VM options

  • Working with primitive data types

    • Primitive data types, their usage, and sizes

  • Operators

    • Explain operators in Java

  • Explanation of control structures (looping, branching)

    • Loops: while, do...while

    • Branching: if, else...if, cond?val1:val2, break, continue, labels, switch, return

  • Implementation of OO concepts on the target platform

    • Defining classes

      • Show how to create a simple class

      • Explain interfaces and how to create them

      • Explain namespaces and packages

    • Support for building abstractions

    • Support for encapsulation and information hiding

    • Support for inheritance

      • Special note on single inheritance in Java and using interfaces

    • Support for polymorphisms

      • Compile time and run time polymorphism

      • Explain polymorphisms with interfaces and classes

      • Explain abstract classes

    • Access modifiers

      • public, private, protected, package friendly

  • Important keywords and concepts

    • static, final

  • String manipulation

    • Creating strings

    • Concatenating strings (using + operator, StringBuffer, StringBuilder)

    • Extracting substrings

  • Creating constants and their importance

    • How to create constants in Java, their importance and usage

  • Working with other commonly used classes

    • Wrapper classes for primitive data types

    • The Object superclass

    • The class Class

  • Exception handling

    • Why do we need exceptions

    • The exception hierarchy in Java

    • Throwing and catching exceptions

    • Creating custom exceptions

  • Working with collections of objects

    • Working with arrays

    • Introduction of the collection interfaces (List, Set, Map)

    • Working with different types of Lists (ArrayList and LinkedList)

    • Working with different types of Sets (HashSet, and TreeSet)

    • Working with different types of Maps (HashMap, and TreeMap)

    • Iterating across collections

    • Comparing objects and sorting in collections

  • The Input/Output system

    • The architecture of the Java IO classes

    • Reading from and writing to the system console

    • Binary IO

    • Character IO

    • Working with files

  • Creating desktop user interfaces

    • Basic UI classes in Java

    • Layout managers

    • Event driven programming

    • Making a simple user interface in Java

  • Language/platform specific concepts

    • Automatic garbage collection

    • Marker interfaces in Java

    • Serialization

    • Introduction to inner classes

    • Introduction to reflection

Friday, March 30, 2007

Network programming in Java

Today we concluded multi-threading in Java and strated network programming in Java using sockets.

The session on multi-threading was summarized by Jaya, and Rajesh Choksey.

On Sunday we will conclude Sockets and start with RMI.

For further resources on Sockets, and RMI, please see the Java tutorial:
  1. Networking with Sockets
  2. RMI
In the networking with sockets tutorial, the part on Sockets in most important. We will not cover DatagramSockets and URLConnection in much detail in this class.

Friday, March 16, 2007

Concurrency in Java

In the next lecture we will learn multi threading in Java. The topics for multi threading are as follows:

  • Fundamental multi threading concepts
  • Creating and running multiple threads
  • Thread states
  • Controlling threads
    • thread priorities
    • sleep
    • yield
    • join
  • Access to critical resources and the synchronize keyword
  • Deadlocks

No lecture on Sunday (18/3/07)

We will NOT have a lecture on Sunday - 18 March, 2007.