No description, website, or topics provided.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
clojure/prime_factors
elixir/prime_factors
elm
go
haskell/prime-factors
ruby
rust
.gitignore
7-languages.pdf
README.md

README.md

7 Languages in 7 Hours

This is the repository that goes along with the Codemash pre-compiler 7 Languages in 7 Hours. Here, you'll find the slides, reference materials, and a starting and ending point for each language.

The rules:

  1. TDD
    • Write the simplest test you can to make progress
    • Write only enough code to make your test pass
    • Only refactor on green!
  2. Pairing is encouraged, but you don't have to. Here's an example of ping-pong style pairing if you want to try it out:
    • You write a very simple failing test (non-compiling counts as failing)
    • You pass the keyboard to your pair to make it pass writing only enough code as is necessary
    • Your pair writes another simple failing test and passes the keyboard back
  3. You may not finish the exercise in the allotted time - that's fine! You still have the rest of your life outside of this session to work on it. :)
  4. Don't be a jerk.

That last one is one we can all be accountable for. This is a safe, supportive place where many of us have little to no idea what we’re doing and are there to stumble through the often uncomfortable steps of learning together.

The Learning

This pre-compiler uses the prime factors kata to guide us through learning all 7 languages. Given an integer, return a list of factors for that integer that are prime numbers. For example:

Given Result
1 []
2 [2]
3 [3]
4 [2,2]
and so on.

Prerequisites

  • A text editor of your choosing. I like Atom, but you do you.

Ruby

Clojure

Haskell

Rust

Elm

Elixir

Go

  • go 1.11.4 (https://golang.org/dl/)
  • run go get github.com/onsi/ginkgo/ginkgo in the go folder
  • run go get github.com/onsi/gomega in the go folder

Testing your setup & getting external dependencies

To test your setup, run the tests for each exercise on the command line once you've cloned this and installed all prereqs:

  • ruby - run bundle in the ruby folder, and once bundled, run rspec prime_factors_spec.rb
  • clojure - run lein test from clojure/prime_factors
  • haskell - run stack install from the haskell folder and then stack test
  • rust - run cargo test in the rust folder
  • elm - run elm test in the elm folder
  • elixir - run mix test from elixir/prime_factors
  • go - run ginkgo from the go folder