teenie-quaggard / yogaForPosers

An app to help yogis keep track of their favourite yoga poses

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Yoga For Posers

Build Status

A command line program built to help yogis keep track of their favourite yoga poses.

"Screenshot of App start"

Getting started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

To run this project, you'll need JDK13 and JUnit5 installed on your computer. It may also be helpful to use an Integrated Development Environment (IDE) that works well with Java such as Eclipse or, as I have used to write this project, IntelliJ.

This project was built using Gradle Build Tool. If you would also like to use Gradle to build this project, you'll first need to download it here.

Installing

First open your Terminal and run

git clone https://github.com/teenie-quaggard/yogaForPosers.git

in the location where you'd like to save the project locally.

The easiest way to quickly build and run this project is by using an IDE that can compile and run Java files for you. For instance, if you are using IntelliJ, you will be able to run this project by opening the project in your IDE , opening up the App class located at:

yogaForPosers.src.main.java.space.jaggard.yogaforposers.App

and running the main method by clicking the green arrow that appears on the left-hand side of line 10 in the screenshot below.
"Screen shot of App class".

If you're using Gradle, you should be able to build this project by running: ./gradlew build in your terminal while in the root folder of this project. You should also then be able to run ./gradlew run to run the program from the command line.

It is also possible to compile and run this program manually using javac which comes installed with JDK. For a tutorial on how to do that, have a look here.

Running tests

If using Gradle, use the command ./gradlew test while within the root folder of his project in your terminal to run the tests.

Otherwise, you should be able to run the tests using the IDE of your choice . Different IDEs may require different types of configuration. If you are using IntelliJ, you can look here to find out how to do so.

Bugs noted and potential nice to add features

  • Project lacks testing for if program closes appropriately
  • Project lacks testing for randomized UUID (used as Entry ID) - this can potentially be side-stepped by refactoring and instead using a static Counter class to create unique IDs which are more human readable than UUID
  • Database is not yet connected to edit and delete commands, which throws errors when the test suite is run.
  • Using an in memory DB for testing
  • Potentially implementing JDBI with Maven for better abstraction of the database

Things I learned

  • How to implement the Maven Standard Directory Layout
  • Package naming conventions in Java
  • The pattern of creating a TestConsole to substitute for user input and standard output of the console
  • How to use Enums to nicely separate out constants from the code (and using them also in tests, so that tests don't fail when you change something simple within the copy.)
  • That when storing lists of data, it is often smarter to store the items in their original data type. For instance, I had initially converted individual Entries into strings before storing them all in an array list . This meant that the individual Entries were much more difficult to deal with in the long run, even though it initially seemed better for testing to store them as strings.
  • The refactor tool in IntelliJ is indispensable!
  • The difference between private and public methods
  • How to set up and destroy a database between tests
  • That I should try to never return null in the case of databases
  • Understanding the flow of db set up - connection, table creation, db functionality, db disconnection

Things I struggled with

  • Implementing a design that stays within the scope of the stories, but is thoughtful of the future

  • Implementing more VIM commands into my repertoire

  • Taking advantage of IntelliJ's built in commands

  • Remembering to take breaks while working from home (stretch hands!)

  • Learning how to test for multiple inputs in Java (in this case, by creating a fake console)

  • Remembering to ensure that I am following a TDD structure and that I see a test fail before continuing on through the TDD cycle

  • Moving too quickly through the stories without testing for edge-cases

  • Branching and committing at appropriate points

  • Adding the JBDC driver to the gradle build file

  • Null pointer error when working with a database

  • Database configuration

  • Setting up and wiping a db table between tests

About

An app to help yogis keep track of their favourite yoga poses


Languages

Language:Java 100.0%