Potato
์•ˆ๋…•ํ•˜์„ธ์š”, ๊ฐ์žก๋‹ˆ๋‹ค?๐Ÿฅ” ^___^ ๐Ÿ˜บ github ๋ฐ”๋กœ๊ฐ€๊ธฐ ๐Ÿ‘‰๐Ÿป
๋ฐ˜์‘ํ˜•

potato's devlog 437

[Software Engineering] (iOS/Swift ๊ธฐ์ค€) ๊ฐ์ฒด์ง€ํ–ฅ ํ”„๋กœ๊ทธ๋ž˜๋ฐ (OOP), OOP ํŠน์ง•, OOP 5์›์น™ SOLID

์Šคํ„ฐ๋””๋ฅผ ์šด์˜ํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ํ•ด๋‹น repository์— ๊ฐ€๋ฉด ๋” ๋งŽ์€ ์ •๋ณด๋ฅผ ๋ณด์‹ค ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค! ํŠนํžˆ close ๋œ PR์„ ๋ณด์‹œ๋ฉด, ์–ด๋–ค ๋ถ€๋ถ„์— ๋Œ€ํ•ด์„œ ๊ณ ๋ฏผํ•˜๊ณ  ์Šคํ„ฐ๋””์›๋“ค๊ณผ ์ด์•ผ๊ธฐ๋‚˜๋ˆด๋Š”์ง€ ๋ณด์‹ค ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค https://github.com/JulSaMo/CS-start GitHub - JulSaMo/CS-start: ๐Ÿ“ CS ์ง€์‹ ๋Œ€๋ฐฑ๊ณผ โœจ ๐Ÿ“ CS ์ง€์‹ ๋Œ€๋ฐฑ๊ณผ โœจ. Contribute to JulSaMo/CS-start development by creating an account on GitHub. github.com ๐ŸŸ  ๊ฐ์ฒด (Object) CS์—์„œ ๊ฐ์ฒด๋Š” ๋ฌผ๋ฆฌ์ ์œผ๋กœ ์กด์žฌํ•˜๊ฑฐ๋‚˜ ์ถ”์ƒ์ ์œผ๋กœ ์ƒ๊ฐํ•  ์ˆ˜ ์žˆ๋Š” ๊ฒƒ ์ค‘์—์„œ ์ž์‹ ์˜ ์†์„ฑ์„ ๊ฐ€์ง€๊ณ  ์žˆ๊ณ  ๋‹ค๋ฅธ๊ฒƒ๊ณผ ์‹๋ณ„ ๊ฐ€๋Šฅํ•œ ๊ฒƒ์„ ๋งํ•œ๋‹ค. ์ปดํ“จํ„ฐ๋ฅผ ์˜ˆ๋กœ๋“ค๋ฉด, '..

[ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค] (Swift) Kakao - [3์ฐจ]ํŒŒ์ผ๋ช… ์ •๋ ฌ (Lv.3) (feat. ์˜ˆ์™ธ ์ผ€์ด์Šค ์ ์šฉ์‹œ์ผœ ๋ณด๊ธฐ)

๐ŸŸ  TIL ์˜ค๋Š˜ ๋ฐฐ์šด ๊ฒƒ ๐Ÿ“ ํด๋กœ์ € ํ™œ์šฉํ•ด์„œ array ์ด์ค‘(?), ๋‹ค์ค‘ ์ •๋ ฌํ•˜๊ธฐ ํด๋กœ์ €๋ฅผ ์‚ฌ์šฉํ•ด์„œ array์— ์—ฌ๋Ÿฌ ์กฐ๊ฑด๋ณ„๋กœ ์ •๋ ฌํ•ด์ค„ ์ˆ˜ ์žˆ๋‹ค. ์ด ๋ฐฉ๋ฒ•์—๋Š”, ์•„๋ž˜์™€ ๊ฐ™์€ ๋ฐฉ๋ฒ•์ด ์žˆ๋‹ค. let myGrades = [ ["B", "๋‹ค"], ["A", "๋ฐ”"], ["C", "๋‚˜"], ["B", "๊ฐ€"], ["A", "๋ผ"], ["A", "๋งˆ"] ] print(myGrades.sorted { ($0[0] $1[1]) }) // [["A", "๋ฐ”"], ["A", "๋งˆ"], ["A", "๋ผ"], ["B", "๋‹ค"], ["B", "๊ฐ€"], ["C", "๋‚˜"]] ์ด๋ ‡๊ฒŒ ํ•˜๊ฒŒ๋˜๋ฉด, ABC ์˜ค๋ฆ„์ฐจ์ˆœ์€ ๊ทธ๋Œ€๋กœ ์œ ์ง€ํ•˜๋ฉด์„œ, ๋’ค์— '๊ฐ€๋‚˜๋‹ค'๋Š” ๋‚ด๋ฆผ์ฐจ์ˆœ์œผ๋กœ ์ •๋ ฌํ–ˆ๋‹ค. || ๋…ผ๋ฆฌ์—ฐ์‚ฐ์ž๋ฅผ ํ†ต..

[ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค] (Swift) Kakao - [3์ฐจ]์••์ถ•

๐ŸŸ  TIL (ํ•ด๋‹น ๋ฌธ์ œ๋ฅผ ํ’€๋ฉฐ ๋ฐฐ์šด์ ) โค๏ธ‍๐Ÿ”ฅ swift ๋”•์…”๋„ˆ๋ฆฌ์—์„œ ํŠน์ • ๋ฌธ์ž๋ฅผ ์ฐพ๊ธฐ (๋”•์…”๋„ˆ๋ฆฌ contain ์‚ฌ์šฉ๋ฒ•) ๋”•์…”๋„ˆ๋ฆฌ์—์„œ ํŠน์ • ๋ฌธ์ž๋ฅผ ๊ฐ€์ง„ key ๊ฐ’์„ ๊ฒ€์ƒ‰ํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” contain์„ ์‚ฌ์šฉํ•˜๋ฉด ๋œ๋‹ค.ํ•˜์ง€๋งŒ, ๋”•์…”๋„ˆ๋ฆฌ ์ž๋ฃŒํ˜•์—์„œ๋Š” 'ํด๋กœ์ €'๋ฅผ ํ†ตํ•ด์„œ ์•Œ์•„๋ณผ ์ˆ˜ ์žˆ๋‹ค. func wcCheckInDict(_ w: String, _ c: String, dict: [String:Int]) -> Bool { let wc = w+c let isinDict = dict.contains { $0.key == wc } return isinDict } ์œ„ ์ฝ”๋“œ ์ฒ˜๋Ÿผ, dict์—์„œ contain์„ ์ด์šฉํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” ํด๋กœ์ €๋ฅผ ์‚ฌ์šฉํ•˜๊ณ , key๋ƒ value๋ƒ๋ฅผ ๊ฒ€์ƒ‰ํ•˜๋ฉด ๋œ๋‹ค.๋งˆ์ฐฌ๊ฐ€์ง€๋กœ Bool๊ฐ’์„ ๋ฆฌํ„ดํ•œ๋‹ค! ๐ŸŸ  ..

[UIKit] BaseViewController๋ฅผ ์‚ฌ์šฉํ•ด๋ณด์ž. (์ฝ”๋“œ์˜ ๊ฐ€๋…์„ฑ ๋†’์ด๊ธฐ, ์ค‘๋ณต ์ค„์ด๊ธฐ)

์ƒˆ๋กœ์šด ์‚ฌ์ด๋“œ ํ”„๋กœ์ ํŠธ๋ฅผ ํ•˜๊ณ  ์žˆ๋Š”๋ฐ, ๊ฑฐ๊ธฐ์„œ ์‚ฌ์šฉํ•ด๋ณผ BaseViewController์— ๋Œ€ํ•ด์„œ ๊ธ€์„ ์ž‘์„ฑํ•ด๊ฒ ๋‹ค. ์ด๋ฒˆ ํ”„๋กœ์ ํŠธ์—์„œ๋Š” ๋‚ด๊ฐ€ ํ•ด๋ณด์ง€ ์•Š์•˜๋˜ ๊ฒƒ๋“ค์„ ์กฐ๊ธˆ์”ฉ ๋„์ „ํ•ด๋ณด๋ฉด์„œ ๋งŒ๋“ค์–ด๋ณผ ์˜ˆ์ •์ด๋‹ค... ๊ทธ๋Ÿฐ๋ฐ ์กฐ๊ธˆ ๊ฐœ๋ฐœ ๊ธฐ๊ฐ„์ด ์ด‰๋ฐ•...ํ•ด์„œ...๊ฑฑ์ •์ด ...,,, ์”... ๐ŸŸ  BaseViewController๋ž€? BaseViewController๋Š” ์ปค์Šคํ…€ ๋ทฐ ์ปจํŠธ๋กค๋Ÿฌ์ด๋‹ค. ๊ธฐ๋ณธ์ ์œผ๋กœ UIKit์œผ๋กœ ๋ทฐ๋ฅผ ๋งŒ๋“ค๊ฒŒ ๋˜๋ฉด UIViewController๋ฅผ ์ƒ์†๋ฐ›๊ฒŒ ๋˜๋Š”๋ฐ, ์ด UIViewController๋Œ€์‹  ๋‚ด๊ฐ€ ๋งŒ๋“  BaseViewController๋ฅผ ์ƒ์†๋ฐ›๊ฒŒ ํ•˜๋ฉด๋œ๋‹ค.! ๊ทธ๋ž˜์„œ ์›๋ž˜๋Š” makeview

[ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค] (Swift) Kakao - [3์ฐจ]๋ฐฉ๊ธˆ๊ทธ๊ณก (Lv.2) (feat. ๋ฌธ์ž์—ด ์น˜ํ™˜ replacingOccurrences)

๐Ÿ“ TIL - swift ํŠน์ • ๋ฌธ์ž์—ด ๋ณ€๊ฒฝ, ๋ฌธ์ž์—ด ์น˜ํ™˜, swift replace ๋ฌธ์ œ๋ฅผ ํ’€๋ฉด์„œ ๋‚ด๊ฐ€ ๋ฐฐ์šด ํ•œ๊ฐ€์ง€ ์ ๊ธฐ! ๋ฌธ์ž์—ด ์น˜ํ™˜~~ replacingOccurrences(of: , with: ) let musicCode = "CC#BCC#BCC#BCC#B" let newMusicCode = musicCode.replacingOccurrences(of: "C#", with: "V") .replacingOccurrences(of: "D#", with: "W") .replacingOccurrences(of: "F#", with: "X") .replacingOccurrences(of: "G#", with: "Y") .replacingOccurrences(of: "A#", with: "Z") print(n..

[ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค] (Swift) Kakao - [1์ฐจ] ์บ์‹œ (Lv.2)

๐ŸŸ  ๋ฌธ์ œ ๋งํฌ https://school.programmers.co.kr/learn/courses/30/lessons/17680 ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค ์ฝ”๋“œ ์ค‘์‹ฌ์˜ ๊ฐœ๋ฐœ์ž ์ฑ„์šฉ. ์Šคํƒ ๊ธฐ๋ฐ˜์˜ ํฌ์ง€์…˜ ๋งค์นญ. ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค์˜ ๊ฐœ๋ฐœ์ž ๋งž์ถคํ˜• ํ”„๋กœํ•„์„ ๋“ฑ๋กํ•˜๊ณ , ๋‚˜์™€ ๊ธฐ์ˆ  ๊ถํ•ฉ์ด ์ž˜ ๋งž๋Š” ๊ธฐ์—…๋“ค์„ ๋งค์นญ ๋ฐ›์œผ์„ธ์š”. programmers.co.kr ๐ŸŸ  ๋‚˜์˜ ํ’€์ด ์šฐ์„  LRU ์•Œ๊ณ ๋ฆฌ์ฆ˜์— ๋Œ€ํ•ด์„œ ์•Œ์•„์•ผํ–ˆ๋‹ค. ์ง„์งœ ๋งˆ์นจ,, ๋งˆ์นจ,, ์˜ค๋Š˜ ์•„์นจ์— CS ์Šคํ„ฐ๋””๋ฅผ ํ–ˆ๋Š”๋ฐ ๊ฑฐ๊ธฐ์„œ LRU ์•Œ๊ณ ๋ฆฌ์ฆ˜์ด ๋‚˜์™”๋‹ค. ๊ทผ๋ฐ ์ž์„ธํ•œ ์„ค๋ช…์€... ์•„์ง ์ดํ•ดํ•˜์ง€ ์•Š๊ณ  ๋„˜์–ด๊ฐ„ ์ƒํƒœ๋‹ค.. ๊ทผ๋ฐ ๋ฐ”๋กœ๋‚˜์™€ ๋ฒ„๋ฆฌ๋‹ค๋‹ˆ!! LRU๋Š” ํŽ˜์ด์ง• ๊ต์ฒด ์•Œ๊ณ ๋ฆฌ์ฆ˜์—์„œ ๋“ฑ์žฅํ•œ ๊ฐœ๋…์ด์—ˆ๋‹ค. ๊ฐœ๋…์€ Least Recently Used๋กœ, ๊ฐ€์žฅ ์˜ค๋žซ๋™์•ˆ ์‚ฌ์šฉ๋˜์ง€ ์•Š์€ ํŽ˜์ด์ง€๋ฅผ ๊ต์ฒดํ•˜๋Š” ..

[Operating System] (iOS) ์„ธ๋งˆํฌ์–ด (Semaphore), ๋ฎคํ…์Šค (Mutex)

์Šคํ„ฐ๋””๋ฅผ ์šด์˜ํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ํ•ด๋‹น repository์— ๊ฐ€๋ฉด ๋” ๋งŽ์€ ์ •๋ณด๋ฅผ ๋ณด์‹ค ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค! ํŠนํžˆ close ๋œ PR์„ ๋ณด์‹œ๋ฉด, ์–ด๋–ค ๋ถ€๋ถ„์— ๋Œ€ํ•ด์„œ ๊ณ ๋ฏผํ•˜๊ณ  ์Šคํ„ฐ๋””์›๋“ค๊ณผ ์ด์•ผ๊ธฐ๋‚˜๋ˆด๋Š”์ง€ ๋ณด์‹ค ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค https://github.com/JulSaMo/CS-start GitHub - JulSaMo/CS-start: ๐Ÿ“ CS ์ง€์‹ ๋Œ€๋ฐฑ๊ณผ โœจ ๐Ÿ“ CS ์ง€์‹ ๋Œ€๋ฐฑ๊ณผ โœจ. Contribute to JulSaMo/CS-start development by creating an account on GitHub. github.com ๐ŸŸ  ๋“ค์–ด๊ฐ€๋ฉฐ ๐Ÿ”ธ Critical section (์ž„๊ณ„์˜์—ญ) ์ด๋ž€? ์—ฌ๋Ÿฌ ํ”„๋กœ์„ธ์Šค๊ฐ€ ๋ฐ์ดํ„ฐ๋ฅผ ๊ณต์œ ํ•˜๋ฉฐ ์ˆ˜ํ–‰๋  ๋•Œ, ๊ฐ ํ”„๋กœ์„ธ์Šค์—์„œ ๊ณต์œ  ๋ฐ์ดํ„ฐ๋ฅผ ์ ‘๊ทผํ•˜๋Š” ํ”„๋กœ๊ทธ๋žจ ์ฝ”๋“œ ๋ธ”๋ก ์ฆ‰, ์—ฌ๋Ÿฌ ํ”„..

[Operating System] (iOS) IPC ์ด๋ž€? (Inter-Process Communication)

์Šคํ„ฐ๋””๋ฅผ ์šด์˜ํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ํ•ด๋‹น repository์— ๊ฐ€๋ฉด ๋” ๋งŽ์€ ์ •๋ณด๋ฅผ ๋ณด์‹ค ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค! ํŠนํžˆ close ๋œ PR์„ ๋ณด์‹œ๋ฉด, ์–ด๋–ค ๋ถ€๋ถ„์— ๋Œ€ํ•ด์„œ ๊ณ ๋ฏผํ•˜๊ณ  ์Šคํ„ฐ๋””์›๋“ค๊ณผ ์ด์•ผ๊ธฐ๋‚˜๋ˆด๋Š”์ง€ ๋ณด์‹ค ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค https://github.com/JulSaMo/CS-start GitHub - JulSaMo/CS-start: ๐Ÿ“ CS ์ง€์‹ ๋Œ€๋ฐฑ๊ณผ โœจ ๐Ÿ“ CS ์ง€์‹ ๋Œ€๋ฐฑ๊ณผ โœจ. Contribute to JulSaMo/CS-start development by creating an account on GitHub. github.com ๐ŸŸ  IPC (Inter Process Communication) ์œ„ ์‚ฌ์ง„์ฒ˜๋Ÿผ ํ”„๋กœ์„ธ์Šค๋Š” ๊ฐ์ž ๋…๋ฆฝ๋œ ๋ฉ”๋ชจ๋ฆฌ ๊ณต๊ฐ„์„ ๊ฐ€์ง€๊ณ  ์žˆ์–ด์„œ ์„œ๋กœ๊ฐ„์˜ ๋ฐ์ดํ„ฐ๋ฅผ ๊ณต์œ ํ•  ๋ฐฉ๋ฒ•์ด ์—†๋‹ค. ๊ทธ๋ ‡๊ธฐ ๋•Œ๋ฌธ์— ๋‚˜..

[Operating System] (iOS) PCB์™€ Context Switching

์Šคํ„ฐ๋””๋ฅผ ์šด์˜ํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ํ•ด๋‹น repository์— ๊ฐ€๋ฉด ๋” ๋งŽ์€ ์ •๋ณด๋ฅผ ๋ณด์‹ค ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค! ํŠนํžˆ close ๋œ PR์„ ๋ณด์‹œ๋ฉด, ์–ด๋–ค ๋ถ€๋ถ„์— ๋Œ€ํ•ด์„œ ๊ณ ๋ฏผํ•˜๊ณ  ์Šคํ„ฐ๋””์›๋“ค๊ณผ ์ด์•ผ๊ธฐ๋‚˜๋ˆด๋Š”์ง€ ๋ณด์‹ค ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค https://github.com/JulSaMo/CS-start GitHub - JulSaMo/CS-start: ๐Ÿ“ CS ์ง€์‹ ๋Œ€๋ฐฑ๊ณผ โœจ ๐Ÿ“ CS ์ง€์‹ ๋Œ€๋ฐฑ๊ณผ โœจ. Contribute to JulSaMo/CS-start development by creating an account on GitHub. github.com ๐ŸŸ  ๋“ค์–ด๊ฐ€๋ฉฐ ๐Ÿ”ธ Process Management CPU๊ฐ€ ํ”„๋กœ์„ธ์Šค๊ฐ€ ์–ด๋Ÿฌ๊ฐœ์ผ ๋•Œ, CPU ์Šค์ผ€์ฅด๋ง์„ ํ†ตํ•ด ๊ด€๋ฆฌํ•˜๋Š” ๊ฒƒ์„ ๋งํ•œ๋‹ค. https://velog.io/@hyehello/CS-..

[Operating System] (iOS) System Call (์‹œ์Šคํ…œ์ฝœ, ์‹œ์Šคํ…œ ํ˜ธ์ถœ์ด๋ž€?)

์Šคํ„ฐ๋””๋ฅผ ์šด์˜ํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ํ•ด๋‹น repository์— ๊ฐ€๋ฉด ๋” ๋งŽ์€ ์ •๋ณด๋ฅผ ๋ณด์‹ค ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค! ํŠนํžˆ close ๋œ PR์„ ๋ณด์‹œ๋ฉด, ์–ด๋–ค ๋ถ€๋ถ„์— ๋Œ€ํ•ด์„œ ๊ณ ๋ฏผํ•˜๊ณ  ์Šคํ„ฐ๋””์›๋“ค๊ณผ ์ด์•ผ๊ธฐ๋‚˜๋ˆด๋Š”์ง€ ๋ณด์‹ค ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค https://github.com/JulSaMo/CS-start GitHub - JulSaMo/CS-start: ๐Ÿ“ CS ์ง€์‹ ๋Œ€๋ฐฑ๊ณผ โœจ ๐Ÿ“ CS ์ง€์‹ ๋Œ€๋ฐฑ๊ณผ โœจ. Contribute to JulSaMo/CS-start development by creating an account on GitHub. github.com ๐ŸŸ  ๋“ค์–ด๊ฐ€๋ฉฐ ์šด์˜์ฒด์ œ(OS) : Window, DOS, UNIX, Linux, Mac OS ๋“ฑ ์‘์šฉ ํ”„๋กœ๊ทธ๋žจ : ํ•œ๊ธ€, ์—‘์…€, ๋ฉ”๋ชจ์žฅ ๋“ฑ ์ปดํ“จํ„ฐ ๋‚ด์˜ ๋‹ค์–‘ํ•œ ํ”„๋กœ๊ทธ๋žจ๋“ค ์šด์˜์ฒด์ œ ๋Š” ์ปดํ“จ..

๋ฐ˜์‘ํ˜•