{"id":22218309,"url":"https://github.com/coders-school/pre_work","last_synced_at":"2025-09-13T14:39:15.218Z","repository":{"id":36447206,"uuid":"177149818","full_name":"coders-school/pre_work","owner":"coders-school","description":"Universal pre-work for any C++17 project on any platform with CMake.","archived":false,"fork":false,"pushed_at":"2022-12-14T07:52:38.000Z","size":134,"stargazers_count":3,"open_issues_count":1,"forks_count":55,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-04T03:04:12.802Z","etag":null,"topics":["catch2","cmake","cpp17"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coders-school.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-03-22T13:57:59.000Z","updated_at":"2024-12-31T07:45:09.000Z","dependencies_parsed_at":"2023-01-17T01:45:31.799Z","dependency_job_id":null,"html_url":"https://github.com/coders-school/pre_work","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/coders-school/pre_work","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coders-school%2Fpre_work","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coders-school%2Fpre_work/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coders-school%2Fpre_work/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coders-school%2Fpre_work/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coders-school","download_url":"https://codeload.github.com/coders-school/pre_work/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coders-school%2Fpre_work/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267370618,"owners_count":24076458,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["catch2","cmake","cpp17"],"created_at":"2024-12-02T22:20:13.929Z","updated_at":"2025-07-27T14:32:35.331Z","avatar_url":"https://github.com/coders-school.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# C++ training pre-work\n\nThe project is configured to run on Windows, Linux and macOS. It uses CMake \u003e= 3.6\n\n## Software for remote sessions\n\nI recommend using **Visual Studio Code** with **Live Share Extension Pack** installed. It will allow us to have a remote Coding Dojo / Mob Programming session and to have an audio chat during this session. [Take a look at this extension in action](https://visualstudio.microsoft.com/pl/services/live-share/). In case you do not have it or do not want it, you will just have to do group tasks on your own.\n\n## Docker \n\nYou can use [this docker image](https://hub.docker.com/r/lukin1000/linux_toolset). It is Ubuntu-based Linux with all necessary applications installed. Full support of C++17 is provided.\n\n```bash\ndocker pull lukin1000/linux_toolset\n```\n\n### Running a docker container\n\n```bash\ndocker run -v ~/workspace/:/workspace -it lukin1000/linux_toolset:latest /bin/bash\n```\n\nOptions:\n\n* `-v /path/to/host/dir:/path/to/docker/dir` - directory mapping\n* `-it` - allocate a new terminal session and keep stdin open even if not attached\n* `lukin1000/linux_toolset:latest` - the name of image\n* `/bin/bash` - the name of the command to be executed on the container. Bash simply gives you access to the terminal. \n\nIt's useful to have an alias to the above command.\n\nIf you don't have docker please install the necessary software as described below.\n\n## Software installation for Windows\n\n- Download and install your favourite IDE - CLion, Visual Studio Code (free), QtCreator (free) or any other that can handle CMake builds\n- Download MinGW compiler (g++, make, cmake, gdb)\nor \n- Download and install Visual Studio Community Edition (IDE + MSVC compiler)\n\n## Software installation for Linux/macOS\n\nFor Linux please install:\n- your favourite IDE - CLion (paid), Visual Studio Code (free), QtCreator (free), vim or any other that can handle CMake builds\n- g++ \u003e= 7 or clang++ \u003e= 5\n- cmake \u003e= 3.6\n- make\n- gdb\n- binutils\n- valgrind\n\n## Online IDE\n\nIf you have any problems with setting up an environment you can use [Repl.it](https://repl.it). It is an online IDE that can handle multiple files projects and has a Linux terminal available.\n\n## Possible problems on Windows\n\nIf you can build the `NumberGenerators` target, but you cannot build the `NumberGenerators-ut` target it probably means that MinGW does not properly support exceptions on your machine. Please reinstall MinGW and select another type of exception implementation in the `Exception` field.\n\nIf MinGW is problematic on your machine, feel free to use the MSVC compiler. Compiler type does not matter. Just make sure it supports C++17.\n\nAlso if CLion is problematic, you can use Visual Studio Community Edition.\n\nYou need to be able to compile both `NumberGenerators` and `NumberGenerators-ut` targets. We will be using similar build configurations in our training.\n\n## Assignment\n\n1. Optional: Fork this repository to your own GitHub account (if you have one).\n2. Compile the binary and unit tests. Steps for manual compilation in console with CMake:\n\n  ```bash\n  \u003e mkdir build\n  \u003e cd build\n  \u003e cmake ..\n  \u003e make\n  ```\n\n3. Run `NumberGenerators` target. `Result: 42` should be displayed on the output.\n4. Run `NumberGenerators-ut` target.\n5. Fix mistakes in unit tests. To do that you need to implement the `sumNumbersFromGenerators()` function to make all UTs pass. You can add more UTs if you wish.\n6. Commit, push and create a Pull Request to inform me about your successful implementation and environment setup. If you do not have and do not want to have a GitHub account just send me your solution (diff only) via email to *lukasz@coders.school*\n\nAfter completion of this assignment, you have everything set up and ready for training.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoders-school%2Fpre_work","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoders-school%2Fpre_work","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoders-school%2Fpre_work/lists"}