1. Save those directory to a file, say cache_fail_folder_list.txt
2.
sudo -i
cat cache_fail_folder_list.txt | xargs touch
昨夜西风凋碧树,独上高楼,望尽天涯路
sudo -i
cat cache_fail_folder_list.txt | xargs touch
wget http://www.gtlib.gatech.edu/pub/suse/projects/alsa/snapshot/driver/alsa-driver-hg20070804.tar.bz2 |
./configure --with-cards-hda-intel |
make |
sudo make install |
| ||
| ||
| ||
| ||
| ||
| ||
| ||
|
4.1 建立版本库目录
[root@localhost root] #mkdir –p /svn
svn是我自己建立的目录,各人根据具体情况设计名字
4.2 建立一个用户,用与管理这个版本库目录
[root@localhost root] #useradd -m -s /bin/bash lyl
lyl是建立的用户名,可以根据习惯改
4.3 用建立的用户管理我们刚建的版本库目录
[root@localhost root] #chown –R lyl.lyl /svn
用lyl来管理我们的版本库目录/svn
4.4 启动服务器
用用户lyl来管理版本库目录/svn,则须转为lyl,命令如下:
[root@localhost root] #su lyl
启动svn服务
[root@localhost root] #svnserve -d -r /svn/;
-d表示以daemon方式(后台运行)运行
-r/svn/指定根目录是/svn/
检查服务器是否启动正常:
[svn_leader@localhost root]$ ps –ef|grep svnserve
如果显示如下,即为启动成功:
lyl 6941 1 0 15:07 ? 00:00:00 svnserve -d ——listen-port 9999 -r /svn
----------------------------------------------------- # apt-get install kcontrol
$ mkdir ~/.fonts
$ cp [fontfile] ~/.fonts
$ fc-cache -f -v ~/.fonts
# mkdir /usr/share/fonts/truetype/myfonts
# cp [fonts] /usr/share/fonts/truetype/myfonts
# fc-cache -f -v
# deb http://us.archive.ubuntu.com/ubuntu dapper universe
# apt-get update
# apt-get install msttcorefonts
For example search for a string called redeem reward in all text files located in /home/tom/*.txt directory, use$ grep "redeem reward" /home/tom/*.txt
You can search for a text string all files under each directory, recursively with -r option:$ grep -r "redeem reward" /home/tom
$ grep -H -r “redeem reward” /home/tom
grub> kernel (hd0,4)/vmlinuz root=/dev/ram ramdisk_size=32000 devfs=mount,dallSee also:
grub> initrd (hd0,4)/initrd.gz
grub> boot
If design is good, why not make it everyone's job? (Refactoring)
If simplicity is good, why not use the simplest design that supports the currently desired functionality? (Simple design)
If architecture is good, why not have everyone work at defining and refining the architecture continuously? (Metaphor)
If short iterations are good, why not make iterations really short (hours and days) instead of weeks and months? (Short iterations & planning games)
If requirements, design, and code reviews are good, why not do it all the time? (Pair programming)
If testing is good, why not do it all the time… even customers? (Continuous unit and functional testing)
If integration testing is good, why not do it several times a day? (Continuous integration)
Test driven sounds like a good idea, but it is very hard to get used to it. When we get an idea, we could not help to realize it. We often forget to find out a way to prove what we're going to do is right. Even Nate sometimes forgets. So he often asks us don't hesitate to kick him when he forgets to write a test before writing any production code. It's not good to see a test always passes, Nate always says, that means what we do makes no difference. Every time we have to see a test fails before writing any code. So that it is our code that makes that test pass. That is test driven: writing code against a failing test.
Ruby on Rails provides so many facilities and tools to practice test driven development. There're different types of tests: unit test, functional test, acceptance test. There is a strong belief amongst Agile practitioners that every thing could be tested. So they develop lots of tools to do this. From user interface to database, there are tools to test them.
In his middle of thinking, one may not like to be disturbed by questions and suggestions, and it does no good to the overall productivity as well. Nate suggested that to be a good partner, one should learn to take notes. It would be better if one writes down what he wants to talk about while the other is in the middle of thinking, as long as what he is going to talk is not so urgent that otherwise may waste a lot of effort. When waiting for checking in and out, waiting for tests to be passed, it's a good time to discuss what their doing
Today Rock and I continued the work that should have been done on last Friday. There is a task on CIY requiring that when a teacher creates an assignment, the system should send email to every student of that course. Nate had created a skeleton of sending email for us. We were expected to spend no more 2 pairing hours on this. However, it did not seem so easy when we got down to work.
On last Friday afternoon we spent two hours on researching this part of the system, and how to send a email using Ruby on Rails, only to find that there exited some problem with database fields. What we could get is an assignment_id, with which we had to look into the database and find the email address of the students who chose that course. Unfortunately, the database was not set up as was design on ERD. The assignments table stored a field teacher_id which should have been course_id, while the students table stored a field class_id which should be course_id. Then we realized that we should use migration to modify the database before we can start to work on the mailing job.
So we started today by creating the migration to modify the database. However, when we update the local project from SVN, there were failed tests. We tried very hard to fix that failure until we found it out of our capabilities and responsibilities half an hour later. Then we turned Nate, finally finding that it was a test that had been committed before passed. After Nate fixed that failure, we came back to our machine and update again, ran all tests, it had been 9:30! We thus wasted more than an hour today just because a failed test not caused by us.
Modifying the schema of a database is a radical change; it may shake the foundation of the system. Rock and I had experienced such a nightmare on last Thursday evening when we were asked to change a field ideal_hour to ideal_day and divide the original data by 8. In that evening, we started to work in 7:30. It seemed simple initially. After spent some time checking out and passing all test, we start to change the database. Of course a lot of tests could not pass. Then we began to spend frustrating hours in fixing codes in order to pass those tests, until it was nearly 12 that night when we realized it impossible to fix those failure in a couple of hours. So we decided to roll back what we had done that evening. When we continued to work for more than half an hour, we thought that we had rolled back. Since run all the tests again may take a long time, Rock said I could leave for bed first, he could handle the rest. Not do I know the next morning that he worked until 2:30 a.m. just to make all test pass again!
So this time we were both taught that it would never be too cautious in making change to database schema, and the estimation time of that work would never too long. Before we did the migration, we decided to make a new branch in the SVN, because we did not think that we could fix in a single day all the failures of tests that were caused by changing the schema. Before we made a new branch, we had to pass all the tests and commit what we had done to the trunk. Then we could made a branch from the trunk. Then we could work on that branch.
We proceeded so smoothly this time. Rock even doubted whether there were still incorrect logics that could not figure out by passing all the tests. It is possible, but it is a test coverage issue, we were not able to do anything to it then. So we could not but trust the tests. Then it came to merge the branch to the trunk. To did this, first we had to commit what we had done to the branch, then we checked out from the trunk to another project, say admin_trunk. And then we merged the branch to admin_trunk, after resolving all the conflicts and fixing all failures of tests, we finally committed it to the trunk. It had been 3:30 then. If we started from over eight this morning, apart from an hour of meeting this morning, we had spent nearly 5 hours on it. Imaging we just modify two database fields, if we had been asked to estimate how long it would take, we might say at most 30 minutes pairing. It turned out to be 10 times we might estimate. In retrospect of how we spent such a long time, writing that two migration files only took us less than 30 minutes; we spent the rest of the time fixing the unpassed tests that were not written by us, waiting for SVN check and out, waiting when the tests were running. How to reduce such overhead time, or how to estimate such time during planning meeting, it is a question.