Using Java and NetBeans to Teach High School Computer Science

First Question

Another teacher recently asked about my experiences teaching CS and for a description of the tools and language that I used. I thought I might share my response on here, in case anyone can add to the conversation.

First response

I used Java with NetBeans for development. This was my first time through the courses (ICS3U/3C) and it was by e-Learning, so I wanted to stick with something that was fairly standard. NetBeans was really flexible and was fairly nice for building GUIs as well. I hadn’t used a development environment with such effective refactoring capabilities before, so that was a treat. JavaDoc templates were generated automatically, and documentation look up was fast and reliable.

NetBeans_StartPage

Some other CS teachers use Eclipse, JCreator, or something else. NetBeans does have an Android development plugin, although I haven’t used it. If I were to teach the grade 12 course, I might consider focusing on Android development with the Android SDK/Studio IDE. There is a lot more to think about for app development, but I think there would be a significantly increased level of engagement. Also, those skills should be highly marketable for students if they pursue programming or software engineering as a career.

AndroidStudio

If you want to see what it look like while I was coding and developing user interfaces in NetBeans, I have a bunch of videos in a playlist on my YouTube channel.

It was helpful to have the students building GUIs right away in some respects. However, because they didn’t already understand objects when they started this, it was difficult in the later stages of the course to have them create GUI elements programmatically instead of with drag-and-drop tools. For example, one student was creating a game that required playing cards to be displayed, but he needed to create (up to) 52 UI objects to represent them. That screams arrays/lists, but he didn’t know how to instantiate those elements based on what we had already learned. I might try a slightly different approach, rather than changing IDE though.

If you have specific questions I can answer, let me know. I’ll be teaching this course again next year, so talking about this is good for me too! If you want the content/activities I developed, I’m happy to share that as well.

Second Question

Later the teacher asked about whether I had used Python, and if I had thoughts about Python vs. Java. Here’s what I said:

Second Response

I haven’t worked in Python, but I understand that it is fairly powerful and straightforward. I talked to the other CS teacher here and he recommends Java, and I think I do too.

Some points to consider:

  • Python has very forgiving syntax; the argument is that this may allow students to focus on concepts.
  • Java is strongly- and statically-typed, but Python is strongly- and dynamically-typed.
  • Java has a longer history, so there are “more” resources available for support (might not matter – “enough” and “good” are more important than “more”)
  • Java is used for more application types (desktop, web, Android, non-computing devices) and is available on most platforms.
  • Python tends to be used server-side – it’s a scripting language.
  • Python applications tend to be shorter
  • Python uses indentation to describe code structure; Java uses braces.

I use Java because I’m used to it, I understand it well, and it’ll be a nice transition to mobile development for the kids.

Let me know what you decide – it’s interesting!

Your turn

If I have made a mistake above, or if you have thoughts about IDEs/Java/Python/Android/etc., please add a comment and I’ll pass it along!

Advertisements

Introductory Computer Programming in Java – video playlist on YouTube

I’m teaching ICS3C/3U online right now, and I’ve been making videos for my students to learn from. I realize there are good resources online for this stuff already, but there are three reasons I’m making my own instead of curating other sources:

  1. The Java language has evolved, so some things are done differently now (e.g. String comparison)
  2. The development environment has had major updates (NetBeans)
  3. It’s nice to personalize things for my students so they can connect with me a little better

I’m trying to post my videos to YouTube as well as in the virtual Learning Environment. I don’t want to use just one or the other; YouTube is blocked in some school boards, and the vLE is harder to access from a mobile device. Crossposting seems like a good idea.

If you’re interested, here is the playlist I’ll add to this semester. I’ll warn you that they’re not “polished”, although that’s partly intentional: I don’t have time for a lot of re-takes, and I want students to see coding errors and their fixes too.

https://www.youtube.com/playlist?list=PLfd-5Q3Fwq0WGwNp-Ef9OubhMxwM8bROj

Teaching Computer Science online – the hard parts

This semester I am teaching my first e-Learning course (I’ve been supporting e-Learning for five years; time for me to walk the walk, eh?). It’s a split ICS3C/ICS3U course in Computer Science and Programming.

I’m using Java with NetBeans and we’re coding “desktop” applications (i.e. not mobile yet). We might later move to Android programming, but I think that’ll probably be enrichment for interested students. There isn’t really a requirement to write for mobile in the course, and it adds a lot of extra layers of complexity.

“The Range”

Complexity would be fine, except many of the students are first-time coders – zero experience with programming of any kind. That’s normal, since ICS3x doesn’t have a prerequisite, and many schools (especially in Northern Ontario, but elsewhere too I understand) can’t afford to offer ICS2O as a precursor.

Of course, many of the students do have a bunch of programming experience, some in Javascript or Visual Basic, others in HTML, and a couple in many languages.

So I have what I think is a typically wide range in starting points for learning computer science and computer programming.

Troubleshooting at a distance

Teaching online has special challenges for any course, but ICS has software requirements that are significant and unusual. You need a “computer” – no tablets, no Chromebooks*. You need an application installed and a development kit. If students are using computers owned by their school boards they may have to ask to have those items installed for them. I’m sure you can imagine how easy that is to accomplish.

Of course, many students are using their own computers. I prefer this, because they can install their own software (a useful skill in its own right) and they have a lot more coding time (evenings and weekends).

So what do you do when you get an email like this?

“Hi Mr Grasley, I can’t find Netbeans on the computer at school. I don’t know what to do.”

After several email messages, we got it all worked out. I’m sure the student was frustrated, and I felt a little helpless. The special software needs are tough up front in the course.

These aren’t Word documents

The e-Learning environment has a handy document renderer which nicely formats Word and other documents for me in the browser. It’s a fairly new feature, and it works really well.

It can’t handle a .zip file containing a Java project, of course.

So, I have to download the student submissions and import them into NetBeans or unzip them and open the .java files in a text editor. A little more onerous, but still manageable.

That’s it so far

See, I’m not complaining – it’s pretty good to have only a couple of issues that are special. I like teaching online, I get to reference xkcd in my course, and I’m looking forward to the rest of the semester.

*It is possible to use a cloud-based development environment, which would allow you to code using other kinds of devices. I’m not “supporting” that just yet, but I can see it down the road. I’m hoping some of my students try it out and report back.