The Way 2 Inner Peace.

欧拉项目第65题.

#lang racket

(define (k-con n f init)
  (let loop([i n] [r 0])
    (cond [(= 1 i) (+ init r)]
          [else (loop (sub1 i) (/ 1 (+ r (f i))))])))
          
;; ith convergent of sqrt(2)
(define (sqrt2 i)
  (k-con i (λ (x) 2) 1))

;; ith convergent of e
(define (con-e i)
  (k-con i (λ (x) 
             (let-values ([(q r) (quotient/remainder x 3)])
               (if (zero? r) (* 2 q) 1)))
         2))

(numerator (con-e 100))

 

三周流水帐

来实验室三个星期了...虽然感觉和自己想得有点不一样...不过总体应该还好吧....

实验室主要做三维重建.来了以后呢..就是看射影几何的书和学习OpenCV. 在我看书和看C++快看吐的时候..终于有任务来了.一个是写代码完成模型的可视化.调用了几个PCL的模块就完成了任务.. 另一个就是最烦人的给导师写项目的申请材料了..时间又紧.我又不会.......

慢慢克服困难早日完成吧..

还有一周多就开学了..  又会是怎样的生活呢..

Some words I got today

The first one is from the Racket mailing list by Neil Van Dyke.

You’ve read a lot already. I don’t know how much practical programming experience you have, but this reminds me to make a suggestion for anyone reading this email who is learning programming and doing a lot of reading…

If someone has access to a computer, then my suggestion at this point is make sure that they are spending more time practicing programming than they are spending on reading.

By reading books and doing problem sets only, and reasoning about programming in their head atop that, then someone might be able to understand programming theory as a mathematician might. But if they want intuition and insight into how to build and evolve sustainable systems in the real world, then I’m not aware of any substitute for practical experience in programming.

the other is from Alan Perlis.

What you know about computing other people will learn. Don't feel as if the key to successful computing is only in your hands. What's in your hands, I think and hope, is intelligence: the ability to see the machine as more than when you were first led up to it, that you can make it more.

应该能上了.

复试结束.结果也出来了.应该能上研究生了.从一开始准备.到现在.已经有一年了吧.

用org-mode实践番茄工作法

前一阵子想找一个做笔记的工具. 考虑的有Evernote,Markdown. 最后还是选了Org-mode,谁让Org-mode那么方便而且又是emacs的模式呢.

既然org-mode的网站提到可以用org-mode做时间管理, 我便顺便把的doit.im上的to-do list转移到本地用org-mode来管理了.并同步到dropbox 这么做主要是因为doit.im主要是为GTD而设计的.我在上面用番茄工作法用得挺别扭的. 而由于org-mode极强的可定制型,我也找到了适合自己的番茄工作法实践. 番茄工作的核心很简单:集中精力工作一个番茄钟(25分钟),休息5分钟,在接着工作25分钟. 四五个番茄钟做一个大休息. 番茄工作法只有两个to-do list,分别是未来待办(TODO)和今日待办(TODAY), 当然你也可以在增加一个计划外列表,将临时想到的东西记在这里. 每天的第一件事就是查看待办列表,将它们加入到今日代办,然后以此开始执行

对我来说是这样的.一个todo-list,一个completed. to-do list里是很多项目或者几个番茄钟就能完成的任务(比如写这篇博客) 每天查看带有TODO标签的item,然后将它的TODO标签改为TODAY, 然后当日就看TODAY标签就可以了.(我没用org-mode自带的日程表).

http://somethin.is-programmer.com/user_files/somethin/Image/org-mode-pomodoro1.png

;加入日程表文件
(setq org-agenda-files (list "~/Dropbox/todo.org"))
;org-agenda的快捷键
(global-set-key (kbd "C-c a") 'org-agenda)
;自定义查看TODAY标签条目
(setq org-agenda-custom-commands
      '(("T" todo "TODAY")))

加入init.el,这样C-c a t 查看TODO,然后C-c C-t改标签为 TODAY,C-c a T查看TODAY.

http://somethin.is-programmer.com/user_files/somethin/Image/org-mode-pomodoro2.png

至于25分钟的定时,我也没用org-mode自带的定时,我用的是workrave.