GTD

Getting Things Done

Time management method
Invented by David Allen
Move tasks and projects to external database
Focus on taking action, no recalling

Five Elements

Capture

Collect everything
Inbox

Clarity

Process what it means
Is it actionable
No? Trash or reference
Less than 2 mins, do it!
Delegate or defer

Organise

Where does it belong?
Projects
Contexts

Reflect

Review
Clean up
Update
Clear your mind

Engage

Do!
Next actions list
Confidence

References

Book:Getting Things Done: The Art of Stress-Free Productivity
[Getting Things Done]

[Zen habits]

[43 Folders]

[Inside OmniFocus]

Perspectives

Inbox - stash all your tasks and to-dos that come to mind for later processing

Projects - where related tasks are grouped together into overarching plans and hierarchies

Contexts - places, people, things and states of mind most relevant to accomplishing your tasks

Forecast - view tasks chronologically and integrate them into your schedule

Flagged - tasks designated with the most important priority or visibility

Review - place to regularly check up on your progress and check the status of projects (At least once a week)

States of the circle

Repeat action - 3 dots
Due soon - yellow circle
Due - red circle
Flag - orange circle
Tick - tick grey
Repeat and due soon - 3 dots and yellow circle
Repeat and flagged - flag and 3 dots

Create action

Create Note

Add note - common + ‘
Type note in the inspector
Click little note icon under the action item
Attach file -> Edit -> Attach File, If you just drag a file into an action item, it will create a link, in order to attach the file, hold down opt to switch to attach mode.

Date and Time

Due - When the project should be done
Defer - When the project is variable

Date Format

2w fri - 2 weeks later on Friday
1m - 1 month
1d - 1 day

Projects

Create project

  • Drag Action Item from Inbox to Project Icon, this action item will become as a project
  • Shift + Command + N

Action Item and project

  • In order to create action item in a project, just hit enter
  • Move action item to a project, simply click a down triangle icon and choose a project, hit Clean Up to clean any action item has already assigned to a project

Type of project

  • Parallel
  • Sequential - First Item is black and others are grey out
  • Single action - List, loosely related to each other

Project Status

  • Active
  • On Hold
  • Completed
  • Drop

Action Groups

Group action items together when the have some relation, such as breakfast and dinner. Select action items and hit Organize -> Group. This group will be considered as sub action, you can change the type as sequential or parallel.

Drag action items to a folder - drag it to the folder and move to right of the folder, it will put these action items into this group.

Creating Folders

Put related projects into group (Opt + Common + G)
Pick a folder and click Focus to only focus on this folder, for example, focus on work when you’re in the office.

Review Perspective

Review at least every week.
Select a project, change the review option in the inspector.
Go to Review tag, hit Mark Reviewed when the project is reviewed and it’s ok.

Forecast View

In the Forecast View, you can drag action to a day of the calendar view to change the due day.

Only view action need to be finished on Saturdays of the month, hold down common and select Saturdays of the month.

Change deffered date, hold down command and drag this action item to the specific date on the calendar.

ScalingFilters

三种不同的 Scaling Filters

  • kCAFilterLinear
  • kCAFilterNearest
  • kCAFilterTrilinear

三种 Scaling Filters 的特点

kCAFilterLinear 使用 Bilinear filtering 算法,采样多个象素来生成最终的图象。

优点: 圆滑,流畅
缺点: 如果放大的比较够大,图象会出现模糊
kCAFilterTrilinear 跟 kCAFilterLinear 类似。大多数情况下,两者在视觉上并没有太大 的差异。但是 kCAFilterTrilinear 保存多个图象的尺寸(Mip-mapping),然后在三个不同的维 度采样,组合较大和较小的存储的图象,来生成最终的图象。kCAFilterTrilinear 改善了性能。

优点: 由于最终的图象的在尽寸跟保存的图象已经非常接近,所以不用同时采样较多的象素,从而提 高了性能和避免了在 scale factors 较小的情况下出现的问题(rounding errors)。
kCAFilterNearest 就像它的名字暗示一样,只会采用最接近的单象素,并且不对颜色进行渲染。

优点: 速度非常快, 保留原来图象,只处理边缘部分 缺点: 图象质量很差,出现象素化

总结

Linear filtering 保留形状,kCAFilterLinear 和 kCAFilterTrilinear。 Nearest-neighbor filtering 保留象素, kCAFilterNearest。

例子

当我们不设置 magnificationFilter , 默认为 kCAFilterLinear。图象就变得非常模糊。

1
2
3
view.layer.contents = digits?.CGImage
view.layer.contentsRect = CGRectMake(0, 0, 0.1, 0.1)
view.layer.contentsGravity = kCAGravityResizeAspect

当我们把 magnificationFilter 设置成 kCAFilterNearest,字体马上变得很清晰,原因是我们使用的 backing image 是很小的,我们把图象的 frame 调置成比原来图象大时,图象就会变得 模糊。

1
2
3
4
5

view.layer.contents = digits?.CGImage
view.layer.contentsRect = CGRectMake(0, 0, 0.1, 0.1)
view.layer.contentsGravity = kCAGravityResizeAspect
view.layer.magnificationFilter = kCAFilterNearest

CocoaPods

初始化 Cocoapods

1
pod init

执行以上语句,Cocoapods 会创建默认的 Podfile

1
2
3
4
5
6
7
8
9
10
# Uncomment this line to define a global platform for your project
# platform :ios, '6.0'
 
target 'XDream' do
 
end
 
target 'XDreamTests' do
 
end

修改平台和使用 frameworks

1
2
platform :ios, "8.0"
use_frameworks!

为什么 Swift 要使用 dynamic frameworks

当说起 Swift library 时, 实际上是指 Swift dynamic framework,因为 Swift static libraries是不被允许。
iOS 8 推出的 dynamic frameworks 允许把代码,图象和其它资源打包在一起。在 iOS 8 之前,Cocoapods 以 static libraries
创建,当中只包含代码(可以包含不同的指令集,比如 i386, armv7), 但不能包含图象这些资源。

第二个不同点是,dynamic frameworks 可以有 namespace classes, 然而 static libraries 不能。

不像 Objective-C,标准的 Swift runtime libraries 没有包含在 iOS 中! 所以你的 framework 必须包含必要的 runtime libraries.
正因为如此,用 Swift 写的 pods 必须被创建成 dynamic frameworks。如果苹果允许 static libraries, 使用标准 runtime dependencies
的 libraries 会出现重复标识(因为 static libraries 没有 namespace)。

安装 pods

1
2
3
4
5
6
7
8
9
10
11
12
# Uncomment this line to define a global platform for your project
platform :ios, '8.0'

# Using frameworks instead of static library
use_frameworks!
target 'XDream' do
pod 'Alamofire', '1.2.3'
end

target 'XDreamTests' do

end

然后执行 pod install 命令, 在城内,很多时候会安装失败, 需要梯子方能安装成功。
安装成功,会看到以下的打印信息。注意最后一条,现在我们要使用 .xcworkspace 的文件来打开项目。

1
2
3
4
5
6
7
Analyzing dependencies
Downloading dependencies
Installing Alamofire (1.2.3)
Generating Pods project
Integrating client project

[!] Please close any current Xcode sessions and use `XDream.xcworkspace` for this project from now on.