Skip to main content

안녕 2024, 안녕 2025

· 21 min read
Haril Song
Owner, Software Engineer at 42dot

reminiscence

Overview

warning

개인적인 일기를 바탕으로 작성했기 때문에, 글이 살짝 오글거릴 수 있습니다 😂

2024년엔 정말 많은 일이 있었다.

더 좋은 문장이 떠오르지 않아서, 이런 뻔하기 그지없는 문장으로 회고를 시작한다. 누구나 '오늘, 엄마가 죽었다' 같은 문장으로 글을 시작할 수 있는건 아니니까. 아니, 그게 가능한가. 잘 모르겠다.

[Book Review] Code Writing Guide

· 4 min read
Haril Song
Owner, Software Engineer at 42dot

Cover of Munetoshi Ishikawa's Code Writing Guide

info

This review was written with a copy of the book provided by the publisher, and this did not influence the content or evaluation of the review.

Overview

What makes code easy to review?

The Guide to Writing Readable and Review-Friendly Code is a book written by a current LINE developer based on their experiences. It thoroughly covers various methods and principles to enhance code readability.

Personally, I think it's an excellent introductory book on code conventions. Let me explain why.

Naver DAN 24 Review

· 25 min read
Haril Song
Owner, Software Engineer at 42dot

overview

Overview

  • 참가 일시: Nov 11, 2024
  • 장소: 코엑스 그랜드블룸
  • 관련 링크: DAN 24

운좋게도 네이버에서 주관한 DAN24 에 다녀올 수 있었습니다. 결론부터 말씀드리면, 24년에 참여한 컨퍼런스 중 가장 수준이 높았다고 할 수 있을 것 같아요. 아래는 대략적인 내용을 적어둔 것이며, 자세한 내용은 DAN24 공식페이지를 참고해주세요.

KafkaKRU Meetup Review

· 6 min read
Haril Song
Owner, Software Engineer at 42dot

KafkaKRU 밋업 리뷰: Event Sourcing부터 리더 파티션 밸런싱까지

2024년 11월 21일, 서울 중구 삼화타워에서 열린 KafkaKRU 밋업에 참석했습니다. 사실 대기자 명단에 있었어서 참석이 어려운 상태였던 것 같지만, 열정으로 봐주셔서 다행히 쫓겨나지는 않았습니다. 결과적으로는 예상을 훨씬 뛰어넘는 값진 시간이었어요.

[Shell] Easily Organize Annoying Dummy Files

· 6 min read
Haril Song
Owner, Software Engineer at 42dot

Overview

Do you use cloud storage across multiple devices? If so, you've probably noticed the gradual increase of conflict files.

Animation showing an increase in conflict files

Conflict files that keep piling up whenever you turn around

Conflict files tend to accumulate for various reasons, such as making edits before files are synced or experiencing network delays.

Personally, I like to keep things tidy, so I regularly delete these dummy files. However, today I find the repetitive task a bit tedious. So, I thought I'd write a shell script to automate the process and show off my developer skills.

Managing Development Tool Versions with mise

· 6 min read
Haril Song
Owner, Software Engineer at 42dot

Overview

  • Do you use a variety of programming languages rather than just one?
  • Have you ever felt fatigued from memorizing commands for multiple package managers like sdkman, rvm, nvm, etc.?
  • Would you like to manage your development environment more quickly and conveniently?

With mise, you can use the exact version of any language or tool you need, switch between different versions, and specify versions for each project. By specifying versions in a file, you can reduce communication costs among team members about which version to use.

Until now, the most famous tool in this field was asdf[^fn-nth-1]. However, after starting to use mise recently, I found that mise offers a slightly better user experience. In this post, I will introduce some simple use cases.

mise vs asdf

Not sure if it's intentional, but even the web pages look similar.

mise-en-place, mise

mise (pronounced 'meez') is a tool for setting up development environments. The name comes from a French culinary term that roughly translates to "setting" or "putting in place." It means having all your tools and ingredients ready before you start cooking.

Here are some of its simple features:

Journey to a Multi-Connection Server

· 14 min read
Haril Song
Owner, Software Engineer at 42dot

banner

Overview

Implementing a server application that can handle multiple client requests simultaneously is now very easy. Just using Spring MVC alone can get you there in no time. However, as an engineer, I am curious about the underlying principles. In this article, we will embark on a journey to reflect on the considerations that were made to implement a multi-connection server by questioning the things that may seem obvious.

info

You can check the example code on GitHub.

Socket

The first destination is 'Socket'. From a network programming perspective, a socket is a communication endpoint used like a file to exchange data over a network. The description 'used like a file' is important because it is accessed through a file descriptor (fd) and supports I/O operations similar to files.

Why are sockets identified by fd instead of port?

While sockets can be identified using one's IP, port, and the other party's IP and port, using fd is preferred because sockets have no information until a connection is accepted, and more data is needed than just a simple integer like fd.

To implement a server application using sockets, you need to go through the following steps:

How SELECT FOR UPDATE Works

· 6 min read
Haril Song
Owner, Software Engineer at 42dot

banner

In PostgreSQL, the FOR UPDATE lock is used to explicitly lock rows in a table while performing a SELECT query within a transaction. This lock mode is typically used to ensure that the selected rows do not change until the transaction is completed, preventing other transactions from modifying or locking these rows in a conflicting manner.

For example, it can be used to prevent other customers from changing data while a specific customer is going through the ticket booking process.

The cases we will examine in this article are somewhat special:

  • How does select for update behave if there is a mix of locked reads and unlocked reads?
  • If a lock is used initially, is it possible for other transactions to read?
  • Can consistent reading of data be guaranteed even if reading methods are mixed?

In PostgreSQL, the select for update clause operates differently depending on the transaction isolation level. Therefore, it is necessary to examine how it behaves at each isolation level.

Let’s assume a scenario where data is being modified when the following data exists.

idname
1null