2016-04-01ãã1ã¶æéã®è¨äºä¸è¦§
ãã¨ã¿çç£æ¹å¼ã«ã¯ï¼ã¤ã®ã ãã¨ãããã®ãããã¾ããããããã以ä¸ã®ããã«ãªã£ã¦ãã¾ãã ä½ãããã®ã ã æå¾ ã¡ã®ã ã éæ¬ã®ã ã å å·¥ãã®ãã®ã®ã ã å¨åº«ã®ã ã åä½ã®ã ã ä¸è¯ãä½ãã ã ãã¨ã¿çãªèãæ¹ã§ã¯ã製åãå å·¥ãã¦ããä½æ¥ãå¯ä¸ä»å 価â¦
ã½ããã¦ã§ã¢ã¡ããªã¯ã¹ã«ã¤ãã¦èª¿æ»ä¸ã§ããä»æ¥ã¯LCOM*ã«ã¤ãã¦ã LCOM*ã¨ã¯Lack of Cohision in Methodsï¼ã¡ã½ããã®åé度ã®æ¬ é¥ï¼ã示ãã¦ããã以ä¸ã®å¼ã§å®ç¾©ããã¾ãã 1 a âââââ Σ μ( Aj ) - m a j LCOM* = âââââââââââââââââââââââââ 1 - m ããã§â¦
ãªãã¸ã§ã¯ãæåã§ããã°ã©ã ãä½ãã°åå©ç¨æ§ãé«ããªãã¨ããã®ã¯èª¤ãã ã£ãã¨æãããªãã¸ã§ã¯ãæåããã°ã©ãã³ã°ï¼OOPï¼ã«ã¤ãã¦ã®æ¬ãå¼ãã§ããã¨OOPã¯åå©ç¨æ§ãé«ãã¨ãããããªãã¨ãæ¸ãã¦ããããã§ã«çµè«ãåºã¦ãã話ãªæ°ãããããããã¯å¿ â¦
ãã¶ã¤ã³ãã¿ã¼ã³ã®ï¼ã¤Flyweightãã¿ã¼ã³ã¯è¦ããã«Memoization (ã¡ã¢å) ã®ãã¨ã§ããFlyweightãã¿ã¼ã³ã¨ããã¨ä½ã®ãã¨ãè¯ãããããªãã®ã§ãMemoizationãã¿ã¼ã³ã¨èªãã æ¹ãé©å½ãªããã«æãã¾ãã ã¡ã¢åã¨ã¯ãé¢æ°ãè¿ããå¤ãè¦ãã¦ããã¦ãå度åâ¦
ä»æ¥ã¯æ½è±¡ã¯ã©ã¹ã«ã¤ãã¦èãã¦ã¿ãã åã åï¼ ã¯ã©ã¹ã¨ã¯ ååï¼ ã¤ã³ã¿ã¼ãã§ã¤ã¹ã¨ã¯ æ½è±¡ã¯ã©ã¹ã¨ã¯ãå¿ ãç¶æ¿ãã¦ä½¿ããªããã°ãªããªãã¯ã©ã¹ã®ãã¨ã§ãããããæ½è±¡ã¯ã©ã¹Aã«å±ãã¦ãã¦ãAã®ãµãã¯ã©ã¹ã«å±ãã¦ããªããããªãªãã¸ã§ã¯ãã¯ããªãã â¦
ååï¼ã¯ã©ã¹ã¨ã¯)ã¯classã¨ã¯ä½ããèãã¦ã¿ãã®ã§ãä»æ¥ã¯interfaceã«ã¤ãã¦èãã¦ã¿ãã ã¤ã³ã¿ã¼ãã§ã¤ã¹ã¨ã¯ããªãã¸ã§ã¯ãã®ã«ä»ä¸ãããæ§è³ªã®ï¼ã¤ã§ããã ã¯ã©ã¹ã¨ã¯ãåãæ§è³ªãæã£ããªãã¸ã§ã¯ããåé¡ (classification) ãããã®ã§ããåãã¡ã½â¦
classã¨ã¯ãªãããã¨èãã¦ããããã©ãçããã¨ããã¾ã§ã¾ã¨ããã ã¯ã©ã¹ã¨ã¯ãåãæ§è³ªãæã£ããªãã¸ã§ã¯ããåé¡ (classification) ãããã®ã§ãããæ¼¢åã§æ¸ãã¨é¡ã§ããåãã¯ã©ã¹ã«å±ãã¦ãããªãã¸ã§ã¯ãã¯åããããªæ§è³ªãæã£ã¦ãããã¯ã©ã¹ã¯ãâ¦
以åã«ãªãã¸ã§ã¯ãæåã«ãªã£ã¦ãããªãã°ãããã¯ã©ã¹ãç¶æ¿ããã¯ã©ã¹ã¯ç¶æ¿å ã®ã¯ã©ã¹ã¨ç½®ãæãã¦ãåããªããã°ãªããªãã¨ããæ°ä»ãã«ã¤ãã¦æ¸ãã¾ãããååãã¤ãã¦ãã¦ãããã¯ãªã¹ã³ãã®ç½®æååã¨å¼ã°ãããããã§ãã fj.hatenablog.jp ãã®ãªâ¦
ã³ã¼ãã®å質ã®ã¹ã«ã¦ã¿ã¼ãã©ãã«ãä½ããªããã¨èãã¦ãã¦ãã½ããã¦ã§ã¢ã¡ããªã¯ã¹ã«ã¤ãã¦èª¿ã¹ã¦ããã å¤ãè¨äºã§ãããèªãã ã®ã§ã¡ã¢æ¸ãããã Robert Martin, OO Design Quality Metrics. An Analysis of Dependencies https://linux.ime.usp.br/~jâ¦
ãã¶ã¤ã³ãã¿ã¼ã³ã¯ãªãã¸ã§ã¯ãæåè¨èªã ãã®ãã®ã§ã¯ãªããã·ã§ã«ã¹ã¯ãªããã«ããã¶ã¤ã³ãã¿ã¼ã³ã®æ¦å¿µã¯é©ç¨å¯è½ã§ãã Strategyãã¿ã¼ã³ã¨ã¯ãã¢ã«ã´ãªãºã ãåçã«ä»ãæ¿ãããã¨ãã§ãããã¶ã¤ã³ãã¿ã¼ã³ã§ãã ãã®æ¦å¿µã¯æ±ºãã¦ãªãã¸ã§ã¯ãæåã â¦
èå³æ·±ãè¨äºãè¦ã¤ããã Cyclomatic Complexity and Lines of Code: Empirical Evidence of a Stable Linear Relationship http://dx.doi.org/10.4236/jsea.2009.23020 ã³ã¼ãã®è¡æ°(LOC)ã¨å¾ªç°çè¤é度ã«ã¯å¼·ãç¸é¢ãããã¨ã®ãã¨ã ã 循ç°çè¤é度ã¨ã¯ãâ¦
OSã®èµ·åããã»ã¹ã¯ç®ã被ãããã¦ããããã©ããã§ããã ã裸ã®æ¹ãä½ãã©ããªã£ã¦ããã®ãæèã§ãã¦è¯ãã ããã¨æã£ãã®ã§ããã¼ãããã»ã¹ã表示ããããã«ãããä¸æ¹ã§ããã¤ãºã§ãããããã©ãã /etc/default/grubãç·¨éãã¦ã GRUB_CMDLINE_LINUX_Dâ¦