|
| 1 | +# Help |
| 2 | + |
| 3 | +## Running the tests |
| 4 | + |
| 5 | +Get the first test compiling, linking and passing by following the [three rules of test-driven development][3-tdd-rules]. |
| 6 | + |
| 7 | +The included makefile can be used to create and run the tests using the `test` task. |
| 8 | + |
| 9 | +```console |
| 10 | +$ make test |
| 11 | +``` |
| 12 | + |
| 13 | +Create just the functions you need to satisfy any compiler errors and get the test to fail. |
| 14 | +Then write just enough code to get the test to pass. |
| 15 | +Once you've done that, move onto the next test. |
| 16 | + |
| 17 | +As you progress through the tests, take the time to refactor your implementation for readability and expressiveness and then go on to the next test. |
| 18 | + |
| 19 | +Try to use standard C99 facilities in preference to writing your own low-level algorithms or facilities by hand. |
| 20 | + |
| 21 | +## Checking for memory leaks |
| 22 | + |
| 23 | +The makefile comes also with a build that checks some common mistakes regarding memory leaks and out of bound access to arrays. |
| 24 | +To run these checks, use the following at the command line: |
| 25 | + |
| 26 | +```console |
| 27 | +$ make memcheck |
| 28 | +``` |
| 29 | + |
| 30 | +[3-tdd-rules]: https://blog.cleancoder.com/uncle-bob/2014/12/17/TheCyclesOfTDD.html |
| 31 | + |
| 32 | +## Submitting your solution |
| 33 | + |
| 34 | +You can submit your solution using the `exercism submit hello_world.c hello_world.h` command. |
| 35 | +This command will upload your solution to the Exercism website and print the solution page's URL. |
| 36 | + |
| 37 | +It's possible to submit an incomplete solution which allows you to: |
| 38 | + |
| 39 | +- See how others have completed the exercise |
| 40 | +- Request help from a mentor |
| 41 | + |
| 42 | +## Need to get help? |
| 43 | + |
| 44 | +If you'd like help solving the exercise, check the following pages: |
| 45 | + |
| 46 | +- The [C track's documentation](https://exercism.org/docs/tracks/c) |
| 47 | +- The [C track's programming category on the forum](https://forum.exercism.org/c/programming/c) |
| 48 | +- [Exercism's programming category on the forum](https://forum.exercism.org/c/programming/5) |
| 49 | +- The [Frequently Asked Questions](https://exercism.org/docs/using/faqs) |
| 50 | + |
| 51 | +Should those resources not suffice, you could submit your (incomplete) solution to request mentoring. |
| 52 | + |
| 53 | +Make sure you have read the [C track-specific documentation][c-track] on the Exercism site. |
| 54 | +This covers the basic information on setting up the development environment expected by the exercises. |
| 55 | + |
| 56 | +## Submitting Incomplete Solutions |
| 57 | + |
| 58 | +If you are struggling with a particular exercise, it is possible to submit an incomplete solution so you can see how others have completed the exercise. |
| 59 | + |
| 60 | +## Resources |
| 61 | + |
| 62 | +To get help if having trouble, you can use the following resources: |
| 63 | + |
| 64 | +- [StackOverflow][] can be used to search for your problem and see if it has been answered already. You can also ask and answer questions. |
| 65 | +- [CPPReference][] can be used to look up information on C concepts, operators, types, standard library functions and more. |
| 66 | +- [TutorialsPoint][] has similar content as CPPReference in its C programming section. |
| 67 | +- [The C Programming][K&R] book by K&R is the original source of the language and is still useful today. |
| 68 | + |
| 69 | +[c-track]: https://exercism.org/docs/tracks/c |
| 70 | +[stackoverflow]: http://stackoverflow.com/questions/tagged/c |
| 71 | +[cppreference]: https://en.cppreference.com/w/c |
| 72 | +[tutorialspoint]: https://www.tutorialspoint.com/cprogramming/ |
| 73 | +[K&R]: https://www.amazon.com/Programming-Language-2nd-Brian-Kernighan/dp/0131103628/ |
0 commit comments