Live data from Hacker News

Ask HN: Suggestions for an exemplar Java project to showcase in class

news.ycombinator.com

1–6 of 6 posts

Ask HN: Suggestions for an exemplar Java project to showcase in class

#1
Turbo Pascal included the source code of a working spreadsheet written in Pascal. Reading it was a revelation for me: I quickly understood how to structure code in small procedures and functions.

I see that my students have trouble structuring their code in classes and methods, and I think that going through an exemplar project in classroom would help them a lot. Which projects would you recommend?

Ideally, I'd want something: non-trivial in size (tens of classes) and structure (use of composition, inheritance, dynamic dispatch, containers, enumerations, maybe interfaces, threads, generics, streams); useful in everyday situations that the students can readily appreciate; easy to build; written with impeccable style in terms of structure, naming, commenting, and formatting; accompanied with unit tests; not dauntingly complex (this made me rule out the JDK libraries); of manageable size (< 100k LoC, ideally < 10k LoC).

Re: Ask HN: Suggestions for an exemplar Java project to showcase in class

#2
If your stundents have trouble with the most basic part of programmging I would suggest that they should do more exercice to gain experience. Just by seeing "good code" doesn't teach them anything.

A couple of years ago I had a lot of fun solving problems (e.g. https://projecteuler.net/) with friends and to compare and discuss the solutions we've chosen.

Re: Ask HN: Suggestions for an exemplar Java project to showcase in class

#3

If your stundents have trouble with the most basic part of programmging I would suggest that they should do more exercice to gain experience. Just by seeing "good code" doesn't teach them anything. A couple of years ago I had a lot of fun solving problems (e.g. https://projecteuler.net/ ) with friends and to compare and discuss the solutions we've chosen.

The students can by now program OK in the small, but I feel they will benefit from some good examples regarding programming in the large.

Re: Ask HN: Suggestions for an exemplar Java project to showcase in class

#4

If your stundents have trouble with the most basic part of programmging I would suggest that they should do more exercice to gain experience. Just by seeing "good code" doesn't teach them anything. A couple of years ago I had a lot of fun solving problems (e.g. https://projecteuler.net/ ) with friends and to compare and discuss the solutions we've chosen.

The students can by now program OK in the small, but I feel they will benefit from some good examples regarding programming in the large.

Then log4j might be an option since people will probably use it someday anyway.

Re: Ask HN: Suggestions for an exemplar Java project to showcase in class

#5

Earlier quoted context omitted.

The students can by now program OK in the small, but I feel they will benefit from some good examples regarding programming in the large.

Then log4j might be an option since people will probably use it someday anyway.

I'm going through the source code. It looks indeed well-written and structured. Its function is a bit difficult to catch the students' imagination, but I think I can make a good case for it.