DECEMBER 03
Learning a new language
o How Java handles name look-up, abstract classes and interfaces, exceptions, etc.
o But bigger differences vs Python, e.g;
everything has a type (variables & methods, not just objects)
primitive vs object
completely object-oriented (no functions, all code in a class)
And an overall philosophy oriented towards safety.
o And a new language construct: reflection.
o You also did more of the learning yourself than before.
o You’ll see more languages with new constructs & approaches:
csc324: programming languages
csc343: introduction to databases
csc309: programming the web
o Value: knowing which tool to apply in a given situation
o Value: deeper appreciation of a language’s design and how best to use it
o Value: if a language doesn’t have a feature, perhaps you can implement it. E.g., support for the observer pattern.
Safety
o Much of how Java does things (types, casting, etc.) was intended to make programs safer.
o Safety was a key philosophy behind the design of Java.
o Safety came up again when we looked at floating point.
o Much more on floating point in csc336: numerical methods.
Design Patterns
o These are far more general than Java or any other language.
o And far more general than any one problem.
o You’ll see many more design patterns in csc301: introduction to software engineering.
o The algorithmic analog to design patterns is algorithmic design techniques, like divide and conquer, and greedy algorithms.
o You’ll learn that in csc373: algorithm design, analysis, and complexity.
o These algorithmic design techniques are just as important.
Regular expressions
o These have many practical applications:
Parsing input in a Java program (or another language).
Many Unix commands, such as grep, use regular expressions.
Regular expressions and related concepts are important in language design and compilers
csc488:compilers and interpreters
o At the same time, there is rigorous and beautiful theory behind regular expressions.
You ca
More
Less