Microsoft MVP성태의 닷넷 이야기
CodeCrafter 소개 - 단계별 프로그램 제작 실습 [링크 복사], [링크+제목 복사],
조회: 976
글쓴 사람
정성태 (seongtaejeong at gmail.com)
홈페이지
첨부 파일
 

CodeCrafter 소개 - 단계별 프로그램 제작 실습

프로그래밍 공부하기 재미있는 사이트가 하나 있군요. ^^

Catalog | CodeCrafters - Challenges
; https://app.codecrafters.io/courses

접속하고 로그인하면 각각의 주제별로 다양한 프로그램을 작성하는 과제가 나옵니다. 비록 유료이긴 하지만, 처음이라면 "FREE THIS MONTH"라든가 "FREE DURING BETA" 같은 주제를 선정해서 하나씩 심심할 때 실습하는 것도 좋을 것 같습니다. ^^




방식은 간단합니다. 특정 주제를 선택하고, 단계별로 요구하는 기능을 작성한 후에 git commit을 하면 codecrafters 서버 측에서 기능 테스트가 이뤄집니다. 즉, 구현 여부에 대한 판정은 기능 테스트 통과로 결정됩니다.

그런데, 하다 보면 기능 테스트를 위해 매번 git commit을 하는 것이 번거롭다고 느낄 수 있는데요, 그럴 때는 로컬에 codecrafters-cli를 설치해,

How do I install the CLI?
; https://docs.codecrafters.io/cli/installation

// 윈도우 환경이라면 WSL에서 실행

$ curl https://codecrafters.io/install.sh | sh

$ git config --global user.email "...git사용자 이메일..."
$ git config --global user.name "...git사용자이름..."

코드 변경 후 (git commit 없이) 해당 프로젝트 디렉터리에서 "codecrafters test" 명령어를 실행하면 기능 테스트를 구동할 수 있습니다.

$ pwd
/mnt/c/git_temp/codecrafters-shell-csharp

$ codecrafters test
Initiating test run...

⚡ This is a turbo test run. https://codecrafters.io/turbo

Running tests. Logs should appear shortly...

[compile]   Determining projects to restore...
[compile]   All projects are up-to-date for restore.
[compile]   codecrafters-shell -> /tmp/codecrafters-build-csharp/codecrafters-shell.dll
...[생략]...
[tester::#WH6] Running tests for Stage #WH6 (Autocompletion - Multiple completions)
[tester::#WH6] [setup] export PATH=/tmp/quz:$PATH
[tester::#WH6] [setup] export PATH=/tmp/qux:$PATH
[tester::#WH6] [setup] export PATH=/tmp/foo:$PATH
[tester::#WH6] [setup] Available executables:
[tester::#WH6] [setup] - xyz_baz
[tester::#WH6] [setup] - xyz_bar
[tester::#WH6] [setup] - xyz_qux
[tester::#WH6] Running ./your_program.sh
...[생략]...




참고로, 윈도우 + WSL 환경인 경우 "codecrafters test" 시에 이런 오류가 발생할 수 있습니다.

$ codecrafters test
Initiating test run...

⏳ Turbo test runners busy. You are in queue.

Upgrade to skip the wait: https://codecrafters.io/turbo

Running tests. Logs should appear shortly...

: not foundapp/.codecrafters/compile.sh: line 8:
: not foundapp/.codecrafters/compile.sh: line 10:
[compile] Looks like your code failed to compile.
[compile] If you think this is a CodeCrafters error, please let us know at hello@codecrafters.io.


View our article on debugging test failures: https://codecrafters.io/debug

Failed to execute /app/your_program.sh: fork/exec /app/your_program.sh: no such file or directory
Test failed (try setting 'debug: true' in your codecrafters.yml to see more details)

왜냐하면, 해당 프로젝트의 ".codecrafters" 하위에 있는 "compile.sh", "run.sh" 파일이 (윈도우 환경의 git 설정에 따라) CRLF로 저장돼 있는 경우 저런 식으로 오류가 발생합니다. 따라서, 해당 파일을 LF로 변경한 후 다시 테스트를 수행하면 됩니다.










[최초 등록일: ]
[최종 수정일: 2/9/2025]

Creative Commons License
이 저작물은 크리에이티브 커먼즈 코리아 저작자표시-비영리-변경금지 2.0 대한민국 라이센스에 따라 이용하실 수 있습니다.
by SeongTae Jeong, mailto:techsharer at outlook.com

비밀번호

댓글 작성자
 




[1]  2  3  4  5  6  7  8  9  10  11  12  13  14  15  ...
NoWriterDateCnt.TitleFile(s)
556정성태2/22/2025665넷플릭스 - 오류 코드: D7717-1270, F7703-1290
555정성태2/9/2025976CodeCrafter 소개 - 단계별 프로그램 제작 실습
553정성태6/28/20247853[종료] "시작하세요 C# 12" 서적 나눔합니다. (4권)
552정성태2/20/20247764Windows - 바탕화면에 검은 영역의 빈 공간을 삭제하는 방법
551정성태2/18/20247491DropBox - PermissionError: [WinError 5] Access is denied: 'C:\\Users\\...'
550정성태10/31/20237984윈도우 탐색기의 "새로 만들기" 메뉴에 "텍스트 문서" 항목이 없는 경우 - 두 번째 이야기
549정성태4/20/202310065youtube-dl을 파이썬으로 실행하는 방법
548정성태4/15/20239922Galaxy Buds2를 Windows에 연결한 경우 (Stereo가 아닌) Mono로 들리는 문제
547정성태1/28/202311216JetBrains Omea Reader에서 TLS 1.2 모드의 https 서버로부터 RSS 구독이 안 되는 경우 해결 방법파일 다운로드1
546정성태12/17/202212323blizzless-diiis 소개 - (C#으로 만들어진) Diablo 3 오픈 소스 서버
545정성태11/29/202218115[종료] [2차] "시작하세요 C# 10" 서적 나눔합니다. (5권)
544정성태11/6/202210251Camtasia - "변경된" 볼륨을 일괄 설정하는 방법
543정성태11/4/202221501[종료] "시작하세요 C# 10" 서적 나눔합니다. (4권 한정)
542정성태6/8/202213456입력 포커스를 가져가는 응용 프로그램을 확인하는 방법 - FocusLogger
541정성태6/7/202210783특정 USB 장치가 인식이 안 되는 문제
540정성태5/25/202210575구글 검색 시 "ko-kr"이 아닌 "en-us"에 해당하는 자료 검색 방법
539정성태5/23/202211544문법에 맞지 않는 learn.microsoft.com의 C++ 소스 코드
538정성태5/18/202211643WACOM Intuos Pro PTH-660 사용 후기 (개발자 입장)
537정성태3/17/202212337eFriend Plus 설치 후 실행이 안 되는 문제가 발생한다면?
536정성태1/13/2022149222021년 블로그 기부 수익 공개 ^^
535정성태11/25/2021147032021년 새로운 PC
534정성태10/19/202115475파판14 - 에오르제아의 시간 알람을 위한 C# WinForms 응용 프로그램 [1]파일 다운로드1
533정성태10/6/202117375모바일 브라우저에서 "비공개 연결이 아닙니다." NET::ERR_CERT_AUTHORITY_INVALID 오류가 발생하는 현상 [1]
531정성태9/1/20211509316GB로도 모자란 근래의 개발 환경
530정성태7/27/202113016그동안 마이크로소프트 계정으로 가입한 웹 서비스 및 응용 프로그램을 알아내는 방법
[1]  2  3  4  5  6  7  8  9  10  11  12  13  14  15  ...