목록전체 글 (1208)
넘치게 채우기
프레젠터는 험블 객체 패턴을 따른 형태로, 아키텍처 경계를 식별하고 보호하는 데 도움이 된다. 험블 객체 패턴 험블 객체 패턴은 디자인 패턴으로, 테스트하기 어려운 행위와 테스트하기 쉬운 행위를 단위 테스트 작성자가 분리하기 쉽게 하는 방법으로 고안되었다. 아이디어는 매우 단순하다. 행위들을 두 개의 모듈 또는 클래스로 나누다. 이들 모듈 중 하나가 험블(humble)이다. 가장 기본적인 본질은 남기고, 테스트하기 어려운 행위를 모두 험블 객체로 옮긴다. 나머지 모듈에는 험블 객체에 속하지 않은, 테스트하기 쉬운 행위를 모두 옮긴다. 예를 들어 GUI의 경우 단위 테스트가 어려운데, 화면을 보면서 각 요소가 필요한 위치에 적절히 표시되었는지 검사하는 테스트는 작성하기 매우 어렵기 때문이다. 하지만 GUI..
https://leetcode.com/problems/design-a-food-rating-system/description/ Design a Food Rating System - LeetCode Can you solve this real interview question? Design a Food Rating System - Design a food rating system that can do the following: * Modify the rating of a food item listed in the system. * Return the highest-rated food item for a type of cuisine in the syst leetcode.com leetcode - Design ..
이번 하반기부터 점점 블로그의 게시물도 늘어나고, 규모도 조금씩 성장해나가면서, 블로그를 하는 것에 대해 아카이브 이상의 관심이 생겨났다. 소소한 수익도 기대하기 시작했고, 사람들이 더 많이 찾아와주길 바라게 되었다. 그래서 이번 기회에 블로그를 개편해보고자 겨울동안 SEO공부도 해보고, 블로그의 품질을 더 개선시켜보고자 맨 땅에 헤딩하게 되었다. 웹을 이해하는 데 있어서 도움이 될 것 같기도 하고 말이다. 우선, Google의 Lighthouse라는 기능이 있는 것을 알게 되었다. 웹 페이지를 분석하고, 결과를 보고서로 만들어주는 강력한 도구이다. https://developer.chrome.com/docs/lighthouse/overview/?hl=ko 개요 | Lighthouse | Chrome f..
육각형 아키텍처(Hexagonal Architecture): 포트와 어댑터라고도 알려졌으며, 앨리스터 코오번이 개발했다. 그리고 스티브 프리먼과 냇 프라이스가 그들의 훌륭한 저서인 에서 차용했다. DCI(Data, Context and Interaction): 제임스 코플리언과 트리그배 린스쿠주가 만들었다. BCE(Boundary-Contorl Entity): 이바 야콥슨이 자신의 저서인 이들 아키텍처는 모두 세부적인 면에서는 다소 차이가 있더라도 그 내용은 상당히 비슷하다. 이들의 목표는 모두 같은데, 바로 관심사의 분리(seperation of concerns)다. 이들은 모두 소프트웨어를 계층으로 분리함으로써 관심사의 분리라는 목표를 달성할 수 있었다. 각 아키텍처는 최소한 업무 규칙을 위한 계층 ..
오늘의 문제는 이전에 푼 경험이 있는 문제라서 생략합니다! 오늘은 Leetcode에게 상을 받은 날입니다. 2023년 4월 26일부터 쭉 달려와서, 이제는 열흘 뒤면 8개월이 되어갑니다. 제가 처음으로 정착한 Problem Solving 플랫폼이고, 현재도 편리한 기능과 UI/UX, 좋은 질의 문제 등의 이유로 가장 애용하고 있습니다. 특히, 문제와 예시가 직관적이고, 테스트 케이스가 친절해서 가장 좋아합니다. 일이 생겨서 중간에 끊긴 적도 몇 번 있었지만, 그런 때를 제외하고는 매일 Daily Challenge에 도전하였습니다. 이제는 이 블로그에 수많은 문제들이 쌓여있습니다. 저는 릿코드의 문제를 푸는 것이 재미있습니다. (물론, 다른 플랫폼들도 좋아합니다!) 앞으로도 계속 코딩 문제를 풀어나갈 것입..
https://leetcode.com/problems/destination-city/description/ Destination City - LeetCode Can you solve this real interview question? Destination City - You are given the array paths, where paths[i] = [cityAi, cityBi] means there exists a direct path going from cityAi to cityBi. Return the destination city, that is, the city without any path ou leetcode.com leetcode - Destination City 문제 유형 : 탐색 /..
https://leetcode.com/problems/difference-between-ones-and-zeros-in-row-and-column/description/ Difference Between Ones and Zeros in Row and Column - LeetCode Can you solve this real interview question? Difference Between Ones and Zeros in Row and Column - You are given a 0-indexed m x n binary matrix grid. A 0-indexed m x n difference matrix diff is created with the following procedure: * Let th..
https://leetcode.com/problems/special-positions-in-a-binary-matrix/description/ Special Positions in a Binary Matrix - LeetCode Can you solve this real interview question? Special Positions in a Binary Matrix - Given an m x n binary matrix mat, return the number of special positions in mat. A position (i, j) is called special if mat[i][j] == 1 and all other elements in row i and co leetcode.com ..
https://leetcode.com/problems/maximum-product-of-two-elements-in-an-array/description/ Maximum Product of Two Elements in an Array - LeetCode Can you solve this real interview question? Maximum Product of Two Elements in an Array - Given the array of integers nums, you will choose two different indices i and j of that array. Return the maximum value of (nums[i]-1)*(nums[j]-1). Example 1: Inpu le..
https://leetcode.com/problems/element-appearing-more-than-25-in-sorted-array/description/ Element Appearing More Than 25% In Sorted Array - LeetCode Can you solve this real interview question? Element Appearing More Than 25% In Sorted Array - Given an integer array sorted in non-decreasing order, there is exactly one integer in the array that occurs more than 25% of the time, return that integer..