GitHunt
KY

kylewelsby/mindful-chef-coding-challenge

Code challenge for Mindful Chef

Mindful Chef Code Challenge

This repository contains the solution to the
Mindful Chef Code Challenge completed by
Kyle Welsby. The challenge involved building a
warehouse robot controller.

โšก๏ธ System Dependencies

Before using the warehouse robot controller, make sure you have the following
dependencies installed on your system:

  • Deno: The runtime environment required to build and run
    the tool.
  • (alternative) Ruby: The alternative runtime
    environment to run the tool.

At the time of writing the latest stable version of Deno is 1.34.1, or Ruby
3.3.0

๐Ÿš€ Getting Started

Follow the steps below to get started with the warehouse robot controller:

  1. Clone this repository to your local machine:

    git clone https://github.com/kylewelsby/mindful-chef-code-challenge.git
  2. Install Deno by visiting the
    Deno installation guide
    and following the instructions provided.

  3. Open your terminal or command prompt and navigate to the project directory:

    cd mindful-chef-challenge
  4. Run the following command to execute the robot controller, replacing
    with the desired sequence of commands:

    This command uses Deno

    deno run mod.ts <commands>

    This command uses Ruby

    bundle exec ruby robot_cli.rb <commands>

    N.B. you may need to run bundle install as Bunlder
    is managing dependencies for Ruby before running the Ruby command

    Option Description Default
    <commands> Nvigate the robot using compas directions
    - N = North
    - S = South
    - E = East
    - W = West
    --start=<n>,<n> (optional): Sepecify the starting position of the robot 0,0

    For example, to navigate the robot to grid position [4,4], use the following
    command: <commands>.

    deno run mod.ts 'N,E,N,E,N,E,N,E'
    bundle exec ruby robot_cli.rb 'N,E,N,E,N,E,N,E' --start=4,4
  5. The result will be the final position of the robot within the warehouse grid.

๐Ÿงช Testing

To ensure the correctness of the tool, unit tests are provided. Follow the
instructions below to run the tests:

deno test -A
bundle exec rake test

๐Ÿšจ Linting

The warehouse robot controller adheres to coding standards and best practices.
To run the linter and formatter on the codebase, execute the following commands:

  • Format the code using Deno's built-in formatter:

    deno fmt
  • Run the Deno linter to check for potential issues and enforce coding
    standards:

    deno lint
  • Run the Ruby typechecker to check for potential issues and enforce coding
    standards:

    bundle exec srb tc

The linter checks your code for potential issues, enforces best practices, and
alerts you to any deviations from the recommended coding standards.

๐ŸŽ“ License

MIT: https://kylewelsby.mit-license.org

Languages

Ruby97.6%TypeScript2.4%

Contributors

MIT License
Created May 30, 2023
Updated June 1, 2023