Sha256: 3c79b9255c69eddff26238933bfe85c8d6a2651e44880a22584dec7fab9e22c2

Contents?: true

Size: 1.57 KB

Versions: 92

Compression:

Stored size: 1.57 KB

Contents

# Gigasecond

Calculate the moment when someone has lived for 10^9 seconds.

A gigasecond is 10^9 (1,000,000,000) seconds.

## Test-Driven Development

As programmers mature, they eventually want to test their code.

Here at Exercism we simulate [Test-Driven
Development](http://en.wikipedia.org/wiki/Test-driven_development) (TDD), where
you write your tests before writing any functionality. The simulation comes in
the form of a pre-written test suite, which will signal that you have solved
the problem.

It will also provide you with a safety net to explore other solutions without
breaking the functionality.

### A typical TDD workflow on Exercism:

1. Run the test file and pick one test that's failing.
2. Write some code to fix the test you picked.
3. Re-run the tests to confirm the test is now passing.
4. Repeat from step 1.
5. Submit your solution (`exercism submit /path/to/file`)

## Instructions

Submissions are encouraged to be general, within reason. Having said that, it's
also important not to over-engineer a solution.

It's important to remember that the goal is to make code as expressive and
readable as we can.



Run the tests with:

```bash
bats gigasecond_test.sh
```

After the first test(s) pass, continue by commenting out or removing the `skip` annotations prepending other tests.

## Source

Chapter 9 in Chris Pine's online Learn to Program tutorial. [http://pine.fm/LearnToProgram/?Chapter=09](http://pine.fm/LearnToProgram/?Chapter=09)

## Submitting Incomplete Solutions
It's possible to submit an incomplete solution so you can see how others have completed the exercise.

Version data entries

92 entries across 92 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/bash/exercises/gigasecond/README.md
trackler-2.2.1.179 tracks/bash/exercises/gigasecond/README.md
trackler-2.2.1.178 tracks/bash/exercises/gigasecond/README.md
trackler-2.2.1.177 tracks/bash/exercises/gigasecond/README.md
trackler-2.2.1.176 tracks/bash/exercises/gigasecond/README.md
trackler-2.2.1.175 tracks/bash/exercises/gigasecond/README.md
trackler-2.2.1.174 tracks/bash/exercises/gigasecond/README.md
trackler-2.2.1.173 tracks/bash/exercises/gigasecond/README.md
trackler-2.2.1.172 tracks/bash/exercises/gigasecond/README.md
trackler-2.2.1.171 tracks/bash/exercises/gigasecond/README.md
trackler-2.2.1.170 tracks/bash/exercises/gigasecond/README.md
trackler-2.2.1.169 tracks/bash/exercises/gigasecond/README.md
trackler-2.2.1.167 tracks/bash/exercises/gigasecond/README.md
trackler-2.2.1.166 tracks/bash/exercises/gigasecond/README.md
trackler-2.2.1.165 tracks/bash/exercises/gigasecond/README.md
trackler-2.2.1.164 tracks/bash/exercises/gigasecond/README.md
trackler-2.2.1.163 tracks/bash/exercises/gigasecond/README.md
trackler-2.2.1.162 tracks/bash/exercises/gigasecond/README.md
trackler-2.2.1.161 tracks/bash/exercises/gigasecond/README.md
trackler-2.2.1.160 tracks/bash/exercises/gigasecond/README.md