Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Round1] Step3 - tomchoi95 #999

Open
wants to merge 2 commits into
base: ss_20_tomchoi95
Choose a base branch
from

Conversation

tomchoi95
Copy link

다음부턴 질문거리도 열심히 가져오겠습니다.
@jaemuYeo

@tomchoi95 tomchoi95 changed the title [Round1] Step1 - tomchoi95 [Round1] Step3 - tomchoi95 Sep 21, 2024
@jaemuYeo
Copy link

tomchoi님 안녕하세요.
아직 스텝2가 진행중인데 스텝3를 보내주셔서요!
확인 후 디스코드로 메시지 한 번 남겨주세요 :)

Copy link

@jaemuYeo jaemuYeo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Round1 고생많으셨습니다!
아직 Merge 전이니 지난번처럼 close하시면 안돼요!! ><
수정하여 코드 반영 후 코멘트에 수정 완료 했다고 전달 부탁해요~

순서도

흐름은 좋으나 몇 가지 수정할 부분이 있을 것 같아 전달드리겠습니다!
(빼뺴로 만들기에 대한 순서도는 없는 것 같아요~ 재요청시 추가해주세요!)

  • 시작과 종료의 표현이 되어있지 않아요!
    • 아이스크림 만들기가 시작 표현같은데 종료의 표현은 없는 것 같습니다.
  • 그 외 변수들은 코드 수정 시 생략될 것이기때문에 수정 후 확인하겠습니다!

@@ -8,5 +8,20 @@

import Foundation

print("Hello, World!")
func icecream() {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

네이밍이 조금 더 명확하게 표현되었으면 좋겠어요!
iceCreamBody, iceCreamBar와 같이요 :)

두 개의 함수 모두 아이스크림 하나를 그리는 것이기에 아이스크림의 어떤 부분을 그리는 것이다!라고 표현하면 좋아요.
또한 API 디자인 가이드라인 문서를 보면
함수를 네이밍할때 앞에 동사를 붙이라고 되어있습니다! 꼭 한 번 읽어보시길 추천드려요 🙏
디자인 가이드라인에 맞게 네이밍 수정해보시길 바랍니다!

@@ -8,5 +8,20 @@

import Foundation

print("Hello, World!")
func icecream() {
for _ in 1...8 {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

와일드카드패턴까지 사용하여 for문을 잘 활용해주셨네요! 컨벤션도 좋아요 👍


import Foundation

var bodyLength : Int = 3

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이렇게 변수에 설정값들을 담아둘수도 있지만 함수호출과 함께 매개변수에 입력값들을 받아볼 수 있게해볼 수 있을까요?
함수의 사용 목적은 재사용성입니다!
현재와 같은 구현은 또 다른 빼빼로를 만든다고 했을 때 반복적인 코드가 발생할거예요 😵‍💫

아래에 함수들은 재사용성있게 수정 후 다시 한 번 코멘트 드리겠습니다!

var barLength : Int = 3

func makeBody() -> String {
return topping+body+topping

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

연산자(+) 앞뒤로 띄어쓰기를 한번씩 해주는 것이 가독성이 좋습니다!

topping + body + topping

}
}

func information() {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

정보를 표현해주는 함수도 따로 기능 분리해주셨군요! 좋습니다 👍

@tomchoi95
Copy link
Author

@jaemuYeo

빼빼로 만들기 순서도

  • makeIceCream.drawio → Pepero.drawio (빼뺴로 순서도를 아이스크림 순서도로 오표기)
  • 종료 표현 사용

함수 네이밍 수정

  • iceCream -> makeIceCream
  • bar - > makeBar

makeBody() 의 return 값 연산자 사이 띄어쓰기 추가

  • topping+body+topping -> topping + body + topping

Global variable 사용을 함수 내부의 paramater로 전환

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants