14 |
15 | ## Why?
16 |
17 | Helping people learn how to code requires a *simple* but *functional* example.
18 |
19 | **_Everyone_** has experience using a stopwatch.
20 | Whether to time an experiment in school (science class),
21 | cooking in the home or holding ones' breath under water,
22 | we can all *immediately* see the *use* of a stopwatch.
23 |
24 | Yes, I *hear* you, "most mobile phones have stopwatches,
25 | why would anyone want to *build* their own?"
26 | I agree, why "***re-invent the wheel***" if you already have a perfectly good one?
27 |
28 | Well, as you are about to discover we are not *re-inventing* anything (*yet*!) simply
29 | *discovering* a few computer/web programming basics by building something we already know.
30 |
31 | Once you have the basics mastered, you can unleash your imagination! :-)
32 |
33 |
34 |
35 |
36 | ## How?
37 |
38 | Open the **index.html** in your web browser and try the **_simple_ stopwatch**.
39 | Then read the code in the files to understand how it all works!
40 |
41 |
42 | ### Interface
43 |
44 |
45 | 
46 |
47 | I tried to simplify the UI as much as possible so there is a single button/control for the stopwatch: **Go**
48 | (If you chose to edit the file you can change this to *Start* or what ever you prefer)
49 |
50 |
51 |
52 | 
53 |
54 | While the stopwatch is running we only have one action: **Stop**
55 | (We can/will add the *Lap* function in a later tutorial bur for now *KISS*!)
56 |
57 |
58 |
59 | 
60 |
61 | When the "Stop" button is pressed/clicked it stops the timer.
62 | We then have two options: we can either **Go** again to keep counting *or* **Clear**.
63 | Clicking/Pressing the **Clear** button simply clears/resets the current count.
64 |
65 |
66 |
67 | ## Questions?
68 |
69 | If you get stuck while reading the code or have any questions,
70 | please open an
71 | [issue](https://github.com/dwyl/stopwatch/issues)
72 |
73 |
74 |
75 | ***Note*** on "*re-inventing the wheel*" - if *anyone* ever asks you why
76 | you are re-inventing the wheel, show them these links:
77 |
78 | 1. https://loopwheels.com
79 | 2. http://www.kickstarter.com/projects/1537100752/shark-wheel-the-square-skateboarding-wheel-that-sh
80 | 3. https://www.nasa.gov/specials/wheels/
81 | How NASA Reinvented The Wheel - Shape Memory Alloys: https://youtu.be/2lv6Vs12jLc
82 |
--------------------------------------------------------------------------------