Book making use of amber features
Ethan McCue
ethan at mccue.dev
Sat Nov 9 17:01:46 UTC 2024
Hi all,
I've shared this with some folks separately, but it's at the point where
it's "partially topic complete" enough that I think I can share it more
widely.
I have been writing a book for covering Java as a first language assuming
all the anonymous main class changes have landed.
https://javabook.mccue.dev
I still need to go back and integrate println, readln, etc. (and obviously
go further)
I am sharing it here partially because I assume some general interest, but
mostly to highlight the section where I transition from single files with
anonymous main classes to full classes in their own files.
https://javabook.mccue.dev/multi_file_programs
If it's going to be how this goes, I think I need advice on how to also
include enough pre-work so that import static java.io.IO.*; and import
module java.base; won't be a jumpscare.
This blurb from my README I think suffices for additional context
My primary goals with this are
* Get the ordering of topics right. By this I mean that every topic covered
should have had its prerequisites covered in the topics previous. While
"lesson 1: Inheritance" is clearly wrong in this regard, some things are
more subtle.
* Be a template for other people. This is a book. Not everyone likes books,
some like youtube videos, some like over priced udemy courses, some attend
College, etc. Everyone has different learning paths. I hope this to be of
use to anyone looking to make a more up to date Java curriculum and hope
that the vague order of things (which I consider superior to the content
produced with the Java of years' past) is carried through.
* Write as if the newest Java wasn't new. It's obvious when a book was
written before Java 8
because it always has newer additions with "addendum: brand new stuff in
Java 8." But
the order language features were introduced is hardly a good order to teach
them. You have
to pretend that Java 21 has always been *the* Java. Does it really make
sense to show terrible
C-style switch statements way before switch expressions?
* Write as if the words Object Oriented Programming, Functional
Programming, etc. didn't exist.
While I understand that these all have definitions and are useful concepts
to know about, introducing them early seems to lead to either dogma,
rejection of said dogma, or some
mix thereof. None of them are actually needed to understand the mechanics
of and motivation
behind what we would call "object oriented" or "functional" techniques.
They certainly don't
work as justification for adding getters and setters to every class.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/amber-dev/attachments/20241109/06565fc4/attachment-0001.htm>
More information about the amber-dev
mailing list