Wednesday, December 21, 2011

Course Grades

Course grades are posted now, and should be available through the UNM system.

Happy holidays everyone!

Saturday, December 10, 2011

Tuesday, December 6, 2011

Final Exam

Thread for discussion related to the final, or to studying and course review. --> comments.

Tuesday, November 22, 2011

Graph Factories

A thread to discuss the question raised in class today, about using the "factory pattern" to produce graphs.

Problem Set #9

Discuss in comments.

Monday, November 21, 2011

Programming Assignment #2

See the Assignments section of the main website for the assignment details and the provided source files.

Use the comments section here for questions and discussion.

Wednesday, November 9, 2011

Towards a more disciplined Java

Here's something I'd really like. Does anyone know if it exists already? Any other thoughts are also welcome.

A nice feature of Java is its extensive class library. But lots of these classes have been written with a "kitchen sink" mentality--throw in every feature anyone might want. Often, when wants a simple class or interface, such as a FIFO queue, one ends up using something like LinkedList instead, which has a ton of additional functionality. If one is tempted into actually using it, it makes one'd code less portable and harder to maintain.

One way around this is to define a wrapper, or gatekeeper, class FIFOQueue that holds a LinkedList object in a field, and restricts access to all but a handful of its methods. Then the compiler will force you to actually use the right subset of methods. And you can even rename them to your preferred nomenclature. But, there seem to be a number of disadvantages to this approach.

Any suggestions for a better solution? Ideally, I'd like to be able to define a "restricted version" of a class like LinkedList by basically just listing the methods I want to forbid, allow, or rename, and have the compiler or annotations preprocessor enforce the usage restrictions I want. Whether it actually compiles a separate class or not would be a secondary consideration.

Friday, October 21, 2011

Spoilers for practice test

Please use this thread for posting and discussing solutions, AFTER you have taken the practice test.

Use the thread below for other midterm-related topics that will not spoil the practice test.

Thursday, October 20, 2011

Midterm exam

Thought I'd give you a place to talk about preparing for the midterm, ask questions, announce your study group meetings, etc. Use the comments section, as usual.

Thursday, September 29, 2011

Problem Set #5

Problems 2.1, 2.3, 2.5, due Thursday 10/6.
10 points each. Discussion in the comments section.

Everyone who posts a comment in this thread by Sunday night gets +3 points on this assignment.
Be sure to include your name so we can credit you with these points.

Don't forget: Reading assignment for this week is Sections 3.1 to 3.4

Wednesday, September 21, 2011

Problem Set #4

Problems 2.5b (10 points) and 2.7 (20 points), due Thursday 9/29.

For 2.7, if you aren't familiar with the song under discussion, it is this one:
http://en.wikipedia.org/wiki/The_Twelve_Days_of_Christmas_(song)

Please don't read the whole article--all we care about is the structure of the lyrics. (Search for "structure" in the article).

Thanks to Lucia for pointing out the link. I suppose most of the class knows the song, which can be hard to escape from at a certain time of year.

Thursday, September 15, 2011

Problem Set #3

Problems 2.2, 2.4, 2.6 are due on Thursday, 9/22.
Please use the Comments section for discussion/questions.

Thursday, September 8, 2011

Problem Set #2

Want to discuss problems from problem set #2? Use the comments section below. Your classmates, the TA and I will be following, and will try to help it be a useful place to exchange ideas.

Discussion Topics

Hi class,

Please, put comments here if you want to suggest new topics for discussion threads.

Tuesday, September 6, 2011

Test Post

Hi class,

This is a test post to see how well feeding this blog into the course webpage works. The goal is to get a workable discussion forum going. Please test whether you are able to view and leave comments below.