Archive for April, 2019

It is never easy

April 21, 2019

Grading programming is a royal pain.  Why cannot my students give me the same answers for an assignment?  They have to get clever. They have to find some snippet on the internet that works maybe better than the solution in the book.  Or maybe worse but it still works. I give no restrictions regarding finding help on the internet. I want them to know about stackoverflow but I demand they understand what they use from online resources.

Here is an example.  The assignment is to write a program to capitalize the first letter in every word of a sentence.  The only real requirement is to use a sub-procedure. The first sample is the book solution and also the one I thought of.  A very traditional solution. The second sample is what most of my students turned in. I asked the first student to turn this in where he found it.  He pointed to a stackoverflow example that was sort of doing the same task. With the toTitleCase function. He just had to build the code around that function.  Of course that function spread like wildfire. One student that works in another room turned in a more traditional solution but it was still different from the book solution.

I like that the kids dig for solutions.  To me that is the whole idea of programming and computer science in general.  Find solution to problems you do not know the answer to by researching the internet.  It can lead to plagiarism but realistically, how many programmers in the real world come up with unique solutions?  I require that the kids explain their solution, they cannot just cut and paste. It just makes it a real pain to grade.

The only way I think I could possibly control what the solution is going to look like would be to put all sorts of restrictions and requirements on the methods to be used.  This is counter to my philosophy of teaching. I believe students should find solutions, not be told solutions. If this means I lose something to plagiarism, so be it. What I gain is worth it.

Book solution.

import java.util.Scanner;

public class Ch4_1Caps1


public static void main(String[] args)


  Scanner input = new Scanner(;

  String line;

   System.out.println(“Enter a line of text.”);

   line = input.nextLine();


   System.out.println(“Capitalized version:”);

   printCapitalized( line );


static void printCapitalized( String str )


     char ch;       

     char prevCh;   

     int i;         

     prevCh = ‘.’;  

     for ( i = 0;  i < str.length();  i++ )


        ch = str.charAt(i);

        if ( Character.isLetter(ch)  && ! Character.isLetter(prevCh) )

           System.out.print( Character.toUpperCase(ch) );


           System.out.print( ch );

        prevCh = ch;  






Student solution.


import java.util.Scanner;

public class Ch4_1Caps2


public static String toTitleCase(String word)


return Character.toUpperCase(word.charAt(0)) + word.substring(1);


public static void main(String[] args)


Scanner s = new Scanner(;

System.out.println(“What do you want uppercase?: “);

String phrase = s.nextLine();



public static void sub(String phrase)


String[] splitPhrase = phrase.split(” “);

String result = “”;

   for(String word: splitPhrase)


       result += toTitleCase(word) + ” “;






“Guess what great idea we have come up with!”

April 10, 2019

Monday I am over at the elementary school checking their internet.  It seemed to be having a case of the slows so I was checking if the access points were acting up.  (They were, reboot and problem fixed. Everyone thinks I am a genius.) Anyway I stopped in to talk to the principal to let her know that another lab computer had gone to the big dead computer warehouse in the sky.  She says she is not to worried, next year there will be no computer lab. The lab will be on a cart with laptops and the teacher will be mobile. Surprise!

I would really be happy if these things were not a surprise.  There are only about twenty issues that need to addressed before this mobile lab thing becomes practical.  Foremost of which is where we are getting the money to buy 70 laptops? (Two floors, no elevator so need two mobile labs plus some spares.)  We are getting things sorted out one issue at a time and the powers do have hope of raising the money (private school, no tax funded education) for laptops, carts, extra access points, wireless printers and some yet to be determined things I have yet to think of.  (Surprise!) Luckily all I have to do is find vendors and bids for “stuff”. I can let someone else figure where the money is coming from.

Events like this keep me from getting bored with this job.

Course Building 101 or How to Teach Something You Know Nothing About.

April 5, 2019

More tinkering and reading.  A couple readers suggested I look at  The link I posted sends you to the site.  Weird. Anyway I have started looking at the three tutorials. The UW course is very different from the other two.  The UW course is built for students and teachers with a teacher version and a student version.  This course is not just a coding in HTML course. It does quite a bit about how to build good web pages, discussing color, fonts, page design and so on.  (This sent me off on a bit of a Google tangent. I Googled “bad websites”. There are numerous articles about what is good and bad in website design. I want the kids to learn more than just how to code websites.  Part of this website business is knowing how to build good websites.) I am starting to like this UW course a lot.

I have been playing with two editors, Notepad++ and Visual Studio Code.  Notepad++ is very basic and is recommended by several sites as the best way to go for introducing HTML code.  It is solid as a brick, no whistles and bells. VSC on the other hand is big on whistles and bells. Auto-complete and WYSIWYG extensions.  Make a change in the HTML code and it automatically reflected in a window in the editor. It is a bit quirky but once figured out it is pretty slick.  After working in both editors through the same lesson there are arguments for both. Being lazy I like VSC. Being a teacher interested in retention I like Notepad++.  The teacher is going to win. Actually I do want to use both eventually. Start out with Notepad++ then maybe half way through the semester switch over to VSC. Of course the plan is subject to change.  (A great Marine Corps saying is “we don’t plan, we improvise”. I do that a lot.)

I also talked to my former student who is does commercial websites now.  His suggestion was to dabble a little in HTML, CSS and JavaScript then when we get serious go to WordPress.  He said the organizational requirements for websites can be massive if not using a tool like WordPress. Since I looking to get the course approved for dual-credit through the University of Montana (UM) I do not think the WordPress route is a possibility for fall semester.  Maybe if I get some students who want to go big time into website development I will offer a second semester using WordPress and get him in to help with the course.

My friend/guru from UM is coming over today and we will chat about the course.  He teaches the WDD courses at UM and is the one that has to approve my course for dual-credit.  UM is extremely flexible in regards to syllabus and teaching resources but if I do not have to reinvent the wheel for this course I will not.  The usual trouble with following the UM syllabus exactly is UM likes expensive textbooks and they also assume that the students have infinite hours outside of class to work on projects.  College students are take three to four courses. High school students are taking seven to eight and usually involved in some kind of extracurricular activity. Many high school students have extremely limited time outside class to work on projects so the lecture during class time and work on assignments out of class scheme is not always feasible.  So far I have never followed the UM syllabus for any of the dual credit courses I teach. They simply do not work for us.

This weekend I need to continue looking for resources.  The UW course looks good but something better may be out there.  I will also wander down to Barnes and Noble to look at what is on the shelves.  Since any book I buy is funded from my wallet I rarely buy anything but there have been exceptions.

One of the really fun things about teaching CS is if you ever get bored or feel in a rut you can grab something else in the field and build a course that is relevant for the students.  Learn something new and try to teach it to students with a higher IQ than yours. Oh joy.

Course Building 101 or Hoping I Get It Right

April 3, 2019

As I mentioned in my last post I want to offer a Web Design and Development (WDD) course next fall.  I know absolutely nothing about this topic. It is not something I have really been interested in over the years.  I have had a student dive into it a few years ago and actually ended up getting paid to build websites while he was going to school here.  I sort of looked over his shoulder but that was about it. The kid was smarter that i was so I just left him alone in this area. He was the stereo typical uber-geek.  But now it is time to bring this into my skill set. Most, if not all, of my blog readers are teachers. We understand the difference between just learning a new topic and learning it and being able to teach it.  It can be a bit of a tightrope walk at times. Personally I like to be good at something before I teach it but since I started teaching CS thirty some years ago that has not always been an option. Now that I think about it, that has never been an option.  So I am going to dive in to Web Design with no experience and no resources from a previous teacher. In the next series of posts I am going to try to explain the process I am going to go through to build a WDD course.

Here is my plan:

Step 1 – Google.

Step 2 – more Google.

Step 3 – contact a friend at the university that teaches WDD.

I have started Step 1, 2 and 3.  I Googled “web design curriculum” and just started hitting links.  One of my major requirements is my resources have to be free. All my courses have a $0 budget but I have had this budget constraint for the last 18 years so it does not bother me.  A nice thing about a $0 budget is I have never wasted money on something that I later thought was junk. I have found lots of junk but free junk can be trashed without feeling bad. So far I have found these three resources.  The UW course was updated on 2012 so it should still be good. The second is a commercial product that is pretty direct with little except the coding aspect. The third is an interactive tutorial. I am not a great fan of interactives (threatens job security) but I will give it a look over.

I also have to find an editor.  Several articles suggest just using Notepad or some very basic text editor.  I have two reasons against this approach. First, I am lazy. Enough said. Second, I want to learn the tools that would actually be used by a semi-pro to build the HTML code.  For example in my Java class we are using Eclipse. So far we are having more trouble learning Eclipse than Java but I consider this part of the learning experience. That is why I have a guru friend at the university.  When we have an IDE or language issue he wanders over and lends a hand.

I just talked to my college guru.  He recommended Visual Studio Code. I have looked at VSC before and abandoned it because i could not get it working in minutes.  I have very little tolerance for IDEs I cannot figure out fairly quickly. (Small Basic spoiled me a few years ago.) I just spent a little more time with VSC and got it working with HTML.  I added a live HTML extension. Pretty slick. I will play with it some more.

Now I need to start working through the three resources I have found so far, look for some more, build a little knowledge and start thinking about how I am going to approach teaching WDD.  Piece of cake.