今天买了三本书 - 行者无疆 始于足下 - 行走,思考,在路上

今天买了三本书

xiaohanyu posted @ Thu, 22 Oct 2009 06:36:01 +0800 in Life with tags c++ unix cdlatex PGF TikZ , 2535 readers

第一本:货币战争。

第二本:C++程序设计原理与实践。

第三本:Unix编程艺术。

共131.8元,花尽了钱包里的所有钱,一分不剩。印象中好像好久没有这样买过书了。尽管我的书已经不少了,多的连宿舍的书架都放不下了。

这一周整个人就像一部机器一样在运转。上周五开始做作业。先是完成了导师布置的任务——写一个iphone下的hello world程序。坦白的说,有些时候我是很随意的,有些时候又过于吹毛求疵。这么一个任务,我看了网上的数十篇文章,下载了十几篇pdf电子书,经过筛选总结最后写出了一份精美的带有目录,索引的达27页的英文文档。题目叫The Cross-Platform Developing Skills for Mac Applications给导师发了过去。可是导师实在是太忙了。没有时间看我的文档。只是今天中午交谈的时候看到文档,简介大气,还是称赞了一下,呵呵。

周日和周一都在补计算几何的知识,用的教材是Computational Geometry in C,刚开始还好,越到后来越难。布置的作业也都很有难度。导致我两天下来才做了十道题。虽然迟交了几天,但总算是弥补了。交总比不交好。交的作业是用latex写的。画一些几何图形,顺便学了学pfg\tikz的用法。真的很不错。如下面的代码: 

\begin{figure}
\centering
\begin{tikzpicture}[line width=2pt]
\draw (-1,0) -- (8,0);
\draw (0,-1) -- (0,8);
\draw[step=.5cm, very thin] (0,0) grid (7.2,7.2);

\coordinate [label=above:$A$] (A) at (1, 4);
\coordinate [label=left:$B$] (B) at (0.5, 3.5);
\coordinate [label=left:$C$] (C) at (1, 3);
\coordinate [label=left:$D$] (D) at (0.3, 1.3);
\coordinate [label=below:$E$] (E) at (1, 1);

\draw[blue] (A) -- (B) -- (C)  -- (D) -- (E);
\draw[blue] (2, 0) -- (2, 6);

\coordinate [label=right:$A'$] (A') at (2, 4);
\coordinate [label=right:$B'$] (B') at (2, 3.5);
\coordinate [label=right:$C'$] (C') at (2, 3);
\coordinate [label=right:$D'$] (D') at (2, 1.3);
\coordinate [label=right:$E'$] (E') at (2, 1);

\draw[blue] (A) -- (A');
\draw[blue] (B) -- (B');
\draw[blue] (C) -- (C');
\draw[blue] (D) -- (D');
\draw[blue] (E) -- (E');

\coordinate [label=above:$a$] (a) at (5, 4);
\coordinate [label=left:$b$] (b) at (4.5, 4.5);
\coordinate [label=left:$c$] (c) at (5, 3);
\coordinate [label=left:$d$] (d) at (4.3, 1.3);
\coordinate [label=below:$e$] (e) at (5, 1.3);

\draw[green] (a) -- (b) -- (c)  -- (d) -- (e);
\draw[green] (6, 0) -- (6, 6);

\coordinate [label=right:$a'$] (a') at (6, 4);
\coordinate [label=right:$b'$] (b') at (6, 4.5);
\coordinate [label=right:$c'$] (c') at (6, 3);
\coordinate [label=right:$d'$] (d') at (6, 1.3);
\coordinate [label=right:$e'$] (e') at (6, 1.3);

\draw[green] (a) -- (a');
\draw[green] (b) -- (b');
\draw[green] (c) -- (c');
\draw[green] (d) -- (d');
\draw[green] (e) -- (e');
\end{tikzpicture}
\caption{Monotonic polygonal chains}
\label{fig:monotonic_chain}
\end{figure}

经xelatex处理的图形如下:

pgt/tikz

还有algorithm, algorithmic宏包,用来排版算法伪码效果非常好。我估计<<Introduction to Algorithms>>上的伪码就是用的这个。latex源码如下:

\begin{algorithm}
  \caption{Determining whether or not P is convex}
  \label{alg:convex}
  \begin{algorithmic}[1]
    \FOR {$i = 1$ to $n$}
    \STATE $j \gets i \bmod n$
    \STATE $p \gets \overrightarrow{V_{j-1}V_j} \times \overrightarrow{V_{j}V_{j+1}}$
    \IF{$p < 0$}
    \PRINT "Polygon P is not an convex polygon!"
    \RETURN \FALSE
    \ENDIF
    \RETURN \TRUE
    \ENDFOR
  \end{algorithmic}
\end{algorithm}

排版效果(博客中上传的图片貌似都有压缩,效果稍差):

昨天无意间又发现了cdlatex这个东西,至此,emacs+cdlatex+auctex+reftex+outline+xetex,这些东西组合起来,感觉写文档非常美妙。在文档中穿梭,有时间,等我通晓elisp后,在来总结这些东西。再上一张图。

emacs latex editing environment

这不,今天写实验报告又碰见了数据的图形化,顺便复习下gnuplot。kiss the unix。

下午在老板公司,和学长简单交流了下,自己在一边搞定上网,大概看了下windows ce的东西。不过现在感觉自己最大的软肋还是编程基础和算法基础。看书看书看书。

明天的数值分析,逻辑,后天的计算机组成实验,都是头疼的课。我一向对电类的课程比较头疼。电路原理,数电等硬件类课程无一例外都挂掉了。一方面是自己没好好学,另一方面也是自己实在提不起兴趣。比较讨厌。逻辑实验虽然七搞八搞能做出结果,但是个中详细原理,却懒得去理了,只求用latex把实验报告弄的好看点,祈求得个差不多的分数就行。

C++之父Bjarne Stroustrup的最新力作<<Programming: Principles and Practice Using C++>>,刚翻了翻目录。讲的内容非常广泛。从最初的入门知识,语言结构,面向对象,stl,gui,embedded, testing,不知深度如何。书中前言说:If you work by yourself, don't expec to spend less time than that(maybe 15 hours a week for 14 weeks)。

Unix编程艺术,经典书籍,久闻其名,今天终于狠下心买了一本。当小说来看好了。

越学越不明白。计算机软件简直是无边无际无极的知识海洋。技术的更新,理论的发展,这些独有的特点使得计算机应用科学的知识更新换代极其迅速。我想在大概明白所谓的需求驱动。计算机的学习也是一样,什么样的需求,什么样的技术,用到了再去学,边学边实践。像什么asp pk php等等完全是无聊的东西。有需要就学,没有这个需要的话学了不用也忘掉。当然有些经典的东西,c++, unix, emacs, latex, algorithms, sql, xml, 这才是千秋万代的东西。加油吧,lox。


Login *


loading captcha image...
(type the code from the image)
or Ctrl+Enter
Host by is-Programmer.com | Power by Chito 1.3.3 beta | © 2007 LinuxGem | Design by Matthew "Agent Spork" McGee