éå§ãã
ãŽã¡ã¬ã©ã¯ ãäžå€®ã¢ãžã¢ã®1ã€ã®å€§åœã«ãã1ã€ã®å€§èŠæš¡ITäŒç€Ÿã§ããŒã ãªãŒããŒãšããŠåããŠããŸãã ä»äºã«ã¯ããã€ãã®å€§ããªãããžã§ã¯ãããããããŒã±ãã£ã³ã°ããã³è²©å£²ã®ã¹ãã·ã£ãªã¹ãã®èŒãããé¡ããå€æãããšããããã¯ããã«ãã£ãšå€§ãããªããŸãã åãèãã§ãValeraã¯ãã¯ãã«ã«ãã£ã¬ã¯ã¿ãŒããåãåã£ãäŒè°ãžã®æåŸ ã«ãã£ãŠä¿ãããŸãã äŒè°ã®ããŒãã¯ãæè²ã·ã¹ãã ã®æ¹åæ§ãæ¡å€§ããããšã§ãã
ç¿æãäž»èŠã¹ã¿ãããäŒè°å®€ã«éãŸããŸããã ãã¯ãã«ã«ãã£ã¬ã¯ã¿ãŒïŒåœŒã«ãŸã æ £ããŠããªã人ã®ãã-圌ã®ååã¯ã€ãŽã¡ã³ïŒã¯ããã«è³ªåã®æ žå¿ã«è¡ããŸããã ãåç¥ã®ããã«ããã°ããåã«ãåžå Žã§ã®ãã¬ãŒã³ã¹ãæ¡å€§ãããšããç®æšãèšå®ãããã®ããã«æ°ããå¶æ¥æãéèšããŸããã ãããã£ãŠããã®æŠç¥ã¯ããŸããããŸããã 1ãæã§ãé éæè²ãã©ãããã©ãŒã ã®éçºãšå®è£ ã«é¢ããå¥çŽã«çœ²åããŸãã ãã®ãããžã§ã¯ãã¯éåžžã«èå³æ·±ãã§ãããããã«ã€ããŠã¯ãŸã ããã§ã¯ãããŸããã ãããåŒãåºãã«ã¯ãæè²ã·ã¹ãã ã®æ¹åã«æ°ããããŒã ãæ¥ãå¿ èŠããããŸããã
ãã¹ãªããïŒããŽã¡ã¬ã©ã®é ããå ããŸããã 圌ã¯ãåžå Žã«ç¡æã®éçºè ãã»ãšãã©ããªãããšãæ確ã«ç解ããŠããã1ãæåŸã«ã¯é©åãªéãèŠã€ããããšã¯ã»ãšãã©äžå¯èœã«ãªããŸãã 圌ã¯ãããã®èããååãšå ±æããŸããã ãã°ããè°è«ããåŸãäŒè°ã®åå è ã¯æ¬¡ã®æ±ºå®ã«è³ããŸããã ä»ã®3人ã®åŒ·åãªå°é家ã¯ãæ°ããæ¹åã§ä»ã®ããŒã ãšåºå¥ãããŸãã ã€ã³ã¿ãŒã³ã¯ãã¹ãŠã®ããŒã ã«åãå ¥ããããŸã-æšæ¥ã®åŠçãŸãã¯åŠéšçã¯èšç·Žãåããå¿ èŠããããŸãã ãã¹ãŠã®ãããžã§ã¯ãã®çŸ©åã圱é¿ãåããªãããã«ãè¿ éã«èšç·ŽããŠãã ããã Valeraã¯ãæ°ããããŒã ã®ããŒã ãªãŒããŒã«ãªããŸãã 解決ãããŸããã
2é±éåŸãè¥ãç·ããããããªããæ°ããããŒã ã®æ°ãããªãã£ã¹ã«å ¥ããŸããã 圌ã¯ãŽã¡ã¬ã©ã®ããŒãã«ã«è¡ãããYerzhanã¯ããªãã®ç ä¿®çã§ãããšèªå·±çŽ¹ä»ããŸããã ãŽã¡ã¬ã©ã¯ã以åã¡ãŒã«ã§ãã察å¿ããŠããªãã£ãç·æ§ãæåã«èŠãŠãã¿ã¹ã¯ãäžãã解決çã確èªããŸããã ãããŠã圌ã¯äŒç€Ÿã®æãéèŠãªãããžã§ã¯ãã®1ã€ã§é·ãéåããªããã°ãªããŸããã
ã座ã£ãŠããç§ãã¡ã®ããŒããŒã¯æ€ åã«åãã£ãŠæãæ¯ã£ãã åœç€Ÿã«ã¯ãåã€ã³ã¿ãŒã³ã«ã¡ã³ã¿ãŒãä»ãããšããã«ãŒã«ããããŸãã ç ä¿®çã課é¡ãå®äºããã®ã«åœ¹ç«ã¡ãäœãã©ã®é åºã§å匷ãããã«ã€ããŠã®æšå¥šäºé ã瀺ããŸãã äžè¬çã«ãç§ã®ä»äºã¯ç§ãèªåèªèº«ãç¥ã£ãŠãããã¹ãŠãããªãã«äŒããããšã§ãã ãã¹ãŠã®è³ªåã§ç§ã«é£çµ¡ããŠãã ãããã ã€ãŒãžã£ã³ã¯åŸ®ç¬ãã ïŒãã¹ãŒããŒïŒ ããã¯ç§ãç©äºã®ã³ãŒã¹ã«äœåãæ©ãå ¥ã蟌ã¿ãå®éã®åé¡ã解決ãå§ããã®ã«åœ¹ç«ã€ãšæããŸããã ãŽã¡ã¬ã©ã¯ããã®ç·ã«ã¯æ£ããåæ©ããããšèªåã«èšãèãããŸããã
åæ©ä»ãã«ããåæ©ä»ãã§ãããValeraã¯ãæ°é±éã®ãã¡ã«ãåœå ã®æè²ã·ã¹ãã ã«æ©ãŸãããŠããç·æ§ããåé¡ãèªåã§è§£æ±ºã§ããããã«ããæ¹æ³ãç解ããå¿ èŠããããŸããã ãããŠãããããå¹ççãã€æééãã«è§£æ±ºããŸãã ãããè¡ãã«ã¯ãValeraãé·å¹Žã«ããã£ãŠãã£ãªã¢ãç©ãã§ãããã¹ãŠã®çµéšãäœç³»åãããããç ä¿®çã«è¿ éã«äŒããããšããå¿ èŠããããŸãã ã¿ã¹ã¯ã¯ç°¡åã§ã¯ãããŸãããã䟡å€ããããŸãã 誰ããåŸã§ããã«ã€ããŠæ¬ãæžãã§ãããã
ããããäžè¬çã«ãäœã«éäžããã®ã§ããããïŒ æªãããã°ã©ããŒãšè¯ãããã°ã©ããŒã®éãã¯äœã§ããïŒ åžžã«æ¥ç¶ããã¹ããŒã¿ã¹ã远跡ããã³ãŒãã®ååãæžãçŽããã¹ããŒãã¡ã³ããããäžæ¹ã«äŒãã詳现ã説æããããžãã¹ã«ã€ããŠå·éã«è¡ããªããã°ãªããªãããšãç¥ã£ãŠãäžæ¹ã«ã¿ã¹ã¯ãäžããããšãæããã®ã¯ãªãã§ããïŒ ãã®ãã¡ã®1人ã¯ããã°ã©ãã³ã°èšèªãããç¥ã£ãŠããŠããã1人ã¯ããŸããããªãã§ããããïŒ ããããããã§ã¯ãããŸããã ãŽã¡ã¬ã©ã¯ãããã°ã©ãã³ã°èšèªã«é¢ããè€æ°ã®æ¬ãç 究ããããåçŽãªã¢ããªã±ãŒã·ã§ã³ãèšèšããããšãã§ããªãã£ã人ã ãååã«èŠãŠããŸããã åŸ ã£ãŠãã ãã...ãã¶ã€ã³...ããã«ãããŸãïŒ åªããéçºè ã¯èšèšã§ããªããã°ãªããŸããã ãããŠããã®ã¹ãã«ã®éçºã¯æåã«éäžããªããã°ãªããŸããã
次ã«ããããã€ãŒãžã£ã³ã«äŒããå¿ èŠããããŸãã ãŽã¡ã¬ã©ã¯äºæããéå§ããŸããïŒãèŠä»¶ã¯åžžã«å€ãããŸããã 圌ã®å¯Ÿè«è ã®é©ãã®è¡šæ ãèŠãŠã圌ã¯ç¶ããŸããããéçºè ãšããŠã®ããªãã®äž»ãªä»äºã¯ãäœæãããã·ã¹ãã ã®ãŠãŒã¶ãŒã®èŠä»¶ãå®è£ ããããšã§ãã ãã®ããããŠãŒã¶ãŒã¯éåžžã«é¢šã匷ãçãç©ã§ãããå¿ èŠãªãã®ãããã«ã¯ããããŸããã ã·ã¹ãã ã®æåã®ããŒãžã§ã³ã確èªããŠåããŠãèŠä»¶ãæ確ã«ãªãå§ããå€ãã®å Žåå€§å¹ ã«å€æŽãããŸãã ãŸããæ©èœãç°ãªãããã«åäœããã¯ãã ãšããããã³ã«æºè¶³ã§ããããã«ã³ãŒããæžãå¿ èŠããããŸãã äœæããèšèšã«ããããããã®èŠä»¶ãç°¡åã«å®è£ ã§ããã·ã¹ãã ãå°ãè¯ããªãããã§ããã
ãŽã¡ã¬ã©ã¯ãé©åãªèšèšãéåžžã«éèŠã§ããçç±ãYerzhanã«èª¬æããã®ã«ããå°ãæéãè²»ãããŸããã 圌ã¯ããã£ãªã¢ã®åæ段éã§ãèšèšãäžååãªã·ã¹ãã ãã©ã®ããã«äœ¿çšãããã«ã€ããŠè©±ããŸããã ãããã®ããããªå€æŽã§ãããããŒã å šäœã§ãããã¯ãåŒãèµ·ãããŸããã çµå±ã®ãšããããã®å€æŽåŸã«ã·ã¹ãã ãç Žæããå Žæã誰ãç¥ããŸããã§ããã ãããŠããã¹ã¿ãŒãæ éãå ±åããã®ã¯è¯ãããšã§ãã ããžãã¹ãŠãŒã¶ãŒããããå ±åããç¶æ³ã¯ããŽã¡ã¬ã©ã®æã楜ããæãåºã«å±ããŠããŸããã§ããã
Valeraã®èŠçŽïŒãæ°é±éã§éçºãéå§ããã·ã¹ãã ã¯ã倧ããè€éã§ãã ãããŠãããªãã¯ããã«åº§ã£ãŠãã°ãä¿®æ£ããããšã¯ãããŸããã ããªãã¯éçºã®æ¬æ Œçãªåå è ã«ãªããŸãã æè»ãªãªããžã§ã¯ãæåèšèšã®äžçã«é£ã³èŸŒãæºåãããŠãã ãããã ããã€ã§ãæºåãã§ããŠããŸãïŒãäžéšã®æ ç»ã§èããããã¬ãŒãºã¯ããžã§ã«ãžã£ã³ã®æœåšæèããé£ã³åºããŸããã 圌ã¯ãŸããããã§ããã奜ãã«ãªãå§ãããšæã£ãã
åæ¥ã æåã®çå®
ç¿æ¥ãYerzhanãè·å Žã«æ¥ããšãã圌ãæåã«ç®ã«ããã®ã¯ã¢ãã¿ãŒã®è¿ãã«ãã2åã®æ¬ã§ããã Stephen McConnellã®ãPerfect CodeããšRobert Martinã®ãPerfect Programmerãã Valeraã«ãããã®æ¬ããªãããŒãã«ã«èŒã£ãŠããã®ãã説æããããã«é Œã¿ã圌ã¯çããŸããããæåã®æ¬ã¯è¯ãã³ãŒãã®å質ã«ã€ããŠèªã£ãŠããŸãã 2çªç®ã®æ¬ã¯ãåªããããã°ã©ããŒã®è³è³ªã«ã€ããŠèªã£ãŠããŸãã 圌ãã¯ãäºããå®å šã«è£å®ããŠããããã«æããŸãã äžæ¹ãä»æ¹ãªãã§ã¯ååšã§ããŸããã ãããã®æ¬ãèªãã åŸãéçºãå€§å¹ ã«å éã§ããŸãã ããã«ãè¯ãæ¬ã¯åºæ¿ãäžããŸãã æåã®ããã«éèŠã§ããã
æ¬ãçµããåŸããŽã¡ã¬ã©ã¯åœŒããéçºããã·ã¹ãã ãç°¡åã«èª¬æããŸããã å°ãåãæè²çã¯é éæè²ç 究æãèšç«ããæè²ãµãŒãã¹ã®æäŸã®ããã®æ°ããã¢ãã«ã®éçºãä»»ãããŸããã ãã®çµæãããŸããŸãªå€§åŠã®æåž«ãã³ãŒã¹ãå ¬éããåŠçãã«ãªãã¥ã©ã ã«åºã¥ããŠå¿ èŠãªã»ãããéžæãããšãããµã€ãã®ã³ã³ã»ãããçãŸããŸããã åæåž«ã¯ãã³ãŒã¹ãå®äºããããã®äŸ¡æ Œã瀺ããŸãã ãããŠãåŠçã¯ãäŸ¡æ Œãšå質ã®æ¯çã«åºã¥ããŠãèªåã«æé©ãªãªãã·ã§ã³ãéžæããŸãã ç 究æã¯ããã®ã¡ã«ããºã ãæåž«éã®ç«¶äºãåºæ¿ããäžè¬ã«é éæè²ã®è³ªãåäžããããšæ³å®ããŠããŸãã
ããããŠãåœç€Ÿã¯ãã®ã¢ãã«ãç«ã¡äžããããã®ãã©ãããã©ãŒã ãéçºããå¿ èŠããããŸããããšValeraã¯èª¬æãç¶ããŸããã çãè°è«ã®åŸãååã¯ããããå®äºããã¿ã¹ã¯ãæ€èšŒããããã®ã¢ãžã¥ãŒã«ã«ãªãããšã決å®ããŸããã
Yerzhanã®ã©ãããããã¯ãå¿ èŠãªããŒã«ããã¹ãŠã€ã³ã¹ããŒã«ããæè¡ãµãŒãã¹ã¹ãã·ã£ãªã¹ããææããŠããŸãã 圌ãã¯ææ¥ã ããããäžããã®ã§ãValeraã¯ç¹å®ã®ã¿ã¹ã¯ã®è©³çŽ°ãè°è«ããã®ã§ã¯ãªãããã¹ãŠã®ããã°ã©ããŒãç解ããå¿ èŠãããããšãYerzhanã«äŒããããã«ä»åã䜿çšããããšã«ããŸããã ãããŠã圌ãããããããæ©ãç解ããã»ã©ãããè¯ãã§ãã
ãŽã¡ã¬ã©ã¯ãããªããžã§ã¯ãæåããã°ã©ãã³ã°ãšã¯äœããããã¯äœã®ããã«çºæãããã®ãããšãããæ°ã«å ¥ãã®è³ªåããå§ãŸããŸãããã€ãŒã¶ã³ã¯è³ªåã®åçŽãã«é©ããããã«çããŸããã ãªããžã§ã¯ãæåããã°ã©ãã³ã°ã䜿çšãããšãå®éã®ãªããžã§ã¯ããã³ãŒãã§èšè¿°ã§ããŸãã è»ããããè»èŒªããã®ä»ã®ã¡ã«ããºã ããããšããŸãã ãé©åãªã¯ã©ã¹ãäœæããããã䜿çšããŠè»ãé転ããããã°ã©ã ã§äœ¿çšã§ããŸããã
ãŽã¡ã¬ã©ã®æ代ãæ¥ãŸããããããªãã®è©±ã¯çå®ã§ãã ããããããã¯ãã€ã³ãã§ã¯ãããŸããã å®éãOOPã®äž»ãªç®æšã¯è€éããå æããããšã§ãã æå³ã説æããŸãã OOP以åã¯ãäž»èŠãªéçºã¢ãã«ã¯æç¶ãåããã°ã©ãã³ã°ã§ããã ããããã·ã¹ãã ãããè€éã«ãªããšãæç¶ãåã®ã¢ãããŒãã¯æ»ãå§ããŸããã ã³ãŒãã®ä¿å®ãšéçºã¯éåžžã«æéãããããŸããã ãŸãããã¹ãŠã®æé ã§ã¯ãã·ã¹ãã ã³ã³ããŒãã³ããçžäºã«é©åã«åé¢ããããšãã§ããªãã£ãããã§ãã äžéšã®æé ã®å€æŽã¯ãä»ã®æé ã®åäœã«åœ±é¿ãäžããŸããã OOPã¯ããã®åé¡ã解決ããããã«èæ¡ãããŸããã ãªããžã§ã¯ãã¢ãããŒãã䜿çšãããšãããã°ã©ã ãç¬ç«ããåé¢ãããã³ã³ããŒãã³ãã«åå²ã§ããŸãã ãããŠã1ã€ãå€æŽããŠãä»ã®äººã®è¡åã«ã¯åœ±é¿ããŸããã ããã«ã人éã®è³ã¯éåžžã«åŒ±ããããæç¹ã§ã·ã¹ãã å šäœãã«ããŒããããšã¯ã§ããŸããã ãŸãããã®ã¯ã©ã¹ã䜿çšãããšãã·ã¹ãã ã®å¥ã®éšåã«éäžãããããç解ããŠæäœã§ãããããã¿ã¹ã¯å šäœã®è€éãã軜æžãããŸãã
å°ãèããŠã圌ã®æåã®ãããžã§ã¯ããæãåºããåŸãValeraã¯æ¬¡ã®ããã«ä»ãå ããŸããã ä»éãããã¹ãŠã®åé¡ãæ±ããªãããåãCïŒã§å®å šã«æç¶ãåã®ã³ãŒããèšè¿°ãããŠããã®ãèŠãŠããŸããã ãªããžã§ã¯ãæåããã°ã©ãã³ã°ãšãªããžã§ã¯ãæåèšèšãç解ããããããæ£ãã䜿çšã§ããããã«ããå¿ èŠããããŸãã ãã®åŸãããªãã¯å¹žãã§å®ãå€ããã£ãªã¢ãæã¡ãŸãã ãããŠãä»ã§ã¯OOPã®ã¿ã䜿çšããŠãããšã¯æããªãã§ãã ããã ä»ã®ã¢ãããŒããããããããããç¬èªã®åéã§äœ¿çšãããŠããŸãã ããããç§ãã¡ã«ãšã£ãŠããšã³ã¿ãŒãã©ã€ãºã·ã¹ãã ã®éçºè ãšããŠãOOPã¯éåžžã«éèŠã§ããã
OOPããå§ããŠã次ã®è«ççãªã¹ãããã¯ãYerzhanã«åŒ±ãçµåïŒãŸãã¯è±èªã®çšèªã䜿çšããããã®ççµåïŒãäŒããããšã§ããã ã¯ã©ã¹ã䜿çšãããšãã·ã¹ãã ã³ãŒããå¥ã ã®éšåã«åå²ã§ããŸã-ããã¯è¯ãããšã§ãã ãããããããã®éšåãäºãã«ã€ããŠã§ããã ãç¥èãæãããå¯èœãªéãç¬ç«ããŠããããšãããã«éèŠã§ãã ããã¯ã©ã¹ã§ã®å€æŽã¯ãå¥ã®ã¯ã©ã¹ã«ã¯åœ±é¿ããŸããã ããã«ãã·ã¹ãã ã¯ããã°ã©ããŒã®ããŒã ã«ãã£ãŠäŸ¿å©ã«éçºããããããã®éã«ç¬ç«ããã³ã³ããŒãã³ããé åžããŸãã 匱ãåéåã¯ãç§ãã¡ãå¿ ãåªåããªããã°ãªããªãå質ã§ãã ãããããããè¡ãããšã¯èŠãç®ãããå°é£ã§ãã ã·ã¹ãã ã³ã³ããŒãã³ãéã®æ¥ç¶ã¯ãæ瀺çãšæé»çã®äž¡æ¹ã§ãããŸããŸãªåœ¢ã§çŸããŸãã
説æã«ãã°ããæéãè²»ãããåŸããŽã¡ã¬ã©ã¯ã€ãŒãžã£ã³ã®ç©æãã«æ²ãã é¡ãèŠãŠãå®å¿ãããããšæ¥ãã§èšããŸããããç§ã話ããŠããããšãå®å šã«ç解ããŠããªããŠãå¿é ããªãã§ãã ããã åŒç€Ÿã¯æè»ãªéçºææ³ã®ãã¡ã³ã§ãããèšèšã«ãããŠãåãã¢ãããŒããæ¡çšããŠããŸãã ææ¥ããå®éã®ã¿ã¹ã¯ãéå§ããåŸã ã«ã¹ãã«ã磚ããŸãã ãããŠä»æ¥ã§ã¯ãçè«ã¯ååã§ãã ããªãã£ã¹ãæ©ããŠãããã§ãã¹ãŠãã©ã®ããã«é 眮ãããŠãããã確èªãã人ã ãšç¥ãåãããšããå§ãããŸããã
Yerzhanã¯Valeraã®ã¢ããã€ã¹ãæ¥ãã ã 圌ã¯æ®ãã®æéãæ°ããååãšã®ã³ãã¥ãã±ãŒã·ã§ã³ã«è²»ãããŸããã ãããŠã圌ãã®ããããã¯ãYerzhanã«æ°ããæ å ±ã®äžéšãäžããŸããã ããã§åœŒã¯ããªããžã§ã¯ãæåèšèšã®åºæ¬ååã説æããéæ³ã®ç¥èªSOLIDãããããšãåŠã³ãŸããã ãŸããè³¢ã人ã ãããŸããŸãªããã°ã©ãã³ã°ã®åé¡ã解決ããããã®æ¢è£œã®ã¬ã·ããæãã€ããããšãããããŸãã ãããã¯ãã¶ã€ã³ãã¿ãŒã³ãšåŒã°ããŸãã ãã¡ãããYerzhanã¯ããã«ã¯ããŸãç解ããŸããã§ããã圌ã¯ããããã¹ãŠç解ããã¯ãŒã«ãªãœãããŠã§ã¢ã®æžãæ¹ãåŠã³ãããšãã匷ãé¡æãæã£ãŠããŸããã
ã ãã圌ã®æ°ããäŒç€Ÿã§ã€ãŒãžã£ã³ã®æåã®æ¥ãéããŸããã æèšã18æã瀺ããåŸã圌ã¯ååã«å¥ããåããŠå®¶ã«åãããŸããã ãããæ°ååŸã圌ã¯æ»ã£ãŠããŠãããŒãã«ãããå®ç§ãªã³ãŒãããæŸãäžããåã³æãæ¯ã£ãŠãªãã£ã¹ãåºãŸããã
ç¶ç¶ããã«ã¯...
PSããã¯ãããŒã ãªãŒããŒValeruãã€ã³ã¿ãŒã³Yerzhanãããã³æè»ãªèšèšã«é¢ããäžé£ã®èšäºã®æåã®èšäºã§ãã 次ã®èšäºã§ã¯ãYerzhanãèŠä»¶ãå®è£ ããå€ãã®ã³ãŒããèšè¿°ããåæã«æè»ãªãªããžã§ã¯ãæåèšèšã®åçãç 究ããåä»ãªéã«ã€ããŠèª¬æããŸãã
PPSãŽã¡ã¬ã©ã«é¢ããæåã®èšäºã¯ããã«ãããŸã ã
PPPSå®åšã®äººç©ãã€ãã³ããšã®äžèŽã¯ãã¹ãŠæ¶ç©ºã®ãã®ã§ãã