Kotlin으로 개발자 생산성과 코드 안정성을 개선한 트위터
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.

Twitter는 가장 널리 사용되는 소셜 미디어 플랫폼 중 하나로, 사용자는 이 플랫폼에서 언제든지 세상에서 어떤 일이 일어나고 있는지 확인할 수 있습니다.
엔지니어링팀은 Kotlin의 null 안전성 기능을 활용해 코드베이스를 유지하기 쉽게 만들고 Android 앱의 안전성을 개선하겠다는 목표를 갖고 2017년 Kotlin을 도입했습니다.
진행한 작업
개발팀은 우선 Periscope의 코드베이스와 트위터 앱의 Periscopoe 기능에 Kotlin을 도입하여 Kotlin을 사용하면 어떤 점이 좋은지, 어떤 점을 희생해야 하는지 테스트할 수 있었습니다. 생산성 및 코드 안전성 개선이라는 성과에 고무된 개발팀은 트위터 앱의 다른 기능에도 점진적으로 Kotlin을 추가하기 시작했습니다.
트위터는 Kotlin을 사용해 앱의 코드 양을 줄이고 상용구 코드 유지 작업을 최소화하였으며, 개발팀의 생산성도 개선했습니다. 또한 데이터 클래스, 봉인된 클래스, 기본 매개변수와 같은 언어 기능도 활용했는데 이를 통해 적은 양의 코드를 빠르게 작성할 수 있었습니다. Kotlin의 스마트 전송 역시 트위터 팀에서 작성하고 유지해야 하는 코드의 양을 줄이는 데 도움이 되었습니다.
"Kotlin을 사용하다 보면 즐겁습니다. 상용구 코드가 줄어들면서 작성해야 하는 코드의 양도 적어집니다." - 앤디 폭스, 트위터 수석 소프트웨어 엔지니어
Kotlin의 null 안전성 기능도 트위터의 코드 안정성 향상에 도움을 주었습니다.
개발팀에서 처음 Kotlin을 도입했을 때 이전에는 찾지 못했던 무음 오류를 발견했습니다. 개발팀은 컴파일 시간 null 검사를 사용해 문제를 더 빠르게 감지하고 null 허용 여부 오류를 미리 처리할 수 있습니다.
결과
Kotlin을 도입한 후 앱의 시스템 상태 및 실적이 우수한 상태를 유지하고 있습니다. 또한 개발팀이 런타임이 아닌 컴파일 시간에 주요 오류를 잡아낼 수 있게 되면서 생산성과 앱 안전성도 개선되었습니다. 생산성과 코드 안전성이 개선됨을 확인한 개발팀은 Fleets, DM Reactions, Lists 등 여러 새로운 기능을 Kotlin으로 작성하기로 결정했습니다.
시작하기
Kotlin으로 Android 앱 개발하기에 관해 자세히 알아보세요.
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2020-10-21(UTC)
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2020-10-21(UTC)"],[],[],null,["# Twitter increases developer productivity and code reliability with Kotlin\n\n[Twitter](https://play.google.com/store/apps/details?id=com.twitter.android&hl=en)\nis one of the most widely used social media platforms where users can see what's\nhappening in the world at any given moment.\nThe engineering team introduced Kotlin in 2017 with the goal of making their\ncodebase more maintainable and their Android app more reliable as a result of\nKotlin's [null safety features](/kotlin/common-patterns#nullability).\n\nWhat they did\n-------------\n\nThe team initially introduced Kotlin into [Periscope](https://play.google.com/store/apps/details?id=tv.periscope.android&referrer)'s\ncodebase and into the Periscope feature of the Twitter app, and were able to\ntest the benefits and tradeoffs of using Kotlin. Impressed with the improvements\nto productivity and code reliability, they gradually began adding Kotlin to\nother features of the Twitter app.\n\nKotlin has helped Twitter decrease the amount of code in their app,\nminimizing boilerplate maintenance and **enabling the team to be more\nproductive.** They used language features such as data classes, sealed\nclasses, and default parameters, which allowed them to be able to write less\ncode, and faster. Kotlin's smart casting has also reduced the amount of code\ntheir team needs to write and maintain.\n\n*\"Kotlin is a joy to use. The reduction in boilerplate reduces the amount of\ncode we need to write.\" - Andy Fox, Senior Software Engineer at Twitter*\n\nKotlin's null safety features have also increased Twitter's code reliability.\nInitially when the team introduced Kotlin, they uncovered silent failures that\nhad previously gone undetected. Compile time null checking allows the team to\n**detect issues sooner, and handle nullability errors more\nproactively.**\n\nResults\n-------\n\nAfter adopting Kotlin, the team has continued to see excellent system health\nand performance for their app. At the same time, they've improved their team's\nproductivity and made their app safer by catching critical errors at compile\ntime instead of runtime. With the increases in productivity and code\nreliability, the team has decided to write many new features such as Fleets,\nDM Reactions, and Lists in Kotlin.\n\nGet started\n-----------\n\nLearn more about [developing an Android app with Kotlin](/kotlin)."]]