Monday, 16 May 2011

How to read the source code

  Some workmates talked about how to read the source this afternoon. I found that I don't know how to read the source exactly.
  In my opninion, read source is to know everything of the source. Such as: how a fuction works, why a variable plus one, how to implement an algorithm, and so on. So when I read a source, I chose a part to begin, and from that part, I went into the code as deeply as I could. It took me a lot of time, and also very difficult, but I got a little. Even several days later, I forgot everything totaly.
  I found the following words about how to read source code:
  1. It's boring and hard, so must carry on.
  2. If it's really too difficult, read some related books or documents first. It helps you to know the source code better.
  3. Write down your thinking after reading the source. It's very easy to forget what you get from the source.
  4. Know the priority of every parts. first need, first study.
  5. Know the importance of every parts. some parts need to know the details, while other only need to know the functions.

my thinking after reading Ubuntu Pocket Guide and Reference

It took me sometime to finish reading this book:
Ubuntu Pocket Guide and Reference


It's nice especial for the beginners.

You can download here for free.

How to get your wireless card working under Linux?
“Getting the card to work is simple! Just grab the
source code for the module and compile it against
the kernel. insmod it and then use iwconfig to configure a
WEP password—”

That's why Linux was “for techies only“.
Now it's so easy.

Desktop Linux systems changed everything.
Ubuntu is one of them.
If you can use Windows, you can use Ubuntu.
For it free, safe, faster and ease of use. why not use Linux? 

chapter 1 installation 
Skip, for It's really easy now, just follow the steps.

chapter 2 Configuring Ubuntu 
Every major area of hardware. Make them works.

chapter 3 Getting to grips with the desktop
The basic knowledge to use this desktop.

chapter 4 Users and the filesystem
The purpose of this chapter is tell you the file& folder:
 names, paths, permissions, locations...

chapter 5 Hands‐on at the command‐line
From zero to hero studying Shell/Bash in this chapter. It's great, not too hard, and contain lots of useful commands, suitable for the beginners. I wrote a PPT to introduce bash to the beginners, I felt that PPT is so ugly after I read this chapter. I can get more information from this book to update my PPT when needed. 


chapter 6 Software management
Almost tells the two tools: the Advanced Packaging Tool (APT), and the Debian Package system (dpkg), and use APT or dpkg installing/uninstalling packages.
This chapter also introduces the: software repositories. I only want to say: "change it to get the best download speed!"

chapter 7  Securing the system
This chapter tells you:
How to use  Update Manager to update the system? need it ?
Configuring the firewall.
Need an antivirus program? I don't think so, Linux is much safer than Windows even without an antivirus program.

From this book, I got the name of some books I want to read:

The Pragmatic Programmers -- Ubuntu Kung Fu
www.pragprog.com/titles/ktuk/ubuntu‐kung‐fu
Paper Book ($34.95)
eBook ($22.00) 
too expensive for me...


Free Software Magazine, published in a free PDF
edition roughly every two months and covering matters relating to the
world of Free Software, including but not limited to Linux. www.freesoftwaremagazine.com.

Wednesday, 4 May 2011

Practice Trac on CentOS 5 x86_64

Trac is written in the Python programming language(Open Source)

Python: python-2.4.3-43.el5
Database: SQLite  (python-sqlite-1.1.7-1.2.1)
Version Control System: Subversion  (subversion-1.6.11-7.el5_6.3)
Web Server: Apache (httpd-2.2.3-45.el5.centos)

Creating a Project Environment:
After install, create a new environment using trac-admin: 
#trac-admin /path/to/myproject initenv 
make sure the apache can access project folder
#chown -R apache.apache /path/to/myproject
  
Trac Configuration File:
My <projectenv> /var/trac/test/
The Trac Configuration File: /var/trac/test/conf/trac.ini
Changes to the configuration are usually reflected immediately, though changes to the [components] or [logging] sections will require restarting the web server. You may also need to restart the web server after creating a global configuration file when none was previously present.
See the details of all the sections here.

Install plugins:
Download the source and run "python ./setup.py bdist_egg" and
copy the resulting .egg file from the "dist" directory to the
"plugins" directory of your Trac project.

enable the plugin is done in the [components] section of the configuration file, for example, enable tractoc plugin:

[components]
tractoc.* = enabled

Note: After installing the plugin, you need to restart your web server. 
#sudo /etc/init.d/httpd restart