Assembling a mock exam

I like assembling the mock exams. I find it relaxing. I got a question yesterday about my process so writing it down

Question generation

  • Scott and I meet and decide how many mock questions will cover the material for each chapter. For example, we have an 80 question mock exam in our practice exams book. There are 12 chapters. This means some chapters have 6 questions and some have 7.
  • As we write each chapter, we both write mock exam questions for that chapter in a separate file.

Determining the order

  • I create a spreadsheet including the source chapter #, source question # and difficulty.
  • Create a column for mock exam question #
  • Fill it with =RAND().
  • Sort by the random number column.
  • Replace the random numbers by actual question numbers for the mock chapters
  • Fiddle with the list by trading question numbers so that there aren’t more than two questions in a row from the same chapter or same difficulty. (ideally not more than one from the same chapter in a row)

Assemble the questions

  • Copy/paste the questions from each chapter into a new file using the new order generated above. I find it fastest to copy all the questions that go with chapter 1, then 2, etc.
  • Proofread.
  • Run the program we wrote to check styles to make sure I didn’t mess them up on copy/paste.

speaking online – presentation vs panel

I’ve been declining most speaking opportunities from home. I find it a lot harder and more tiring to speak when I can’t see anyone in the audience. It’s stressful enough being at home so much without adding more voluntary stress! I’m also worried about outside noise distracting either me or the audience. For example, sometimes a fire engine “doesn’t go by” (cars don’t/can’t let it go by so it stays at my corner for 20-30 seconds and I can’t hear anything).

I’ve done two “public” things successfully on video from home:

  • Intro trivia and moderating Q&A for the NY Java Sig. (This isn’t the main part of the meeting so I know someone can take over for me.)
  • A panel on architecture. The panel mitigated both my concerns. I could see the moderator and other panelists. So I could see reactions and wasn’t speaking to nobody.
  • When there was excessive noise at my end, I could mute until it went away. Other panelists were still talking so I wasn’t messing up the whole presentation.

java is smart – using var

I was working on some code and seeing how many local variables I could substitute with var. I was a little surprised to learn that the below compiles. It makes sense to me that mags is good because the type is there. It’s cool that years and sorted can infer the type of Integer as well.

package lists;

import java.util.*;

public class Magazines {

    public static void main(String[] args) {
        var mags = new HashMap<String, Integer>();
        mags.put("People", 1974);
        mags.put("Readers Digest", 1922);
        mags.put("The Economist", 1843);

        var years = mags.values();

        var sorted = new ArrayList<>(years);
        Collections.sort(sorted);

        int first = sorted.get(0);
        System.out.println(first);
    }
}