ysmorid / console-morse-code-queens-attack

Pairing exercises for TW booth at Grace Hopper Conference

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Grace Hopper Conference 2018 Console App Coding Exercises

Exercises

General Notes

  • Problems are given in Java, Ruby, .NET Core, and/or JavaScript
  • Test cases are given to guide you along the way
  • Classes are empty

How to Work with the Exercises

  • Run the first test (remove the ignore annotation or x)
    • Watch it fail
  • Write just enough code to make it pass
  • Run the test again
    • Watch it go green
  • Refactor if needed
  • Run the test again
    • It should still be green
  • Repeat until all the tests are passing
  • Add more tests as needed

Morse Code Translator

  • Implement a method to translate from English to Morse Code
  • Optional: Implement a method to translate from Morse Code to English
  • Morse Code Information: https://en.wikipedia.org/wiki/Morse_code
  • Translation of characters are at the top of the file
  • Separate letters with spaces; separate words with three spaces
  • Handle unrecognized characters
  • Provided in Java, Ruby, .NET Core, and Clojure

Queen Attack

  • Implement a program that takes two queen positions on a chess board and determines if they can attach each other
  • Source: http://exercism.io/exercises/java/queen-attack
  • Queens can attack if they are in the same row (rank), column (file), or diagonal path
  • Validate input positions
  • Provided in Java, Ruby, .NET Core, and Clojure

Languages

Java

Requirements:

  • Java 8
  • JUnit 4

Ruby

Requirements:

  • Ruby 2.4
  • Rspec 3.5

Commands:

  • rspec

JavaScript

Requirements:

  • Node 6
  • Npm 5

Commands:

  • npm install
  • gulp jest

Clojure

Requirements:

  • Java 8
  • leiningen

Commands: lein test

.NET Core

Requirements:

  • .NET Core 2.1+

Commands:

  • dotnet restore
  • dotnet build
  • dotnet test

Installation Notes

On a Macbook, you can install most of the required packaged via homebrew, with some exceptions.

An approach to installing the prerequisites on a Macbook can be found below:

  • Install Node Version Manager (nvm): brew install nvm
  • Use nvm to install Node lts: nvm install —lts
  • Install Java brew cask install java
  • Install Gradle brew install gradle
  • Install Clojure brew install clojure
  • Install Leiningen (for Clojure) brew install leiningen
  • Install ruby version manager and ruby curl -L https://get.rvm.io | bash -s stable --auto-dotfiles --autolibs=enable --ruby
  • Install .NET Core 2.1 SDK: https://www.microsoft.com/net/learn/get-started-with-dotnet-tutorial

About

Pairing exercises for TW booth at Grace Hopper Conference


Languages

Language:Ruby 31.2%Language:Java 22.9%Language:JavaScript 22.7%Language:C# 14.2%Language:Clojure 9.0%