<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>dev_damjaeng.log</title>
        <link>https://velog.io/</link>
        <description>목표 : 부지런한 개발자 </description>
        <lastBuildDate>Sat, 24 Sep 2022 00:34:17 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <image>
            <title>dev_damjaeng.log</title>
            <url>https://velog.velcdn.com/images/dev_damjaeng/profile/8912e61e-2772-4156-ae8f-0f90b32536bc/image.jpg</url>
            <link>https://velog.io/</link>
        </image>
        <copyright>Copyright (C) 2019. dev_damjaeng.log. All rights reserved.</copyright>
        <atom:link href="https://v2.velog.io/rss/dev_damjaeng" rel="self" type="application/rss+xml"/>
        <item>
            <title><![CDATA[JSP가 뭐야?]]></title>
            <link>https://velog.io/@dev_damjaeng/JSP%EA%B0%80-%EB%AD%90%EC%95%BC</link>
            <guid>https://velog.io/@dev_damjaeng/JSP%EA%B0%80-%EB%AD%90%EC%95%BC</guid>
            <pubDate>Sat, 24 Sep 2022 00:34:17 GMT</pubDate>
            <description><![CDATA[<p><img src="https://velog.velcdn.com/images/dev_damjaeng/post/a629bfac-5892-4291-bc3e-c715961a64e5/image.png" alt=""></p>
<p>전공 수업을 듣다가 나는 혼동이 왔다. 그 이유는? JavaScript랑 JSP를 교수님께서 계속 언급하시는데 둘을 같은 것으로 인지했기 때문! 이름도 비슷한 둘을 알아보자. </p>
<p>정의부터 살펴보자.</p>
<h2 id="span-stylebackground-color-9ddcf8javascriptspan"><span style='background-color: #9DDCF8'>JAVASCRIPT</span></h2>
<p>: HTML 문서에서 동적으로 변하는 콘텐츠를 표현하기 위해 이벤트 처리를 하거나 서버와 연결하여 데이터를 가지고 오는 등의 역할을 하는 프로그램 언어. </p>
<p>다시 정리하자면? </p>
<blockquote>
<p>HTML 문서에서 이벤트(버튼 클릭 등)를 서버 연결 없이 동적으로 처리할 수 있는 기술 -&gt; 서버에 새로 접속하지 않고도 화면 정보가 변함</p>
</blockquote>
<p><em>HOW?</em> </p>
<blockquote>
<p>스마트폰의 비중이 높아지고 새로운 서버 구현 기법이 확산되면서 가능해짐</p>
</blockquote>
<p><em>종류</em></p>
<blockquote>
<p>앵글러(Angular), 뷰(Vue), 리액트(React)등 </p>
</blockquote>
<h2 id="span-stylebackground-color-9ddcf8jspspan"><span style='background-color: #9DDCF8'>JSP</span></h2>
<p>: 서블릿에서 HTML과 데이터 결함을 손쉽게 처리하기 위해 만들어졌다.</p>
<p><em>서블릿?</em></p>
<blockquote>
<p>자바 기반의 웹 프로그램 개발을 위해 만들어진 기술. 자바로 작성된 프로그램을 실행할 수 있는 서버 소프트웨어(EX.톰캣)를 통해 관리된다. </p>
</blockquote>
<p>자바 중심의 서블릿과 달리 JSP는 HTML을 중심으로 데이터를 처리하는 특징을 가지는데, 쉽게 말해 HTML에서 자바 코드를 사용할 수 있는 구조다. </p>
<ul>
<li>JSP 문법 자체는 page 지시어 선언 부분을 제외하면 HTML 파일 구조와 동일하다.</li>
<li>CSS, 자바스크립트 사용 형식 또한 동일하다.</li>
<li>&lt;%=%&gt;란 JSP 출력문으로 사칙연산, 간단한 변수의 출력 등에 사용된다. </li>
</ul>
<h2 id="결론">결론</h2>
<p>JavaScript : <strong>클라이언트</strong> 차원에서 사용하는 언어
JSP : <strong>서버 차원</strong>에서 사용하는 언어 </p>
]]></description>
        </item>
        <item>
            <title><![CDATA[[UMC] 동덕여대 UMC 서류 및 면접 후기 ]]></title>
            <link>https://velog.io/@dev_damjaeng/UMC-%EB%8F%99%EB%8D%95%EC%97%AC%EB%8C%80-UMC-%EC%84%9C%EB%A5%98-%EB%B0%8F-%EB%A9%B4%EC%A0%91-%ED%9B%84%EA%B8%B0</link>
            <guid>https://velog.io/@dev_damjaeng/UMC-%EB%8F%99%EB%8D%95%EC%97%AC%EB%8C%80-UMC-%EC%84%9C%EB%A5%98-%EB%B0%8F-%EB%A9%B4%EC%A0%91-%ED%9B%84%EA%B8%B0</guid>
            <pubDate>Tue, 13 Sep 2022 16:08:27 GMT</pubDate>
            <description><![CDATA[<p><img src="https://velog.velcdn.com/images/dev_damjaeng/post/eddadb22-6f04-4fcf-9edf-820ae0ae4aba/image.png" alt=""></p>
<h2 id="이-글을-쓰기-전까지">이 글을 쓰기 전까지</h2>
<p>2022년 내 목표는 대외활동을 최소 2개 하는 것이었다. 무작정 대외활동이라고 하면 의문이 있을 수도 있을 것 같지만, 스스로 하기에는 의지가 부족고 우물 안에서 나가고 싶은 마음이었다. 협업의 방식을 배우고 싶었고 조직이 어떻게 이루어져 있는지, 다른 파트 사람들은 어떻게 일하는지.. 등등 어떤 단체에 투입되고 싶었다.</p>
<p>나는 프로젝트 경험이 거의 없는 상황이었기에 합격 허들이 무조건 낮은 곳에 지원을 해야 승산이 있었다. 그러던 중에 &#39;컴공 선배&#39;가 운영하는 챌린저스 단체 &#39;UMC&#39;가 우리 학교에도 있는 것을 발견했다. 원래 겨울 즈음에 &#39;라이징 캠프&#39;를 지원하려고 했는데 학기 중에 스터디를 진행하며 운영된다고 해서 바로 준비했다.</p>
<p>구글에 동덕 UMC 검색하면 딱 하나의 글만 나오고.. 전부 유니클로에 관한 이야기여서 많이 당황했다. 그 하나의 글을 많이 참조했는데 나도 그 은혜를 갚고자 몇 자 적어본다.</p>
<h2 id="서류-지원">서류 지원</h2>
<p>지원은 google forms로 받았다. 꽤나 여러가지의 질문이 있었다. 주변 이야기를 들어보니 열심히 서류를 작성한 사람만이 합격한 것 같다. 
크게 3가지 카테고리가 있다고 느꼈고, 그에 해당한 질문들을 말해보겠다. </p>
<h3 id="span-stylebackground-color-bdbdbd-당신은-누구인가span"><span style='background-color: #BDBDBD'> 당신은 누구인가</span></h3>
<ol>
<li><p>🎤UMC 지원 동기와 UMC 활동을 통해 기대하는 바를 알려주세요! (500자 이내)</p>
</li>
<li><p>🎤2학기 계획을 알려주세요!
(ex. 알바 요일 및 시간, 이수 예정 학점, 복수전공 연계전공 교직이수 사항, 타 대외활동 관련)</p>
</li>
</ol>
<h3 id="span-stylebackground-color-bdbdbd개발-경험-또는-협업-경험span"><span style='background-color: #BDBDBD'>개발 경험 (또는 협업 경험)</span></h3>
<ol>
<li><p>🎤살면서 열정적으로 무엇을 해 본 경험 or 힘들거나 어려웠던 일을 극복한 경험을 알려주세요! (개발 관련 경험이 아니어도 됩니다.) (500자 이내)</p>
</li>
<li><p>🎤진행했던 프로젝트나 개발 관련 경험을 알려주세요!</p>
</li>
<li><p>🎤프로젝트가 어떤 식으로 진행되었는지와 자신이 맡은 역할에 대해 알려주세요!(300자 이내)</p>
</li>
<li><p>🎤프로젝트 진행 시에 있었던 협업, 소통, 갈등 해결 관련 에피소드를 알려주세요!(500자 이내)</p>
</li>
</ol>
<h3 id="span-stylebackground-color-bdbdbd-비전-span"><span style='background-color: #BDBDBD'> 비전 </span></h3>
<ol>
<li><p>🎤UMC는 학기 중에 배운 것을 바탕으로, 방학(8주)동안 팀을 구성하여 앱 런칭을 진행해야 합니다! 실제로 개발하고 싶은 앱이 있다면, 어떤 앱을 만들고 싶으신가요?(500자 이내)</p>
</li>
<li><p>🎤UMC에 임하는 나의 각오를 알려주세요! (글자수 제한 없음) </p>
</li>
</ol>
<h2 id="면접-진행">면접 진행</h2>
<p>모든 질문이 자세히 기억은 나지 않는다. Android 파트를 지원했지만 그에 관한 것은 묻지 않으셨다. 이건 모집폼처럼 공개적인 내용이 아니기 때문에 자세한 것은 생략한다! 기본적인 면접 질문을 준비하면 될 것 같다. (2022년 9월 기준) </p>
<h2 id="어떤-식으로-작성답변했나요">어떤 식으로 작성(답변)했나요?</h2>
<ol>
<li>무조건 두괄식으로 답변하라. </li>
<li>개발 경험이 없어도 상관이 없다! 
그 활동으로 무엇을 &#39;배웠는지&#39;에 초점을 두라. </li>
<li>한 질문당 최소 5번 &#39;왜?&#39;를 외쳐라. </li>
</ol>
<h2 id="합격-문자">합격 문자</h2>
<p>꽤나 열심히 지원서를 작성했기 때문에 떨리는 마음으로 기다렸다. </p>
<h2 id="느낀점">느낀점</h2>
<p>소통문화가 중요한 만큼, 들어가자마자 디스코드와 노션에 초대되었다. 앞으로 이곳에서 많은 것을 배워서 좋은 개발자로 성장하고 싶다. 앞으로 공부한 것을 velog에 올리는 것이 하반기 목표! 아자아자</p>
]]></description>
        </item>
        <item>
            <title><![CDATA[대외활동 인스타는 어떻게 관리해야 할까?]]></title>
            <link>https://velog.io/@dev_damjaeng/%EB%8C%80%EC%99%B8%ED%99%9C%EB%8F%99-%EC%9D%B8%EC%8A%A4%ED%83%80%EB%8A%94-%EC%96%B4%EB%96%BB%EA%B2%8C-%EA%B4%80%EB%A6%AC%ED%95%B4%EC%95%BC-%ED%95%A0%EA%B9%8C</link>
            <guid>https://velog.io/@dev_damjaeng/%EB%8C%80%EC%99%B8%ED%99%9C%EB%8F%99-%EC%9D%B8%EC%8A%A4%ED%83%80%EB%8A%94-%EC%96%B4%EB%96%BB%EA%B2%8C-%EA%B4%80%EB%A6%AC%ED%95%B4%EC%95%BC-%ED%95%A0%EA%B9%8C</guid>
            <pubDate>Sun, 28 Aug 2022 02:25:54 GMT</pubDate>
            <description><![CDATA[<p>오늘은 마지막으로 <code>소프트웨어야놀자</code>의 대외활동에서 <code>인스타</code>는 어떻게 관리해야 하는지에 대해서 말해보도록 하겠다. (만약 12월에 우수 멘토팀으로 선정되면 물론 그 후기도 쓰러 올 예정😎</p>
<blockquote>
<p>사실 카뉴를 지속적으로 만들어야 하므로... 인스타 꾸미기는 <code>디자이너</code>의 몫이 크다. 하지만 개발자들의 모임에서 사실 <code>귀한 인력</code>인  디자이너를 구하는 것은 무척 어렵다...</p>
</blockquote>
<span style='background-color: #FEFEA8'>
결론 : 우리 팀 홍보부장 최고다!</span>

<p><img src="https://velog.velcdn.com/images/dev_damjaeng/post/7c79938f-5674-48a9-befe-37dbfe347ab5/image.gif" alt=""></p>
<hr>
<p>우리 팀은 한 달에 적어도 2~3개는 올리자고 다짐했고 크게 카테고리는 5가지이다. </p>
<ol>
<li>인공지능 카드뉴스</li>
<li>수업관련 카드뉴스</li>
<li>이달의 소놀 카드뉴스</li>
<li>V-DAY 카드뉴스</li>
<li>팀 관련 카드뉴스</li>
<li>그외 </li>
</ol>
<h2 id="인공지능-카드뉴스">인공지능 카드뉴스</h2>
<blockquote>
<p>주기적으로 ai의 개념을 쉽게 전달하는 <code>반가워요 인공지능!</code> 시리즈를 제작하고 있다. </p>
</blockquote>
<p><img src="https://velog.velcdn.com/images/dev_damjaeng/post/57eca35d-85af-41be-9a65-a5edc2740445/image.png" alt="">
<img src="https://velog.velcdn.com/images/dev_damjaeng/post/c532d07a-2f48-4427-bdb1-2b8d877f281d/image.png" alt=""></p>
<hr>
<h2 id="수업관련-카드뉴스">수업관련 카드뉴스</h2>
<blockquote>
<p>사전답사부터 시작해서 수업 후기 (수업에 집중, 학생에 집중 2가지)를 작성했다. 멘티들을 위해 준비한 굿즈 소개 카드뉴스도 제작했다. </p>
</blockquote>
<p><img src="https://velog.velcdn.com/images/dev_damjaeng/post/581d79f1-c6a1-465f-858c-e20f30b355ba/image.png" alt="">
<img src="https://velog.velcdn.com/images/dev_damjaeng/post/4e99c879-0054-4f16-aeea-d70a67977146/image.png" alt="">
<img src="https://velog.velcdn.com/images/dev_damjaeng/post/3a3234f9-5921-4082-9fb8-ec4c298dee78/image.png" alt="">
<img src="https://velog.velcdn.com/images/dev_damjaeng/post/5ebd9594-bda5-4e2e-a149-2312882f9aae/image.png" alt=""></p>
<hr>
<h2 id="이달의-소놀-카드뉴스">이달의 소놀 카드뉴스</h2>
<blockquote>
<p>매달 달라지는 주제에 따라 자체적으로 컨텐츠를 작성했다!</p>
</blockquote>
<p><img src="https://velog.velcdn.com/images/dev_damjaeng/post/e7436c88-6553-4565-b87a-f8baa139639c/image.png" alt=""></p>
<p><img src="https://velog.velcdn.com/images/dev_damjaeng/post/4cbba8c9-1340-4b24-a759-ae83a8b10afe/image.png" alt=""></p>
<hr>
<h2 id="v-day-카드뉴스">V-DAY 카드뉴스</h2>
<blockquote>
<p>이것 또한 <code>소프트웨어야놀자</code>에서 제공되는 주제에 따라 자체적으로 컨텐츠를 제작했다. </p>
</blockquote>
<p><img src="https://velog.velcdn.com/images/dev_damjaeng/post/880926df-2b76-49f4-8648-80bd115fe50d/image.png" alt=""></p>
<p><img src="https://velog.velcdn.com/images/dev_damjaeng/post/6b9b3eb7-e3d6-49fd-8ce2-cc6b4d904f50/image.png" alt=""></p>
<hr>
<h2 id="팀-관련-카드뉴스">팀 관련 카드뉴스</h2>
<blockquote>
<p>팀을 알리기 위해서는 팀원을 소개하는 것이 우선되어야 한다고 생각해서 <code>스피드 문답</code>을 진행했다.  </p>
</blockquote>
<p><img src="https://velog.velcdn.com/images/dev_damjaeng/post/a7f35634-690d-45a9-92fb-c8a00dbc9932/image.png" alt="">
<img src="https://velog.velcdn.com/images/dev_damjaeng/post/15cc696b-e4c2-453e-b01f-c964ccfa6aab/image.png" alt=""></p>
<hr>
<h2 id="그외">그외</h2>
<blockquote>
<p>초반에는 어떤 것을 제작하고 인스타에 올려야 할지 몰라서 아래와 같이 제작했다.</p>
</blockquote>
<p><img src="https://velog.velcdn.com/images/dev_damjaeng/post/396c86b2-a190-4dc8-b6bf-d512af787f10/image.png" alt=""></p>
<p><img src="https://velog.velcdn.com/images/dev_damjaeng/post/2826172d-b12d-4064-84a9-f209e6c58a64/image.png" alt=""></p>
<p>더 많은 내용을 알고 싶다면 아래에 insta 링크로 들어오면 된다.
업무 분담은 <code>대본 -&gt; 카뉴 디자인 -&gt; 소개글 작성</code>으로 진행되었다.
<a href="https://www.instagram.com/codefive.official/">CODEFIVE INSTA</a></p>
<p>-끝-</p>
]]></description>
        </item>
        <item>
            <title><![CDATA[Good bye, PY4E!]]></title>
            <link>https://velog.io/@dev_damjaeng/Good-bye-PY4E</link>
            <guid>https://velog.io/@dev_damjaeng/Good-bye-PY4E</guid>
            <pubDate>Sat, 27 Aug 2022 17:06:07 GMT</pubDate>
            <description><![CDATA[<h3 id="끝마친-소감">끝마친 소감</h3>
<p>길다면 길었고, 짧다면 짧았던 6주간의 여정이 끝났습니다. 
7/17~8/25 동안 이루어졌던 스터디를 통해 파이썬의 기본을 훑어보는 시간을 가졌다는 점이 가장 뿌듯합니다. 혼자라면 작심삼일이나 갔을까요? 기본 자료구조까지도 절대 못 갔을 것이라 생각합니다.  </p>
<p>과제를 제출하기 위해서는 매주 제공되는 <span style="color: RED"><strong>스터디 미션</strong></SPAN>을 풀기 위해서는! 꼭 <span style="color: blue"><strong>강의</strong></SPAN>와 <span style="color: blue"><strong>퀴즈</strong></SPAN> 그리고 <span style="color: blue"><strong>라이브 코칭</strong></SPAN>을 들어야 했습니다. 그리고 이 루틴은 <span style="color: RED"><strong>일주일</strong></SPAN>마다 다시 시작됩니다. </p>
<p>얼핏보면 &#39;아.. 너무 빡센데?&#39;라고 생각할 수 있지만, 조금만 <span style="color: blue"><strong>부지런히</strong></SPAN> 움직이면 됩니다. 그렇게 일주일에 2회 2시간씩 시간을 투자한다면! <span style="color: RED"><strong>양질의 강의와 퀴즈</strong></SPAN>를 누릴 수 있다는 것이 저는 매우 마음에 들었습니다. </p>
<hr>
<h3 id="좋았던-점">좋았던 점</h3>
<ul>
<li>함께 공부하는 스터디원이 생긴다. <ul>
<li>저희 팀 같은 경우에는 6명이 한 팀이었습니다. 물론 실제로 활동하는 사람은 저 포함 딱 3명이었습니다. 그들과 제출 기한에 맞추어 <code>회의 날짜</code>를 정했습니다. 그러면 그 날짜까지 무조건!! 스터디 미션 (보통 4문제)을 다 풀어서 와야하기 때문합니다. 모여서 서로의 코드를 <code>피드백</code>하는 시간이 있었기에 더욱 뜻 깊었습니다. </li>
</ul>
</li>
<li>수료증을 발급해준다. <ul>
<li>6주라는 짧은 시간이지만 그 기간동안 온전히 잘 참여하는 것은 쉽지 않은 일이라고 생각합니다. 저는 처음에는 <code>수료증</code>이 어딘가에 단순히 인증 할 수 있는 수단이라고 느꼈는데요. 점점 종료 시간이 지나오니 &#39;아, 수료증은 나의 완주를 <code>축하</code>해주는 문서구나&#39;를 느낄 수 있었던 것 같습니다. </li>
</ul>
</li>
<li>소통할 수 있는 공간이 마련되어 있다.<ul>
<li>나도 리더를 해본 적이 있어서 알지만, 구성원들 간의 <code>소통</code>이 정말 중요하다. 궁금한 점은 으레 생기는 것이 당연한다. 그리고 그것을 &#39;어떻게&#39; 더 좋은 아이디어로 발전시키고 활발하게 <code>토론</code>이 일어나게 할 수 있는 환경을 만드는 것이 포인트이다. 
그리고 이 스터디의 플랫폼인 <code>Slack</code>에서 그 장면들을 많이 목격할 수 있었다. 아래는 스터디 내 실제 사례들이다. <ol>
<li>팀에 배정된 <code>코치</code>에게 스터디 미션(코딩)에 대해 질문 </li>
<li><code>운영진</code>에게 스터디 운영과 관련해서 질문 </li>
<li><code>다른 스터디 참여자</code>들과 개발을 주제로 토론 
다들 자유로운 분위기에서 질문을 하고 답을 하기 때문에 이 점 또한 좋았다. </li>
</ol>
</li>
</ul>
</li>
</ul>
<h3 id="아쉬웠던-점">아쉬웠던 점</h3>
<ul>
<li>모집 대상에 비해 문제 난이도가 높다.<ul>
<li>스터디의 본질이 &#39;성장&#39;이기 때문에 미션에 대한 난이도 언급은 굉장히 조심스러운 부분이다. 하지만 전공자인 나도 후반부로 갈수록 미션 해결에 많은 시간을 쏟았기 때문에, 파이썬을 아예 처음 공부하는 사람들은 코딩하다 좌절할 수도 있겠다는 생각이 들었다. </li>
</ul>
</li>
</ul>
<hr>
<h3 id="성장한-점">성장한 점</h3>
<ul>
<li>영어 강의에 대한 두려움이 줄었다. <ul>
<li>구글링을 해도 영어가 나오면 바로 마우스 오른쪽을 눌러 한국어로 번역했다. 영어만 보아도 머리가 아팠기 때문에... 하지만 이번 스터디는 영어 베이스 + 한글 자막이기 때문에 강의 자료를 따라 적으면서 다시금 내용을 학습할 수 있었다. </li>
</ul>
</li>
</ul>
<h3 id="배운-점">배운 점</h3>
<ul>
<li><code>에러</code>는 나를 겁먹이게 하는 존재가 아니다. <ul>
<li><code>에러</code>는 컴퓨터가 &#39;나 여기가 안 돌아가~&#39; 하고 친절하게 알려주는 것이다. 지레짐작으로 겁을 먹고 <code>에러</code>가 나오면.. 머리부터 아파오는데, 이 스터디를 통해 &#39;차근차근&#39; <code>에러</code>를 해결해 보는 경험을 가졌다. </li>
</ul>
</li>
</ul>
<hr>
<h3 id="더-발전시키고-싶은-점">더 발전시키고 싶은 점</h3>
<ul>
<li>백준은 필수다.<ul>
<li>난 <code>알고리즘</code>에 정말 약하다. 근데 게을러서... 문제도 많이 풀지 않았다. 하지만 코딩 능력 향상을 위해서는 이제 피할 수도 없다. 스터디가 끝났더라도 지속해서 <code>알고리즘</code> 공부에 힘쓰자! </li>
</ul>
</li>
</ul>
<h3 id="마지막-한-줄">마지막 한 줄</h3>
<p>이 기록물이 훗날 든든한 지식 배경이 되기를 바란다! </p>
<p>-끝- 
<img src="https://velog.velcdn.com/images/dev_damjaeng/post/deaab21e-b50f-4bb9-a69b-2533254c962e/image.png" alt=""></p>
<p><img src="https://velog.velcdn.com/images/dev_damjaeng/post/cd1f9a22-9e6c-498b-baae-d60b918e94ac/image.gif" alt=""></p>
]]></description>
        </item>
        <item>
            <title><![CDATA[누구를 가르쳐본 경험은 없는데요..]]></title>
            <link>https://velog.io/@dev_damjaeng/%EB%88%84%EA%B5%AC%EB%A5%BC-%EA%B0%80%EB%A5%B4%EC%B3%90%EB%B3%B8-%EA%B2%BD%ED%97%98%EC%9D%80-%EC%97%86%EB%8A%94%EB%8D%B0%EC%9A%94</link>
            <guid>https://velog.io/@dev_damjaeng/%EB%88%84%EA%B5%AC%EB%A5%BC-%EA%B0%80%EB%A5%B4%EC%B3%90%EB%B3%B8-%EA%B2%BD%ED%97%98%EC%9D%80-%EC%97%86%EB%8A%94%EB%8D%B0%EC%9A%94</guid>
            <pubDate>Sat, 20 Aug 2022 09:04:04 GMT</pubDate>
            <description><![CDATA[<blockquote>
<p>안녕하세요! 2편으로 돌아온 &#39;소프트웨어야 놀자&#39; 멘토링 후기입니다. 1편에서는 이 활동이 어떤 활동인지에 대해서 알아보았습니다. 오늘은 &#39;수업&#39;에 초점을 맞추어서 더 자세히 알려드리겠습니다. </p>
</blockquote>
<h3 id="삐빅--멘토가-되었습니다">삐빅- 멘토가 되었습니다.</h3>
<p><img src="https://velog.velcdn.com/images/dev_damjaeng/post/3809de20-0ed3-4d02-850d-d6a0911cdcc7/image.gif" alt="">
중고등학생 때를 돌이켜보면 나는 누군가를 가르친 경험이 없다. 공부도 나 혼자 <code>독박공부</code>를 하는 편이었고, 친구도 별로 없었다. 가끔가다 들어오는 질문에 대해 대답을 할 때도 상대와 내가 이해한 것이 달라 몇 차례 더 확인해야했던 것 같다. </p>
<p>그래서 이 교육봉사를 시작할 때 조금 걱정이 앞섰다. 다수 앞에서 <code>발표</code>를 하는 것에는 자신이 있는 나였지만, 누군가를 <code>교육</code>하는 것은... &#39;감히 내가?&#39;라는 생각이 먼저 들었다.</p>
<p>하지만 정신을 차리고 보니, 다른 친구들과 함께 지원서를 작성하고 있었다. 으쌰으쌰! 몇 차례의 새벽 회의를 거치고 우린 지원서와 학업 계획서를 완성했다.  </p>
<h3 id="수업-계획서를-작성해-봅시다">수업 계획서를 작성해 봅시다.</h3>
<p>지원을 할 때 직접 <code>category</code>를 선택할 수 있다. 분류는 크게 &#39;인공지능&#39;과 &#39;데이터 과학&#39;으로 이루어지는데 이는 또 세부로 분류된다. 아래 그림과 같이 이중 하나를 선택하면 되고, 우리는 이중 &#39;나를 찾아봐&#39;를 착안하여 <code>이미지 인식</code>에 대한 수업을 진행하기로 했다. 
<img src="https://velog.velcdn.com/images/dev_damjaeng/post/26438b68-b6d6-4c51-90f8-88b1484f7877/image.jpg" alt=""></p>
<p>이렇게 큰 카테고리를 정한 후 우리는 <code>자체적인 컨텐츠</code>를 만들어야 했다. 이미지 인식 기술로 할 수 있는 것은 무궁무진하지만, 우리는 수업 대상으로 삼았던 중학생들이 좋아할 만한 활동을 찾는 것에 몰입했다.  </p>
<blockquote>
<p>아마 어떤 활동을 해야하지?가 예비 멘토들의 큰 어려움이라고 생각한다. 그래서 우리의 것을 예시로 들면서 계획서를 쉽게 쓸 수 있는 프로세스를 공유하고자 한다.</p>
</blockquote>
<p><strong>1. 팀의 Main이 될 수 있는 프로그램 정하기</strong>
           -우리 팀은 &#39;디비디비딥&#39; 게임을 중심에 두었다. 
<strong>2. Main 활동을 위해 <code>빌드업</code> 할 수 있는 활동을 생각한다. **
     - 이미지 인식이 큰 주제이므로 인공지능이 이미지를 인식하는 원리에 대해 알려주고자 했다. <span style="color: green">(인공지능 이론)</span> <span style="color: blue">
[1교시 수업]</span>
     - 아이들의 흥미를 높이고자 이미지 인식을 활용한 게임을 찾아보았고 그 결과 <code>퀵드로우</code>와 <code>오토드로우</code>를 발견했다. <span style="color: green">(인공지능 실습)</span><span style="color: blue">
[2교시 수업]</span>
     - 인공지능에 대해 배웠으니 당연히 윤리에 대해서도 다뤄야 겠다고 생각했다. <span style="color: green">(인공지능 윤리)</span> <span style="color: blue">
[4교시 수업]</span>
이렇게 큰 갈래를 짜서 2차시 (디비디비딥 실습 포함하여 - 총 4교시) 교육 내용을 정리할 수 있었다. 
*<em>3. 수업 진행시 어떤 도구를 사용할 것인지 정한다. *</em>
        - 학습지, ppt, 휴대폰, 엔트리 등 다양한 자료들을 준비한다. 
**4. 예상되는 돌발 상황에 대해서 생각해 본다.</strong>
    - 이를 유의점에 작성한다. </p>
<h3 id="내-인생의-첫-멘티">내 인생의 첫 멘티</h3>
<p>나는 팀내에서 팀장을 맡았기 때문에 업무 분담 및 수행 뿐만 아니라 학교들과 컨택하는 업무도 진행했다. 대면 멘토링은 대개 2 학교를 맡는다. 미리 연락하여 자기 소개를 하고 멘토링 수업 일자 그리고 학교 답사 일정을 잡았다. 
수업 당일에 일어날 변수를 최소화하고 싶었기에 사전 답사를 진행했다. </p>
<blockquote>
<p>우리 팀의 경우 아주 lucky하게도 두 주에 걸쳐 모든 학교의 수업을 끝낼 수 있었다. 한 학교의 1차시 수업이 끝나면 바로 그 다음날 다른 학교의 2차시 교육을 하러 갔다. 지금 생각해도 참 잘 선택한 일정이었다.  </p>
</blockquote>
<p>학교에 가기 전에 해야할 일이 있어서 학교에서 팀원 모두가 모였다. 그러고 같이 점심을 먹고 출발하고자 했는데.. 떨려서 밥을 어떻게 먹었는지 기억도 안 난다.</p>
<h3 id="a학교">A학교</h3>
<p>첫 학교는 20명이나 되는 멘티님들이었다. 근데 분위기가.. 너무 열정이 넘쳤다. 조금만 여유를 주어도 바로 옆에 있는 친구와 장난을 쳤다. 수업이 끝나고 나서는 다들 녹초가 되었다. </p>
<h3 id="b학교">B학교</h3>
<p>코딩에 관심이 있는 친구들이 모인 동아리가 우리의 멘티님들이었다. A학교에서 워낙 요즘(?) 중학생들을 겪고 왔었기에 긴장을 많이 했는데, 이 학교는 그와 정반대로 사담이 전혀 없어서 놀랐다. (물론 갈수록 분위기가 좋아졌다!) </p>
<h3 id="릴레이-수업">릴레이 수업</h3>
<p>대면으로 진행했던 수업을 단축시켜서 90분 동안 온라인 멘티들을 위하여 수업을 해야 한다. 진행 n 개월 전에 8월 어떤 날 어떤 시간에 수업을 진행할지 선착순으로 신청할 수 있다. </p>
<p>핵심 수업만 진행하기 위하여 참여 멘토들도 따로 정했고, 릴레이 수업용 ppt도 따로 만들었다. 사정이 있는 한 친구 빼고 모두 한 장소에 모여서 진행했다. </p>
<p>많은 친구들이 적극적으로 참여해 주었다. 코로나로 인해 zoom 환경이 익숙한 멘티들과 멘토들이어서 수업이 한결 수월했던 것 같다. 
<img src="https://velog.velcdn.com/images/dev_damjaeng/post/80027c90-67a4-4ab9-a904-5286aab529fc/image.gif" alt=""></p>
<hr>
<h3 id="좋았던-점">좋았던 점</h3>
<ol>
<li>중학생들의 AI 수업 환경과 수준에 대해 알 수 있었다.<ul>
<li>항상 궁금했다. 요즘 친구들은 초등학교 때부터 코딩을 배운다고 하던데... 서울 출신이 아닌 나는 특히 서울 안에 있는 학교들의 코딩 교육 실태가 궁금했다. 생각했던 것의 배는 좋은 실습실 환경을 보면서 &#39;대한민국 IT의 미래는 밝다..⭐&#39;고 생각했다. </li>
</ul>
</li>
<li>수업을 준비하면서 나 또한 성장할 수 있었다. <ul>
<li>지도학습, 비지도학습, 강화학습.. 은 대학에 들어와서 단 한 번도 들어보지 못한 단어이다. (고등학교 때 책 보다가 알았음.) 이와 같이 기본 AI 개념들에 대해서 <code>내가 먼저 알아야 남에게 설명할 수 있다.</code>를 명심하고 열심히 공부하며 준비했다.  </li>
</ul>
</li>
</ol>
<h3 id="아쉬웠던-점">아쉬웠던 점</h3>
<ol>
<li>팀플은 처음이라서요.<ul>
<li>내가... 내가 처음이었다. 팀원들이랑 어떻게 소통을 해야하는지, 역할 분담은 어떻게 해야 이상적인지, 다들 불만은 없는지 등 &#39;내가 잘 하고 있는 걸까?&#39;에 대한 고민을 많이 했다.</li>
</ul>
</li>
<li>할 일이 꽤나 많다.<ul>
<li>물론 우리가 열정적으로 참여한 축에 속하기 때문도 있다. 하지만 수업 멘토링 + 컨텐츠 제작 + 대본 작성 등등 업로드할 것들이 계속 생겨서 (업로드하려면 소개글도 작성해야 하니까) 일을 어떻게 조절할지에 대해서도 생각하게 되었다.   <h3 id="배울-점">배울 점</h3>
</li>
</ul>
</li>
<li>팀장은 확인 또 확인을 해야 한다.<ul>
<li>한 학교의 선생님들이 너무 바쁘셨는지 자꾸 놓치시는 것이 많았다. 나는 <code>reminder</code>를 한 번이면 족하다고 생각했는데, 전혀 그렇지 않았다.  그렇게 수업을 하기 위해 다시 학교에 방문했을 때 들었던 생각은 &#39;그냥 내가 한 번 더 check 할 걸...&#39; 이었다.</li>
<li>여러 변수가 일어날 것을 미리 생각해야 한다. </li>
</ul>
</li>
<li>팀 내의 혼란성을 최소화 해야 한다.<ul>
<li>팀원들에게 정확한 업무와 데드라인을 공지해야 한다. </li>
<li>최대한 구체적으로 내가 구상하는 것에 대해 이야기한다. </li>
<li>팀원들의 사기를 올리기 위해 말투에 신경 쓴다. </li>
</ul>
</li>
</ol>
<p>한 줄 : <code>역량을 키울 수 있었다.</code></p>
<blockquote>
<p>원래는 쓸 생각이었는데.. 어찌하다 보니... 이렇게나 길어졌다.
1편에는 이 활동이 무슨 활동인지에 대해 다루었고, 2편에서는 수업을 준비와 진행 그리고 느낀 점에 대해서 공유했다.
다음 편인 3편에서는 우리의 발자취(컨텐츠)를 공유하면서 마무리해 볼까 한다. </p>
</blockquote>
<p>끝! </p>
]]></description>
        </item>
        <item>
            <title><![CDATA[Tuples are like lists. But, ]]></title>
            <link>https://velog.io/@dev_damjaeng/Tuples-are-like-lists.-But</link>
            <guid>https://velog.io/@dev_damjaeng/Tuples-are-like-lists.-But</guid>
            <pubDate>Wed, 17 Aug 2022 02:36:52 GMT</pubDate>
            <description><![CDATA[<h3 id="tuples-are-like-lists">Tuples are like lists</h3>
<p>Tuples are another king of sequence that functions much like a list - they have elements which are indexed starting at 0</p>
<pre><code class="language-python">&gt;&gt;&gt; x = (&#39;Glenn&#39;, &#39;Sally&#39;, &#39;Joseph&#39;)
&gt;&gt;&gt; print(x[2])
Joseph
&gt;&gt;&gt; y = (1, 9, 2)
&gt;&gt;&gt; print(y)
(1, 9, 2)
&gt;&gt;&gt; print(max(y))
9 </code></pre>
<h3 id="but-tuples-are-immutable">but.. Tuples are “immutable”</h3>
<p>Unlike a list, once you create a <span style="color: pink"><strong>tuple</strong></span>, you <span style="color: orange"><strong>cannot alter</strong></span> its contents - similar to a string </p>
<h3 id="a-tale-fo-two-sequences">A Tale fo Two sequences</h3>
<pre><code class="language-python">&gt;&gt;&gt; l = list()
&gt;&gt;&gt; dir(l)
[&#39;append&#39;, &#39;count&#39;, &#39;extend&#39;, &#39;index&#39;, &#39;insert&#39;, &#39;pop&#39;, &#39;remove&#39;, &#39;reverse&#39;, &#39;sort&#39;]

&gt;&gt;&gt; t = tuple()
&gt;&gt;&gt; dir(t)
[&#39;count&#39;, &#39;index&#39;] </code></pre>
<h3 id="tuples-are-more-efficient">Tuples are more efficient</h3>
<ul>
<li>Since Python does not have to build tuple structures to be modifiable, they are simpler and more efficient in terms of memory use and performance than lists</li>
<li>So in our program when we are making “temporary variables” we prefer tuples over lists</li>
</ul>
<h3 id="tuples-and-assignment">Tuples and Assignment</h3>
<ul>
<li>We can also put a <span style="color: orange"><strong>tuple</strong></span> on the <span style="color: blue"><strong>left-hand side</strong></span> of an assignment statement</li>
<li>We can even omit the parentheses</li>
</ul>
<pre><code class="language-python">&gt;&gt;&gt; (x, y) = (4, &#39;fred&#39;)
&gt;&gt;&gt; print(y)
fred
&gt;&gt;&gt; (a, b) = (99, 98)
&gt;&gt;&gt; print(a)
99</code></pre>
<h3 id="tuples-and-dictionaries">Tuples and Dictionaries</h3>
<p>The items() method in dictionaries returns a list of (key, value) tuples</p>
<pre><code class="language-python">&gt;&gt;&gt; d = dict()
&gt;&gt;&gt; d[&#39;csev&#39;] = 2
&gt;&gt;&gt; d[&#39;cwen&#39;] = 4
&gt;&gt;&gt; for (k, v) in d.items() : 
                print(k, v)
...
...
csev 2
cwen 4
&gt;&gt;&gt; tups = d.items()
&gt;&gt;&gt; print(tups)
dict_items([(&#39;csev&#39;, 2), (&#39;cwen&#39;, 4)])</code></pre>
<h3 id="tuples-are-comparable">Tuples are Comparable</h3>
<p>The comparison <span style="color: blue"><strong>operators</strong></span> work with <span style="color: orange">
<strong>tuples</strong></span> and other sequences. If the first item is equl, Python goes on to the next element, and so on, until it finds elements that differ. </p>
<pre><code class="language-python">(0, 1, 2) &lt; (5, 1, 2)
# True 값을 가집니다.
 (0, 1, 2000000) &lt; (0, 3, 4)
# True 값을 가집니다.
 ( &#39;Jones&#39;, &#39;Sally&#39; ) &lt; (&#39;Jones&#39;, &#39;Sam&#39;)
# True 값을 가집니다.
 ( &#39;Jones&#39;, &#39;Sally&#39;) &gt; (&#39;Adams&#39;, &#39;Sam&#39;)
# True 값을 가집니다.</code></pre>
<hr>
<h3 id="sorting-lists-of-tuples">Sorting Lists of Tuples</h3>
<ul>
<li>We can take advantage of the ability to sort a list of <span style="color: orange"></li>
<li><em>tuples*</em></span> to get a sorted version of a dictionary</li>
<li>First we sort the dictionary by the key using the <span style="color: pink"><strong>items()</strong></span> method and <span style="color: orange"></li>
<li><em>sorted()*</em></span> function</li>
</ul>
<pre><code class="language-python">&gt;&gt;&gt; d = {&#39;a&#39;:10, &#39;b&#39;:1, &#39;c&#39;:22}
&gt;&gt;&gt; d.items()
dict_items([(&#39;a&#39;, 10), (&#39;c&#39;, 22), (&#39;b&#39;, 1)])
&gt;&gt;&gt; sorted(d.items())
[(&#39;a&#39;, 10), (&#39;b&#39;, 1), (&#39;c&#39;, 22)]</code></pre>
<h3 id="using-sorted">Using sorted()</h3>
<p>We can do this even more directly using the built-in function <span style="color: pink"><strong>sorted</strong></span> that takes a sequence as a parameter and returns a sorted sequence </p>
<pre><code class="language-python">&gt;&gt;&gt; d = {&#39;a&#39;:10, &#39;b&#39;:1, &#39;c&#39;:22}
&gt;&gt;&gt; t = sorted(d.items())
&gt;&gt;&gt; t
[(&#39;a&#39;, 10), (&#39;b&#39;, 1), (&#39;c&#39;, 22)]
&gt;&gt;&gt; for k, v in sorted(d.items()):
                print(k, v)
...
...
a 10
b 1
c 22</code></pre>
<h3 id="sort-by-values-instead-of-key">Sort by values instead of key</h3>
<ul>
<li>If we could construct a list of <span style="color: orange"><strong>tuples</strong></span> of the form <span style="color: orange"><strong>(value, key)</strong></span> we could <span style="color: pink"><strong>sort</strong></span> by value</li>
<li>We do this with a <span style="color: orange"><strong>for</strong></span> loop that creates a list of tuples</li>
</ul>
<pre><code class="language-python">&gt;&gt;&gt; c = {&#39;a&#39;:10, &#39;b&#39;:1, &#39;c&#39;:22}
&gt;&gt;&gt; tmp = list()
&gt;&gt;&gt; for k, v in c.items() :
    tmp.append( (v, k) )
...
...
&gt;&gt;&gt; print(tmp)
# [(10, &#39;a&#39;), (1, &#39;b&#39;), (22, &#39;c&#39;)]
&gt;&gt;&gt; tmp = sorted(tmp)
&gt;&gt;&gt; print(tmp)
# [(1, &#39;b&#39;), (10, &#39;a&#39;), (22, &#39;c&#39;)]</code></pre>
<h3 id="the-top-10-most-common-words">The top 10 most common words</h3>
<pre><code class="language-python">fhand = open(&#39;romeo.txt&#39;)
counts = {}
for line in fhand:
    words = line.split()
    for word in words:
        counts[word] = counts.get(word, 0 ) + 1

lst = []
for key, val in counts.items():
    newtup = (val, key) 
    lst.append(newtup)

lst = sorted(lst, reverse=True)

for val, key in lst[:10] :
    print(key, val)</code></pre>
<h3 id="even-shorter-vwesion">Even Shorter Vwesion</h3>
<p><span style="color: green"><strong>List comprehension</strong></span> creates a dynamic list. In this case, we make a list of reversed tuples and then sort it. </p>
<pre><code class="language-python">c = {&#39;a&#39;:10, &#39;b&#39;:1, &#39;c&#39;:22}
print( sorted( [ (v,k) for k,v in c.items() ] ) )
# [(1, &#39;b&#39;), (10, &#39;a&#39;), (22, &#39;c&#39;)]</code></pre>
<h3 id="summary">Summary</h3>
<ul>
<li>Tuple syntax</li>
<li>Immutability</li>
<li>Comparability</li>
<li>Sorting</li>
<li>Tuples in assignment statements</li>
<li>Sorting dictionaries by either key or value</li>
</ul>
]]></description>
        </item>
        <item>
            <title><![CDATA[Methods of Dictionaries ]]></title>
            <link>https://velog.io/@dev_damjaeng/Methods-of-Dictionaries</link>
            <guid>https://velog.io/@dev_damjaeng/Methods-of-Dictionaries</guid>
            <pubDate>Wed, 17 Aug 2022 02:25:04 GMT</pubDate>
            <description><![CDATA[<h3 id="many-counters-with-a-dictionary">Many Counters with a Dictionary</h3>
<p>One common use of dictionaries is <span style="color: orange"><strong>counting</strong></span> how often we “see” something </p>
<pre><code class="language-python">&gt;&gt;&gt; ccc = dict()
&gt;&gt;&gt; ccc[&#39;csev&#39;] = 1
&gt;&gt;&gt; ccc[&#39;cwen&#39;] = 1
&gt;&gt;&gt; print(ccc)
{&#39;csev&#39;: 1, &#39;cwen&#39;: 1}
&gt;&gt;&gt; ccc[&#39;cwen&#39;] = ccc[&#39;cwen&#39;] + 1
&gt;&gt;&gt; print(ccc)
{&#39;csev&#39;: 1, &#39;cwen&#39;: 2}</code></pre>
<h3 id="dictionary-tracebacks">Dictionary Tracebacks</h3>
<ul>
<li>It is an error to reference a key which is not in the dictionary</li>
<li>We can use the in operator to see if a key is in the dictionary</li>
</ul>
<pre><code class="language-python">&gt;&gt;&gt; ccc = dict()
&gt;&gt;&gt; print(ccc[&#39;csev&#39;])
KeyError: &#39;csev&#39;</code></pre>
<h3 id="when-we-see-a-new-name">When we see a new name</h3>
<p>When we encounter a new name, we need to add a new entry in the dictionary and if this the second or later time we have seen the name, we simply add one to the count in the dictionary under that name</p>
<pre><code class="language-python">counts = dict()
names = [&#39;csev&#39;, &#39;cwen&#39;, &#39;csev&#39;, &#39;zqian&#39;, &#39;cwen&#39;]
for name in names:
    if name not in counts :
            counts[name] = 1
    else : 
            counts[name] = counts[name] + 1
print(counts) </code></pre>
<h3 id="the-get-method-for-dictionaries">The get method for dictionaries</h3>
<p>The pattern of checking to see if a <span style="color: blue"><strong>key</strong></span> is already in a dictionary and assuming a default value if the <span style="color: blue"><strong>key</strong></span> is not there is so common that there is a <span style="color: pink"><strong>method</strong></span> called <span style="color: pink"><strong>get()</strong></span> that does this for us</p>
<p><span style="color: orange"><strong>Default value if they does not exist (and no Traceback).</strong></span></p>
<pre><code class="language-python">if name in counts:
        x = counts[name]
else :
        x = 0

x = counts.get(name, 0)

{&#39;csev&#39;: 2, &#39;zqian&#39;: 1, &#39;cwen&#39;: 2}</code></pre>
<h3 id="simplified-counting-with-get">Simplified counting with get()</h3>
<p>We can use <span style="color: pink"><strong>get()</strong></span> and provide a <span style="color: orange"><strong>default value of zero</strong></span> when the key is not yet in the dictionary - and then just add one</p>
<pre><code class="language-python">counts = dict()
names = [&#39;csev&#39;, &#39;cwen&#39;, &#39;csev&#39;, &#39;zqian&#39;, &#39;cwen&#39;]
for name in names:
        counts[name] = counts.get(name, 0) + 1
print(counts) </code></pre>
<hr>
<h3 id="counting-pattern">Counting Pattern</h3>
<p>The general pattern to count the words in a line of text is to <span style="color: pink"><strong>split</strong></span> the line into words, then loop through the words and use a <span style="color: green"><strong>dictionary</strong></span> to track the count of each word independently. </p>
<pre><code class="language-python">counts = dict()
print(&#39;Enter a line of text: &#39;)
line = input(&#39;&#39;)

words = line.split()

print(&#39;Words:&#39;, words)

print(&#39;Counting...&#39;)
for word in words:
        counts[word] = counts.get(word, 0) + 1
print(&#39;Counts&#39;, counts) </code></pre>
<h3 id="definite-loops-and-dictionaries">Definite Loops and Dictionaries</h3>
<p>Even though <span style="color: green"><strong>dictionaries</strong></span> are not stored in order, we can write a for loop that goes through all the <span style="color: blue"><strong>entries</strong></span> in a <span style="color: green"><strong>dictionary</strong></span> - actually it goes through all of the <span style="color: blue"><strong>keys</strong></span> in the <span style="color: green"><strong>dictionary</strong></span> and <span style="color: blue"><strong>looks up</strong></span> the values</p>
<p>You can get a list of keys, values, or items(both) from a dictionary</p>
<h3 id="bonus-two-iteration-variables">Bonus: Two Iteration Variables!</h3>
<ul>
<li>We loop through the <span style="color: orange"><strong>key</strong>-<strong>value</strong></span> pairs in a dictionary using “two” iteration variables</li>
<li>Each iteration, the first variable is the <span style="color: orange"><strong>key</strong></span> and the second variable is the corresponding <span style="color: orange"><strong>value</strong></span> for the key</li>
</ul>
<pre><code class="language-python">jjj = {&#39;chuck&#39; : 1, &#39;fred&#39; : 42, &#39;jan&#39; : 100}
for aaa.bbb in jjj.items() :
        print(aaa, bbb) </code></pre>
<pre><code class="language-python">name = input(&#39;Enter file:&#39;)
handle = open(name)

counts = dict()
for line in handle:
    words = line.split()
    for word in words:
        counts[word] = counts.get(word,0) + 1

bigcount = None
bigword = None
for word,count in counts.items():
    if bigcount is None or count &gt; bigcount:
        bigword = word
        bigcount = count

print(bigword, bigcount)</code></pre>
<h3 id="summary">Summary</h3>
<ul>
<li>What is a collection?</li>
<li>Lists versus Dictionaries</li>
<li>Dictionary constants</li>
<li>The most common word</li>
<li>Using the <span style="color: pink"><strong>get()</strong></span> method</li>
<li>Hashing, and lack of order</li>
<li>Writing dictionary loops</li>
<li>Sneak peek: tuples</li>
<li>Sorting dictionaries</li>
</ul>
]]></description>
        </item>
        <item>
            <title><![CDATA[What is a Collection?]]></title>
            <link>https://velog.io/@dev_damjaeng/What-is-a-Collection</link>
            <guid>https://velog.io/@dev_damjaeng/What-is-a-Collection</guid>
            <pubDate>Wed, 17 Aug 2022 02:12:11 GMT</pubDate>
            <description><![CDATA[<h3 id="what-is-a-collection">What is a Collection?</h3>
<ul>
<li>A collection is nice because we can put more than one value in it and carry them all around in one convenient package</li>
<li>We have a bunch of values in a single “variable”</li>
<li>We do this by having more than one place “in” the variable</li>
<li>We have ways of finding the different places in the variable</li>
</ul>
<h3 id="what-is-not-a-collection">What is not a “Collection”?</h3>
<ul>
<li>Most of our <span style="color: green"><strong>variables</strong></span> have one value in them - when we put a new value in the <span style="color: green"><strong>variable</strong></span> - the old value is overwritten</li>
</ul>
<pre><code class="language-python">$ python
&gt;&gt;&gt; x = 2
&gt;&gt;&gt; x = 4
&gt;&gt;&gt; print(x)
4</code></pre>
<h3 id="a-story-of-two-collections">A Story of Two Collections..</h3>
<ul>
<li>List<ul>
<li>A linear collection of values that stay in order</li>
</ul>
</li>
<li>Dictionary<ul>
<li>A “bag” of values, each with its own label</li>
</ul>
</li>
</ul>
<h3 id="dictionaries">Dictionaries</h3>
<ul>
<li>Dictionaries are Python’s most powerful data collection</li>
<li>Dictionaries allow us to do fast database-like operations in Python</li>
<li>Dictionaries have different names in different languages<ul>
<li>Associative Arrays - Perl / PHP</li>
<li>Properties or Map or HashMap - Java</li>
<li>Property Bag - C# / .Net</li>
</ul>
</li>
<li>Lists <span style="color: blue"><strong>index</strong></span> their entries based on the position in the list</li>
<li><span style="color: pink"><strong>Dictionaries</strong></span> are like bags - no order</li>
<li>So we <span style="color: blue"><strong>index</strong></span> the things we put in the <span style="color: pink"><strong>dictionary</strong></span> with a <span style="color: blue"><strong>“lookup tag”</strong></span></li>
</ul>
<pre><code class="language-python">&gt;&gt;&gt; purse = dict()
&gt;&gt;&gt; purse[&#39;money&#39;] = 12
&gt;&gt;&gt; purse[&#39;candy&#39;] = 3
&gt;&gt;&gt; purse[&#39;tissues&#39;] = 75
&gt;&gt;&gt; print(purse)
(&#39;money&#39;: 12, &#39;tissues&#39;: 75, &#39;candy&#39;: 3)
&gt;&gt;&gt; print(purse[&#39;candy&#39;])
3
&gt;&gt;&gt; purse[&#39;candy&#39;] = purse[&#39;candy&#39;] +2
&gt;&gt;&gt; print(purse)
(&#39;money&#39;: 12, &#39;tissues&#39;: 75, &#39;candy&#39;: 5) </code></pre>
<h3 id="comparing-lists-and-dictionaries">Comparing Lists and Dictionaries</h3>
<p><span style="color: pink"><strong>Dictionaries</strong></span> are like <strong>lists</strong> except that they use <span style="color: orange"><strong>keys</strong></span> instead of numbers to look up <span style="color: orange"><strong>values</strong></span></p>
<pre><code class="language-python">&gt;&gt;&gt; 1st = list()
&gt;&gt;&gt; 1st.append(21)
&gt;&gt;&gt; 1st.append(183)
&gt;&gt;&gt; print(1st)
[21, 183]
&gt;&gt;&gt; 1st[0] = 23
&gt;&gt;&gt; print(1st)
[23, 183]</code></pre>
<h3 id="dictionary-lieterals-constants">Dictionary Lieterals (Constants)</h3>
<ul>
<li>Dictionary literals use curly braces and have a list of <span style="color: green"><strong>key</strong></span>: <span style="color: pink"><strong>value</strong></span> pairs</li>
<li>You can make an <span style="color: orange"><strong>empty dictionary</strong></span> using empty curly braces</li>
</ul>
<pre><code>python
&gt;&gt;&gt; jjj = {&#39;chuck&#39; : 1, &#39;fred&#39; : 42, &#39;jan&#39;: 100}
&gt;&gt;&gt; print(jjj)
{&#39;jan&#39;: 100, &#39;chuck&#39;: 1, &#39;fred&#39;: 42}
&gt;&gt;&gt; ooo = { }
&gt;&gt;&gt; print(ooo)
{}
&gt;&gt;&gt; </code></pre>]]></description>
        </item>
        <item>
            <title><![CDATA[나의 첫 대외활동 with 소놀 ]]></title>
            <link>https://velog.io/@dev_damjaeng/%EB%82%98%EC%9D%98-%EC%B2%AB-%EB%8C%80%EC%99%B8%ED%99%9C%EB%8F%99-with-%EC%86%8C%EB%86%80</link>
            <guid>https://velog.io/@dev_damjaeng/%EB%82%98%EC%9D%98-%EC%B2%AB-%EB%8C%80%EC%99%B8%ED%99%9C%EB%8F%99-with-%EC%86%8C%EB%86%80</guid>
            <pubDate>Sun, 14 Aug 2022 09:55:45 GMT</pubDate>
            <description><![CDATA[<blockquote>
<p>안녕하세요:) 오늘은 저의 첫 대외활동인 &#39;소프트웨어야 놀자&#39;에 대해 포스팅을 해보려고 합니다. 이 활동의 키워드는 바로 <span style="color: blue">#교육</SPAN> 입니다. </p>
</blockquote>
<h3 id="소프트웨어야-놀자란">소프트웨어야 놀자란?</h3>
<p>전국의 대학생 멘토들이 초·중학생들에게 SW/AI 수업을 통해 AI&amp;DATA 지식과 경험을 함께 나누는 교육 봉사 프로그램입니다. </p>
<h3 id="무슨-활동을-하나요">무슨 활동을 하나요?</h3>
<p>큰 카테고리로는 &#39;수업&#39;이라고 생각하시면 됩니다. 자체적인 수업을 준비해서 총 2학교(추가로 에 대면 멘토링을 나가야 합니다. (불가피한 상황에서는 비대면으로 진행!) 추가로 온라인으로 이루어지는 릴레이 수업도 필수로 참여해야 합니다. 
팀의 홍보를 위해서 SNS 홍보를 위한 게시글도 꾸준히 올려야 합니다. </p>
<h3 id="얼마나-활동하나요">얼마나 활동하나요?</h3>
<p>모집 기간은 대략 매년 5월 초에 마감됩니다. 
활동은 5월~12월로 총 8개월 정도로 꽤나 긴 장기 프로젝트입니다. </p>
<h3 id="각-달마다-무엇을-하나요">각 달마다 무엇을 하나요?</h3>
<p>대면 멘토링은 각 팀마다 다릅니다.
5월 : 지원서 제출, 발대식, 세부 역할 분담, 수업 및 예산 계획서 수정 후 재제출. 
6월 : 전문가 피드백, 교육기관 컨택, 최종 활동 계획서 마감, 학교 답사. 
7월 : <span style="color: blue">피어그룹과 회의 및 미션</SPAN>, 대면 멘토링 진행, 팀 소개 컨텐츠 제작.
8월 : 릴레이 수업, <span style="color: blue">여름 맞이 컨텐츠 제작</SPAN>. </p>
<p>+) 파란색으로 표시된 것은 소놀에서 진행하는 &#39;이달의 소놀&#39;이라는 미션을 수행한 것입니다.
++) 작성 날짜가 8월이기 때문에 12월 활동이 끝난 후 내용 추가하도록 하겠습니다. </p>
]]></description>
        </item>
        <item>
            <title><![CDATA[Best Friends: Strings and Lists]]></title>
            <link>https://velog.io/@dev_damjaeng/Best-Friends-Strings-and-Lists</link>
            <guid>https://velog.io/@dev_damjaeng/Best-Friends-Strings-and-Lists</guid>
            <pubDate>Sun, 07 Aug 2022 15:24:50 GMT</pubDate>
            <description><![CDATA[<h2 id="concatenating-lists-using-">Concatenating lists using +</h2>
<p>We can create a new list by adding two existing lists together</p>
<pre><code class="language-python">&gt;&gt;&gt; a = [1, 2, 3]
&gt;&gt;&gt; b = [4, 5, 6]
&gt;&gt;&gt; c = a + b
&gt;&gt;&gt; print(c)
[1, 2, 3, 4, 5, 6]
&gt;&gt;&gt; print(a)
[1, 2, 3]</code></pre>
<h2 id="lists-can-be-sliced-using">Lists can be sliced using:</h2>
<pre><code class="language-python">&gt;&gt;&gt; t = [9, 41, 12, 3, 74, 15]
&gt;&gt;&gt; t[1:3]
[41, 12]
&gt;&gt;&gt; t[:4]
[9, 41, 12, 3]
&gt;&gt;&gt; t[3:]
[3, 74, 15]
&gt;&gt;&gt; t[:]
[9, 41, 12, 3, 74, 15]</code></pre>
<p><span style='background-color: #FDCBF2'>Remember:</span> Just like in strings, the second number is <span style='background-color: #9DDCF8'>“up to but not including”</span></p>
<h2 id="list-methods">List Methods</h2>
<pre><code class="language-python">&gt;&gt;&gt; x = list()
&gt;&gt;&gt; type(x)
&lt;type &#39;list&#39;&gt;
&gt;&gt;&gt; dir(x)
[&#39;append&#39;, &#39;count&#39;, &#39;extend&#39;, &#39;index&#39;, &#39;inser&#39;, &#39;pop&#39;, &#39;remove&#39;, 
&#39;reverse&#39;, &#39;sor&#39;]</code></pre>
<h4 id="span-stylecolor-bluedata-structures---python-3106-documentationspan"><span style="color: blue">Data Structures - Python 3.10.6 documentation</span></h4>
<p><a href="https://docs.python.org/3/tutorial/datastructures.html">https://docs.python.org/3/tutorial/datastructures.html</a></p>
<h2 id="building-a-list-from-scratch">Building a List from Scratch</h2>
<ul>
<li>We can create an empty <span style='background-color: #A3FCAF'>list</span> and then add elements using the <span style='background-color: #FDCBF2'>append</span> method</li>
<li>The <span style='background-color: #A3FCAF'>list</span> stays in order and new elements are <span style='background-color: #FDCBF2'>added</span> at the end of the <span style='background-color: #A3FCAF'>list</span></li>
</ul>
<pre><code class="language-python">&gt;&gt;&gt; stuff = list()
&gt;&gt;&gt; stuff.append(&#39;book&#39;)
&gt;&gt;&gt; studd.append(99)
&gt;&gt;&gt; print(stuff)
[&#39;book&#39;, 99]
&gt;&gt;&gt; stuff.append(&#39;cookies&#39;)
&gt;&gt;&gt; print(stuff)
[&#39;book&#39;, 99, &#39;cookie&#39;]</code></pre>
<h2 id="is-something-in-a-list">Is Something in a List?</h2>
<ul>
<li>Python provides <span style='background-color: #9DDCF8'>two operators</span> that let you check if an item is in a list</li>
<li>These are logical operators that return <span style='background-color: #FDCBF2'>True or False</span></li>
<li>They do not modify the list</li>
</ul>
<pre><code class="language-python">&gt;&gt;&gt; some = [1, 9, 21, 10, 16]
&gt;&gt;&gt; 9 in some
True
&gt;&gt;&gt; 15 in some
False
&gt;&gt;&gt; 20 not in some
True</code></pre>
<h2 id="lists-are-in-order">Lists are in Order</h2>
<ul>
<li>A <span style='background-color: #A3FCAF'>list</span> can hold many items and keeps those items in the order until we do something to change the order</li>
<li>A <span style='background-color: #A3FCAF'>list</span> can be <span style='background-color: #FDCBF2'>sorted</span> (i.e., change its order)</li>
<li>The <span style='background-color: #FDCBF2'>sort</span> method (unlike in strings) means <span style='background-color: #FDCBF2'>“sort yourself”</span></li>
</ul>
<pre><code class="language-python">&gt;&gt;&gt; friends = [&#39;Joseph&#39;, &#39;Glenn&#39;, &#39;Sally&#39;]
&gt;&gt;&gt; friends.sort()
&gt;&gt;&gt; print(friends)
[&#39;Glenn&#39;, &#39;Joseph&#39;, &#39;Sally&#39;] 
Joseph </code></pre>
<h3 id="span-stylecolor-redstrings-are-immutable-and-lists-are-mutablespan"><span style="color: red">Strings are immutable and lists are mutable.</span></h3>
<h2 id="built-in-fuctions-and-lists">Built-in Fuctions and Lists</h2>
<ul>
<li>There are a number of <span style='background-color: #9DDCF8'>functions</span> built into <span style='background-color: #FDCBF2'>Python</span> that take <span style='background-color: #A3FCAF'>lists</span> as parameters.</li>
<li>Remember the loops we built? These are much simpler.</li>
</ul>
<pre><code class="language-python">&gt;&gt;&gt; nums = [3, 41, 12, 9, 74, 15]
&gt;&gt;&gt; print(len(nums))
6
&gt;&gt;&gt; print(max(nums))
74
&gt;&gt;&gt; print(min(nums))
3
&gt;&gt;&gt; print(sum(nums)) 
154
&gt;&gt;&gt; print(sum(nums)/len(nums)) 
25.6</code></pre>
<h2 id="getting-average-using-lists">Getting Average using Lists</h2>
<pre><code class="language-python">numlist = list()
while True:
        inp = input(&#39;Enter a number: &#39;)
        if inp == &#39;done&#39; : break
        value = float(inp)
        numlist.append(value)

average = sum(numlist) / len(numlist)
print(&#39;Average:&#39;, average)</code></pre>
<h3 id="span-stylecolor-redit-uses-more-memory-than-using-totalspan"><span style="color: red">It uses more memory than using &#39;Total&#39;.</span></h3>
<hr>
<h2 id="best-friends-strings-and-lists">Best Friends: Strings and Lists</h2>
<pre><code class="language-python">&gt;&gt;&gt; abc = &#39;With three words&#39;
&gt;&gt;&gt; stuff = abc.split()
&gt;&gt;&gt; print(stuff)
[&#39;With&#39;, &#39;three&#39;, &#39;words&#39;]
&gt;&gt;&gt; print(len(stuff))
3
&gt;&gt;&gt; print(stuff[0])
With </code></pre>
<p><span style='background-color: #FDCBF2'>Split</span> breaks a string into parts and produces a list of strings. We think of these as words. We can <span style='background-color: #9DDCF8'>access</span> a particular word or <span style='background-color: #FEFEA8'>loop</span> through all the words. </p>
<pre><code class="language-python">&gt;&gt;&gt; line = &#39;A lot                of spaces&#39;
&gt;&gt;&gt; etc = line.split()
&gt;&gt;&gt; print(etc)
[&#39;A&#39;, &#39;lot&#39;, &#39;of&#39;, &#39;spaces&#39;]
&gt;&gt;&gt; 
&gt;&gt;&gt; line = &#39;first;second;third&#39;
&gt;&gt;&gt; thing = line.split()
&gt;&gt;&gt; print(thing)
[&#39;first;second;third&#39;]
&gt;&gt;&gt; print(len(thing))
1
&gt;&gt;&gt; thing = line.split(&#39;;&#39;)
&gt;&gt;&gt; print(thing)
[&#39;first&#39;, &#39;second&#39;, &#39;third&#39;]
&gt;&gt;&gt; print(len(thing))
3</code></pre>
<ul>
<li>When you do not specify a <span style='background-color: #9DDCF8'>delimiter</span>, multiple spaces are treated like one delimiter</li>
<li>You can specify what <span style='background-color: #9DDCF8'>delimiter</span> character to use in the <span style='background-color: #FDCBF2'>splitting</span></li>
</ul>
<h2 id="day-paring">Day Paring</h2>
<p>From <a href="mailto:stephen.marquard@uct.ac.za">stephen.marquard@uct.ac.za</a> <span style='background-color: #FDCBF2'>Sat</span> Jan 5:09:14:16 2008</p>
<pre><code class="language-python">fhand = open(&#39;mbox-short.txt&#39;)
for line in fhand:
        line = line.rstrip()
        if not line.startswitch(&#39;From &#39;) : continue
        words = line.split()
        print(words[2])</code></pre>
<h2 id="the-double-split-pattern">The Double Split Pattern</h2>
<ul>
<li>Sometimes we split a line one way, and then grab one of the pieces of the line and split that piece again</li>
</ul>
<p>From <a href="mailto:stephen.marquard@uct.ac.za">stephen.marquard@uct.ac.za</a> <span style='background-color: #FDCBF2'>Sat</span> Jan 5:09:14:16 2008</p>
<pre><code class="language-python">words = line.split()
email = words[1]
pieces = email.split(&#39;@&#39;)
print(pieces[1]) 

&gt;&gt;&gt; stephen.marquard@uct.ac.za
&gt;&gt;&gt; [&#39;stephen.marquard&#39;, &#39;uct.ac.za&#39;]
&gt;&gt;&gt; &#39;uct.ac.za&#39;</code></pre>
<h2 id="list-summary">List Summary</h2>
<ul>
<li>Concept of a collection</li>
<li>Lists and definite loops</li>
<li>Indexing and lookup</li>
<li>List mutability</li>
<li>Functions: len, min, max, sum</li>
<li>Slicing lists</li>
<li>List methods: append, remove</li>
<li>Sorting lists</li>
<li>Splitting strings into lists of words</li>
<li>Using split to parse strings</li>
</ul>
]]></description>
        </item>
        <item>
            <title><![CDATA[What is Lists?]]></title>
            <link>https://velog.io/@dev_damjaeng/What-is-Lists</link>
            <guid>https://velog.io/@dev_damjaeng/What-is-Lists</guid>
            <pubDate>Sun, 07 Aug 2022 15:12:11 GMT</pubDate>
            <description><![CDATA[<h2 id="python-lists">Python Lists</h2>
<h2 id="programming">Programming</h2>
<h3 id="algorithms">Algorithms</h3>
<ul>
<li>A set of rules or steps used to solve a problem</li>
</ul>
<h3 id="data-structures">Data Structures</h3>
<ul>
<li>A particular way of organizing data in a computer</li>
</ul>
<h3 id="span-stylecolor-red-lists-are-simple-data-structuresspan"><span style="color: red"> Lists are simple data structures</span></h3>
<h2 id="what-is-not-a-collection">What is not a “Collection”</h2>
<p>Most of our <span style='background-color: #A3FCAF'>variables</span> have one value in them - when we put a new value in the <span style='background-color: #A3FCAF'>variable</span>, the old value is overwritten</p>
<pre><code class="language-python">&gt;&gt;&gt; x = 2
&gt;&gt;&gt; x = 4
&gt;&gt;&gt; print(x)
4</code></pre>
<h2 id="a-list-is-a-kind-of-collection">A List is a kind of Collection</h2>
<ul>
<li>A <span style="color: red"><strong>collection</strong></span> allows us to put many values in a single <span style='background-color: #A3FCAF'>“variable”</span></li>
<li>A <span style="color: red"><strong>collection</strong></span> is nice because we can carry all <span style='background-color: #FDCBF2'>many</span> values aroud in one convenient package</li>
</ul>
<pre><code class="language-python">friends = [&#39;Joseph&#39;, &#39;Glenn&#39;, &#39;Sally&#39;]
carryon = [&#39;socks&#39;, &#39;shirt&#39;, &#39;perfume&#39;] </code></pre>
<h2 id="list-constants">List Constants</h2>
<ul>
<li><span style='background-color: #A3FCAF'>List</span> constants are surrounded by square brackets and the elements in the list are separated by commas</li>
<li>A <span style='background-color: #A3FCAF'>list</span> element can be any Python object - even <span style='background-color: #9DDCF8'>another list</span></li>
<li>A <span style='background-color: #A3FCAF'>list</span> can be empty</li>
</ul>
<pre><code class="language-python">&gt;&gt;&gt; print([1, 24, 76])
[1, 24, 76]
&gt;&gt;&gt; print([&#39;red&#39;, &#39;yellow&#39;, &#39;blue&#39;])
[&#39;red&#39;, &#39;yellow&#39;, &#39;blue&#39;]
&gt;&gt;&gt; print([&#39;red&#39;, 24, 98.6])
[&#39;red&#39;, 24, 98.6]
&gt;&gt;&gt; print([1, [5, 6], 7])
[1, [5, 6], 7]
&gt;&gt;&gt; print([])
[]</code></pre>
<h2 id="we-already-use-lists">We already use lists!</h2>
<pre><code class="language-python">for i in [5, 4, 3, 2, 1]:
        print(i) 
print(&#39;Blastoff!&#39;)

&gt;&gt;&gt;5
4
3
2
1
Blastoff!</code></pre>
<h2 id="lists-and-definite-loops---best-pals">Lists and definite loops - best pals</h2>
<pre><code class="language-python">friends = [&#39;Joseph&#39;, &#39;Glenn&#39;, &#39;Sally&#39;]
for friend in friends :
        print(&#39;Happy New Year:&#39;, friend)
print(&#39;Done!&#39;)

&gt;&gt;&gt; Happy New Year: Joseph
Happy New Year: Glenn
Happy New Year: Sally
Done!</code></pre>
<h2 id="looking-inside-lists">Looking Inside Lists</h2>
<p>Just like strings, we can get at any single element in a list using an index specified in <span style='background-color: #E9C0FC'>square brackets.</span></p>
<h3 id="span-stylecolor-redit-starts-at-0-like-in-european-elevatorsspan"><span style="color: red">It starts at 0, like in European elevators.</span></h3>
<h2 id="lists-are-mutable">Lists are Mutable</h2>
<ul>
<li>Strings are <span style='background-color: #A3FCAF'>“immutable”</span> - we cannot change the contents of a string - we must make a <span style='background-color: #FDCBF2'>new string</span> to make any change</li>
<li>Lists are <span style='background-color: #A3FCAF'>“mutable”</span> - we can <span style='background-color: #FDCBF2'>change</span> an element of a list using the <span style='background-color: #FEFEA8'>index</span> operator</li>
</ul>
<pre><code class="language-python">&gt;&gt;&gt; fruit = &#39;Banana&#39;
&gt;&gt;&gt; fruit[0] = &#39;b&#39;
Traceback
TypeError: &#39;str&#39; object does not support item assignment
&gt;&gt;&gt; x = fruit.lower()
&gt;&gt;&gt; print(x)
banana
&gt;&gt;&gt; lotto = [2, 14, 26, 41, 63]
&gt;&gt;&gt; print(lotto)
[2, 14, 26, 41, 63]
&gt;&gt;&gt; lotto[2] = 28
&gt;&gt;&gt; print(lotto)
[2, 14, 28, 41, 63]</code></pre>
<h2 id="how-long-is-a-list">How Long is a List?</h2>
<ul>
<li>The <span style='background-color: #FDCBF2'>len()</span> function takes a <span style='background-color: #FEFEA8'>list</span> as a parameter and returns the number of <span style='background-color: #9DDCF8'>elements</span> in the <span style='background-color: #FEFEA8'>list</span></li>
<li>Actually <span style='background-color: #FDCBF2'>len()</span> tells us the number of elements of any set or sequence (such as a string…)</li>
</ul>
<pre><code class="language-python">&gt;&gt;&gt; greet = &#39;Hello Bob&#39;
&gt;&gt;&gt; print(len(greet))
9
&gt;&gt;&gt; x = [1, 2, &#39;joe&#39;, 99]
&gt;&gt;&gt; print(len(x))
4</code></pre>
<h2 id="using-the-range-function">Using the range function</h2>
<ul>
<li>The <span style='background-color: #FDCBF2'>range</span> function <span style='background-color: #A3FCAF'>returns  a list of numbers</span> that range from zero to one less than the <span style="color: red">parameter</span></li>
<li>We can construct an index loop using for and an integer <span style='background-color: #9DDCF8'>iterator</span></li>
</ul>
<pre><code class="language-python">&gt;&gt;&gt; print(range(4))
[0, 1, 2, 3]
&gt;&gt;&gt; friends = [&#39;Joseph&#39;, &#39;Glenn&#39;, &#39;Sally&#39;]
&gt;&gt;&gt; print(len(friends))
3
&gt;&gt;&gt; print(range(len(firends))
[0, 1, 2]</code></pre>
<h2 id="a-table-of-two-loops">A table of two loops…</h2>
<pre><code class="language-python">frineds = [&#39;Joseph&#39;, &#39;Glenn&#39;, &#39;Sally&#39;]

for friend in friends:
        print(&#39;Happy New Year:&#39;, friend)

for i in range(len(friends)):
        friend = friends[i]
        print(&#39;Happy New Year:&#39;, friend)

&gt;&gt;&gt; Happy New Year: Joseph
Happy New Year: Glenn
Happy New Year: Sally </code></pre>
<pre><code class="language-python">&gt;&gt;&gt; frineds = [&#39;Joseph&#39;, &#39;Glenn&#39;, &#39;Sally&#39;]
&gt;&gt;&gt; print(len(frineds))
3
&gt;&gt;&gt; print(range(len(friends)))
[0, 1, 2]</code></pre>
]]></description>
        </item>
        <item>
            <title><![CDATA[File Processing]]></title>
            <link>https://velog.io/@dev_damjaeng/File-Processing</link>
            <guid>https://velog.io/@dev_damjaeng/File-Processing</guid>
            <pubDate>Sun, 07 Aug 2022 08:06:47 GMT</pubDate>
            <description><![CDATA[<h2 id="file-processing">File Processing</h2>
<ul>
<li>A text file can be thought of as a sequence of lines</li>
</ul>
<h2 id="opening-a-file">Opening a File</h2>
<ul>
<li>Before we can read the contents of the file, we must tell Python which file we are going to work with and what we will be doing with the file</li>
<li>This is done with the <span style='background-color: #FEFEA8'><strong>open()</strong></span> function</li>
<li><span style='background-color: #FEFEA8'><strong>open()</strong></span> returns a <span style='background-color: #A3FCAF'><strong>“file handle”</strong></span> - a variable used to perform operations on the file</li>
<li>Similar to “File → Open” in a Word Processor</li>
</ul>
<h2 id="using-open">Using open()</h2>
<ul>
<li><span style='background-color: #A3FCAF'><strong>handle</strong></span> = <strong>open(<span style='background-color: #9DDCF8'>filename</span>, mode)</strong></li>
<li><span style='background-color: #A3FCAF'><strong>fhand</strong></span> = <strong>open(<span style='background-color: #9DDCF8'>’mbox.txt’</span>, <span style='background-color: #E9C0FC'>‘r’</span>)</strong></li>
<li><strong>returns a <span style='background-color: #A3FCAF'>handle</span> use to manupulate the file</strong></li>
<li><span style='background-color: #9DDCF8'><strong>filename is a string</strong></span></li>
<li><strong>mode is optional and should be <span style='background-color: #E9C0FC'>‘r’</span> if we are planning to <span style='background-color: #E9C0FC'>read</span> the file and <span style='background-color: #E9C0FC'>‘w’</span> if we are going to <span style='background-color: #E9C0FC'>write</span> to the file</strong></li>
</ul>
<h2 id="what-is-a-handle">What is a Handle?</h2>
<pre><code class="language-python">&gt;&gt;&gt; fhand = open(&#39;mbox.txt&#39;)
&gt;&gt;&gt; print(fhand)
&lt;_io.TextIOWrapper name = &#39;mbox.txt&#39; mode=&#39;r&#39; encoding=&#39;UTF-8&#39;&gt;</code></pre>
<p><img src="https://velog.velcdn.com/images/dev_damjaeng/post/b196ebd4-45cb-419b-a78c-33f6b2c777bf/image.handle" alt=""></p>
<h2 id="when-files-are-missing">When Files are Missing</h2>
<ul>
<li><span style='background-color: #FEFEA8'>Traceback Error</span></li>
</ul>
<h2 id="then-newline-character">Then newline Character</h2>
<ul>
<li>We use a special character called the <span style='background-color: #9DDCF8'><strong>“newline”</strong></span> to indicate when a line ends</li>
<li>We present it as <span style='background-color: #E9C0FC'><strong>\n</strong></span> in strings</li>
<li><span style='background-color: #9DDCF8'><strong>Newline</strong></span> is still one character - not two</li>
</ul>
<pre><code class="language-python">&gt;&gt;&gt; stuff = &#39;Hello\nWorld&#39;
&gt;&gt;&gt; stuff
&#39;Hello\nWorld&#39;

&gt;&gt;&gt; print(stuff)
Hello 
World!

&gt;&gt;&gt; stuff = &#39;X\nY&#39;
&gt;&gt;&gt; print(stuff)
X
Y

&gt;&gt;&gt; len(stuff)
3</code></pre>
<h3 id="span-stylecolor-red-n-is-also-considered-as-one-character--span"><span style="color: red"> ‘\n’ is also considered as one character.  </span></h3>
<h2 id="file-processing-1">File Processing</h2>
<ul>
<li>A text file can be thought of as a sequence of lines</li>
</ul>
<hr>
<h2 id="file-handle-as-a-sequence">File Handle as a Sequence</h2>
<ul>
<li>A <span style='background-color: #A3FCAF'><strong>file handle</strong></span> open for read can be treated as a <span style='background-color: #9DDCF8'><strong>sequence</strong></span> of strings where each line in the file is a string in the sequence</li>
<li>We can use the <span style='background-color: #E9C0FC'><strong>for</strong></span> statement to iterate through a <span style='background-color: #9DDCF8'><strong>sequence</strong></span></li>
<li>Remember - a <span style='background-color: #9DDCF8'><strong>sequence</strong></span> is an ordered set</li>
</ul>
<pre><code class="language-python">xfile = open(&#39;mbox.txt&#39;)
for cheese in xfile:
        print(cheese)</code></pre>
<h2 id="counting-lines-in-a-file">Counting Lines in a File</h2>
<ul>
<li>Open a <span style='background-color: #A3FCAF'><strong>file</strong></span> read-only</li>
<li>Use a <span style='background-color: #E9C0FC'><strong>for</strong></span> loop to read each line</li>
<li><span style='background-color: #9DDCF8'><strong>Count</strong></span> the lines and print out the number of lines</li>
</ul>
<pre><code class="language-python">fhand = open(&#39;mbox.txt&#39;)
count = 0
for line in fhand:
        count = count + 1
print(&#39;Line Count:&#39;, count)

$ Python open.py
Line Count: 132045</code></pre>
<h2 id="reading-the-whole-file">Reading the <em>Whole</em> File</h2>
<p>We can <span style='background-color: #A3FCAF'><strong>read</strong></span> the while file (newlines and all) into a <span style='background-color: #9DDCF8'><strong>single string</strong></span></p>
<pre><code class="language-python">&gt;&gt;&gt; fhand = open(&#39;mbox-short.txt&#39;)
&gt;&gt;&gt; inp = fhand.read()
&gt;&gt;&gt; print(len(inp))
94626
&gt;&gt;&gt; print(inpp[:20])
From stephen.marquar</code></pre>
<h2 id="searching-through-a-file">Searching Through a File</h2>
<p>We can put an <span style='background-color: #E9C0FC'><strong>if</strong></span> statement in our <span style='background-color: #E9C0FC'><strong>for</strong></span> loop to only print lines that meet some criteria </p>
<pre><code class="language-python">fhand = open(&#39;mbox-short.txt&#39;)
for line in fhand:
    if line.startswitch(&#39;From:&#39;) :
            print(line) </code></pre>
<h2 id="oops">OOPS!</h2>
<p>What are all these blank lines doing here?</p>
<ul>
<li>Each line from the file has a <span style='background-color: #A3FCAF'><strong>newline</strong></span> at the end</li>
<li>The <span style='background-color: #9DDCF8'><strong>print</strong></span> statement adds a <span style='background-color: #A3FCAF'><strong>newline</strong></span> to each line</li>
</ul>
<h2 id="searching-through-a-file-fixed">Searching Through a File (fixed)</h2>
<ul>
<li>We can strip the whitespace from the right-hand side of the string using <span style='background-color: #E9C0FC'><strong>rstrip()</strong></span> from the string library</li>
<li>The newline is considered “white space” and is <span style='background-color: #A3FCAF'><strong>stripped</strong></span></li>
</ul>
<pre><code class="language-python">fhand = open(&#39;mbox-short.txt&#39;)
for line in fhand:
    line = line.rstrip()
    if line.startswitch(&#39;From:&#39;) :
            print(line) </code></pre>
<h2 id="skipping-with-continue">Skipping with continue</h2>
<p>We can conveniently skip a line by using the <span style='background-color: #A3FCAF'><strong>continue</strong></span> statement</p>
<pre><code class="language-python">fhand = open(&#39;mbox-short.txt&#39;)
for line in fhand:
    line = line.rstrip()
    if not line.startswitch(&#39;From:&#39;) :
            continue
    print(line) </code></pre>
<h2 id="using-in-to-select-lines">Using in to select lines</h2>
<p>We can look for a string anywhere <span style='background-color: #E9C0FC'><strong>in</strong></span> a <span style='background-color: #E9C0FC'><strong>line</strong></span> as our selection criteria </p>
<pre><code class="language-python">fhand = open(&#39;mbox-short.txt&#39;)
for line in fhand:
        line = line.rstrip()
        if not &#39;@uct.ac.za&#39; in line :
                continue
        print(line)</code></pre>
<h2 id="prompt-for-file-name">Prompt for File Name</h2>
<pre><code class="language-python">fname = input(&#39;Enter the file name:  &#39;)
try:
    fhand = open(fname)
except:
    print(&#39;File cannot be opened: &#39;, fname)
    quit()

count = 0
for line in fhand:
    if line.startswith(&#39;Subject:&#39;) :
        count = count + 1
print(&#39;There were&#39;, count, &#39;subject lines in&#39;, fname)</code></pre>
]]></description>
        </item>
        <item>
            <title><![CDATA[Play with String Data Type]]></title>
            <link>https://velog.io/@dev_damjaeng/Play-with-String-Data-Type</link>
            <guid>https://velog.io/@dev_damjaeng/Play-with-String-Data-Type</guid>
            <pubDate>Sun, 07 Aug 2022 07:50:12 GMT</pubDate>
            <description><![CDATA[<h2 id="string-data-type">String Data Type</h2>
<ul>
<li>A string is a sequence of characters</li>
<li>A string literal uses quotes ‘Hello’ or “Hello”</li>
<li>For strings, + means “concatenate”</li>
<li>When a string contains numbers, it is still a string</li>
<li>We can convert numbers in a string into a number using int()</li>
</ul>
<pre><code class="language-python">str1 = &quot;Hello&quot;
str2 = &#39;there&#39;
bob = str1 + str2

print(bob)
&gt;&gt;&gt;Hellothere

str3 = &#39;123&#39;
x = int(str3) + 1
print(x)
&gt;&gt;&gt; 124</code></pre>
<h2 id="reading-and-converting">Reading and Converting</h2>
<ul>
<li>We prefer to read data in using <span style='background-color: #9DDCF8'><strong>strings</strong></span> and then parse and convert the data as we need</li>
<li>This gives us more control over error situations and/or bad user input</li>
<li>Raw input numbers must be <span style='background-color: #9DDCF8'><strong>converted</strong></span> from strings</li>
</ul>
<h2 id="looking-inside-strings">Looking Inside Strings</h2>
<ul>
<li>We can get at any single character in a string using an index specified in <span style='background-color: #E9C0FC'><strong>square brackets</strong></span></li>
<li>The index value must be an integer and starts at zero</li>
<li>The index value can be an expression that is computed</li>
</ul>
<pre><code class="language-python">fruit = &#39;banana&#39;
letter = fruit[1]
print(letter)
&gt;&gt;&gt; a

x = 3
w = fruit[x-1]
print(w)
&gt;&gt;&gt; n</code></pre>
<h2 id="a-character-too-far">A Character Too Far</h2>
<ul>
<li>You will get a <span style="color: red"><strong>python error</strong></span> if you attempt to index beyond the end of a string.</li>
<li>So be careful when constructing index values and slices</li>
</ul>
<h2 id="strings-have-length">Strings Have Length</h2>
<p>The built-in function <span style='background-color: #9DDCF8'><strong>len</strong></span> gives us the length of a string</p>
<pre><code class="language-python">fruit = &#39;banana&#39;
print(len(fruit))
&gt;&gt;&gt; 6</code></pre>
<h1 id="len-function">Len Function</h1>
<p>A function is <span style='background-color: #9DDCF8'><strong>some stored code</strong></span> that we use. A function takes some <span style='background-color: #E9C0FC'><strong>input</strong></span> and produeces an <span style='background-color: #E9C0FC'><strong>output.</strong></span> </p>
<h2 id="looping-through-strings">Looping Through Strings</h2>
<p>Using a <span style="color: red"><strong>while</strong></span> statement and an <span style='background-color: #E9C0FC'><strong>iteration variable</strong></span>, and the <span style='background-color: #9DDCF8'><strong>len</strong></span> function, we can construct a loop to look at each of the letters in a string individually. </p>
<pre><code class="language-python">fruit = &#39;banana&#39;
index = 0
while index &lt; len(fruit):
        letter = fruit[index]
        print(index, letter)
        index = index + 1

&gt;&gt;&gt; 0 b
        1 a 
        2 n
        3 a
    4 n
        5 a</code></pre>
<ul>
<li>A definite loop using a <span style='background-color: #9DDCF8'><strong>for</strong></span> statement is much more elegant</li>
<li>The <span style='background-color: #E9C0FC'><strong>iteration variable</strong></span> is completely taken care of by the <span style='background-color: #9DDCF8'><strong>for</strong></span> loop</li>
</ul>
<pre><code class="language-python">fruit = &#39;banana&#39;
for letter in fruit:
        print(letter)</code></pre>
<h2 id="looping-and-countring">Looping and Countring</h2>
<p>This is a simple loop that loops through each letter in a string and counts the number of times the loop encounters the ‘a’ character.</p>
<pre><code class="language-python">word = &#39;banana&#39;
count = 0
for letter in word:
        if letter == &#39;a&#39;:
                count = count + 1
print(count)</code></pre>
<h2 id="looking-deeper-into-in">Looking deeper into in</h2>
<ul>
<li>The <span style='background-color: #E9C0FC'><strong>iteration variable</strong></span> “iterates” through the sequence (oredered set)</li>
<li>The <span style='background-color: #9DDCF8'><strong>block (body)</strong></span> of code is executed once for each value in the <span style='background-color: #A3FCAF'><strong>sequence</strong></span></li>
<li>The <span style='background-color: #E9C0FC'><strong>iteration variable</strong></span> moves through all of the values <span style='background-color: #9DDCF8'><strong>in</strong></span> the <span style='background-color: #A3FCAF'><strong>sequence</strong><span></li>
</ul>
<pre><code class="language-python">for letter in &#39;banana&#39;:
            print(letter)</code></pre>
<hr>
<h2 id="slicing-strings">Slicing Strings</h2>
<ul>
<li>We can also look at any continuous section of a string using a <span style='background-color: #9DDCF8'><strong>colon operator</strong></span></li>
<li>The second number is one beyond the end of the slice - “up to but not including”</li>
<li>If the second number is beyond the end of the string, it stops at the end</li>
</ul>
<pre><code class="language-python">s = &#39;Monty Python&#39;

&gt;&gt;&gt;print(s[0:4])
Mont

&gt;&gt;&gt;print(s[6:7])
P

&gt;&gt;&gt;print(s[6:20])
Python</code></pre>
<p>If we leave off the first number of the last number of the slice, it is assumed to be the beginning or end of the string respectively. </p>
<h2 id="string-concatenation">String Concatenation</h2>
<p>  When the <span style='background-color: #E9C0FC'><strong>+</strong></span> operator is applied to strings, it means <span style='background-color: #9DDCF8'><strong>“concatenation”</strong></span></p>
<pre><code class="language-python">&gt;&gt;&gt; a = &#39;Hello&#39;
&gt;&gt;&gt; b = a + &#39;There&#39;
&gt;&gt;&gt; print(b)
HelloThere

&gt;&gt;&gt; c = a + &#39; &#39; + &#39;There&#39;
&gt;&gt;&gt; print(c)
Hello There</code></pre>
<h2 id="using-in-as-a-logical-opearator">Using in as a logical Opearator</h2>
<ul>
<li>The <span style='background-color: #FEFEA8'><strong>in</strong></span> keyword can also be used to check to see if one string is “in” another string</li>
<li>The <span style='background-color: #FEFEA8'><strong>in</strong></span> expression is a logical expression that returns <span style='background-color: #E9C0FC'><strong>True or False</strong></span> and can be used in an <span style='background-color: #9DDCF8'><strong>if</strong></span> statement</li>
</ul>
<h2 id="string-library">String Library</h2>
<ul>
<li>Python has a number of string <span style='background-color: #9DDCF8'><strong>functions</strong></span> which are in the <span style='background-color: #E9C0FC'><strong>string library</strong></span></li>
<li>These <span style='background-color: #9DDCF8'><strong>functions</strong></span> are already <span style='background-color: #E9C0FC'><strong>built into</strong></span> every string - we invoke them by appending the function to the string variable</li>
<li>These <span style='background-color: #9DDCF8'><strong>functions</strong></span> do not modify the original string, instead they return a new string that has been altered</li>
</ul>
<pre><code class="language-python">&gt;&gt;&gt; greet = &#39;Hello Bob&#39;
&gt;&gt;&gt; zap = greet.lower()
&gt;&gt;&gt; print(zap)
hello bob

&gt;&gt;&gt;print(greet)
Hello Bob

&gt;&gt;&gt;print(&#39;Hi There&#39;.lower())
hi there</code></pre>
<h3 id="--span-stylecolor-redstrings-are-also-objectsspan">- <span style="color: red">Strings are also objects.</span></h3>
<pre><code class="language-python">str.capitalize()
str.center(width[, fillchar])
str.endswitch(suffix[, start[, end]])
str.find(sub[, start[, end]])
str.lstrip([chars])
str.replace(old, new[, count])
str.lower()
str.rstrip([chars])
str.strip([cahrs])
str.upper()</code></pre>
<h2 id="searching-a-string">Searching a String</h2>
<ul>
<li>We use the <span style='background-color: #9DDCF8'><strong>find()</strong></span> function to search for a substring within another string</li>
<li><span style='background-color: #9DDCF8'><strong>find()</strong></span> finds the first occurrence of the substring</li>
<li>If the substring is not found, <span style='background-color: #9DDCF8'><strong>find()</strong></span> returns <span style='background-color: #E9C0FC'><strong>-1</strong></span><h3 id="span-stylecolor-red-remember-that-string-position-starts-at-zerospan"><span style="color: red"> <strong>Remember that string position starts at zero</strong></span></h3>
</li>
</ul>
<pre><code class="language-python">&gt;&gt;&gt; fruit = &#39;banana&#39;
&gt;&gt;&gt; pos = fruit.find(&#39;na&#39;)
&gt;&gt;&gt; print(pos)
2

&gt;&gt;&gt; aa = fruit.find(&#39;z)
&gt;&gt;&gt; print(aa)
-1</code></pre>
<h2 id="making-everything-upper-case"><strong>Making everything</strong> <strong>UPPER CASE</strong></h2>
<ul>
<li>You can make a copy of a string in <span style='background-color: #E9C0FC'><strong>lower case</strong></span> or <span style='background-color: #E9C0FC'><strong>upper case</strong></span><ul>
<li>Often when we are searching for a string using <span style='background-color: #9DDCF8'><strong>find()</strong></span> we first convert the string to lower case so we can search a string regardless of case</li>
</ul>
</li>
</ul>
<h2 id="search-and-replace">Search and Replace</h2>
<ul>
<li>The <span style='background-color: #9DDCF8'><strong>replace()</strong></span> function is like a “search and replace” operation in a word processor</li>
<li>It replaces <span style='background-color: #E9C0FC'><strong>all occurrences</strong></span> of the <span style='background-color: #A3FCAF'><strong>search string</strong></string></span>  with the <span style='background-color: #E9C0FC'> ** replacement string**</string></li>
</ul>
<pre><code class="language-python">&gt;&gt;&gt; greet = &#39;Hello Bob&#39;
&gt;&gt;&gt; nstr = greet.replace(&#39;Bob&#39;, &#39;Jane&#39;)
&gt;&gt;&gt; print(nstr)
Hello Jane

&gt;&gt;&gt; nstr = greet.replace(&#39;o&#39;, &#39;X&#39;)
&gt;&gt;&gt; print(nstr)
HellX BXb</code></pre>
<h2 id="stripping-whitespace">Stripping Whitespace</h2>
<ul>
<li>Sometimes we want to take a string and remove whitespace at the beginning and/or end<ul>
<li><span style='background-color: #E9C0FC'><strong>lstrip()</strong></span> and <span style='background-color: #E9C0FC'><strong>rstrip()</strong></span> remove whitespace at the left or right</li>
<li><span style='background-color: #9DDCF8'><strong>strip()</strong></span> removes both beginning and ending whitespace</li>
</ul>
</li>
</ul>
<pre><code class="language-python">&gt;&gt;&gt; greet = &#39;   Hello Bob   &#39;
&gt;&gt;&gt; greet.lstrip()
&#39;Hello Bob   &#39;
&gt;&gt;&gt; greet.rstrip()
&#39;   Hello Bob&#39;
&gt;&gt;&gt; greet.strip()
&#39;Hello Bob&#39;</code></pre>
<h2 id="prefixes">Prefixes</h2>
<pre><code class="language-python">&gt;&gt;&gt; line = &#39;Please have a nice day&#39;
&gt;&gt;&gt; line.startswitch(&#39;Please&#39;)
True
&gt;&gt;&gt; line.startswith(&#39;p&#39;)
False</code></pre>
<h2 id="parsing-and-extracting">Parsing and Extracting</h2>
<p><img src="https://velog.velcdn.com/images/dev_damjaeng/post/10380943-abd0-4b58-9399-f84d5b19dc32/image.parcing" alt=""></p>
]]></description>
        </item>
        <item>
            <title><![CDATA[Making “smart” loops]]></title>
            <link>https://velog.io/@dev_damjaeng/Making-smart-loops</link>
            <guid>https://velog.io/@dev_damjaeng/Making-smart-loops</guid>
            <pubDate>Sun, 07 Aug 2022 07:29:28 GMT</pubDate>
            <description><![CDATA[<h2 id="making-smart-loops">Making “smart” loops</h2>
<p>The trick is “knowing” something about the whole loop when you are stuck writing code that only sees one entry at a time</p>
<pre><code class="language-python">Set some variables to initial values
for thing in data:
        Look for something or do something to each entry separately, 
        updating a variable
Look at the variables</code></pre>
<h2 id="finding-the-largest-value">Finding the largest value</h2>
<p>We make a <span style='background-color: #9DDCF8'><strong>variable</strong></SPAN> that contains the largest value we have seen so far. If the current <span style='background-color: #E9C0FC'><strong>number we are looking at</strong></SPAN> is larger, it is the new <span style='background-color: #9DDCF8'><strong>largest value we have seen so far.</strong></SPAN></p>
<pre><code class="language-python">largest_so_far = -1
print(&#39;Before&#39;, largest_so_far)

for the_num in [9, 41, 12, 3, 74, 15]:
    if the_num &gt; largest_so_far:
            largest_so_far = the_num
    print(largest_so_far, the_num)

print(&#39;After&#39;, largest_so_far)</code></pre>
<hr>
<h2 id="counting-in-a-loop">Counting in a Loop</h2>
<pre><code class="language-python">zork = 0
print(&#39;Before&#39;, zork)

for thing in [9, 41, 12, 3, 74, 15]:
        zork = zork + 1
        print(zork, thing)

print(&#39;After&#39;, zork)</code></pre>
<p>To <span style='background-color: #A3FCAF'><strong>count</strong></SPAN> how many times we execute a loop, we introduce a <span style='background-color: #9DDCF8'><strong>counter variable that starts at 0</strong></SPAN> and we add <span style='background-color: #9DDCF8'><strong>one to it each time through the loop.</strong></SPAN> </p>
<h2 id="summing-in-a-loop">Summing in a Loop</h2>
<pre><code class="language-python">zork = 0
print(&#39;Before&#39;, zork)

for thing in [9, 41, 12, 3, 74, 15]:
        zork = zork + thing
        print(zork, thing)

print(&#39;After&#39;, zork)</code></pre>
<p>To <span style='background-color: #A3FCAF'><strong>add up</strong></SPAN> a <span style='background-color: #E9C0FC'><strong>value</strong></SPAN> we encounter in a loop, we introduce a <span style='background-color: #9DDCF8'><strong>sum variable that starts at 0</strong></SPAN> and we add the <span style='background-color: #E9C0FC'><strong>value</strong></SPAN> to the sum each time through the loop.</p>
<h2 id="finding-the-average-in-a-loop">Finding the Average in a Loop</h2>
<pre><code class="language-python">count = 0
sum = 0
print(&#39;Before&#39;, count, sum)

for value in [9, 41, 12, 3, 74, 15]:
        count = count + 1
        sum = sum + value
        print(count, sum, value)

print(&#39;After&#39;, count, sum, sum/count)</code></pre>
<p>An <span style='background-color: #A3FCAF'><strong>average</strong></SPAN> just combines the <span style='background-color: #E9C0FC'><strong>counting</strong></SPAN> and <span style='background-color: #E9C0FC'><strong>sum</strong></SPAN> patterns and <span style='background-color: #9DDCF8'><strong>divides when the loop is done.</strong></SPAN></p>
<h2 id="filtering-in-a-loop">Filtering in a Loop</h2>
<pre><code class="language-python">print(&#39;Before&#39;)
for value in [9, 41, 12, 3, 74, 15]:
        if value &gt; 20:
                print(&#39;Large number&#39;, value)
print(&#39;After&#39;)</code></pre>
<p>We use an <span style='background-color: #E9C0FC'><strong>if</strong></SPAN> statement in the <span style='background-color: #E9C0FC'><strong>loop</strong></SPAN> to catch/filter the values we are looking for. </p>
<h2 id="search-using-a-boolean-variable">Search Using a Boolean Variable</h2>
<pre><code class="language-python">found = false
print(&#39;Before&#39;, found)

for value in [9, 41, 12, 3, 74, 15]:
        if value == 3:
                found = True
        print(found, True)

print(&#39;After&#39;, found)</code></pre>
<p>If we just want to search and <span style='background-color: #9DDCF8'><strong>know if a value was found</strong></SPAN>, we use a <span style='background-color: #A3FCAF'><strong>variable</strong></SPAN> that starts at <span style='background-color: #E9C0FC'><strong>False</strong></SPAN> and is set to <span style='background-color: #E9C0FC'><strong>True</strong></SPAN> as soon as we <span style='background-color: #A3FCAF'><strong>find</strong></SPAN> what we are looking for. </p>
<h2 id="how-to-find-the-smallest-value">How to find the smallest value</h2>
<p>How would we change this to make it find the smallest value in the list?</p>
<h2 id="finding-the-smallest-value">Finding the smallest value</h2>
<pre><code class="language-python">smallest = None
print(&#39;Before&#39;)

for value in [9, 41, 12, 3, 74, 15]:
        if smallest is None:
                smallest = value
        elif value &lt; smallest:
                smallest = value
        print(smallest, value)

print(&#39;After&#39;, smallest)
</code></pre>
<p>We still have a variable that is the <span style='background-color: #9DDCF8'><strong>smallest</strong></SPAN> so far.</p>
<p>The first time through the loop <span style='background-color: #9DDCF8'><strong>smallest</strong></SPAN> is None, so we take the first <span style='background-color: #A3FCAF'><strong>value</strong></SPAN> to be the smallest.</p>
<h2 id="none-types">None Types</h2>
<ul>
<li>단 하나의 값만 가지는 특별한 표식 (None)</li>
<li>None을 저장했는지 확인할 수 있음</li>
<li>공백을 나타내기 위해 쓰임</li>
</ul>
<h2 id="the-is-and-is-not-operators">The “is” and “is not” Operators</h2>
<ul>
<li>Python has an <span style='background-color: #E9C0FC'><strong>is</strong></SPAN> operator that can be used in logical expressions</li>
<li>Implies <span style='background-color: #E9C0FC'><strong>“is the same as”</strong><SPAN></li>
<li>Similar to, but stronger than <strong>==</strong><ul>
<li><span style='background-color: #E9C0FC'><strong>is not</strong></SPAN> also is a logical operator</li>
</ul>
</li>
</ul>
<p>ex) 0 == 0.0 → True</p>
<p>0 is 0.0 → False [different data types]</p>
]]></description>
        </item>
        <item>
            <title><![CDATA[While loop, For loop]]></title>
            <link>https://velog.io/@dev_damjaeng/While-loop-For-loop</link>
            <guid>https://velog.io/@dev_damjaeng/While-loop-For-loop</guid>
            <pubDate>Sun, 07 Aug 2022 07:18:59 GMT</pubDate>
            <description><![CDATA[<h2 id="repeated-steps">Repeated Steps</h2>
<p>Loops (repeated steps) have <span style='background-color: #A3FCAF'><strong>iteration variables</strong></span> that change each time through a loop. Often these <span style='background-color: #A3FCAF'><strong>iteration variable</strong></span>s on through a sequence of numbers.</p>
<pre><code class="language-python">n = 5
while n &gt; 0:
        print(n)
        n = n - 1
print(&#39;Blastoff!&#39;)
print(n)

/*Output
5
4
3
2
1
Blastoff!
0
*/</code></pre>
<h2 id="breaking-out-of--a-loop"><strong>Breaking Out of  a Loop</strong></h2>
<ul>
<li>The <span style='background-color: #FEFEA8'> break</span> statement ends the current loop and jumps to the statement immediately following the loop</li>
<li>It is like a loop test that can happen anywhere in the body of the loop</li>
</ul>
<pre><code class="language-python">while True:
        line = input(&#39;&gt; &#39;)
        if line == &#39;done&#39;:
                break;
        print(line)
print(&#39;Done!&#39;) 

&gt; hello there
hello there
&gt; finished
finished
&gt; done
Done! </code></pre>
<h2 id="finishing-an-iteration-with-continue">Finishing an Iteration with continue</h2>
<p>The <span style='background-color: #FEFEA8'> continue</span> statement ends the current iteration and jumps to the top of the loop and starts the next iteration</p>
<pre><code class="language-python">while True:
        line = raw_input(&#39;&gt; &#39;)
        if line[0] == &#39;#&#39;:
                continue
        if line == &#39;done&#39;:
                break
        print(line)
print(&#39;Done!&#39;)
</code></pre>
<h2 id="indefinite-loops">Indefinite Loops</h2>
<ul>
<li>While loops are called <span style='background-color: #9DDCF8'><strong>“indefinite loops”</strong></span> because they keep going until a logical condition becomes <span style='background-color: #E9C0FC'><strong>False</strong></span></li>
<li>The loops we have seen so far are pretty easy to examine to see if they will terminate or if they will be “infinite loops”</li>
<li>Sometimes it is a little harder to be sure if a loop will terminate</li>
</ul>
<hr>
<h2 id="definite-loops">Definite Loops</h2>
<ul>
<li>Quite often we have a <span style='background-color: #E9C0FC'><strong>list</strong></span> of items of the <span style='background-color: #E9C0FC'><strong>lines in a file</strong></span> - effectively a <span style='background-color: #FEFEA8'><strong>finite set</strong></span> of things</li>
<li>We can write a loop to run the loop once for each of the items in a set using the Python <span style='background-color: #9DDCF8'><strong>for</strong></span> construct</li>
<li>These loops are called <span style='background-color: #FEFEA8'><strong>“definite loops”</strong></span> because they execute an exact number of times</li>
<li>We say that <span style='background-color: #FEFEA8'><strong>“definite loops iterate through the members of a set”</strong></span></li>
</ul>
<h2 id="a-simple-definite-loop">A Simple Definite Loop</h2>
<pre><code class="language-python">for i in [5, 4, 3, 2, 1]:
        print(i)
print(&#39;Blastoff!&#39;)

/*Output
5
4
3
2
1
Blastoff!
*/</code></pre>
<h2 id="a-simple-definite-loop-1">A Simple Definite Loop</h2>
<p>Definite loops (for loops) have explicit <span style='background-color: #E9C0FC'><strong>iteration variables</strong></span> that change each time through a loop. These <span style='background-color: #E9C0FC'><strong>iteration variables</strong></span> move through the sequence or set. </p>
<h2 id="looking-at-in">Looking at In…</h2>
<ul>
<li>The <span style='background-color: #9DDCF8'><strong>iteration variable</strong></span> “iterates” through the <span style='background-color: #E9C0FC'><strong>sequence</strong></span> (ordered set)</li>
<li>The <span style='background-color: #9DDCF8'><strong>block (body)</strong></span> of code is executed once for each value <span style='background-color: #E9C0FC'><strong>in the sequence</strong></span></li>
<li>The <span style='background-color: #9DDCF8'><strong>iteration variable</strong></span> moves through all of the values <span style='background-color: #E9C0FC'><strong>in the sequence</strong></span></li>
</ul>
<h2 id="loop-idioms-what-we-do-in-loops">Loop Idioms: What We Do in Loops</h2>
<p>Note: Even though these examples are simple, the patterns apply to all kinds of loops</p>
]]></description>
        </item>
        <item>
            <title><![CDATA[Building our Own Functions ]]></title>
            <link>https://velog.io/@dev_damjaeng/Building-our-Own-Functions</link>
            <guid>https://velog.io/@dev_damjaeng/Building-our-Own-Functions</guid>
            <pubDate>Sun, 07 Aug 2022 07:02:14 GMT</pubDate>
            <description><![CDATA[<h2 id="stored-and-reused-steps">Stored (and reused) Steps</h2>
<pre><code class="language-python">//Program
def thing():
        print(&#39;Hello&#39;)
        print(&#39;Fun&#39;)
thing()
print(&#39;Zip&#39;)
thing()

//Output
Hello
Fun
Zip
Hello
Fun</code></pre>
<h2 id="python-functions">Python Functions</h2>
<ul>
<li>There are two kinds of functiongs in Python.</li>
<li><span style='background-color: #9DDCF8'><strong>Built-in functions</strong></span> that are provided as part of Python - print(), input(), type(), float(), int() …</li>
<li><span style='background-color: #9DDCF8'><strong>Functions that we define ourselves</strong></span> and then use</li>
<li>We treat the built-in function names as “new” <span style='background-color: #FEFEA8'>reserved</span> words (i.e., we avoid them as variable names)</li>
</ul>
<h2 id="function-definition">Function Definition</h2>
<ul>
<li>In Python a <span style='background-color: #9DDCF8'><strong>function</strong></span> is some reusable code that takes <span style='background-color: #FEFEA8'>arguments(s)</span> as input, does some computation, and then returns a result or results</li>
<li>We define a <span style='background-color: #9DDCF8'><strong>function</strong></span> using the <span style='background-color: #FEFEA8'>def</span> reserved word</li>
<li>We call/invoke the <span style='background-color: #9DDCF8'><strong>function</strong></span> by using the function name, parentheses, and arguments in an expression</li>
</ul>
<h3 id="span-stylecolor-redin-english-lowercase-letters-have-a-higher-value-than-uppercase-lettersspan"><span style="color: red">In English, lowercase letters have a higher value than uppercase letters.</span></h3>
<pre><code class="language-python">&gt;&gt;&gt; big = max(&#39;Hello world&#39;)
&gt;&gt;&gt; print(big)
w

&gt;&gt;&gt; tiny = min(&#39;Hello world&#39;)
&gt;&gt;&gt; print(tiny)
( ) </code></pre>
<h2 id="max-function">Max Function</h2>
<ul>
<li>A <span style='background-color: #9DDCF8'><strong>function</strong></span> is <span style='background-color: #E9C0FC'><strong>some stored code</strong></span> that we use. A function takes some <span style='background-color: #9DDCF8'>input</span> and produces an <span style='background-color: #9DDCF8'>output</span>.</li>
</ul>
<h2 id="type-conversions">Type Conversions</h2>
<ul>
<li>When you put an integer and floating point in an expression, the integer is <span style='background-color: #FEFEA8'>implicitly</span> converted to a float</li>
<li>You can control this with the built-in functions int() and float()</li>
</ul>
<pre><code class="language-python">&gt;&gt;&gt; print float(99)/100
0.99

&gt;&gt;&gt; i = 42
&gt;&gt;&gt; type(i)
&lt;class &#39;int&#39;&gt;

&gt;&gt;&gt; f = float(i)
&gt;&gt;&gt; print(f)
42.0

&gt;&gt;&gt; type(f)
&lt;class &#39;float&#39;&gt;

&gt;&gt;&gt; print(1 + 2 * float(3) / 4 - 5)
-2.5 </code></pre>
<h2 id="string-conversions">String Conversions</h2>
<ul>
<li>You can also use <span style='background-color: #FEFEA8'>int()</span> and <span style='background-color: #FEFEA8'>float()</span> to convert between strings and integers</li>
<li>You will get an <span style='background-color: #E9C0FC'><strong>error</strong></span> if the string does not contain numeric characters</li>
</ul>
<hr>
<h2 id="building-our-own-functions">Building our Own Functions</h2>
<ul>
<li>We create a new function using the <span style='background-color: #FEFEA8'>def</span> keyword followed by optional parameters in parentheses</li>
<li>We indent the body of the function</li>
<li>This <span style='background-color: #FEFEA8'>defines</span> the function but does not execute the body of the function</li>
</ul>
<pre><code class="language-python">def print_lyrics():
        print(&quot;I&#39;m a lumberjack, and I&#39;m okay.&quot;)
        print(&#39;I sleep all night and I work all day.&#39;) </code></pre>
<h2 id="definitions-and-uses">Definitions and Uses</h2>
<ul>
<li>Once we have <span style='background-color: #FEFEA8'>defined</span> a function, we can <span style='background-color: #E9C0FC'><strong>call (or invoke)</strong></span> it as many times as we like</li>
<li>This is the <span style='background-color: #FEFEA8'>store</span> and <span style='background-color: #E9C0FC'><strong>reuse</strong></span> pattern</li>
</ul>
<h2 id="arguments">Arguments</h2>
<ul>
<li>An <span style='background-color: #FEFEA8'>argument</span> is a value we pass into the <span style='background-color: #9DDCF8'>function</span> as its input when we call the function</li>
<li>We use <span style='background-color: #FEFEA8'>arguments</span> so we can direct the <span style='background-color: #9DDCF8'>function</span> to do different kinds of work when we call it at <span style='background-color: #E9C0FC'><strong>different times</strong></span></li>
<li>We put the <span style='background-color: #FEFEA8'>arguments</span> in parentheses after the <span style='background-color: #E9C0FC'>name</span> of the function</li>
</ul>
<h2 id="parameters">Parameters</h2>
<p>A <span style='background-color: #9DDCF8'><strong>parameter</strong></span> is a variable which we use in the function <span style='background-color: #E9C0FC'><strong>definition.</strong></span> It is a “handle” that allows the code in the function to access the <span style='background-color: #FEFEA8'>arguments</span> for a particular <span style='background-color: #9DDCF8'><strong>function</strong></span> invocation. </p>
<h2 id="return-values">Return Values</h2>
<p>Often a function will take its arguments, do some computation, and <span style='background-color: #FEFEA8'>return</span> a value to be used as the value of the function call in the <span style='background-color: #E9C0FC'>calling expression</span>. The <span style='background-color: #FEFEA8'>return</span> keyword is used for this.</p>
<pre><code class="language-python">def greet():
        return &quot;Hello&quot;

print(greet(), &quot;Gleen&quot;)
print(greet(), &quot;Sally&quot;)
</code></pre>
<h2 id="reutrn-value">Reutrn Value</h2>
<ul>
<li>A “fruitful” <strong>function</strong> is one that produces a <span style='background-color: #E9C0FC'>result</span> (or <span style='background-color: #FEFEA8'><strong>return</strong></span> <span style='background-color: #E9C0FC'>value</span>)</li>
<li>The <span style='background-color: #FEFEA8'><strong>return</strong></span> statement ends the <span style='background-color: #9DDCF8'>function</span> execution and “sends back” the <strong>result</strong> of the function</li>
</ul>
<pre><code class="language-python">&gt;&gt;&gt; def greet(lang):
                if lang == &#39;es&#39;:
                        return &#39;Hola&#39;
                elif lang == &#39;fr&#39;:
                        return &#39;Bonjour&#39;
                else: 
                        return &#39;Hello&#39;
&gt;&gt;&gt; print(greet(&#39;en&#39;), &#39;Glenn&#39;)
Hello Glenn
&gt;&gt;&gt; print(greet(&#39;es&#39;), &#39;Sally&#39;)
Hola Sally
&gt;&gt;&gt; print(greet(&#39;fr&#39;), &#39;Michael&#39;)
Bonjour Michael</code></pre>
<h2 id="multiple-parametersarguments">Multiple Parameters/Arguments</h2>
<ul>
<li>We can define more than one <strong>parameter</strong> in the <span style='background-color: #E9C0FC'>function</span> <span style='background-color: #FEFEA8'>definition</span></li>
<li>We simply add more <span style='background-color: #9DDCF8'>
arguments</span> when we call the <span style='background-color: #E9C0FC'>function</span></li>
<li>We match the number and order of arguments and parameters</li>
</ul>
<pre><code class="language-python">def addtwo(a, b):
        added = a + b
        return added

x = addtwo(3, 5)
print(x)

8</code></pre>
<h2 id="void-non-fruitful-functions">Void (non-fruitful) Functions</h2>
<ul>
<li>When a function does not return a value, we call it a <span style='background-color: #9DDCF8'>
“void”</span> function</li>
<li>Functions that return values are “fruitful” functions</li>
<li><span style='background-color: #9DDCF8'>
Void</span> functions are “not fruitful”

</li>
</ul>
<h2 id="to-function-or-not-to-function">To function or not to function..</h2>
<ul>
<li>Organize your code into “paragraphs” - capture a complete thought and “name it”</li>
<li>Don’t repeat yourself - make it work once and then reuse it</li>
<li>If something gets too long or complex, break it up into logical chunks and put those chunks in functions</li>
<li>Make a library of common stuff that you do over and over - perhaps share this with your friends…</li>
</ul>
<h2 id="summary">Summary</h2>
<ul>
<li>Arguments</li>
<li>Results (fruitful functions)</li>
<li>Void (non-fruitful) functions</li>
<li>Why use functions?</li>
<li>Functions</li>
<li>Built-In Functions<ul>
<li>Type conversion (int, float)</li>
<li>String conversions</li>
</ul>
</li>
<li>Parameters</li>
</ul>
]]></description>
        </item>
        <item>
            <title><![CDATA[Conditional Execution, Multi-way Decision]]></title>
            <link>https://velog.io/@dev_damjaeng/Conditional-Execution</link>
            <guid>https://velog.io/@dev_damjaeng/Conditional-Execution</guid>
            <pubDate>Sun, 07 Aug 2022 06:42:15 GMT</pubDate>
            <description><![CDATA[<pre><code class="language-python">//Program
x = 5
if x &lt; 10:
    print(&#39;Smaller&#39;)
if x &gt; 20:
    print(&#39;Bigger&#39;)

print(&#39;Finis&#39;)

//Outputs
Smaller
Finis</code></pre>
<h2 id="comparison-operators">Comparison Operators</h2>
<ul>
<li><span style="color: blue">Boolean</span> expressions ask a question and produce a Yes or No result which we use to control program flow</li>
<li><span style="color: blue">Boolean expressions</span> using <span style="color: green"><strong>comparison operators</strong></span> evaluate to True / False or Yes / No</li>
<li>Comparison operators look at variables but do not change the variables</li>
</ul>
<!doctype html>
<html lang="ko">
  <head>
    <meta charset="utf-8">
    <style>
  table {
    width: 100%;
    border: 1px solid #444444;
    border-collapse: collapse;
  }
  th, td {
    border: 1px solid #444444;
    padding: 10px;
  }
</style>
  </head>
  <body>
    <table>
      <thead>
        <tr>
          <th>Python</th><th>Meaning</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td><</td><td>Less than</td>
        </tr>
        <tr>
          <td><=</td><td>Less than or Equal to </td>
        </tr>
        <tr>
          <td>==</td><td>Equal to</td>
        </tr>
        <tr>
          <td>>=</td><td>Greater than or Equal to </td>
        </tr>
        <tr>
          <td>></td><td>Greater than </td>
        </tr>
         <tr>
          <td>!=</td><td>Not equal </td>
        </tr>
      </tbody>
    </table>
  </body>
</html>


<h2 id="indentation">Indentation</h2>
<ul>
<li><span style='background-color: #FEFEA8'>Increase indent</span> after an <span style="color: blue">if</span> statement or <span style="color: blue">for </span>statement or for statement [after : ]</li>
<li><span style='background-color: #FEFEA8'>Maintain indent</span> to indicate the  <span style="color: blue">scope</span> of the block (which lines are affected by the  <span style="color: blue"><strong>if/for</strong></span>)</li>
<li><span style='background-color: #FEFEA8'>Reduce indent</span> back to the level of the if statement or  <span style="color: blue"><strong>for</strong></span> statement to indicate the end of the blcok</li>
<li><span style='background-color: #9DDCF8'><strong>Blank lines</strong></span> are ignored - they do not affect indentation</li>
<li><span style='background-color: #9DDCF8'><strong>Comments</strong></span> on a line by themselves are ignored with regard to indentation</li>
</ul>
<h2 id="warning--turn-off-tabs4-spaces">Warning : Turn Off Tabs(4 spaces)!</h2>
<ul>
<li>Atom automatically uses spaces for files with “.py” extension (nice!)</li>
<li>Most text editors can turn <span style='background-color: #E9C0FC'>tabs</span> into <span style='background-color: #9DDCF8'><strong>spaces</strong></span> - make sure to enable this feature<ul>
<li>NotePad++ : Settings → Preferences → Language Menu/<span style='background-color: #E9C0FC'>Tab</span> Settings</li>
<li>TextWragler : TextWrangler → Preferences → Editor Defaults</li>
</ul>
</li>
<li>Python cares a <em>lot</em> about how far a line is intended. If you mix <span style='background-color: #E9C0FC'>tabs</span> and <span style='background-color: #9DDCF8'><strong>spaces</strong></span>, you may get <span style='background-color: #FEFEA8'>“indentation errors”</span> even if everything looks fine</li>
</ul>
<h2 id="two-way-decisions">Two-way Decisions</h2>
<ul>
<li>Sometimes we want to do one thing if a logical expression is true and something else if the expression is false</li>
<li>It is like a fork in the road - we must choose <span style='background-color: #9DDCF8'>one or the other</span> path but not both</li>
</ul>
<hr>
<h2 id="multi-way-decision">Multi-way Decision</h2>
<h2 id="the-tryexcept-structure">The try/except Structure</h2>
<ul>
<li>You surround a dangerous section of code with <span style='background-color: #FEFEA8'><strong>try</strong></span> and <span style='background-color: #FEFEA8'>except</span></li>
<li>If the code in the <span style="color: blue"><strong>try</strong></span> works - the <span style='background-color: #FEFEA8'>except</span> is skipped</li>
<li>If the code in the <span style="color: blue"><strong>try</strong></span> fails - it jumps to the <span style='background-color: #FEFEA8'>except</span> section</li>
</ul>
<pre><code class="language-python">astr = &#39;Hello Bob&#39;
try:
        istr = int(astr)
except:
        istr = -1

print(&#39;First&#39;, istr)

astr = &#39;123&#39;
try:
        istr = int(astr)
except:
        istr = -1

print(&#39;Second&#39;, istr)</code></pre>
<h2 id="sample-tryexcept">Sample try/except</h2>
<pre><code class="language-python">rawstr = input(&#39;Enter a number:&#39;)
try:
        ival = int(rawstr)
except:
        ival = -1

if ival &gt; 0 :
    print(&#39;Nice work&#39;)
else:
    print(&#39;Not a number&#39;)</code></pre>
<h2 id="summary">Summary</h2>
<ul>
<li>Comparison operator<ul>
<li>==, &lt;=, &gt;=, &gt;, &lt;, !, =</li>
</ul>
</li>
<li>Indentation</li>
<li>One-way Decisions</li>
<li>Two-way decisions: <span style='background-color: #FEFEA8'><strong>if:</strong></span> and <span style='background-color: #FEFEA8'><strong>else:</strong></span></li>
<li>Nested Decisions</li>
<li>Multi-way decisions using <span style='background-color: #FEFEA8'><strong>elif</strong></span></li>
<li><span style='background-color: #FEFEA8'><strong>try</strong>/except</span> to compensate for errors</li>
</ul>
]]></description>
        </item>
        <item>
            <title><![CDATA[[스파르타 코딩클럽]코딩 용어(3)]]></title>
            <link>https://velog.io/@dev_damjaeng/%EC%8A%A4%ED%8C%8C%EB%A5%B4%ED%83%80-%EC%BD%94%EB%94%A9%ED%81%B4%EB%9F%BD%EC%BD%94%EB%94%A9-%EC%9A%A9%EC%96%B43</link>
            <guid>https://velog.io/@dev_damjaeng/%EC%8A%A4%ED%8C%8C%EB%A5%B4%ED%83%80-%EC%BD%94%EB%94%A9%ED%81%B4%EB%9F%BD%EC%BD%94%EB%94%A9-%EC%9A%A9%EC%96%B43</guid>
            <pubDate>Sat, 06 Aug 2022 15:45:29 GMT</pubDate>
            <description><![CDATA[<p><img src="https://velog.velcdn.com/images/dev_damjaeng/post/9489dc17-e87c-4c89-a86e-bbd767c0293f/image.jpg" alt=""></p>
<h2 id="아키텍쳐db---db-뭐-쓰세요">아키텍쳐/DB - &quot;DB 뭐 쓰세요?&quot;</h2>
<p>만약 회사에 개발자가 100명이라고 한다면…</p>
<ul>
<li><p>프론트엔드 개발자 : 10명</p>
</li>
<li><p>백엔드(서버) 개발자 : 90명</p>
</li>
<li><p><code>서버</code></p>
<ul>
<li>여러가지 역할들로 구성된 집합체</li>
</ul>
</li>
</ul>
<h3 id="-서버와-클라이언트-구성">※ 서버와 클라이언트 구성</h3>
<p><span style="color: red"> <strong>돈도 별로 없고 사용자도 별로 없을 때 (=스타트업 초창기) 심지어 한 컴퓨터 안에 웹서버와 DB를 다 둔다.</strong></span> </p>
<p><img src="https://velog.velcdn.com/images/dev_damjaeng/post/4a3c8dcb-176b-46af-834e-6c0c754049bc/image.client%2520server" alt=""></p>
<p><img src="https://velog.velcdn.com/images/dev_damjaeng/post/56ac104d-d1c6-4fe2-8e59-3338462adf3c/image.client%2520server%2520db" alt=""></p>
<p>→ 사용료가 이렇게 하면 만 원 정도밖에 안 나온다. </p>
<p><span style="color: red"> <strong>쫌 잘된다. 유저가 많아져서 데이터 저장소를 따로 뺌.</strong></span></p>
<p><img src="https://velog.velcdn.com/images/dev_damjaeng/post/83cf41ad-60fa-4ed1-bb8b-8618898e7513/image.bigger%2520client%2520server%2520db" alt="">
<img src="https://velog.velcdn.com/images/dev_damjaeng/post/bf42a54d-a341-40a5-a291-57c98989f7bd/image.bigger%2520client%2520server%2520db%2520router" alt=""></p>
<p><span style="color: red"> <strong>규모가 더 커지면 웹서버를 늘린다.
데이터는 한 곳에 모아지는 것이 좋기 때문.</strong></span> </p>
<p><img src="https://velog.velcdn.com/images/dev_damjaeng/post/3fa8f42a-8370-4d5a-9430-1cb6633896b6/image.real%2520server" alt=""></p>
<p><span style='background-color: #FEFEA8'> <strong>더 커지면 상태를 체크만 하는 서버도 따로 필요하다.</strong></span></p>
<hr>
<p>더 더 키지면 <code>**클라우드 서비스**</code>를 이용한다. </p>
<ul>
<li><p>클라우드를 잘 이용해서 잘 구성하는 것이 스타트업이 탄탄하게 개발을 할 수 있는 핵심 역량이 되기도 한다.</p>
</li>
<li><p><code>**데이터베이스**</code></p>
<ul>
<li><p>잘 찾기 위해서 존재하는 것.</p>
<p>Ex) <code>경영 섹션 &gt; 출판사 별 &gt; 책 제목별</code>로 정리되어 있을 때, 뭐가 쉬울까?</p>
<p>1) ‘사랑’이 제목에 들어간 책 다 주세요</p>
<p>2) ‘한국출판사’ 책 다 주세요</p>
</li>
<li><p>DB도 이렇게 정렬된 상태대로 찾아야 빠르게 찾아온다.</p>
</li>
<li><p><span style='background-color: #FEFEA8'>정리된 항목을 <strong><code>인덱스</code></strong> 라고 한다.</span></p>
<ul>
<li><p>인덱스를 타야 빠르게 가져온다.</p>
</li>
<li><p>인덱스를 잘못하면 쭉 보는 걸 <span style="color: blue"><strong>풀스캔 떴다</strong></span>라고 표현한다.</p>
<p>  → 불려간다!</p>
</br>            

</li>
</ul>
</li>
</ul>
</li>
</ul>
<h3 id="-sql-vs-nosql-not-only-sql">※ SQL vs NoSQL (Not-only SQL)</h3>
<p><img src="https://velog.velcdn.com/images/dev_damjaeng/post/615f723e-d69d-40c9-a573-742c419b2500/image.sql%2520nosql" alt=""></p>
<p><strong>정형화된 SQL</strong> </p>
<ul>
<li>실수를 절대 하면 안 되는 대기업에서 주로 사용.</li>
</ul>
<p><strong>비정형화된 Not-only SQL</strong> </p>
<ul>
<li>스타트업에서 주로 사용</li>
</ul>
<p>굉장히 쉽고, 문법이 몇 개 없다. </p>
<p>한번 배워두면 요긴하게 직장생활에서 쓰일 수 있다. </p>
<p><img src="https://velog.velcdn.com/images/dev_damjaeng/post/9b24599a-a3ba-4f89-9c58-37d68f991aee/image.sql%2520nosql%2520ex" alt=""></p>
<p><span style="color: red"><strong>데이터분석을 하기위해 SQL을 배운다 = SQL DB에서 데이터를 빼내는 방법을 배운다.</strong></span></p>
<hr>
<h2 id="협업---git에-커밋했습니다">협업 - &quot;git에 커밋했습니다&quot;</h2>
<ul>
<li><p><code>깃업</code></p>
<p>  : 부분을 나눠서 작업하고, 합치는 방법.</p>
</li>
</ul>
<p><img src="https://velog.velcdn.com/images/dev_damjaeng/post/295c5dfa-daf0-4d8e-ba49-82fc0750a9f6/image.git1" alt="">
<img src="https://velog.velcdn.com/images/dev_damjaeng/post/a83f12c7-e839-4013-a29e-f2cd71348216/image.git2" alt=""></p>
<ol>
<li>세이브 포인트</li>
<li>업로드</li>
<li>다운로드 (+자동/수동 충돌 해결)</li>
<li>브랜치 따기</li>
<li>머지하기(합치기)</li>
</ol>
]]></description>
        </item>
        <item>
            <title><![CDATA[[스파르타 코딩클럽]코딩 용어(2)]]></title>
            <link>https://velog.io/@dev_damjaeng/%EC%8A%A4%ED%8C%8C%EB%A5%B4%ED%83%80-%EC%BD%94%EB%94%A9%ED%81%B4%EB%9F%BD%EC%BD%94%EB%94%A9-%EC%9A%A9%EC%96%B42</link>
            <guid>https://velog.io/@dev_damjaeng/%EC%8A%A4%ED%8C%8C%EB%A5%B4%ED%83%80-%EC%BD%94%EB%94%A9%ED%81%B4%EB%9F%BD%EC%BD%94%EB%94%A9-%EC%9A%A9%EC%96%B42</guid>
            <pubDate>Sat, 06 Aug 2022 15:32:11 GMT</pubDate>
            <description><![CDATA[<p><img src="https://velog.velcdn.com/images/dev_damjaeng/post/55787d6f-dbca-4978-a8e4-1b7c1346a366/image.jpg" alt=""></p>
<h2 id="서버-클라이언트-통신---저희가-api-열어드릴게요">서버-클라이언트 통신 - &quot;저희가 API 열어드릴게요&quot;</h2>
<ul>
<li><span style='background-color: #FEFEA8'>창구, 약속 <strong>(API)</strong></span><ol>
<li>아이디를 갖고와 - 주문내역을 알려줄게</li>
<li>주소를 갖고와 - 음식점을 알려줄게</li>
<li>주문번호를 갖고와 - 배달현황을 알려줄게 </li>
</ol>
</li>
</ul>
<p><span style='background-color: #FEFEA8'>http://</span><code>서버 위치</code><span style='background-color: #FEFEA8'>/ </span><code>API 주소</code><span style='background-color: #FEFEA8'>?</span><code>가져가기로 한 데이터</code></p>
<p><code>“김 책임님 이거 신규 피쳐라 API 하나만 따주세요”</code></p>
<p>= 새로운 기능 창구를 하나 만들어달라. 그 쪽으로 요청하겠음.</p>
<p><code>&quot;API 개발은 끝났고, 클라이언트는 아직이에요”</code></p>
<p>= 창구는 다 만들었는데, 요청하는 쪽이 아직 작업 중. </p>
<ul>
<li>Open API<ul>
<li>누구나 요철할 수 있게 열어둔 AOP</li>
<li>주로 공공데이터를 열람하는 사이트</li>
</ul>
</li>
</ul>
<p><img src="https://velog.velcdn.com/images/dev_damjaeng/post/b83ca78c-ef07-4e7e-90bb-448bd05e44d8/image.client%2520%2526%2520server" alt=""></p>
<ul>
<li><span style='background-color: #FEFEA8'>서버는 요청이 어디서 오는 건지 상관 없다!</span></li>
</ul>
<hr>
<h2 id="개발-언어프레임워크---요새는-리액트로-개발해요">개발 언어/프레임워크 - &quot;요새는 리액트로 개발해요&quot;</h2>
<ul>
<li><p>프레임워크</p>
<ul>
<li><p>미리 만들어놓은 블록 세트.</p>
<ul>
<li>Java로 만든 프레임워크 (제일 유명:Spring)</li>
<li>Node.js로 만든 프레임워크 (제일 유명:Express)</li>
<li>Python으로 만든 프레임워크 (제일 유명:Django, Flask)</li>
</ul>
<p><img src="https://velog.velcdn.com/images/dev_damjaeng/post/7a603e49-48a9-424e-b12c-26625d4ca6b4/image.javascript%2520framework" alt=""></p>
</li>
</ul>
</li>
</ul>
<ul>
<li>모두 다 Javascript로 만든 프레임워크</li>
</ul>
<p>HTML, CSS, Javascript를 더 잘 쓸 수 있게 하는 프레임워크. 체감상 
<span style="color: red"><strong>리액트</strong></span>가 대세. 그런데 셋 중 하나 할 줄 알면 금방 배운다는 이야기.</p>
<ul>
<li><p>대부분의 언어로 서버를 만들 수 있다고 봐도 무방.</p>
<p>  (HTML, CSS, JS를 제외하고)</p>
<ul>
<li>많이 쓰이는 것은 Java, Python, Node js.</li>
</ul>
</li>
</ul>
<p><code>서버</code></p>
<ol>
<li><span style='color: blue'><strong>Java</strong></span><ol>
<li>어렵다. </li>
<li>형식이 많다.</li>
<li>큰 회사에서 많이 쓴다.</li>
</ol>
</li>
<li><span style='color: blue'><strong>Python</strong></span><ol>
<li>쉽게 입문할 수 있다.</li>
<li>자유롭다. </li>
<li>데이터분석에도 쓸 수 있다.</li>
</ol>
</li>
<li><span style='color: blue'><strong>Node js</strong></span><ol>
<li>Javascript와 문법이 거의 같다.</li>
<li>스타트업에서 많이 쓴다. </li>
</ol>
</li>
</ol>
<p><code>앱</code></p>
<p>안드로이드 → Kotlin</p>
<p>아이폰 → Swift </p>
<p><code>한번에 개발</code></p>
<ol>
<li>Flutter</li>
<li>React Native </li>
</ol>
<p>요새는 <span style='color: blue'><strong>C언어</strong></span>를 현업에서 많이 사용하지 않는다. </p>
<p>임베디드나 칩을 다루는 곳에서나 다룬다. </p>
<p><img src="https://velog.velcdn.com/images/dev_damjaeng/post/a3775963-b07f-480e-a93c-6909201e4a06/image.big%2520frame" alt=""></p>
<h2 id="결론">결론</h2>
<p>서버를 처음부터 다 만들지 않는다. 누가 만들어 놓은 프레임 워크를 가져다가 잘 쓰는 것이 중요하다!</p>
]]></description>
        </item>
        <item>
            <title><![CDATA[[스파르타 코딩클럽]코딩 용어(1)]]></title>
            <link>https://velog.io/@dev_damjaeng/%EC%8A%A4%ED%8C%8C%EB%A5%B4%ED%83%80-%EC%BD%94%EB%94%A9%ED%81%B4%EB%9F%BD%EC%BD%94%EB%94%A9-%EC%9A%A9%EC%96%B41</link>
            <guid>https://velog.io/@dev_damjaeng/%EC%8A%A4%ED%8C%8C%EB%A5%B4%ED%83%80-%EC%BD%94%EB%94%A9%ED%81%B4%EB%9F%BD%EC%BD%94%EB%94%A9-%EC%9A%A9%EC%96%B41</guid>
            <pubDate>Sat, 06 Aug 2022 15:20:29 GMT</pubDate>
            <description><![CDATA[<h2 id="컴퓨터와-인터넷---https-보안-설정-됐어요">컴퓨터와 인터넷 - &quot;https 보안 설정 됐어요?&quot;</h2>
<ul>
<li>우린 사실 매일 기계를 제어하고 있는 것.</li>
<li><span style="color: blue"><strong>운영체제(OS)</strong></span>가 그 역할을 하고 있음.<ul>
<li>인간이 기계와 소통할 수 있게 만드는 기반 프로그램.</li>
<li>OS에게는 우리가 키보드나 마우스로 명령을 내린다.</li>
<li>꼭 키보드나 마우스로? <span style="color: red"><strong>No!! Coding으로!!</strong></span></li>
</ul>
</li>
</ul>
<p>서버마다 운영체제를 다 깔아야 하는데, Linux는 무료로 사용할 수 있다.</p>
<p>Linux = ‘오픈소스’. 회사에서 보통 ‘서버 컴퓨터다’라고 한다면, 아 Linux 사용하고 있다고 생각해도 무방하다. </p>
<ul>
<li>코딩 <span style="color: blue"><strong>(= 프로그래밍)</strong></span><ul>
<li>컴퓨터에게 내릴 수 있는 모든 명령.</li>
<li>각 언어마다 특성이 다르므로 여러 프로그래밍 언어를 사용.</li>
</ul>
</li>
<li>프로그램<ul>
<li>미리 짜둬서 매번 똑같이 움직이는 것</li>
<li>ex) 파워포인트, 엑셀, 워드 등</li>
</ul>
</li>
<li>인터넷<ul>
<li>컴퓨터끼리 서로 소통하는 것</li>
<li>대화를 주고 받기 위해서 규칙이 필요하다.</li>
<li><span style="color: blue"><strong>웹 통신</strong></span><ul>
<li>ex) http:// → 지금부터 웹의 규칙대로 이야기할 것이라는 암시.</li>
<li>https:// → 암구호 표를 서로 가져서 가운데서 엿듣지 못하도록 하는 것.</li>
</ul>
</li>
</ul>
</li>
</ul>
<p>If, “잘 듣고 있다가 누가 http 요청하면 이 파일을 돌려줘” 라고 명령을 한다면?</p>
<p>그게 바로 <span style="color: red"><strong>“웹 서버”</strong></span>를 만들었다고 하는 것!</p>
<hr>
<h2 id="웹서비스-동작-방식---서버가-죽었네요">웹서비스 동작 방식 - &quot;서버가 죽었네요&quot;</h2>
<ul>
<li><p>서버</p>
<ul>
<li><span style='background-color: #FEFEA8'>가운데서</span> 데이터를 저장하고, 주는 것.</li>
<li>사실은 그냥 컴퓨터 껍데기 떼고 가로로 눕히는 것.</li>
<li>즉, 서버란 “컴퓨터”라는 사람의 직업과 같은 것.<ul>
<li>(DB, 웹서핑, ··· 투잡 쓰리잡 가능!</li>
</ul>
</li>
</ul>
</li>
<li><p>브라우저</p>
<ul>
<li><span style='background-color: #FEFEA8'>요청 + 그려주기</span>의 역할 담당.</li>
</ul>
</li>
</ul>
<br>

<p><code>서버</code> → <code>브라우저</code> </p>
<ol>
<li><strong>HTML : 뼈대</strong>
<img src="https://velog.velcdn.com/images/dev_damjaeng/post/3107c416-49dc-41ad-affa-edccf1ccdc2f/image.HTML%25EB%25A7%258C%2520%25EC%259E%2588%25EB%258A%2594%2520%25EB%25AA%25A8%25EC%258A%25B5" alt=""></li>
</ol>
</br>

<ol start="2">
<li><strong>CSS : 예쁘게</strong>
<img src="https://velog.velcdn.com/images/dev_damjaeng/post/028ed907-a188-439f-a7a9-83820d1e5ef9/image.CSS%25EB%25A7%258C%2520%25EC%259E%2588%25EB%258A%2594%2520%25EB%25AA%25A8%25EC%258A%25B5" alt=""></br></li>
<li><strong>Javascript : 움직이게</strong></li>
</ol>
<p>자동완성 기능을 사용할 수 있게 됨.<img src="https://velog.velcdn.com/images/dev_damjaeng/post/616465f1-8030-47ab-a966-f4719dd3c483/image.Javascript" alt=""></p>
<h2 id="결론-다-형식이-정해져-있다">결론: 다 형식이 정해져 있다.</h2>
<p>→ <code>제이슨방식</code></p>
<ul>
<li><p>‘키 : 밸류’ 의 방식</p>
</li>
<li><p><span style='background-color: #FEFEA8'>웹은 다 받아서 다 다시 그리는 형태,
  앱은 껍데기는 있고 데이터만 왔다갔다하는 형태.</span></p>
</li>
</ul>
]]></description>
        </item>
    </channel>
</rss>