AI 연구자를 위한 클린코드 - GDG DevFest Seoul 2019Kenneth Ceyer
올바른 코드 작성을 고민하는 연구자들을 위하여 - 클린코드는 여러분의 코드를 복잡한 패턴으로 구현하여 시간을 잡아먹는, 겉만 화려한 장식이 아닙니다. 모델을 구현하고, 또 그것을 테스트 할 때 이것이 정말 올바른 코드인지 궁금하셨나요? 이 세션에서는 연구 모델을 작성할 때 발견할 수 있는, 빈번한 코드 악취(Code smell)들과, 그것들을 어떻게 없앨 수 있을지에 대해서 알아봅니다. 코드에 영혼을 불어넣고, 그 어떤 코드라도 부끄럽지 않게 구현할 수 있는 연구자들이 되어봅시다!
Advanced Python Testing Techniques (Pycon KR 2019) [Korean Ver.]Jaeman An
• 기본적인 테스트 구현하기
• Sure를 이용하여 더 직관적으로 테스트 코드를 구현하기
• Behavior Driven Development (BDD) 를 이용하여 더 재미있게 테스트 코드를 구현하기 • HTTP Mocking과 monkey patching으로 독립적인 테스트 코드 구현하기
• Randomized testing을 이용하여 온전한 테스트 코드 구현하기
• Benchmark testing을 이용하여 로직 시간 측정하기
• 간단한 pytest plugin 만들기
This presentation demonstrates general guidelines how to create good test cases using Robot Framework. Both good practices and anti-patterns are presented.
The presentation is hosted on GitHub where you can find the original in ODP format: https://github.com/robotframework/DosDontsSlides
AI 연구자를 위한 클린코드 - GDG DevFest Seoul 2019Kenneth Ceyer
올바른 코드 작성을 고민하는 연구자들을 위하여 - 클린코드는 여러분의 코드를 복잡한 패턴으로 구현하여 시간을 잡아먹는, 겉만 화려한 장식이 아닙니다. 모델을 구현하고, 또 그것을 테스트 할 때 이것이 정말 올바른 코드인지 궁금하셨나요? 이 세션에서는 연구 모델을 작성할 때 발견할 수 있는, 빈번한 코드 악취(Code smell)들과, 그것들을 어떻게 없앨 수 있을지에 대해서 알아봅니다. 코드에 영혼을 불어넣고, 그 어떤 코드라도 부끄럽지 않게 구현할 수 있는 연구자들이 되어봅시다!
Advanced Python Testing Techniques (Pycon KR 2019) [Korean Ver.]Jaeman An
• 기본적인 테스트 구현하기
• Sure를 이용하여 더 직관적으로 테스트 코드를 구현하기
• Behavior Driven Development (BDD) 를 이용하여 더 재미있게 테스트 코드를 구현하기 • HTTP Mocking과 monkey patching으로 독립적인 테스트 코드 구현하기
• Randomized testing을 이용하여 온전한 테스트 코드 구현하기
• Benchmark testing을 이용하여 로직 시간 측정하기
• 간단한 pytest plugin 만들기
This presentation demonstrates general guidelines how to create good test cases using Robot Framework. Both good practices and anti-patterns are presented.
The presentation is hosted on GitHub where you can find the original in ODP format: https://github.com/robotframework/DosDontsSlides
NGINX Ingress Controller for KubernetesNGINX, Inc.
Presentation by Michael Pleshakov from NGINX to GDG Cloud Düsseldorf Meetup group on using NGINX as an Ingress Controller for Kubernetes. This presentation is for Kubernetes users, looking to deliver applications on Kubernetes in production. You will learn how to:
- install the Ingress Controller through Kubernetes manifests or Helm;
- configure the Ingress Controller to load balance HTTP and TCP/UDP applications;
- monitor the Ingress Controller using Prometheus;
- troubleshoot the Ingress Controller in case of problems;
- extend the Ingress Controller to support advanced load balancing requirements.
API Testing. Streamline your testing process.Andrey Oleynik
Slides from IT talk: «API Testing. Streamline your testing process. A step by step tutorial»
Code on github: https://github.com/a-oleynik/soap-ui
Webinar on youtube: https://www.youtube.com/watch?v=x2ALtuCjuUo
DataArt P. https://www.meetup.com/ru-RU/DataArt-Wroclaw-IT-talk/events/246967484/?eventId=246967484 Wroclaw, 2018, February 15
자프링(자바 + 스프링) 외길 12년차 서버 개발자가 코프링(코틀린 + 스프링)을 만난 후 코틀린의 특징과 스프링의 코틀린 지원을 알아가며 코프링 월드에서 살아남은 이야기…
코드 저장소: https://github.com/arawn/kotlin-support-in-spring
NGINX Kubernetes Ingress Controller: Getting Started – EMEAAine Long
This webinar gets you started using the Kubernetes Ingress controllers for NGINX & NGINX Plus to load balance, route, and secure Kubernetes applications
Join this webinar to learn:
- The benefits of using Kubernetes and why it's become the de facto container scheduler
- About the Kubernetes Ingress resource and Ingress controllers
- How to use NGINX and NGINX Plus Ingress controllers to load balance, route traffic to, and secure applications on Kubernetes
- How to monitor the NGINX Plus Ingress controller with Prometheus
고승범(peter.ko) / kakao corp.(인프라2팀)
---
카카오에서는 빅데이터 분석, 처리부터 모든 개발 플랫폼을 이어주는 솔루션으로 급부상한 카프카(kafka)를 전사 공용 서비스로 운영하고 있습니다. 전사 공용 카프카를 직접 운영하면서 경험한 트러블슈팅과 운영 노하우 등을 공유하고자 합니다. 특히 카프카를 처음 접하시는 분들이나 이미 사용 중이신 분들이 많이 궁금해하는 프로듀서와 컨슈머 사용 시의 주의점 등에 대해서도 설명합니다.
Traditional virtualization technologies have been used by cloud infrastructure providers for many years in providing isolated environments for hosting applications. These technologies make use of full-blown operating system images for creating virtual machines (VMs). According to this architecture, each VM needs its own guest operating system to run application processes. More recently, with the introduction of the Docker project, the Linux Container (LXC) virtualization technology became popular and attracted the attention. Unlike VMs, containers do not need a dedicated guest operating system for providing OS-level isolation, rather they can provide the same level of isolation on top of a single operating system instance.
An enterprise application may need to run a server cluster to handle high request volumes. Running an entire server cluster on Docker containers, on a single Docker host could introduce the risk of single point of failure. Google started a project called Kubernetes to solve this problem. Kubernetes provides a cluster of Docker hosts for managing Docker containers in a clustered environment. It provides an API on top of Docker API for managing docker containers on multiple Docker hosts with many more features.
세션 소개
저는 개발자로서 RoamResearch와 VSCode를 사용하던 중 불의의 사고를 겪었습니다. 사고를 겪은 직후, Neovim을 접하고 나서 저의 개발 도구와 글 작성 도구를 모두 이것으로 전환하게 되었습니다. 그만큼 매력적인 도구인 Neovim을 여러분께 소개하고, 100퍼센트 활용할 수 있는 팁까지 공유하고 싶습니다.
발표자 소개
Neovim 에 과몰입한 백엔드 개발자
INTP과 ENFP 사이를 오가는 하이브리드
사색을 좋아하면서 한편으로는 도파민 자극을 좋아합니다
NGINX Ingress Controller for KubernetesNGINX, Inc.
Presentation by Michael Pleshakov from NGINX to GDG Cloud Düsseldorf Meetup group on using NGINX as an Ingress Controller for Kubernetes. This presentation is for Kubernetes users, looking to deliver applications on Kubernetes in production. You will learn how to:
- install the Ingress Controller through Kubernetes manifests or Helm;
- configure the Ingress Controller to load balance HTTP and TCP/UDP applications;
- monitor the Ingress Controller using Prometheus;
- troubleshoot the Ingress Controller in case of problems;
- extend the Ingress Controller to support advanced load balancing requirements.
API Testing. Streamline your testing process.Andrey Oleynik
Slides from IT talk: «API Testing. Streamline your testing process. A step by step tutorial»
Code on github: https://github.com/a-oleynik/soap-ui
Webinar on youtube: https://www.youtube.com/watch?v=x2ALtuCjuUo
DataArt P. https://www.meetup.com/ru-RU/DataArt-Wroclaw-IT-talk/events/246967484/?eventId=246967484 Wroclaw, 2018, February 15
자프링(자바 + 스프링) 외길 12년차 서버 개발자가 코프링(코틀린 + 스프링)을 만난 후 코틀린의 특징과 스프링의 코틀린 지원을 알아가며 코프링 월드에서 살아남은 이야기…
코드 저장소: https://github.com/arawn/kotlin-support-in-spring
NGINX Kubernetes Ingress Controller: Getting Started – EMEAAine Long
This webinar gets you started using the Kubernetes Ingress controllers for NGINX & NGINX Plus to load balance, route, and secure Kubernetes applications
Join this webinar to learn:
- The benefits of using Kubernetes and why it's become the de facto container scheduler
- About the Kubernetes Ingress resource and Ingress controllers
- How to use NGINX and NGINX Plus Ingress controllers to load balance, route traffic to, and secure applications on Kubernetes
- How to monitor the NGINX Plus Ingress controller with Prometheus
고승범(peter.ko) / kakao corp.(인프라2팀)
---
카카오에서는 빅데이터 분석, 처리부터 모든 개발 플랫폼을 이어주는 솔루션으로 급부상한 카프카(kafka)를 전사 공용 서비스로 운영하고 있습니다. 전사 공용 카프카를 직접 운영하면서 경험한 트러블슈팅과 운영 노하우 등을 공유하고자 합니다. 특히 카프카를 처음 접하시는 분들이나 이미 사용 중이신 분들이 많이 궁금해하는 프로듀서와 컨슈머 사용 시의 주의점 등에 대해서도 설명합니다.
Traditional virtualization technologies have been used by cloud infrastructure providers for many years in providing isolated environments for hosting applications. These technologies make use of full-blown operating system images for creating virtual machines (VMs). According to this architecture, each VM needs its own guest operating system to run application processes. More recently, with the introduction of the Docker project, the Linux Container (LXC) virtualization technology became popular and attracted the attention. Unlike VMs, containers do not need a dedicated guest operating system for providing OS-level isolation, rather they can provide the same level of isolation on top of a single operating system instance.
An enterprise application may need to run a server cluster to handle high request volumes. Running an entire server cluster on Docker containers, on a single Docker host could introduce the risk of single point of failure. Google started a project called Kubernetes to solve this problem. Kubernetes provides a cluster of Docker hosts for managing Docker containers in a clustered environment. It provides an API on top of Docker API for managing docker containers on multiple Docker hosts with many more features.
세션 소개
저는 개발자로서 RoamResearch와 VSCode를 사용하던 중 불의의 사고를 겪었습니다. 사고를 겪은 직후, Neovim을 접하고 나서 저의 개발 도구와 글 작성 도구를 모두 이것으로 전환하게 되었습니다. 그만큼 매력적인 도구인 Neovim을 여러분께 소개하고, 100퍼센트 활용할 수 있는 팁까지 공유하고 싶습니다.
발표자 소개
Neovim 에 과몰입한 백엔드 개발자
INTP과 ENFP 사이를 오가는 하이브리드
사색을 좋아하면서 한편으로는 도파민 자극을 좋아합니다
NDC Python 게임서버 안녕하십니까? : 몬스터 슈퍼리그 게임 서버 편의 후속으로 기획된 발표입니다. 사내 준비 도중 "너굴" 님의 질문에서 시작되었습니다.
이 발표는 잘 알려진 RPC Framework 인 Thrift, gRPC를 살펴보고 예시로 오델로 게임을 만들어보면서 기존 RPC framework 들이 게임의 서버/클라 구조에 잘 어울리지는 살펴보고 왜 몬스터 슈퍼리그에서 그런 선택을 했는지 살펴봅니다.
그리고 게임에 맞게 RPC 를 설계하고 이를 이용하여 온라인 오델로 게임을 완성해봅니다.
SMARTSTUDY 에서 몬스터 슈퍼 리그를 개발하면서 빠른 개발 진행을 위해 선택했던 Python 게임 서버, '잘 되면 다시 만들지 뭐'라는 생각에서 시작했지만 다시 만들 일은 영원히 오지 않았습니다... Python으로 게임 서버를 만들었을 때 사용한 것은 무엇인지 또 실제 오픈 했을 때 서버는 안녕했는지 알아봅니다.
상업적 이용 및 출처없는 무단전재를 금합니다.
애자일과 애자일 테스트 소개 (테스트기본교육 3장 2절)
애자일의 스크럼, XP에 대한 기본적인 소개와 스크럼 팀 안에서 테스트 역할자로써 사용자 스토리 리뷰, 테스트 설계, 짝 테스트, 테스트 자동화 등에 대한 내용을 사례 기반으로 소개하고 있습니다.
KGC 2014, 'Software Enginner in Test' in Game Development (Bluehole Studio)Sungmin Kim
Document presented at Korea Game Conference 2014.
Title is ''Software Enginner in Test' in Game Development' and sub-title is 'How can TERA verify too many scearios by automation ?'
블루홀 스튜디오의 김성민 입니다. 이번 Korea Game Conference 2014에서 발표한 자료를 공유합니다. 발표 주제는 'Software Enginner in Test' in 게임 개발 입니다.
[FEConf 2018] Front-End 프로젝트의 Test code 작성경험기Ahreum Kim
2018. 11. 03 'FEConf 2018' 발표자료입니다.
---
처음으로 프론트엔드 프로젝트에 (유닛)테스트코드를 작성해보며 느낀 경험을 공유합니다. 어떤 관점으로 접근 했는지부터, 테스트코드 작성을 하며 만난 고민과 해결책은 어떤 방식으로 풀어 냈는지 코드와 함께 다뤄보려 합니다. 저는 테스트 숙련자가 아니지만, 저와 비슷한 위치에서 테스트에 입문하시려는 분들께 어떻게 테스트에 입문하고 코드를 작성했는지에 대해서 구체적인 경험을 공유하는 것도 의미있을 거라 생각했습니다. 제가 드릴 얘기들이 정답이 아닐 수 있지만, 더 좋은 방향을 고민하면서 같이 생각해볼 수 있다면 좋겠습니다.
1. –Kent Beck
‘내가 12살 괴짜시절에 읽었던 책이 있는데, 실제 입력
테이프를 넣었을 때 그 결과로 기대할 수 있는 출력 테이
프를 미리 타이프해 넣고, 실제 결과가 기대 결과와 같아
질 때까지 코딩하라고 제안했다. 그 책을 쓴 이름 모르는
저자에게: 고마워요, 고마워요, 고마워요.’
2. – 김창준
‘테스트를 먼저 하다니 도대체 말이나 될 법한 소리인
가? 아니 말이 된다. 그것도 아주 훌륭히.’
5. TDD란?
• Test Driven Development 테스트 주도적인 개발
• 소스코드 작성 전에 테스트 코드를 먼저 작성하라
• “단순한 설계를 장려하고 자신감을 불어넣는다.” - Kent
Beck
• “잘 동작하는 깔끔한 코드” - Ron Jeffries
6. TDD 싸이클
• 빨강 - 실패하는 작은 테스트를 작성한다
• 초록 - 빨리 테스트가 통과하게끔 만든다. 죄악을 저질러
도 좋다
• 리팩토링 - 테스트를 통과하게 하는 와중에 생겨난 문제
와 중복을 제거한다
7.
8. TDD의 장점
• 높은 소스코드 품질 (MS와 IBM 사례)
• http://research.microsoft.com/en-us/groups/ese/nagappan_tdd.pdf
• 15~35% 개발 시간 증가
• 40~90% 결함(버그) 감소
• 재설계 및 디버깅 시간의 절감
• 퍼포먼스 체크 및 추가 대응에 용이
• 문서화 대체
9. TDD의 단점
• 단기적 코드 생산성 하락
• 실제 코드보다 TC(Test-Case) 유지보수 비용이 더 커질
수도
• 과도한 Mock-up 비용 -> Docker나 Chef 이용 바람직
10. TDD 수련법
• 간단하고 쉬운 문제들을 TDD를 시도한다.
• 초록막대주기( 테스트가 합격된 상태에서 다음 합격 상태
까지 )를 짧게 가져간다.
• 가짜로 구현하기를 사용한다.
• 보폭을 조절한다. 너무 큰 것을 테스트 하고 있다면 쪼갠다.
• 테스트 하기 힘든 것은 레이어를 나누어 가능한 계층에 대
해서 한다
11. TDD로 풀기 난해한 분야들
• 보안 소프트웨어와 동시성 문제
• 게임 클라이언트
• UI가 많은 어플리케이션
• 의존하는 외부 시스템이 많은 서비스
12. TDD와 파이썬
• 파이썬과 같은 동적언어는 TDD를 하기에 보다 적합하다.
• 컴파일 단계의 체크가 약하기에, TDD가 꼭 필요하다.
14. 시연 과제 - URL Splitter
• https://www.google.co.kr/#q=seoul 과 같은 URL주소
를 다음과 같이 분리하는 코드를 작성하여라
• 프로토콜: http
• 도메인: www.google.com
• 경로: #q=seoul
15. 파이썬 TDD 툴들
• unittest 모듈 - 기본 내장되어 있으나 구식
• nose - 전통적으로 많이 사용
• pytest - 최신의 다양한 기능이 많음 👈
• coverage - 코드 커버리지 분석 👈
• 툴에 너무 집착하지 말자. 단순 assert로도 충분!
16. 준비
• 필요 모듈 설치
• pip install pytest
• pip install pytest-cov
• pip install coverage
• 파일 생성 urlsplit.py, test_urlsplit.py
• tests/ 폴더를 따로 만드는 것도 좋습니다.
17. 1. 기본 기능 동작하게
• https://www.google.co.kr/#q=seoul 분석 - 가짜 구현!?
• ftp://ftp.daum.net/ubuntu-releases 분석 - 어쩔 수 없
이 제대로
• 옵션 - 프로토콜이나 경로가 없는 경우에도 동작하게
18. fixture 사용하기
• 퍼포먼스 체크를 위해 더 많은 URL에 대해 수행해보자
• test_urls를 @pytest.fixture 로 만들기
• pytest -k 를 사용하여 특정 테스트만 실행 시키기
• 이를 위해 테스트 이름 정리 필요
• -s 옵션으로 print 출력 결과 보기
19. 예외 발생 시키기
• 이상한 URL이 들어오면 ValueError 예외 발생
• pytest.raises 이용
21. coverage 구하기
• 기본 실행
• py.test —cov urlsplit
• HTML 보고서 보기
• py.test —cov urlsplit —cov-report=html
• is_valid 함수 별도 구현 후 다시 시도
• coverage 100%에 도전!