<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>dev_daeun.log</title>
        <link>https://velog.io/</link>
        <description>호랑이 같이 멋진 개발자가 될 때까지 아자!</description>
        <lastBuildDate>Fri, 12 Dec 2025 08:38:13 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <image>
            <title>dev_daeun.log</title>
            <url>https://velog.velcdn.com/images/dev_daeun/profile/2cf0be29-810f-4d6c-9685-947525171dbd/image.jpg</url>
            <link>https://velog.io/</link>
        </image>
        <copyright>Copyright (C) 2019. dev_daeun.log. All rights reserved.</copyright>
        <atom:link href="https://v2.velog.io/rss/dev_daeun" rel="self" type="application/rss+xml"/>
        <item>
            <title><![CDATA[[백준] 14888. 연산자 끼워넣기]]></title>
            <link>https://velog.io/@dev_daeun/%EB%B0%B1%EC%A4%80-14888.-%EC%97%B0%EC%82%B0%EC%9E%90</link>
            <guid>https://velog.io/@dev_daeun/%EB%B0%B1%EC%A4%80-14888.-%EC%97%B0%EC%82%B0%EC%9E%90</guid>
            <pubDate>Fri, 12 Dec 2025 08:38:13 GMT</pubDate>
            <description><![CDATA[<p>요즘 코딩테스트 속성 준비 강의를 듣고 있다.
(<a href="https://skillflo.io/course/10459?productId=18173&amp;tab=info">https://skillflo.io/course/10459?productId=18173&amp;tab=info</a>
이 강의 part5를 수강중이다.)</p>
<p>강의를 듣기전 일단 먼저 문제를 풀었다.</p>
<p>내가 처음 제출한 코드는 이렇다. 다행히(?) 한번에 통과했다.</p>
<pre><code>#include &lt;iostream&gt;
#include &lt;vector&gt;
#include &lt;limits&gt;

using namespace std;

int N;
vector&lt;int&gt; numV;
vector&lt;int&gt; oper(4, 0);
int minAns = numeric_limits&lt;int&gt;::max();
int maxAns = numeric_limits&lt;int&gt;::min();

// 입력
void input() {
    // 숫자 갯수 받기
    cin &gt;&gt; N;

    int temp;
    // 숫자 벡터 채우기
    for (int i = 0; i &lt; N; i++) {
        cin &gt;&gt; temp;
        numV.push_back(temp);
    }
    // 연산자 벡터 채우기
    for (int i = 0; i &lt; 4; i++) {
        cin &gt;&gt; oper[i];
    }
}

int sum(int a, int b) {
    return a + numV[b];
}

int sub(int a, int b) {
    return a - numV[b];
}

int mul(int a, int b) {
    return a * numV[b];
}

int di(int a, int b) {
    if (a &lt; 0) {
        return (-1) * ((-1 * a) / numV[b]);
    }

    return a / numV[b];
}

void rec_func(int k, int ans) {
    // 연산완료
    if (k == N) {
        if (minAns &gt; ans) {
            minAns = ans;
        }

        if (maxAns &lt; ans) {
            maxAns = ans;
        }

        return;
    }

    // 연산
    for (int i = 0; i &lt; 4; i++) {
        if (oper[i] == 0) {
            continue;
        }

        // 연산 후 다음단계 이동
        oper[i]--;
        switch(i) {
            case 0:
                rec_func(k + 1, sum(ans, k));
                break;
            case 1:
                rec_func(k + 1, sub(ans, k));
                break;
            case 2:
                rec_func(k + 1, mul(ans, k));
                break;
            case 3:
                rec_func(k + 1, di(ans, k));
                break;
        }

        // 연산자 변경
        oper[i]++;
        continue;
    }

}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);

    input();
    rec_func(1, numV[0]);

    // 결과 출력
    cout &lt;&lt; maxAns &lt;&lt; &quot;\n&quot; &lt;&lt; minAns;
    return 0;
}</code></pre><p>현재 수강중인 내용은 완전탐색. 완전탐색이라서기보다는 언제읽어도 무슨 코드인지 알 수 있게 지금은 가독성 중시 및 모듈화하는 연습을 하고 있다.
사실 처음에는 이게 모듈화 최선인줄 알았다.</p>
<p>수강 후 수정한 코드는 이렇다.</p>
<pre><code>#include &lt;iostream&gt;
#include &lt;vector&gt;
#include &lt;limits&gt;

using namespace std;

int N;
vector&lt;int&gt; numV;
vector&lt;int&gt; operators(4, 0);
int minAns = numeric_limits&lt;int&gt;::max();
int maxAns = numeric_limits&lt;int&gt;::min();

// 입력
void input() {
    // 숫자 갯수 받기
    cin &gt;&gt; N;

    int temp;
    // 숫자 벡터 채우기
    for (int i = 0; i &lt; N; i++) {
        cin &gt;&gt; temp;
        numV.push_back(temp);
    }
    // 연산자 벡터 채우기
    for (int i = 0; i &lt; 4; i++) {
        cin &gt;&gt; operators[i];
    }
}

// 계산 함수
int calc(int operand1, int oper, int operand2) {
    switch(oper) {
        case 0:
            return operand1 + operand2;
        case 1:
            return operand1 - operand2;
        case 2:
            return operand1 * operand2;
        case 3:
            if (operand1 &lt; 0) {
                return -1 * ((-1 * operand1) / operand2);
            }
            return operand1 / operand2;
    }
}

void rec_func(int k, int ans) {
    // 연산완료
    if (k == N) {
        if (minAns &gt; ans) {
            minAns = ans;
        }

        if (maxAns &lt; ans) {
            maxAns = ans;
        }

        return;
    }

    // 연산
    for (int i = 0; i &lt; 4; i++) {
        if (operators[i] == 0) {
            continue;
        }

        // 연산 후 다음단계 이동
        operators[i]--;
        rec_func(k + 1, calc(ans, i, numV[k]));

        // 연산자 변경
        operators[i]++;
        continue;
    }

}

int main() {
    // 최적화
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);

    // 입력 + 연산 + 출력
    input();
    rec_func(1, numV[0]);
    cout &lt;&lt; maxAns &lt;&lt; &quot;\n&quot; &lt;&lt; minAns;
    return 0;
}</code></pre><p>계산을 여기저기서 할게 아니라 &#39;계산&#39;이라는 함수를 따로 만드는게 더 깔끔하다는 걸 알았다.</p>
<p>아무래도 계속 연습하는 것만이 답인 것 같다. 이 함수가 어디까지를 책임질지를 잘 고민해봐야겠다.
어찌보면 이 또한도 객체지향적인 코드를 짜는 연습이 되지 않을까 싶다. (요즘 많이 고민하는 부분 ㅎㅎ)</p>
]]></description>
        </item>
        <item>
            <title><![CDATA[[C++] 코테에서 최소, 최대값 쓰기]]></title>
            <link>https://velog.io/@dev_daeun/C-%EC%BD%94%ED%85%8C%EC%97%90%EC%84%9C-%EC%B5%9C%EC%86%8C-%EC%B5%9C%EB%8C%80%EA%B0%92-%EC%93%B0%EA%B8%B0</link>
            <guid>https://velog.io/@dev_daeun/C-%EC%BD%94%ED%85%8C%EC%97%90%EC%84%9C-%EC%B5%9C%EC%86%8C-%EC%B5%9C%EB%8C%80%EA%B0%92-%EC%93%B0%EA%B8%B0</guid>
            <pubDate>Fri, 12 Dec 2025 07:40:27 GMT</pubDate>
            <description><![CDATA[<pre><code>#include &lt;limits&gt;

int maxInt = std::numeric_limits&lt;int&gt;::max();
int minInt = std::numeric_limits&lt;int&gt;::min();

long maxLong = std::numeric_limits&lt;long&gt;::max();
long long minLonglong = std::numeric_limits&lt;long long&gt;::min();
unsigned int maxUnInt = std::numeric_limits&lt;unsigned int&gt;::max();
</code></pre>]]></description>
        </item>
        <item>
            <title><![CDATA[FSD란?]]></title>
            <link>https://velog.io/@dev_daeun/FSD%EB%9E%80</link>
            <guid>https://velog.io/@dev_daeun/FSD%EB%9E%80</guid>
            <pubDate>Tue, 09 Sep 2025 09:50:42 GMT</pubDate>
            <description><![CDATA[<p>가장 마지막 팀프로젝트에서 프론트 아키텍처를 FSD로 개발을 했었다. 얼추 이해했지만, 대부분 cursor가 작업을 했었기에 구조를 절반도 이해하지 못한 것 같아서 짬짬히 공부하고 적용해보려고 한다.</p>
<p>우선은 알고리즘에 의해 발견된 영상 하나를 간략하게 요약해보려고 한다.</p>
<p><a href="https://www.youtube.com/watch?v=pYAYTJ0vFfs">https://www.youtube.com/watch?v=pYAYTJ0vFfs</a></p>
<p>FSD의 풀네임은 Feature-Sliced Design. 기능별로 잘라서 디자인을 하겠다는 뜻이다. 그렇다고 개발자 위주로 나누는 것이냐? 아니 사용자의 이용을 중심으로 나누는 것이다.
(참고: <a href="https://feature-sliced.design/">https://feature-sliced.design/</a>)</p>
<p><img src="https://velog.velcdn.com/images/dev_daeun/post/1b398935-aefb-4984-814f-937c295b211d/image.png" alt="">
(출처: 구글검색)</p>
<p>이렇게 layer단위로 먼저 나누고, 레이어 안에는 slice, 그 안에는 segement로 이루어지게 된다. 같은 layer안에 있다 해도 슬라이스와 슬라이스는 참조할 수 없으며 같은 슬라이스 안에 있는 세그먼트더라도 세그먼트끼리는 참조할 수 있다. 오직 layer들 만이 위에서 아래방향으로 참조할 수 있다.</p>
<p>즉, app은 widget을 참조할 수 있지만 widget은 app을 참조할 수 없다.</p>
<p>그렇다면 각각의 layer는 무엇을 기준으로 나누느냐! 사실 이건 상대적인 것이다. 팀 내에서 소통을 통해 정하면 된다. 프로젝트 당시에도 features는 무엇이며 entities에는 무엇이 들어가는건지 감이 안잡혔었는데 논의가 필요한 부분이라고 해서 살짝 안심했다.</p>
<p>아마 제대로 이해하려면 간단한 토이프로젝트에 이 구조를 적용시켜봐야 조금이나마 더 이해한채로 글을 작성할 수 있을 것이다.</p>
<br/>
어쨋든 만들어본 사람입장에서 이야기 하자면 라우팅이 생각보다 편했고, 코드관리가 편했다. 다만 협업시에 책임범위를 명확히 나누는게 필요해 보이긴했다.(이건 이해를 제대로 못한 우리팀, 그리고 팀장이던 나의 문제긴 하다.) slice단위나 segment단위로 책임을 나누든 해서, 중복코드가 많아지는걸 방지하고 또 함부로 수정해서 전체 프로젝트가 망가지는 일을 줄이고 할 수 있지 않을까 싶었다.

<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
다음편은 공식문서를 읽고 또 정리해봐야겠다.]]></description>
        </item>
        <item>
            <title><![CDATA[[Kernel360 5기] Day3. ORM & JPA]]></title>
            <link>https://velog.io/@dev_daeun/Kernel-360-Day3.-ORM-JPA</link>
            <guid>https://velog.io/@dev_daeun/Kernel-360-Day3.-ORM-JPA</guid>
            <pubDate>Wed, 30 Apr 2025 10:08:28 GMT</pubDate>
            <description><![CDATA[<p><small>(해당 내용은 글쓴이가 공부한 것을 바탕으로 정리한 것이라 부정확하거나 세부 용어가 틀릴 수 있음을 미리 알립니다.)</small></p>
<h2 id="orm이란">ORM이란?</h2>
<p>서버단과 DB단을 연결해주는 기술.
직접적으로 쿼리문을 적지 않아도 데이터를 조회, 생성, 삭제, 수정 할 수 있다.</p>
<h4 id="🔸-언어별-대표-orm-예시">🔸 언어별 대표 ORM 예시</h4>
<table>
<thead>
<tr>
<th>언어</th>
<th>ORM 라이브러리</th>
<th>설명</th>
</tr>
</thead>
<tbody><tr>
<td><strong>Java</strong></td>
<td>JPA (Hibernate)</td>
<td>Java의 표준 ORM, Spring에서 주로 사용</td>
</tr>
<tr>
<td><strong>Python</strong></td>
<td>Django ORM / SQLAlchemy</td>
<td>Django에 내장된 ORM, 또는 범용 SQLAlchemy</td>
</tr>
<tr>
<td><strong>JavaScript (Node.js)</strong></td>
<td>Sequelize / TypeORM / Prisma</td>
<td>MySQL, PostgreSQL, SQLite 등 지원</td>
</tr>
<tr>
<td><strong>Ruby</strong></td>
<td>ActiveRecord</td>
<td>Ruby on Rails의 기본 ORM</td>
</tr>
<tr>
<td><strong>PHP</strong></td>
<td>Eloquent</td>
<td>Laravel 프레임워크에서 사용</td>
</tr>
<tr>
<td><strong>Go</strong></td>
<td>GORM / ent</td>
<td>Go 언어용 ORM 도구들</td>
</tr>
<tr>
<td><strong>C# (.NET)</strong></td>
<td>Entity Framework</td>
<td>마이크로소프트 공식 ORM</td>
</tr>
</tbody></table>
<h2 id="jpa란">JPA란?</h2>
<p>JAVA의 ORM.
JPA는 interface고 
실제 구현체는 Hibernate, EclipseLink</p>
<table>
<thead>
<tr>
<th>항목</th>
<th>Hibernate</th>
<th>EclipseLink</th>
</tr>
</thead>
<tbody><tr>
<td>지원</td>
<td>가장 널리 사용됨</td>
<td>Oracle에서 공식 지원</td>
</tr>
<tr>
<td>Spring Boot 기본값</td>
<td>✔️ 기본 채택</td>
<td>❌ 별도 설정 필요</td>
</tr>
<tr>
<td>커뮤니티</td>
<td>활발하고 방대</td>
<td>상대적으로 적음</td>
</tr>
<tr>
<td>특징</td>
<td>성능 튜닝 옵션 다양</td>
<td>안정적, 기업용에 강함</td>
</tr>
</tbody></table>
]]></description>
        </item>
    </channel>
</rss>