boolean-uk / software-developer

0 stars 0 forks source link

Create Module: Programming Fundamentals #181

Closed dearshrewdwit closed 1 year ago

dearshrewdwit commented 1 year ago

1. Product

2. Course Content

Demonstrate with 1 exercise

Translate or create the following exercises

vherus commented 1 year ago

At what point do we think using multiple classes should come into it? We can likely do a lot of programming fundamentals just using the Main class, even the scrabble challenge really

dearshrewdwit commented 1 year ago

Let's, from the beginning, use Main as a runner which uses other classes from the same package - means the classes can be unit tested easily.

vherus commented 1 year ago

I've added a JUnit exercise setup using Gradle to the repo: https://github.com/boolean-uk/java-scrabble-challenge

@dearshrewdwit could you try cloning it and making sure it builds? There is no solution implemented but it should at least install the JUnit dependencies

Image

vherus commented 1 year ago

Implemented an exemplar here: https://github.com/boolean-uk/java-scrabble-challenge-exemplar

vherus commented 1 year ago

Setting up some CI is going to be a challenge but I think that's the next step for the scrabble challenge repo

vherus commented 1 year ago

Anchor skills for scrabble challenge:

vherus commented 1 year ago

There are 2 things in consideration for the rest of the fundamentals exercises so far:

  1. Separate test suites for core criteria and extensions. There are a few different ways to do it, gradle test suites & gradle tasks seem to be the best candidates. Currently figuring out how to implement these

  2. There are some exercises that come before functions are introduced so the js tests are expecting exported variables. How do we aproach these?

    • Classes need to come before everything because it's Java
    • Do we have the students create public members that we can test or do we teach methods and returning data types from the beginning? E.g.

Public member approach:

const firstName = 'Jane'
const secondName = 'Smith'

// Set this variable to firstName and secondName concatenated
const fullName = null

module.exports = {
  a: fullName
}

becomes

public class Strings {
  String firstName = "Jane";
  String lastName = "Smith";

  // Set this variable to firstName and secondName concatenated
  public String fullName = "";
}
vherus commented 1 year ago

Java exercise template repo with example PR here: https://github.com/boolean-uk/java-template

dearshrewdwit commented 1 year ago

Let's review on Monday. By then I'll create a provisional sequence we can pick apart that would make sense.

Classes and public fields right from the start makes sense to me. We can leave the access modifiers until we visit encapsulation deeper.

Custom gradle tasks probably would be my first try creating separate runnable test suites.

vherus commented 1 year ago

Day 1: Members extension - provide them models that they can design with classes and members