MNuenninghoff / NPCCreator

NPC description generator
0 stars 0 forks source link

Week 8 ready for review #4

Closed MNuenninghoff closed 3 weeks ago

MNuenninghoff commented 2 months ago

@pawaitemadisoncollege Week 8 is ready for review - week 8 is done in branch "webservice"

  1. Key learning points Exploring the webservice is important, especially if there is not much documentation. You need to know what the format of output should be, as well as what input could cause errors.
  2. Challenges/Problems/Resources Used One challenge that I had was figuring out how to handle the situation where the name generator api that I am using gets called with a race that it won't generate names for - e.g. anything that is not dragonborn, dwarf, elf, gnome, goblin, halfling, halfelf, halforc, human, orc, tiefling, or troll. When I initially set up the error handling, I was still getting an error in unit testing. However, I set a breakpoint and stepped through the IronArachneDao code line by line to figure out where the problem was occuring. I realized that I needed to put return statements in catch blocks in order to break out of the method then after handling the problem.
pawaitemadisoncollege commented 2 months ago

Hi @MNuenninghoff! This is good work on many fronts: you are using properties rather than hardcoding the service url and any related details, and you wrote code to account for the not found error. This also demonstrates good use of git branching for adding new features or doing bit of R&D.

Does the service happen to provide a call that will return all valid races?

These methods are all the same with the exception of the nameType value. I wonder about reducing that duplication...https://github.com/MNuenninghoff/NPCCreator/blob/a99f19011ff0c49d5fd396e96b8ea47d66fe93a1/src/main/java/com/mnuenninghoff/persistence/IronArachneDao.java#L29-L45