ãµã¤ãã¼ã°
ããµã¤ãããã£ãã¯ã¹ã¨é¢é£ãããã®ãæè¿ç¥ã£ãã
ãµã¤ãã¼ã°ï¼cyborgï¼ã¯ããµã¤ãããã£ãã¯ã»ãªã¼ã¬ããºã ï¼Cybernetic Organismï¼ã®ç¥ã§ãåºç¾©ã®æå³ã§ã¯çå½ä½ï¼organï¼ã¨èªåå¶å¾¡ç³»ã®æè¡ï¼cyberneticï¼ãèåããããã®ãæãã
ãµã¤ãããã£ãã¯ã¹ã®é¢é£ç¨èªã¨ãã¦ã¯ãèªå·±çµç¹åããã£ã¼ãããã¯ãèªåå¶å¾¡ï¼ãªã¼ããããã¯ããªã¼ãã¡ã¼ã·ã§ã³ï¼ã¨ããã
SFã®ã³ã³ããã¹ãã ã¨ãåä½ã¬ãã«ã§æ©æ¢°ã«ããå¼·åãå°è±¡æ·±ãããã½ããã¦ã§ã¢ã®ã³ã³ããã¹ãã ã¨ããªã¼ã³ã¹ã¿ã¼ãã¢ããã®ãã«ãã»ã¡ã¸ã£ã¼ã»ã©ã¼ã³ãç¶ç¶çããªããªã¼ããTDDããããã¨ãã¦ããä¸ç観ã¯ãâçå½ä½ï¼organï¼ã¨èªåå¶å¾¡ç³»ã®æè¡ï¼cyberneticï¼ãèåâãå¦ã«ãã¾ã説æã§ãã¦ããã¨æãã
ã©ããã¦ããç¶ç¶ããªããªã¼ãTDDãèãã¨ãèªååï¼ã活人åï¼ã®æçã§èªèãããã¡ã ããè¦ã¯ãçå½ä½ï¼organï¼ã¨èªåå¶å¾¡ç³»ãèåããå¦ç¿ãã£ã¼ãããã¯ã«ã¼ããã©ãã ãç¶ç¶ãã¦ç´ æ©ãã¶ãåãç¶ããããã·ã¹ãã ç³»ãè²ã¦ãããããå¼·åã§ããããèã§ããã
Perl More ã§ãã¹ãã®æ¸ãæ¹ãã¹ã¶ã£ã¦ã
åè
http://blog.ainam.me/2013/04/09/test-more-perl-testing/
use strict; use warnings; use Test::More 'no_plan'; subtest "array" => sub { my $subject; my $setup = sub { $subject = [1, 2, 3, 4] }; my $teardown = sub { $subject = undef }; subtest "pop" => sub { $setup->(); my $actual1 = pop($subject); my $actual2 = pop($subject); is $actual1, 4, "é åã®æå¾ã®è¦ç´ ãã¨ãããã¨"; is $actual2, 3, "ç ´å£ã¡ã½ãã"; $teardown->(); }; subtest "shift" => sub { $setup->(); my $actual1 = shift($subject); my $length = @$subject; is $actual1, 1, "é åã®å é è¦ç´ ãã¨ãããã¨"; is $length, 3, "ç ´å£ã¡ã½ãã"; $teardown->(); }; }
package FuzzBuzz; use strict; use warnings; use Test::More 'no_plan'; sub fizzbuzz { my $array = []; for my $number (@_) { push($array, &convert($number)); } return $array; } sub convert { my ($num) = @_; return "FizzBuzz" if($num % 15 == 0); return "Buzz" if($num % 5 == 0); return "Fizz" if($num % 3 == 0); return $num; } subtest "fizzbuzz" => sub{ subtest "fizzbuzzé åã«å¤æã§ãããã¨" => sub { is_deeply(&fizzbuzz(1..15), [1, 2, "Fizz", 4, "Buzz", "Fizz", 7, 8, "Fizz", "Buzz", 11, "Fizz", 13, 14, "FizzBuzz"]); }; }; subtest "convert" => sub { subtest "15ã®åæ°ã¯Buzzãè¿ããã¨" => sub { is &convert(15), 'FizzBuzz'; is &convert(45), 'FizzBuzz'; }; subtest "5ã®åæ°ã¯Buzzãè¿ããã¨" => sub { is &convert(5), 'Buzz'; is &convert(25), 'Buzz'; }; subtest "3ã®åæ°ã¯Fizzãè¿ããã¨" => sub { is &convert(3), 'Fizz'; is &convert(99), 'Fizz'; }; subtest "æ´æ°ãè¿ããã¨" => sub { is &convert(1), 1; is &convert(2), 2; is &convert(4), 4; }; };
ã¡ã¢
- Perl ããåç §ãé åãã¹ã«ã©ã§ãå¤æ°åã®ä»ãæ¹ã®$, @ã¨ãã§è¿·ãããã
- ã¨ã©ã¼ã¬ãã¼ãã®è¦ç·ã®éãå ã®ã«ã©ã¼ãªã³ã°ã俺好ã¿ãããªããªãã
- Test::More ã ã¨ã setup , teardown ãã¹ããã¬ã¼ã ã¯ã¼ã¯å´ã§ãµãã¼ããã¦ãªãããã
- More以å¤ã®é¸æã ã¨ãTest::Classããããããã
Perl ãã
hhh @rrr Perl ã ä¸å¤æ¼¬ã㧠å¦ã¶ãå§ããµã¤ããããã¦ãã ãã¨ãã¹ã kkk 16:06 åãã¦ã®Perl kkk 16:06 http://www.amazon.co.jp/Perl-%E3%83%86%E3%82%B9%E3%83%86%E3%82%A3%E3%83%B3%E3%82%B0-%E3%83%8F%E3%83%B3%E3%83%89%E3%83%96%E3%83%83%E3%82%AF-tokuhirom-ebook/dp/B00A5Q6EM2/ref=sr_1_fkmr1_1?ie=UTF8&qid=1390460320&sr=8-1-fkmr1&keywords=Test+tokuhirom rrr 16:09 ãªã¤ããã®ã¨ã»ã» http://www.tohoho-web.com/wwwperl.htm rrr 16:12 ãã¹ãã¯Test::Simpleã¨ãTest::Moreã¨ã... rrr 16:12 http://gihyo.jp/dev/serial/01/modern-perl/0027 rrr 16:20 å¾ã¯æ¥æ¬èªè¨³ãããå ¬å¼ããã¥ã¡ã³ãã¨ã rrr 16:20 http://perldoc.jp/docs/perl/5.18.1/perlsyn.pod rrr 16:20 http://perldoc.jp/docs/perl/5.18.1/perlref.pod rrr 16:20 http://perldoc.jp/docs/perl/5.18.1/perlsub.pod rrr 16:21 http://perldoc.jp/docs/perl/5.18.1/perldata.pod rrr 16:21 http://perldoc.jp/docs/perl/5.14.1/perlobj.pod rrr 16:21 ããã辺æãã¦ããã°ä¸éãæ¸ããã®ã§ã¯ rrr 16:22 æ£ç´Perlã¯æ¸ãæ¨ã¦ã°ããã§ãã¹ãã¯ãã¾ãæ¸ãããã¨ããªã... ddd 16:22 ãããã¤ã³ã¹ãã¼ã«ã¨ãããããã®ã¯? ddd 16:23 http://dotinstall.com/lessons/basic_perl ddd 16:24 ä¿®è«ã§perl使ã£ããã©ã¾ã£ããæ¶ãã¦ããªã sss 16:25 1997å¹´é ã¯ããªããªPerlæ¸ãã¦ãã®ã«å ¨ç¶è¦ãã¦ãªã... rrr 16:30 è±èªã ãã© http://learn.perl.org/tutorials/ rrr 16:32 http://perl-tutorial.org/ rrr 16:34 ãµã³ãã«ã³ã¼ãã«ããPerlå ¥é 㨠2æéåã§å¦ã¶Perl ã¯ãªããªãè¯ãã®ã§ã¯ rrr 16:35 ä¸ãã¼ã¸ã«ã¿ã£ããè©°ã¾ã£ã¦ã¦ã¡ãã£ã¨ããã ãã© http://qntm.org/files/perl/perl_jp.html rrr 16:35 ãã£ã¡ã®æ¹ã話é¡ãåºãã£ã¦ã¦ãããã http://d.hatena.ne.jp/perlcodesample/30000101/1361667605 rrr 16:42 å¤å°è¤éãªãã¼ã¿ãæ±ããªããã¹ã«ã©ãé åãããã·ã¥ããªãã¡ã¬ã³ã¹ã«ã¤ãã¦ç解ãæ·±ããå¿ è¦ã rrr 16:46 ãªãã¸ã§ã¯ãæåã¯æãªããã®æ¸ãæ¹ã ã¨ã¡ãã£ã¨ããããããæãã«ãªãã¾ã rrr 16:48 https://github.com/hatena/Hatena-Textbook/blob/master/oop-for-perl.md rrr 16:49 ããã«æ¸ãã¦ãããã¨ãæããããããã«ãªãã°è¯ããããªæ°ããã¾ã rrr 16:51 ãã®ã£ã¼ã³ https://github.com/hatena/Hatena-Textbook/blob/master/test-for-perl.md
flickr 㧠6000views è¶ãåçãåºã¾ããï¼
çæéã«ï¼ã¤ãã
- http://www.flickr.com/photos/haru01/11645322756/
- http://www.flickr.com/photos/haru01/11772366635/
- http://www.flickr.com/photos/haru01/11686613164/
Explore ã«é¸ã°ããã¨æ¥æ¿ã«ä¼¸ã³ãããã§ãã
å人çã«ã¯ããããããããï¼ï¼ï¼ãã®åçã§ã¯ãªãã®ã ããã©ã
ããã§ããããããã¼ãã¹ã溶ãããç²æãããã¾ããã
æè¿ã®å¶ç¶ã®çºè¦
æè¿ã®å¶ç¶ã®çºè¦ã¯ããããª
- æ¨å¹´ã®POç ä¿®ãå¹´æ«ã®kkdã¨ã®é£²ã¿ä¼ãç«æã®é£²ã¿ä¼ã§å¦ã«ã価å¤ãã®è¨èãæ°ã«ãªã£ã¦ããã
- ãªãã ãã©åãç¥ããããï¼ä½¿ãæãè²·ãæã«ã¨ã£ã¦ã®ä¾¡å¤ã§ã¯ãªãã¦ï¼ãä½ãæã使ãæãè²·ãæãæè³ãã人ãããããã«ã¨ã£ã¦ã®ã価å¤ããï¼ã¤ã®å俵ã§èªãã«ã¯ã©ããããã ãã㨠(ãã¤ã¢ãã¼ã°ã®èªæ¸ã®ä½é»ãã¾ã¡ã¥ããã®ã¯ã¼ã¯ã®ä½é»)
- ....
- åªå
ã¥ããããããã¯ãã°ã®ä»£ããã«ãåªå
ã¥ããããè¦ä»¶å®ç¾©æ¸ãã£ã¦ããããªã¼ã¨ã½ãã¼ã¨æã£ã¦ Googleæ¤ç´¢
- ãè¶ ä¸æµããæ»ããããããã®ãªã³ã¯ãã¯ãªãã¯ãï¼æ®æ®µãªããè¶ ä¸æµããªãã¦ãªã³ã¯ã¯ã¯ãªãã¯ããªããªãï¼
- ãã¡ã¤ã«ã®é£çªã§å¥ã®ãã¡ã¤ã«ãããããï¼é©å½ããï¼
- ãhttp://www.ipa.go.jp/files/000004482.pdf 9pãã®çµµãè¦ã!!
- ç´æ¥ã使ããã¨ããããªããã©ãããããªãã¬ã¼ã¤ã¼ãããä¸ã§ ã価å¤ããï¼ã¤ã®å俵 èªãéã大ããªãã³ãã«ãªãããã¨æã£ãã
- ï¼åªå ã¥ããããè¦ä»¶å®ç¾©æ¸ã¯æ¤ç´¢ã®ãã£ããï¼
ç´æçã«ã¯ã2ãã3軸ã®ä¾¡å¤åºæºã®çµµãçµå¶ç®æ¨ã®éæ度åãããªã¼ã³ãã£ã³ãã¹ã®æµ·è³ææ¨ã®æ¨ç§»ãCode Climate ã®è¨ºæçµæã®æ¨ç§»ãï¼ã¤ã®ããã·ã¥ãã¼ãä¸ã«è¡¨ç¤ºããã¦ãããããªãã¬ã¼ã¤ã¼ãè²ã æè¦ãè¨ã£ã¦ãã½ããã¦ã§ã¢ãã¤ãã£ã¦ãããã ã¨æãã
ãã¬ã¼ã¤ã¼ã¨ãã¦ã
ãã¸ãã¹ä¸ã®ã¢ã¸ãªãã£ã¨ã³ã¼ãã®ã·ã³ãã«ãã®ç¸é¢é¢ä¿æ§ã表ãä½ãã欲ããã
ãªããªãããããæ¬ è½ããã¨
- ã³ã¼ãã®ã·ã³ãã«ããç¡è¦ããããã¸ãã¹ä¸ã®ã¢ã¸ãªãã£ã®è¿½æ±ã¯ããããã¹ãã²ãã£ã³ã¼ããå¶ç´ã¨ãªãããµã¼ãã¹(ãã¸ãã¹)ã®æé·ã®éçã¨ç¸®å°ã«åãã£ã¦ãã¾ããããï¼äººå¡ã®è¿½å ã¯ãã³ã¼ããããã«è¤éã«ãã¦ãä¸é·æçã«ã¯ç¶æ³ãæªåããããï¼
- ãã¸ãã¹ä¸ã®ã¢ã¸ãªãã£ãç¡è¦ããã³ã¼ãã®ã·ã³ãã«ãã®è¿½æ±ã¯ãå¿ è¦ã¨ããã¦ããªããã®ãã¤ãã¦ãã¾ãããã
ã»ã¬ã³ãã£ããã£ã¨ ãªã¼ã³ã»ã¹ã¿ã¼ãã¢ãããTDD
kkd ç´¹ä»ã§ãä¸è¨ã®è¨äºã ãèªãã ãæ¬ã¯ã¾ã ã
http://1000ya.isis.ne.jp/1304.html
ä½ãã夢ä¸ã«æ¢ãã¦ããã¨ã
æ°ããªçºè¦ã«åºä¼ããã¨ãããã
å¶ç¶æ§ã¨å¯ç¥ã®è½åãã©ããã§çµã³ã¤ãã¨ãã
æ°ããªåµé æ§ãçºæ®ããããã¨ãããã
ãããã»ã¬ã³ãã£ããã£ã§ããã
ã»ã¬ã³ãã£ããã£ãèªåãæè¿ã¤ãã£ãã³ã³ãã³ãã ã¨ãäºæãã¬é©ãã®çºè¦ãã®è¨èã«è¿ãã
人ã«ãã£ã¦ã¯ãå°ããªå¤±æãç¹°ãè¿ãããã©ã¤ & ã¨ã©ã¼ã®è¨èã¨è¿æ¥ããã ããã
ã»ã¬ã³ãã£ããã£ã¨ ãªã¼ã³ã»ã¹ã¿ã¼ãã¢ãããTDDã¨ã¯è¿ãç¨èªã ã¨äºæã¯ãã¦ããã
ï¼ã»ã¬ã³ãã£ããã£ã¯ãä¸æè°ç³»ã¨ãè¿åã«ããã®ã§ãç©æ¥µçã«ã¯ä½¿ãã¥ãããï¼
ãªã¼ã³ã¹ã¿ã¼ãã¢ãã ã TDDã¯ãï¼äºæ¸¬å¯è½æ§ãé«ãããã¨ã«ä¾¡å¤ãç½®ã代ããã«ï¼
åä½æéãããã®å¶ç¶ã®çºè¦æ°ï¼äºæãã¬é©ãã®çºè¦ã»å¦ã³ã®æ°ï¼ãé«ãããã¨ã«ä¾¡å¤ãç½®ãã¦ããã
åä½æéãããã®å¶ç¶ã®çºè¦æ°ãå¢ããããããªã¼ã³ã»ã¹ã¿ã¼ãã¢ãããTDDã§ã¯ã
å¦ç¿ãã£ã¼ãããã¯ã«ã¼ããå°ããããã¡ã«ããºã ãæ示ãã¦ããã¦ããã
é«éå転ããå¦ç¿ãã£ã¼ãããã¯ã«ã¼ãï¼ä½ãã夢ä¸ã«æ¢ãã¦ããæ§ï¼ã§ãæ°ããªåµé æ§ãçºæ®ãããï¼ã¯ãï¼ã
æ¬æã§ã¯ããã©ã³ãã¼ã®æé»ç¥ã®ãåºã¦ãããããã©ã³ãã¼ã®èªãæé»ç¥ã«ã¯ã
ç§å¦ã®æªç¥ã®ã¨ãªã¢ãéæãã¦ãããã¨ããã¡ã«ããºã ãã¹ã³ã¼ãå
ã§èªããã¦ããããã§ãããã
ãã¿ã¼ã³ããã¼ãã«ã«ãã£ã¼ã¨ã®ã¤ãªããã¯ãå°ã ãã¾ã¡ãã
æ¨æ¶ã®åé¡ãã¿ãã
https://codeiq.jp/magazine/2013/11/1475/
ãèªãã ã
å¼æ°ã¯å¥½ãã GOOSç®ç·ã ã¨, JMock ã使ã£ã¦ãï¼æ½è±¡åº¦ã®ä½ããæéãèªä½ãã¢ãã¯ãããããªãã¦ï¼GOOSã§ã¯ãåºæ¬ã©ã¤ãã©ãªã¼ãã¢ãã¯ã»ã¹ã¿ãã§å·®ãæ¿ãããã¨ã«å¦å®çãï¼ï¼
ãæ¨æ¶ãã¨åãæ½è±¡åº¦ï¼ãã¡ã¤ã³ç®ç·ã«åããã¦ãæéãããä¸æ®µæ½è±¡åº¦ãä¸ãã¦ãæï¼æ¼ï¼å¤ããå¤å®ãããã¼ã«ï¼ååã¯ããããï¼ï¼ çºè¦ãã責åãåé
ãã³ã©ãã¬ã¼ã·ã§ã³ãã¦ãããããã¨ãå®ç¾ããã®ããã¼ããããã¡ãã»ã¼ã¸ï¼ãã¼ã«ãä¸å¿ã«æããOOè¨è¨ã ã¼ã¨ãè¨ãããã
ãæï¼æ¼ï¼å¤ãã®æ¦å¿µãå¤ããã°ãä¿®æ£ç®æã¯ãæ°ããçºè¦ãããã¼ã«ã§å¯¾å¦ããã
å®æ¥åã ã¨ããã¶ããããªããã©ã æéãå·®ãæ¿ã㦠stub ã timecop ã§æ¸ã¾ããããããªããããã
ææ¼å¤ã®å¤æã»å¤å®ãè¤æ°ç®æã§åºãã¨åãã£ã¦ããDRYååã§æ½åºããããããªããããã
-
- -
æã®å ´åãããã¯ãããããã¾ãã
æ¼ã®å ´åããããã«ã¡ã¯ã
å¤ã®å ´åããããã°ãã¯ã
-
- -
ãå®ã´ã¼ãã¬ãã«ã§åºã¦ã»ããæ°åã
ä¸è¬ã®æéã®æ¦å¿µã¬ãã«ãããªãã¦ããã¡ã¤ã³ã¬ãã«ã®æéã®æ¦å¿µã«æ½è±¡åº¦ãä¸ãã¦ãã¤ãã£ããã¨ã¯ãªããªã
åå ããã°è¯ãã£ãã