Session 6

Growing a Java Program in Small Steps

CS 2530
Intermediate Computing

See Spot Run

Eugene does a daring bit of live programming, following this script roughly.

Students ask questions, become enlightened.

NOTE: I'll pull the script out into lecture notes with more and better formatting as time permits.

Notice the style of programming: I took small steps. At each point, I had a working program for a subset of the requirements. In addition to always having a working program, this way of growing a program has several benefits, including:

How you program is up to you. I suggest you consider using this style whenever you are learning a new language or platform, or when you face a difficult problem you've never solved before. Many programmers, including me, program this way almost all the time!

Programming Style

... Java programming has a style shared by the community of Java programmers. Some conventions came from the creators of Java, and others came as programmers wrote a lot of Java code and wanted to share ideas and code.

... naming things:

... format and white space (similar to the C world)

... some of the programming style you see is my style...
... some for class and some for me.

Consistency is important. It can make unfamiliar style bearable.

Wrap Up

Eugene Wallingford ..... ..... September 7, 2012