顯示具有 Mac 標籤的文章。 顯示所有文章
顯示具有 Mac 標籤的文章。 顯示所有文章

2012年12月20日 星期四

Automator 真方便

在Mac OS X上如果要執行週期性的動作實在很方便。
今天就以週期性地把原始碼同步到Bitbucket(Git/Mercurial Server)為例來灌灌水

2012年7月15日 星期日

Spotlight and Android Source Code


Spotlight真是又快又好用!
Android Source Code真是又多又大!

2010年8月31日 星期二

Tuning Applications

1. The Instruments Application
The Instruments application lets you gather a variety of application performance metrics, such as memory and network use.

2. The Shark Application
The Shark application lets you view system-level events, such as system calls, thread-scheduling decisions, interrupts, and virtual memory faults.


Note:
When performance problems in your code are more related to the interaction between your code, iOS, and the hardware architecture of the device, you can use Shark to get information about those interactions and find performance bottlenecks.

2010年5月27日 星期四

nil vs Nil vs Null vs NSNull null

nil: A null pointer to an Objective-C object.
(#define nil ((id)0))

Nil: A null pointer to an Objective-C class. 

Null: A null pointer to anything else.
(#define NULL ((void*)0))

NSNull: A class defines a singleton object used to represent null values in collection objects (which don’t allow nil values).

[NSNull null]: The singleton instance of NSNull.

2010年4月12日 星期一

Something about Category and Extention

Category 和 Extention 有著非常相似的使用方式, 然而卻還是有些不同的使用情境. 基本上, Extention 是個
"anonymous" Category.
讓我們來復習一下 Category 的寫法:

@interface MyClassName ( MyCategoryName)
// extra methods' definitions
- (void)superShrimp;
@end

然後再看看 Extention
@interface MyClassName ()
// extra methods' definitions
- (void)superShrimp;
@end

2009年12月4日 星期五

Configure Unit Test in Xcode 3.1.3

Test Driving Development 是一種開發 Project 的方式. 可以自動化去檢查每個要檢查的地方有沒有正常工作. 可以有效的減少許多在開發和除錯過程中產生的 side effect 的發生. 因此, Refactoring , 非常的倚賴這種工具來加強開發的安全性. 除此之外, 要先寫好 test case 然後才 implement 實體 method 的邏輯, 也可以讓 method 的邏輯會更明確, 否則 test case 會難以設計. 所以, 今天在介紹在 Xcode 裡面, 應該如何設定 test unit.