{"id":39,"date":"2023-07-09T06:35:44","date_gmt":"2023-07-09T10:35:44","guid":{"rendered":"https:\/\/www.codeclean.net\/blog\/?p=39"},"modified":"2023-07-09T06:35:44","modified_gmt":"2023-07-09T10:35:44","slug":"clean-code%ec%97%90-%eb%8c%80%ed%95%9c-%ec%9d%b4%eb%a1%a0%eb%93%a4","status":"publish","type":"post","link":"https:\/\/www.codeclean.net\/blog\/?p=39","title":{"rendered":"Clean Code\uc5d0 \ub300\ud55c \uc774\ub860\ub4e4"},"content":{"rendered":"<p>Clean code\ub294 \uc18c\ud504\ud2b8\uc6e8\uc5b4 \uac1c\ubc1c\uc5d0\uc11c \uc911\uc694\ud55c \uac1c\ub150\uc73c\ub85c, \ucf54\ub4dc\uc758 \uac00\ub3c5\uc131\uacfc \uc720\uc9c0\ubcf4\uc218\uc131\uc744 \ub192\uc774\ub294 \ub370 \ucd08\uc810\uc744 \ub9de\ucda5\ub2c8\ub2e4. Clean code\ub97c \uc791\uc131\ud558\uae30 \uc704\ud574 \ub2e4\uc591\ud55c \uc774\ub860\uacfc \uc6d0\uce59\ub4e4\uc774 \uc788\uc2b5\ub2c8\ub2e4. \uc77c\ubc18\uc801\uc73c\ub85c \ub2e4\uc74c\uacfc \uac19\uc740 clean code\uc5d0 \ub300\ud55c \uc774\ub860\ub4e4\uc774 \uc788\uc2b5\ub2c8\ub2e4:<\/p>\n<p>\ub530\ub77c\uc11c, Clean code\uc758 \uc774\ub860\ub4e4\uc744 \uc798 \uc219\uc9c0\ud558\uace0, \uc774\ub97c \uc2e4\uc81c\ub85c \uc791\uc131\ud558\ub294 \ub370 \uc801\uc6a9\ud560 \uc218 \uc788\ub3c4\ub85d \ub178\ub825\ud574\uc57c \ud569\ub2c8\ub2e4. \uc774\ub97c \ud1b5\ud574, \ubcf4\ub2e4 \ud6a8\uc728\uc801\uc774\uace0 \uc548\uc815\uc801\uc778 \uc18c\ud504\ud2b8\uc6e8\uc5b4\ub97c \uac1c\ubc1c\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<ol>\n<li><strong>DRY(Don&#8217;t Repeat Yourself)<\/strong>: \uc911\ubcf5 \ucf54\ub4dc\ub97c \ud53c\ud558\uace0 \ucf54\ub4dc\uc758 \uc7ac\uc0ac\uc6a9\uc131\uc744 \ub192\uc774\ub294 \uc6d0\uce59\uc785\ub2c8\ub2e4.<\/li>\n<li><strong>KISS(Keep It Simple, Stupid)<\/strong>: \ucf54\ub4dc\ub97c \uac04\uacb0\ud558\uace0 \ub2e8\uc21c\ud558\uac8c \uc791\uc131\ud558\ub294 \uc6d0\uce59\uc73c\ub85c, \ubd88\ud544\uc694\ud55c \ubcf5\uc7a1\uc131\uc744 \ucd5c\uc18c\ud654\ud569\ub2c8\ub2e4.<\/li>\n<li><strong>YAGNI(You Ain&#8217;t Gonna Need It)<\/strong>: \ubd88\ud544\uc694\ud55c \uae30\ub2a5\uc774\ub098 \ucf54\ub4dc\ub97c \uc791\uc131\ud558\uc9c0 \ub9d0\ub77c\ub294 \uc6d0\uce59\uc73c\ub85c, \ud544\uc694\ud558\uc9c0 \uc54a\uc740 \uac83\uc744 \ubbf8\ub9ac \uad6c\ud604\ud558\uc9c0 \uc54a\ub3c4\ub85d \ud569\ub2c8\ub2e4.<\/li>\n<li><strong>SOLID \uc6d0\uce59<\/strong>: \ub2e4\uc12f \uac00\uc9c0 \uc6d0\uce59\uc73c\ub85c \uc774\ub8e8\uc5b4\uc9c4 \uac1d\uccb4 \uc9c0\ud5a5 \uc124\uacc4 \uc6d0\uce59\uc785\ub2c8\ub2e4.\n<ul>\n<li>SRP(Single Responsibility Principle): \ud074\ub798\uc2a4\ub294 \ub2e8 \ud558\ub098\uc758 \ucc45\uc784\uc744 \uac00\uc838\uc57c \ud569\ub2c8\ub2e4.<\/li>\n<li>OCP(Open\/Closed Principle): \ud655\uc7a5\uc5d0\ub294 \uc5f4\ub824\uc788\uace0, \uc218\uc815\uc5d0\ub294 \ub2eb\ud600 \uc788\uc5b4\uc57c \ud569\ub2c8\ub2e4.<\/li>\n<li>LSP(Liskov Substitution Principle): \uc790\uc2dd \ud074\ub798\uc2a4\ub294 \ubd80\ubaa8 \ud074\ub798\uc2a4\uc758 \uc5ed\ud560\uc744 \ub300\uccb4\ud560 \uc218 \uc788\uc5b4\uc57c \ud569\ub2c8\ub2e4.<\/li>\n<li>ISP(Interface Segregation Principle): \ud074\ub77c\uc774\uc5b8\ud2b8\ub294 \uc790\uc2e0\uc774 \uc0ac\uc6a9\ud558\uc9c0 \uc54a\ub294 \uc778\ud130\ud398\uc774\uc2a4\uc5d0 \uc758\uc874\ud558\uc9c0 \uc54a\uc544\uc57c \ud569\ub2c8\ub2e4.<\/li>\n<li>DIP(Dependency Inversion Principle): \ucd94\uc0c1\ud654\uc5d0 \uc758\uc874\ud574\uc57c \ud558\uba70, \uad6c\uccb4\ud654\uc5d0\ub294 \uc758\uc874\ud574\uc11c\ub294 \uc548 \ub429\ub2c8\ub2e4.<\/li>\n<\/ul>\n<\/li>\n<li><strong>\ud568\uc218\uc640 \ubcc0\uc218\uc758 \ub124\uc774\ubc0d<\/strong>: \uc758\ubbf8\uc788\ub294 \uc774\ub984\uc744 \uc0ac\uc6a9\ud558\uc5ec \ud568\uc218\uc640 \ubcc0\uc218\uc758 \ubaa9\uc801\uacfc \uc5ed\ud560\uc744 \uba85\ud655\ud788 \ud45c\ud604\ud569\ub2c8\ub2e4.<\/li>\n<li><strong>\uc8fc\uc11d\uc758 \uc801\uc808\ud55c \uc0ac\uc6a9<\/strong>: \uc8fc\uc11d\uc744 \uc0ac\uc6a9\ud558\uc5ec \ucf54\ub4dc\uc758 \uc758\ub3c4\uc640 \ub3d9\uc791 \ubc29\uc2dd\uc744 \uc124\uba85\ud558\uace0, \ubcf5\uc7a1\ud55c \ubd80\ubd84\uc774\ub098 \uc911\uc694\ud55c \uacb0\uc815 \uc0ac\ud56d\uc5d0 \ub300\ud55c \uc124\uba85\uc744 \ucd94\uac00\ud569\ub2c8\ub2e4.<\/li>\n<li><strong>\ucf54\ub4dc \ud3ec\ub9e4\ud305<\/strong>: \uc77c\uad00\ub41c \ucf54\ub4dc \ud3ec\ub9e4\ud305\uc744 \uc720\uc9c0\ud558\uc5ec \uac00\ub3c5\uc131\uc744 \ub192\uc774\uace0 \ucf54\ub4dc\uc758 \uc77c\uad00\uc131\uc744 \uc720\uc9c0\ud569\ub2c8\ub2e4.<\/li>\n<li><strong>\ud14c\uc2a4\ud2b8 \uac00\ub2a5\ud55c \ucf54\ub4dc \uc791\uc131<\/strong>: \ub2e8\uc704 \ud14c\uc2a4\ud2b8\ub97c \uc9c0\uc6d0\ud558\uace0, \ubaa8\ub4c8\ud654\ub418\uace0 \uc758\uc874\uc131\uc774 \uc801\uc740 \ucf54\ub4dc\ub97c \uc791\uc131\ud569\ub2c8\ub2e4.<\/li>\n<\/ol>\n<p>\uc774\ub7ec\ud55c \uc774\ub860\ub4e4\uc744 \uc801\uc6a9\ud558\uc5ec clean code\ub97c \uc791\uc131\ud558\uba74 \uc720\uc9c0\ubcf4\uc218\uc131\uc774 \uc88b\uace0 \ud611\uc5c5\uc774 \uc6d0\ud65c\ud55c \ucf54\ub4dc\ub97c \uac1c\ubc1c\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<p>\ub354\ubd88\uc5b4, Clean code\ub97c \uc791\uc131\ud558\ub294 \uac83\uc740 \ub9e4\uc6b0 \uc911\uc694\ud569\ub2c8\ub2e4. \uc65c\ub0d0\ud558\uba74, \ucf54\ub4dc\ub294 \uafb8\uc900\ud55c \uc720\uc9c0\ubcf4\uc218\uc640 \uc5c5\uadf8\ub808\uc774\ub4dc\uac00 \ud544\uc694\ud558\uae30 \ub54c\ubb38\uc785\ub2c8\ub2e4.<\/p>\n<p>\ub610\ud55c, \ub2e4\ub978 \uac1c\ubc1c\uc790\ub4e4\uacfc \ucf54\ub4dc\ub97c \uacf5\uc720\ud558\ub294 \uacbd\uc6b0, \ucf54\ub4dc\uc758 \uac00\ub3c5\uc131\uc774 \uc911\uc694\ud558\uba70, \ud5a5\ud6c4 \ucf54\ub4dc\ub97c \uc218\uc815\ud558\uac70\ub098 \uc5c5\uadf8\ub808\uc774\ub4dc\ud560 \ub54c\ub3c4 \uc720\uc6a9\ud569\ub2c8\ub2e4.\u00a0 \uc798 \uc815\ub9ac\ub41c \uae54\ub054\ud55c \ucf54\ub4dc\ub294 \uc774\ub7ec\ud55c \ubb38\uc81c\ub97c \ud574\uacb0\ud558\uace0, \ucf54\ub4dc\uc758 \uac00\ub3c5\uc131\uacfc \uc720\uc9c0\ubcf4\uc218\uc131\uc744 \ub192\uc774\ub294 \ub370 \ub9e4\uc6b0 \uc911\uc694\ud55c \uc5ed\ud560\uc744 \ud569\ub2c8\ub2e4.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Clean code\ub294 \uc18c\ud504\ud2b8\uc6e8\uc5b4 \uac1c\ubc1c\uc5d0\uc11c \uc911\uc694\ud55c \uac1c\ub150\uc73c\ub85c, \ucf54\ub4dc\uc758 \uac00\ub3c5\uc131\uacfc \uc720\uc9c0\ubcf4\uc218\uc131\uc744 \ub192\uc774\ub294 \ub370 \ucd08\uc810\uc744 \ub9de\ucda5\ub2c8\ub2e4. Clean code\ub97c \uc791\uc131\ud558\uae30 \uc704\ud574 \ub2e4\uc591\ud55c \uc774\ub860\uacfc \uc6d0\uce59\ub4e4\uc774 \uc788\uc2b5\ub2c8\ub2e4. \uc77c\ubc18\uc801\uc73c\ub85c \ub2e4\uc74c\uacfc \uac19\uc740 clean code\uc5d0 \ub300\ud55c \uc774\ub860\ub4e4\uc774 \uc788\uc2b5\ub2c8\ub2e4: \ub530\ub77c\uc11c, Clean code\uc758 \uc774\ub860\ub4e4\uc744 \uc798 \uc219\uc9c0\ud558\uace0, \uc774\ub97c \uc2e4\uc81c\ub85c \uc791\uc131\ud558\ub294 \ub370 \uc801\uc6a9\ud560 \uc218 \uc788\ub3c4\ub85d \ub178\ub825\ud574\uc57c \ud569\ub2c8\ub2e4. \uc774\ub97c \ud1b5\ud574, \ubcf4\ub2e4 \ud6a8\uc728\uc801\uc774\uace0 \uc548\uc815\uc801\uc778 \uc18c\ud504\ud2b8\uc6e8\uc5b4\ub97c \uac1c\ubc1c\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. DRY(Don&#8217;t Repeat [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":114,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"ocean_post_layout":"","ocean_both_sidebars_style":"","ocean_both_sidebars_content_width":0,"ocean_both_sidebars_sidebars_width":0,"ocean_sidebar":"0","ocean_second_sidebar":"0","ocean_disable_margins":"enable","ocean_add_body_class":"","ocean_shortcode_before_top_bar":"","ocean_shortcode_after_top_bar":"","ocean_shortcode_before_header":"","ocean_shortcode_after_header":"","ocean_has_shortcode":"","ocean_shortcode_after_title":"","ocean_shortcode_before_footer_widgets":"","ocean_shortcode_after_footer_widgets":"","ocean_shortcode_before_footer_bottom":"","ocean_shortcode_after_footer_bottom":"","ocean_display_top_bar":"default","ocean_display_header":"default","ocean_header_style":"","ocean_center_header_left_menu":"0","ocean_custom_header_template":"0","ocean_custom_logo":0,"ocean_custom_retina_logo":0,"ocean_custom_logo_max_width":0,"ocean_custom_logo_tablet_max_width":0,"ocean_custom_logo_mobile_max_width":0,"ocean_custom_logo_max_height":0,"ocean_custom_logo_tablet_max_height":0,"ocean_custom_logo_mobile_max_height":0,"ocean_header_custom_menu":"0","ocean_menu_typo_font_family":"0","ocean_menu_typo_font_subset":"","ocean_menu_typo_font_size":0,"ocean_menu_typo_font_size_tablet":0,"ocean_menu_typo_font_size_mobile":0,"ocean_menu_typo_font_size_unit":"px","ocean_menu_typo_font_weight":"","ocean_menu_typo_font_weight_tablet":"","ocean_menu_typo_font_weight_mobile":"","ocean_menu_typo_transform":"","ocean_menu_typo_transform_tablet":"","ocean_menu_typo_transform_mobile":"","ocean_menu_typo_line_height":0,"ocean_menu_typo_line_height_tablet":0,"ocean_menu_typo_line_height_mobile":0,"ocean_menu_typo_line_height_unit":"","ocean_menu_typo_spacing":0,"ocean_menu_typo_spacing_tablet":0,"ocean_menu_typo_spacing_mobile":0,"ocean_menu_typo_spacing_unit":"","ocean_menu_link_color":"","ocean_menu_link_color_hover":"","ocean_menu_link_color_active":"","ocean_menu_link_background":"","ocean_menu_link_hover_background":"","ocean_menu_link_active_background":"","ocean_menu_social_links_bg":"","ocean_menu_social_hover_links_bg":"","ocean_menu_social_links_color":"","ocean_menu_social_hover_links_color":"","ocean_disable_title":"default","ocean_disable_heading":"default","ocean_post_title":"","ocean_post_subheading":"","ocean_post_title_style":"","ocean_post_title_background_color":"","ocean_post_title_background":0,"ocean_post_title_bg_image_position":"","ocean_post_title_bg_image_attachment":"","ocean_post_title_bg_image_repeat":"","ocean_post_title_bg_image_size":"","ocean_post_title_height":0,"ocean_post_title_bg_overlay":0.5,"ocean_post_title_bg_overlay_color":"","ocean_disable_breadcrumbs":"default","ocean_breadcrumbs_color":"","ocean_breadcrumbs_separator_color":"","ocean_breadcrumbs_links_color":"","ocean_breadcrumbs_links_hover_color":"","ocean_display_footer_widgets":"default","ocean_display_footer_bottom":"default","ocean_custom_footer_template":"0","slim_seo":{"title":"Clean Code\uc5d0 \ub300\ud55c \uc774\ub860\ub4e4 - CodeClean","description":"Clean code\ub294 \uc18c\ud504\ud2b8\uc6e8\uc5b4 \uac1c\ubc1c\uc5d0\uc11c \uc911\uc694\ud55c \uac1c\ub150\uc73c\ub85c, \ucf54\ub4dc\uc758 \uac00\ub3c5\uc131\uacfc \uc720\uc9c0\ubcf4\uc218\uc131\uc744 \ub192\uc774\ub294 \ub370 \ucd08\uc810\uc744 \ub9de\ucda5\ub2c8\ub2e4. Clean code\ub97c \uc791\uc131\ud558\uae30 \uc704\ud574 \ub2e4\uc591\ud55c \uc774\ub860\uacfc \uc6d0\uce59\ub4e4\uc774 \uc788\uc2b5\ub2c8\ub2e4. \uc77c\ubc18\uc801\uc73c\ub85c \ub2e4\uc74c\uacfc \uac19\uc740 clean code\uc5d0 \ub300\ud55c \uc774\ub860\ub4e4\uc774 \uc788\uc2b5\ub2c8\ub2e4: \ub530\ub77c\uc11c, Clean code\uc758"},"_jetpack_memberships_contains_paid_content":false,"ocean_post_oembed":"","ocean_post_self_hosted_media":"","ocean_post_video_embed":"","ocean_link_format":"","ocean_link_format_target":"self","ocean_quote_format":"","ocean_quote_format_link":"post","ocean_gallery_link_images":"off","ocean_gallery_id":[],"footnotes":""},"categories":[9],"tags":[],"class_list":["post-39","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-clean-code","entry","has-media"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.codeclean.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/39","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codeclean.net\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codeclean.net\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codeclean.net\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codeclean.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=39"}],"version-history":[{"count":0,"href":"https:\/\/www.codeclean.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/39\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.codeclean.net\/blog\/index.php?rest_route=\/"}],"wp:attachment":[{"href":"https:\/\/www.codeclean.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=39"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codeclean.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=39"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codeclean.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=39"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}