EXTRA CREDIT
{Anti-Patterns}
The Blob- This is when your code becomes more procedural than object-oriented. "The blob" refers to a large class that contains the majority of the processes. The remaining classes contain data. Hence, this code is procedural in that it is separating process from data. Object-oriented programming aims to integrate process and data. Typical causes include the lack of an object-oriented (or any) architecture, the lack of enforcing an object-oriented architecture, and iteratively adding functionality to existing classes rather than redesigning and creating new classes.
Poltergeists - These are classes that have very limited uses in the system. Poltergeists are undesirable because they are (i) unnecessary and waste resources when they "appear", (ii) inefficient because they use multiple navigation paths, (iii) clutter the code and make it difficult to read and organize. Typical causes include a lack of understanding of object-oriented design, trying to use object-oriented design when a different programming style is more appropriate, and management committing itself to an inappropriate architecture.
The Golden Hammer - This is when programmers fall in love with a certain solution or vendor product. Vendors often advocate extensions to these products to solve additional problems. The problem with this is that often the solution is suboptimal and relying on the "Golden Hammer" diverts attention away from exploring a better solution. Of course, a product may occasional be a legitimate "Golden Hammer", though developers should beware since most solutions are not. Several cause of the Golden Hammer anti-pattern are past successes (pride),
large investment of time or money in a particular solution, and reliance on proprietary products.
[src: "Software Development AntiPatterns" by William H. Brown, Raphael C. Malveau, Hays W. "Skip" McCormick III and Thomas J. Mowbray ]
{Regular Expressions}
The regular expression syntax for java is similar to that of Perl, and is contained in the java.util.regex API. The three main classes of this package are Pattern,Matcher, and PatterSyntaxException.
(i) Pattern
A Pattern object is a representation of a regular expression with no public constructors. Creating a pattern requires first invoking a public static compile method with a regular expression object. This returns a Pattern object.
(ii) Matcher
This object is what interprets that pattern and performs matching operations on string input. It also has no public constructors. Matcher objects are created by invoking the matcher method on a Pattern object.
(iii) PatternSyntaxException
This object is an unchecked exception that indicates that a syntax error in a regular expression.
[src: http://java.sun.com/docs/books/tutorial/essential/regex/intro.html ]
Saturday, May 5, 2007
Thursday, May 3, 2007
last day
EXTRA CREDIT
1. submit (before the final) a problem that may be included in the final (nontrivial and interesting)
2. (Submit with your final) What are your top three favorite anti-patterns (things not to do)? [read online and give a description of each, keep it to 1 page; include your name on each page; include sources]
3.
web dvlpment work requires lots of string matching, handy to use regular expression
What are the most important classes/interfaces for regular expression manipulation
include sources
4. extra credit for class notes - submit your notes before the final
note in your final you took notes for extra credit
SAVE AS HTML - INCLUDE IMAGES
+ project is due today before midnight
+ please solve any issues in by tomorrow
final:
+ comprehensive - everything covered in class, take-home, homeworks, etc.
+ emphasis on second part
+ open books/notes
sample topics
+ design an interface given some plain-english specifications
+ take an UML (class) diagram and write the corresponding Java code
+ extend a class to accomplish some new things
+ exception handling example
NO GUI DESIGN AND IMPLEMENTATION
+ i/o problem
+ threading (write a synchronized block to accomplish... or given some code explain what happens if it isn't synchronized )
+ testing: acceptance testing (white box & black box)
+ design patter (e.g. factory, decorator)
+ describe what a piece of code does in plain english
free software/open-source -- know the difference between free software and opensrc
1. clients can't articulate acceptance criteria (don't mention acceptions to the ideal)
2. developers fall in love with their own code and don't test it
=> hire people who are interested in trying to break other people's code
1. submit (before the final) a problem that may be included in the final (nontrivial and interesting)
2. (Submit with your final) What are your top three favorite anti-patterns (things not to do)? [read online and give a description of each, keep it to 1 page; include your name on each page; include sources]
3.
web dvlpment work requires lots of string matching, handy to use regular expression
What are the most important classes/interfaces for regular expression manipulation
include sources
4. extra credit for class notes - submit your notes before the final
note in your final you took notes for extra credit
SAVE AS HTML - INCLUDE IMAGES
+ project is due today before midnight
+ please solve any issues in by tomorrow
final:
+ comprehensive - everything covered in class, take-home, homeworks, etc.
+ emphasis on second part
+ open books/notes
sample topics
+ design an interface given some plain-english specifications
+ take an UML (class) diagram and write the corresponding Java code
+ extend a class to accomplish some new things
+ exception handling example
NO GUI DESIGN AND IMPLEMENTATION
+ i/o problem
+ threading (write a synchronized block to accomplish... or given some code explain what happens if it isn't synchronized )
+ testing: acceptance testing (white box & black box)
+ design patter (e.g. factory, decorator)
+ describe what a piece of code does in plain english
free software/open-source -- know the difference between free software and opensrc
1. clients can't articulate acceptance criteria (don't mention acceptions to the ideal)
2. developers fall in love with their own code and don't test it
=> hire people who are interested in trying to break other people's code
Subscribe to:
Posts (Atom)