Skip to content

Commit

Permalink
Merge branch 'main' into hong/good-software-design-doc
Browse files Browse the repository at this point in the history
  • Loading branch information
deepbig authored Dec 16, 2024
2 parents 9b17662 + e07c015 commit 23133f8
Show file tree
Hide file tree
Showing 177 changed files with 17,822 additions and 22 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @binary-ho @egg528 @deepbig @minkyung00 @hjy0951
45 changes: 45 additions & 0 deletions .github/workflows/md-file-counter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: 10000-bagger Auto Markdown File Count Workflow

on:
push:
branches:
- main
pull_request:
types:
- closed
branches:
- main

jobs:
build:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.merged == true)
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.8'

- name: count files
run: |
python3 -m counter
- name: Commit changes
run: |
git config --local user.email "dfghcvb11@naver.com"
git config --local user.name "binary-ho"
git add -u
if git diff --cached --quiet; then
echo "No changes to commit"
else
git commit -m "10000-bagger auto md file counter"
fi
- name: Push changes
run: |
git remote set-url origin https://binary-ho@github.com/10000-Bagger/free-topic-study.git
git push origin main
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.next
node_modules

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
23 changes: 9 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,19 @@
# 자유 주제 스터디
### 전체 아티클 갯수: 115개

### 진행 방식
<br>

### 웹 사이트 -> [반디북](https://bandibook.vercel.app/10000-bagger)

<br>

### 진행 방식
- 각자 이름의 branch에서 각자 이름의 폴더에 공부 내용을 정리하여 한다.
- 일주일에 5번 main branch를 향하는 PR을 올린다.
- 새벽 6시 전까지 올린 PR은 전날 올린 건으로 간주된다. (출근길 글 읽기를 위해)
- 매일 낮 12시 이전까지 스터디원이 올린 PR에 승인, 질문 등의 피드백을 남긴다.
- PR에 꼭 완성된 글을 올리지 않아도 된다.

### PR 현황
#### 2024.02.07(수) ~ 2024.02.11(일)
| | 1 | 2 | 3 |
| ---------- | ---------- | ---------- | ---------- |
| @binary_ho | 2024.02.07 | | |
| @deepbig | 2024.02.07 | 2024.02.10 | 2024.02.11 |
| @egg528 | 2024.02.09 | | |
<br>

#### 2024.02.12(월) ~ 2024.02.18(일)
| | 1 | 2 | 3 | 4 | 5 |
|------------|---|---|---|---|---|
| @binary_ho | | | | | |
| @deepbig | | | | | |
| @egg528 | | | | | |
### 누적 벌금 : 970,368 원 (2024.10.4 기준)
Empty file added counter/__init__.py
Empty file.
26 changes: 26 additions & 0 deletions counter/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import os

def count_md_files(directory):
md_count = 0
for root, dirs, files in os.walk(directory):
md_count += sum(1 for file in files if file.endswith('.md'))
return md_count


if __name__ == "__main__":
root = os.getcwd()
md_file_count = count_md_files(root) - 1 # README.md 파일 제외
readme_path = os.path.join(root, 'README.md')

with open(readme_path, 'r', encoding='utf-8') as file:
readme_contents = file.readlines()

for i, line in enumerate(readme_contents):
if line.startswith("### 전체 아티클 갯수:"):
readme_contents[i] = f"### 전체 아티클 갯수: {md_file_count}\n"
break

with open(readme_path, 'w', encoding='utf-8') as file:
file.writelines(readme_contents)

print(f"Updated the README.md with total article count: {md_file_count}")
1 change: 1 addition & 0 deletions hong/clean-code/2. 의미 있는 이름.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ class Customer {
> 프로그래밍 언어에서 변수 및 함수의 임자 이름 앞에 데이터 타입을 명시하는 코딩 규칙이다.
IDE라는 게 부실했던 80년대 당시에는 이 규칙이 엄청난 센세이션을 불러일으켰다. 당시는 컴파일러가 타입을 점검하지 않았으므로 프로그래머에게 타입을 기억할 단서가 필요했다.

하지만 최근의 모든 프로그래밍 언어는 훨씬 많은 타입을 지원하며, 또한 컴파일러가 타입을 기억하고 강제한다.
자바 프로그래머는 더 이상 변수 이름에 타입을 인코딩할 필요가 없다. 객체는 강한 타입이며, IDE는 코드를 컴파일하지 않고도 타입 오류를 감지할 수 있다. 따라서 이제는 헝가리식 표기법이나 기타 인코딩 방식이 오히려 방해될 뿐이다. 변수, 함수, 클래스 이름이나 타입을 바꾸기가 어려워지며, 읽기도 어려워진다.

Expand Down
Loading

0 comments on commit 23133f8

Please sign in to comment.