๋„๋ฉ”์ธ ์ฃผ๋„ ์„ค๊ณ„

eric evans ddd

September 20, 2025

Practical go

์šฉ์–ด robustness : ์˜ˆ์ƒ์น˜ ๋ชปํ•œ ์ƒํ™ฉ์ด ๋ฐœ์ƒํ•ด๋„ ์–ด๋А ์ •๋„ ๊นŒ์ง€๋Š” ๋ณ„๋ฌธ์ œ ์—†์ด ๋™์ž‘ํ•˜๋Š”๊ฒƒ resiliency : ์–ด๋А ์ •๋„ ์‹œ๊ฐ„์ด ๊ฑธ๋ฆฌ๋”๋ผ๋„ ๋‹ค์‹œ ์ •์ƒ์ ์œผ๋กœ ๋™์ž‘ํ•˜๋Š” ๊ฒƒ ๋ชฉ์ฐจ CHAPTER 1 ์ปค๋งจ๋“œ ๋ผ์ธ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ์ž‘์„ฑ 1.1 ์ฒซ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ $ ./app Invalid number of arguments Usage: ./app <integer> [-h|--help] A greeter application which prints the name you entered <integer> number of times.% โ€ฆ/practical-go/chap01/manual-parse $ echo $? # ๋งˆ์ง€๋ง‰ exit code ํ™•์ธํ•˜๊ธฐ 1 1.2 ์œ ๋‹› ํ…Œ์ŠคํŠธ ์ž‘์„ฑ 1....

August 30, 2025

Golang-Index ๐Ÿ‘ป

Pages [[]]

August 30, 2025

์ค€๋น„ํ•˜๊ธฐ ๐Ÿ‘ป

Books the art of postgresql ์‹ค๋ฌด์— ๋ฐ”๋กœ ์“ฐ๋Š” Go ์–ธ์–ด ํ•ธ์ฆˆ์˜จ ๊ฐ€์ด๋“œ Grafana Env dotfiles ํ•œ๋ฒˆ์— ์„ค์น˜๋˜๋„๋ก ํ•˜๊ธฐ hx ํ‚ค๋งคํ•‘, ๊ธฐ๋Šฅ ์ •๋ฆฌ hhkb ํ‚ค๋งคํ•‘ ์ •๋ฆฌ ๋“ฑ

August 27, 2025

๊ณ ๋ฃจํ‹ด ์š”์•ฝ

Goroutines Goroutine Scheduling in Go Managed by the Go Runtime Scheduler Uses M:N Scheduling Model M goroutines are mapped onto N operating system threads Efficient Multiplexing (switching) Concurrency vs Parellelism Concurrency : multiple tasks progress simultaneously and not necessarily at the same time Parellelism : tasks are executed literally at the same time on mutliple processors Common Pitfalls and Best Practices Avoiding Goroutine Leaks Limiting Goroutine Creation Proper Error Handling Synchronization Channels Why Use Channels?...

August 17, 2025

golang์˜ ์ธํ„ฐํŽ˜์ด์Šค

ํ•ต์‹ฌ ์ฐจ์ด์  1. Python (๋• ํƒ€์ดํ•‘) - ๋„ˆ๋ฌด ์ž์œ ๋กœ์›€ # ๋ฌธ์ œ: ์–ด๋–ค ๋ฉ”์„œ๋“œ๊ฐ€ ํ•„์š”ํ•œ์ง€ ์•Œ๊ธฐ ์–ด๋ ค์›€ def program(logic): logic.process(data) # process ๋ฉ”์„œ๋“œ๊ฐ€ ์žˆ๊ธฐ๋ฅผ '๊ธฐ๋Œ€'๋งŒ ํ•จ class Logic: def process(self, data): return "์ฒ˜๋ฆฌ๋จ" class WrongLogic: def handle(self, data): # process๊ฐ€ ์•„๋‹ˆ๋ผ handle! return "์ฒ˜๋ฆฌ๋จ" program(Logic()) # ์ž‘๋™ program(WrongLogic()) # ๋Ÿฐํƒ€์ž„ ์—๋Ÿฌ! AttributeError ์–ด๋–ค ๋ฉ”์„œ๋“œ๊ฐ€ ํ•„์š”ํ•œ์ง€ ์ฝ”๋“œ๋งŒ ๋ด์„œ๋Š” ์•Œ ์ˆ˜ ์—†์Œ. 2. Java (๋ช…์‹œ์  ๊ตฌํ˜„) - ๋„ˆ๋ฌด ๊ฒฝ์ง๋จ // ์ธํ„ฐํŽ˜์ด์Šค ๋จผ์ € ์ •์˜ํ•ด์•ผ ํ•จ public interface Logic { String process(String data); } // ๋ฐ˜๋“œ์‹œ implements ํ‚ค์›Œ๋“œ๋กœ ๋ช…์‹œ์  ๊ตฌํ˜„ public class LogicImpl implements Logic { public String process(String data) { return "์ฒ˜๋ฆฌ๋จ"; } } // ์ƒˆ๋กœ์šด ์š”๊ตฌ์‚ฌํ•ญ: ๋‹ค๋ฅธ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์˜ ํด๋ž˜์Šค ์‚ฌ์šฉํ•˜๊ณ  ์‹ถ์Œ public class ThirdPartyProcessor { public String handle(String data) { // ๋ฉ”์„œ๋“œ๋ช…์ด ๋‹ค๋ฆ„!...

August 16, 2025

Golang์˜ ์ž„๋ฒ ๋”ฉ

๊ธฐ๋ณธ ๊ฐœ๋… ์ž„๋ฒ ๋”ฉ์€ Go์—์„œ ์ƒ์†๊ณผ ๋น„์Šทํ•œ ํšจ๊ณผ๋ฅผ ๋‚ด๋Š” ๋ฐฉ๋ฒ•. ํ•˜์ง€๋งŒ ์ƒ์†์ด ์•„๋‹ˆ๋ผ ์ปดํฌ์ง€์…˜(composition). ๊ตฌ์กฐ์ฒด ์ž„๋ฒ ๋”ฉ ๊ธฐ๋ณธ ์‚ฌ์šฉ๋ฒ• type Person struct { Name string Age int } func (p Person) Greet() string { return "์•ˆ๋…•, ๋‚˜๋Š” " + p.Name } type Employee struct { Person // ์ž„๋ฒ ๋”ฉ! ํƒ€์ž…๋งŒ ์“ฐ๊ณ  ํ•„๋“œ๋ช… ์—†์Œ Position string Salary int } func main() { emp := Employee{ Person: Person{Name: "๊น€์ฒ ์ˆ˜", Age: 30}, Position: "๊ฐœ๋ฐœ์ž", Salary: 5000, } // Person์˜ ํ•„๋“œ์— ์ง์ ‘ ์ ‘๊ทผ ๊ฐ€๋Šฅ fmt....

August 16, 2025

go ์ œ๋กœ๊ฐ’๊ณผ ๊ฐ’์—†์Œ

โ€œ๊ฐ’์ด ์—†์Œ"์„ ์–ด๋–ป๊ฒŒ ํ‘œํ˜„ํ• ๊นŒ? ์˜ˆ๋ฅผ ๋“ค์–ด ์‚ฌ์šฉ์ž ์ •๋ณด๋ฅผ ๋‹ด๋Š” ๊ตฌ์กฐ์ฒด๊ฐ€ ์žˆ์œผ๋ฉด. type User struct { Name string Age int } user := User{Name: "ํ™๊ธธ๋™"} fmt.Println(user.Age) // 0 ์—ฌ๊ธฐ์„œ ๋ฌธ์ œ๊ฐ€ ์ƒ๊ธด๋‹ค. user.Age๊ฐ€ 0์ธ๋ฐ, ์ด๊ฒŒ ์ง„์งœ 0์‚ด์ธ์ง€ ์•„๋‹ˆ๋ฉด ๋‚˜์ด ์ •๋ณด๊ฐ€ ์—†๋Š” ๊ฑด์ง€ ๊ตฌ๋ถ„ํ•  ์ˆ˜ ์—†๋‹ค. ํ•ด๊ฒฐ์ฑ… 1: ํฌ์ธํ„ฐ ์‚ฌ์šฉ type User struct { Name string Age *int } // ๋‚˜์ด๋ฅผ ์•„๋Š” ๊ฒฝ์šฐ age := 25 user1 := User{Name: "๊น€์ฒ ์ˆ˜", Age: &age} // ๋‚˜์ด๋ฅผ ๋ชจ๋ฅด๋Š” ๊ฒฝ์šฐ user2 := User{Name: "๋ฐ•์˜ํฌ", Age: nil} // ์‚ฌ์šฉํ•  ๋•Œ if user1....

August 16, 2025

C++ PS ์ •๋ฆฌ ๐Ÿ”„

C++ PS 1๋‹จ๊ณ„: ๊ธฐ์ดˆ ๋ฌธ๋ฒ• ์™„์ „์ •๋ณต ๐ŸŽฏ 0. PS ํ•„์ˆ˜ ํ—ค๋”์™€ ๋งคํฌ๋กœ ๊ธฐ๋ณธ ํ—ค๋” ํŒŒ์ผ๋“ค // ํ•„์ˆ˜ ๊ธฐ๋ณธ ํ—ค๋” #include <iostream> // cin, cout #include <vector> // vector ์ปจํ…Œ์ด๋„ˆ #include <string> // string ํด๋ž˜์Šค #include <algorithm> // STL ์•Œ๊ณ ๋ฆฌ์ฆ˜ ํ•จ์ˆ˜๋“ค // ์ถ”๊ฐ€ ์œ ์šฉํ•œ ํ—ค๋”๋“ค #include <queue> // queue, priority_queue #include <stack> // stack #include <deque> // deque #include <set> // set, multiset #include <map> // map, multimap #include <unordered_set> // unordered_set #include <unordered_map> // unordered_map #include <utility> // pair, make_pair #include <functional> // greater, less ๋“ฑ #include <numeric> // accumulate, gcd, lcm #include <cmath> // pow, sqrt, abs ๋“ฑ #include <climits> // INT_MAX, LLONG_MAX ๋“ฑ #include <cassert> // assert ๋งคํฌ๋กœ // ๋งŒ๋Šฅ ํ—ค๋” (๋Œ€ํšŒ์šฉ) #include <bits/stdc++....

July 31, 2025

ํšจ์œจ์ ์ธ ๋ฆฌ๋ˆ…์Šค ๋ช…๋ น์–ด ์‚ฌ์šฉ์˜ ๊ธฐ์ˆ 

๋ฆฌ๋ˆ…์Šค ๋ช…๋ น์–ด ํ•™์Šต ์ฒดํฌ๋ฆฌ์ŠคํŠธ 1๋ถ€ ํ•ต์‹ฌ ๊ฐœ๋… 1์žฅ ๋ฆฌ๋ˆ…์Šค ๋ช…๋ น ๊ฒฐํ•ฉํ•˜๊ธฐ 1.1 ์ž…๋ ฅ๊ณผ ์ถœ๋ ฅ, ๊ทธ๋ฆฌ๊ณ  ํŒŒ์ดํ”„ 1.2 ๊ธฐ๋ณธ ๋ช…๋ น ์—ฌ์„ฏ ๊ฐ€์ง€ 1.2.1 ์ฒซ ๋ฒˆ์งธ ๋ช…๋ น - wc 1.2.2 ๋‘ ๋ฒˆ์งธ ๋ช…๋ น - head 1.2.3 ์„ธ ๋ฒˆ์งธ ๋ช…๋ น - cut 1.2.4 ๋„ค ๋ฒˆ์งธ ๋ช…๋ น - grep 1.2.5 ๋‹ค์„ฏ ๋ฒˆ์งธ ๋ช…๋ น - sort 1.2.6 ์—ฌ์„ฏ ๋ฒˆ์งธ ๋ช…๋ น - uniq 1.3 ์ค‘๋ณต ํŒŒ์ผ ์ฐพ์•„๋‚ด๊ธฐ 1.4 ์ •๋ฆฌ 2์žฅ ์…ธ๊ณผ ์นœํ•ด์ง€๊ธฐ 2.1 ์…ธ์— ๊ด€ํ•œ ์šฉ์–ด 2....

June 21, 2025