Skip to content

Instantly share code, notes, and snippets.

$ ruby 01.rb
user system total real
0.880000 0.000000 0.880000 ( 0.884170)
0.880000 0.000000 0.880000 ( 0.888569)
@kasei-san
kasei-san / 第二回テスト駆動開発読書感想会議事録.md
Last active February 24, 2018 05:59
第二回テスト駆動開発読書感想会議事録.md

第二回テスト駆動開発読書感想会議事録

リファクタリングとデザインパターンについて

  • デザインパターンを知るキッカケになりそう
  • デザインパターンは知識的に理解しているつもりだが、実践できていない
@kasei-san
kasei-san / テスト駆動開発読書感想会議事録.md
Created November 21, 2017 08:22
テスト駆動開発読書感想会議事録

テスト駆動開発読書感想会議事録

集中

  • TDDは1つのボールに集中する
  • 「割り込みにさらに割り込みしない」は実践したい

TDDというスキル

2 [02/Sep/2016:13:38:35
1 [02/Sep/2016:13:38:36
1 [02/Sep/2016:13:38:37
1 [02/Sep/2016:13:38:38
8 [02/Sep/2016:13:38:49
11 [02/Sep/2016:13:38:50
11 [02/Sep/2016:13:38:51
9 [02/Sep/2016:13:38:52
10 [02/Sep/2016:13:38:53
11 [02/Sep/2016:13:38:54
#!/bin/sh
if [ $# -ne 1 ]; then
echo "usage: $ yomikata git"
exit 1
fi
curl http://yomikata.org/word/$1 2>/dev/null| egrep -o "「([^「]+)」です"
@kasei-san
kasei-san / test.js
Created July 28, 2015 22:46
関数・メソッド・コンストラクタ
function test(){ // 関数
console.log("test");
}
function Animal(type, voice){ // コンストラクタ
this.type = type;
this.bark = function(){ // メソッド
console.log(voice);
};
}
Singleton パターンを用いると、そのクラスのインスタンスが1つしか生成されないことを保証することができる。 ロケールやLook&Feelなど、絶対にアプリケーション全体で統一しなければならない仕組みの実装に使用される
@kasei-san
kasei-san / file0.txt
Created July 28, 2014 22:34
ActiveSupport::Concern と、Module#concerning ref: http://qiita.com/kasei-san/items/c016c626836da09a5a70
関心事、関連、利害関係 など
require "open-uri"
class Titles
include Enumerable
def initialize
@urls = []
end
def <<(url)
@urls << url
# ファイルを生成して、upload するという流れ
class FileUploader # Client
def initialize(factory)
@file_maker = factory.file_maker
@uploader = factory.uploader
end
def make_flie(items)
@file = file_maker.make(item)
end