Log LinQ SQL to vs debug output
DataContext.Log = s => Debug.WriteLine(s);MSBuild with config
http://stackoverflow.com/questions/721173/msbuild-task-configuration-property
http://msdn.microsoft.com/en-us/library/dd465318(v=vs.100).aspx
Log LinQ SQL to vs debug output
DataContext.Log = s => Debug.WriteLine(s);MSBuild with config
http://stackoverflow.com/questions/721173/msbuild-task-configuration-property
http://msdn.microsoft.com/en-us/library/dd465318(v=vs.100).aspx
| UIBarButtonItem *barButton = [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonItemStyleDone target:textField action:@selector(resignFirstResponder)] autorelease]; | |
| UIToolbar *toolbar = [[[UIToolbar alloc] initWithFrame:CGRectMake(0, 0, 320, 44)] autorelease]; | |
| toolbar.items = [NSArray arrayWithObject:barButton]; | |
| textField.inputAccessoryView = toolbar; |
| sudo /Applications/Install\ OS\ X\ Mavericks.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled --applicationpath /Applications/Install\ OS\ X\ Mavericks.app --nointeraction |
| sudo unlink /usr/bin/cc | |
| sudo ln -s /usr/local/bin/gcc-4.2 /usr/bin/cc | |
| sudo unlink /usr/bin/cc | |
| sudo ln -s /usr/bin/clang /usr/bin/cc |
浮现设计可以自上而下,也可以[自下而上][1]。自上而下可以很好地避免过度设计,但根据我[过往][2]的[经验][3],这样提取的函数往往在概念上不够清晰。我在解罗马数字时也是先从个位数开始,而当我做到十位数时,我发现,这里存在两个子问题一个是数码转换,另一个是digits的拆分,这样的问题分解也不需要预先设计的。
我这里另一个尝试是编写正交的测试,我把要解的问题划分为[无关][4]的子问题,而且每组测试之间也没有什么联系。而自上而下设计能够提取函数,但测试是很难再拆成正交的了。这样就很容易导致score测试里面也去测spare的逻辑,to-roman测试又要覆盖digits的逻辑,这就造成最终的测试数量不必要的多和不够正交。在实际项目中,这样的测试维护成本就会高。
新的尝试和值得继续探讨的
| (ns bowling_kata.core | |
| (:use midje.sweet)) | |
| (defn strike [x & xs] | |
| (when (= x 10) | |
| [[10 (first xs) (second xs)] xs])) | |
| (defn spare [x y & xs] | |
| (when (= 10 (+ x y)) | |
| [[x y (first xs)] xs])) |
| (defmacro defletn [name & body] | |
| (let [args (->> body | |
| last | |
| second | |
| (apply array-map) | |
| keys | |
| vec)] | |
| `(defn ~name | |
| ~@(butlast body) | |
| ~args |
| git config core.sparseCheckout true | |
| cat .git/info/sparse-checkout | |
| /* | |
| !foo/bar/ | |
| cat .git/info/exclude | |
| foo/bar/* | |
| cd foo | |
| git tf clone http://tfsclient $/Repo/foo/bar |
| user> (def ^:dynamic *foo* nil) | |
| #'user/*foo* | |
| user> *foo* | |
| nil | |
| user> (defn f [] *foo*) | |
| #'user/f | |
| user> (f) | |
| nil | |
| user> (binding [*foo* 1] (f)) | |
| 1 |