<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">The dots are a real thing. New coders are often also new to computers. One thing that is different about middle school age learners is that they have grown up with computers (phones and tablets) that work correctly (for the most part) *all* the time. They don’t have to compile a kernel, install a bunch of packages, fix defaults for their use case, or dive into a config.sys or autoexec.bat or a reg edit — let alone even peak at a file system. I was surprised by how many kids don’t really know how images are stored on a drive— they’ve only known thumbnails, not filenames.<div> </div><div>Most things are a black box of “it just works”. The first introduction of “dots” is in filenames. There is a heavy context switch to figure “ok .. this thing we are doing with a ‘dot' is not about a file .. it is some sort of way to have the computer do a thing”</div><div><br></div><div>That being said, I don’t think the import static is that big of a deal. As a student builds up from console to file to socket, the imports become a conversation about learning to troubleshoot. Things start to click once they try to use a class or method that is imported in the example source file in the instruction book, but not their source file. Students learn to eye scan the "import area of the file” and start to remember that they need to add that “magic line" and then it compiles and runs without changing any other ‘code’. Python has the same thing— you can't do hashes or networking without the proper headers (and corresponding libraries installed).</div><div><br></div><div>Cautiously peeking back at my previous suggestion ;-) — I think having the step-up be *same* in terms of words and characters on the screen is super valuable in getting the lightbulb to go off that reading and writing to things with a computer is all the same— console, file, network, properties file, etc. It’s how computers work and the next generation of coder has never had to learn *how* computers work.</div><div><br></div><div>Having different method names and handles adds a divergence that doesn’t connect back to the reality that it’s all the same under the covers.</div><div><br></div><div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">Thanks,</div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">Matt</div></div><div><br></div><div><br></div><div>How’s this for a Mr Pav’s Java 101?</div><div><br></div><div><div>Lesson 1:</div><div><br></div><div>import static Console.*;</div><div><br></div><div>void main() {</div><div> String name = readln("Please enter your name: ");</div><div> write("Pleased to meet you, ");</div><div> writeln(name);</div><div>}</div><div><br></div><div>Lesson 2: (Introduce types other than text)</div><div><br></div><div>import static Console.*;</div><div><br></div><div>void main() {</div><div> int age = readInt("Please enter your age: ");</div><div> write(“Your age is, “);</div><div> writeInt(age);</div><div>}</div><div><br></div><div>Lesson 3: (qualify read/write methods)</div><div><br></div><div>import java.io.Console;</div><div><br></div><div>void main() {</div><div> int age = Console.readInt("Please enter your age: ");</div><div> Console.write(“Your age is, “);</div><div> Console.writeIntln(age);</div><div>}</div><div><br></div><div>Lesson 4: (add a file)</div><div><br></div><div>import java.io.Console;</div><div>import java.io.File;</div><div><br></div><div>void main() {</div><div> int age = Console.readInt("Please enter your age: ");</div><div> Console.write(“Writing age to file, “);</div><div> Console.writeIntln(age);</div><div> File file = new File(“age.txt”);</div><div> file.writeIntln(age); // now go inspect age.txt</div><div>}</div><div><br></div><div>Lesson 5: (replace file with a network socket)</div><div><br></div><div>import java.io.Console;</div><div>import java.net.Socket;</div><div><br></div><div>void main() {</div><div><br></div><div> int age = Console.readInt("Please enter your age: ");</div><div> Console.write(“Sending age to server, “);</div><div> Console.writeIntln(age);</div><div><br></div><div> Socket socket = new Socket(“127.0.01”, 4321);</div><div> socket.writeIntln(age); // now go inspect server-side</div><div>}</div><div><br></div></div><div><div><br><blockquote type="cite"><div>On Nov 21, 2024, at 6:19 PM, Brian Goetz <brian.goetz@oracle.com> wrote:</div><br class="Apple-interchange-newline"><div>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<div>
<font size="4" face="monospace">You pass the "only respond if you
are an instructor" test, but I was asking a very specific
question: what can we say about the relative learnability of
`IO.println` vs `println`?<br>
<br>
There's infinite room to design new APIs but we're looking for
feedback on a specific question.<br>
</font><br>
<br>
<div class="moz-cite-prefix">On 11/21/2024 7:14 PM, Matt Pavlovich
wrote:<br>
</div>
<blockquote type="cite" cite="mid:4CAD4179-48AC-4185-9FD2-26C8D4D6BB1D@gmail.com">
Hello-
<div><br>
</div>
<div>How about a series of classes that provide the same I/O
methods (and behavior!) across the spectrum of I/O types? </div>
<div><br>
</div>
<div>This would allow:</div>
<div>1. New coders to learn on the console, which provides the
benefit of immediate feedback loop</div>
<div>2. Allow new coders to transition from Console to File to
Socket by changing only a single word in the source code</div>
<div><br>
</div>
<div>Console.readInt</div>
<div><span style="caret-color: rgb(0, 0, 0);">Console.readIntln</span></div>
<div><span style="caret-color: rgb(0, 0, 0);">Console.writeInt</span></div>
<div><span style="caret-color: rgb(0, 0, 0);">Console.writeIntln</span></div>
<div><font><span style="caret-color: rgb(0, 0, 0);"><br>
</span></font></div>
<div><font><span style="caret-color: rgb(0, 0, 0);">Socket.readInt</span></font></div>
<div><font><span style="caret-color: rgb(0, 0, 0);">Socket.writeInt</span></font></div>
<div><font><span style="caret-color: rgb(0, 0, 0);">..</span></font></div>
<div><font><span style="caret-color: rgb(0, 0, 0);"><br>
</span></font></div>
<div><font><span style="caret-color: rgb(0, 0, 0);">File.readInt</span></font></div>
<div><font><span style="caret-color: rgb(0, 0, 0);">File.writeInt</span></font></div>
<div><font><span style="caret-color: rgb(0, 0, 0);">,,,</span></font></div>
<div><font><span style="caret-color: rgb(0, 0, 0);"><br>
</span></font></div>
<div><font><span style="caret-color: rgb(0, 0, 0);">Properties.readInt</span></font></div>
<div><font><span style="caret-color: rgb(0, 0, 0);">Properties.writeInt<br id="lineBreakAtBeginningOfMessage">
</span></font>
<div>,,,</div>
<div><br>
</div>
<div><br>
</div>
<div>Thanks,</div>
<div>Matt Pavlovich</div>
<div><br>
</div>
<div>Instructor: 1,000+ hours of classroom</div>
<div>Teacher: 8th grade robotics/engineering/programming</div>
<div><br>
<blockquote type="cite">
<div>On Nov 21, 2024, at 12:45 PM, Brian Goetz
<a class="moz-txt-link-rfc2396E" href="mailto:brian.goetz@oracle.com"><brian.goetz@oracle.com></a> wrote:</div>
<br class="Apple-interchange-newline">
<div>
<div>I'd like to validate this further, but I'd like to
seek feedback _from educators only_. (Please include in
your answer how long you've been teaching Java
*formally*.)<br>
<br>
<blockquote type="cite">I am with Stephen here.<br>
<br>
For effective learning, the gating factor is
complexity, not verbosity. The regularity of
IO.println wins over the implicit import.<br>
</blockquote>
<br>
I would like to assess how broadly this opinion is held
_by educators_. The three positions that have been
espoused by various proponents are:<br>
<br>
- println is simpler for learners, and so the speed
bump of going from there to IO.println when going to
non-simple compilation units is worth it.<br>
- IO.println is equally simple for learners, and has
the benefit of uniformity, no need for static import.<br>
- IO.println is actually *simpler* for learners,
because the IO provides context to what comes after the
dot.<br>
<br>
It is easily imaginable for experienced developers to
hold any of these views; consider all of those as having
been read into the record. I want to hear _from
educators_ about which they would be more comfortable
teaching, and why.<br>
<br>
Thanks in advance for keeping this channel clear for the
experienced educators to speak.<br>
<br>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</div>
</div></blockquote></div><br></div></body></html>