I have always been an avid Vi enthusiast. And I have tried to keep abreast of the new features in Vi. Did you know Vi has a powerful adversary ? Yes you guessed it right, it is Emacs. But that has not stopped Vi from gaining faithful followers for itself. Myself being one of the staunch supporters of Vi.
Vim is the modern avataar of Vi and is created and maintained by Bram Moolenaar. Vim is choke full of features which would put any other text editor (except perhaps Emacs) to shame.
Read more »
Showing posts with label book reviews. Show all posts
Showing posts with label book reviews. Show all posts
Wednesday, 6 January 2010
Friday, 9 May 2008
C++ GUI Programming with Qt4 - Book Review

One: Qt library is released under a dual licensing business model which means you can develop open source or closed source applications. If you are developing the former, then you do not have to pay any money for using the library.
Two: It is truly cross platform - which filters down to the fact that you can write the code for your application in one platform - say Linux, and then copy the code to Windows and recompile the code without making any changes and your application is guaranteed to run on Windows.
Three: Cellphone behemoth Nokia's recent acquisition of Trolltech has definitely infused fresh breadth and energy into the future of Qt. The latest version of Qt namely version 4.3 has a lot of enhancements which make developing GUI applications using this library a joy for most C++ programmers.
"C++ GUI Programming with Qt4" authored by Jasmin Blanchette and Mark Summerfield; published under the Prentice Hall Open source software development series is well into its second edition. This book is touted as the "Official book on Qt from Trolltech".
The main goal of this book is to teach how to write GUI programs using Qt4 and is targeted at the entry level to intermediate and advanced C++ programmer. So it starts off on a shallow curve, hand holding the reader from the first rudimentary steps in writing a simple C++ GUI program using Qt4. And over the chapters, gradually builds up steam and introduces the reader to complex scenarios such as creating plugins, 3D graphics, application scripting and more. Going through the book, I didn't feel like I was studying a programming framework rather I found the language used in explaining things quite lucid, clear and interesting all the same.
The book is divided into three parts. A new programmer in Qt will find the first part really useful because it covers the fundamental concepts and practices required for programming in Qt. The second and third part of this book comprising of 12 and 7 chapters respectively deal with specialized topics and can be read in any order. For example, if I want to build a GUI program which needs to connect to a database at the back end, then I can straight away read the 13th chapter namely "Databases", of this book provided I am conversant with Part I of this book which covers the foundation of programming in Qt 4.
The second edition of this book builds up on the first edition and contains numerous changes. For one, a couple of additional chapters have been included such as "Look and Feel Customization" and "Application Scripting". The book has been thoroughly revised to include changes incorporated in Qt 4.2 and Qt 4.3. The original "Graphics" chapter has been split into 2D and 3D graphics chapters respectively. The tiny chapter on Embedded Programming has been expanded to include programming in Qtopia, thus making it not tiny anymore.
What I really like about this book is the realistic examples which are used to introduce each Qt control or concept. There are plenty of images scattered within, which impart visual appeal to the book. More over, these images hopefully give the reader an idea about the correct way of designing their software.
Going through this book, I find that the authors have explained different scenarios of developing programs in Qt 4 exhaustively without overwhelming the reader. Each program is split into digestible chunks of code with detailed explanation succeeding them. This makes it quite easy to understand what each line of code accomplishes.
The appendixes contain a new section namely "Introduction to Qt Jambi". Qt Jambi is the Java edition of the Qt application development framework. Apart from that, there are of course the other sections in the appendix namely installing Qt, building Qt applications and also a concise section listing the main nuances of programming in C++ for Java and C# programmers.
One thing I noticed is that the hard bound book I received did not have a companion CD containing the Qt library and the IDE used to design your applications. Then again, one can always visit the Trolltech site and get the Qt 4.3 library and applications which is available as a free download. Even better, if you are developing your Qt applications in Linux then it is very simple to install all the necessary libraries depending upon the Linux distribution you are using.
All in all, this is a great book not just for any neophyte in Qt but also for the accomplished Qt programmer to use as a ready reference.
Book Specifications
Name : C++ GUI Programming with Qt4 - Second edition
ISBN No : 0-13-235416-0
Authors : Jasmin Blanchette & Mark Summerfield
No of pages : 720
Publisher : Prentice Hall
Price : $ 59.99 (US), $ 65.99 (Canada)
Rating : 9/10
Book Specifications
Name : C++ GUI Programming with Qt4 - Second edition
ISBN No : 0-13-235416-0
Authors : Jasmin Blanchette & Mark Summerfield
No of pages : 720
Publisher : Prentice Hall
Price : $ 59.99 (US), $ 65.99 (Canada)
Rating : 9/10
Thursday, 7 June 2007
Book Review : The Linux Programmer's Toolbox

The book titled "The Linux Programmer's Toolbox" authored by John Fusco is a book which is a store house of knowledge which aims to make the average Linux/Windows programmer aware of the tools at his disposal which can help him write better programs for Linux.
The book is divided into 10 distinct chapters with the first 4 chapters describing various ways of boosting ones productivity while embarking on writing code for Linux as well as getting to know the various tools at ones disposal.
In the very first chapter titled "Downloading and Installing Open source tools", he talks about the different archive formats commonly used in Linux, various package managers such as Debian's own apt-get, Red Hat's Yum and how to properly authenticate the packages you download to ensure that they are not tampered.
The second chapter deals with building tools from source. Here apart from describing the actual steps involved in compiling the sources, the author also delves into explaining the concept behind the MakeFile, the common variables used in implicit rules and so on. In this chapter one also gets to acquire an understanding of the tools used to create projects as well as examine how these tools work together in the build process.
The book has a chapter exclusively devoted to explaining ways of ambulating through the myriad of documents; tools such as man, info, as well as some of the not so obvious ones. One thing I like about this particular chapter is how the author has provided tables which list a number of recommended manual pages with a short description of each of them.
Linux doesn't have a comprehensive IDE on the lines of Microsoft Visual Studio to develop programs - at least not yet. Most Linux programming gurus are perfectly at home with coding using their favorite text editor. And any book of this stature will be incomplete without a mention of the different editors available for coding in Linux and their pros and cons. The 4th chapter of this book introduces the different editors including Vim and Emacs and discusses their pros and cons. There are numerous tips in this chapter which aims to make writing code much more efficient, productive and a pleasant experience for the average Linux programmer. As a Vi enthusiast, I couldn't help but admire how one can convert Vim editor to work as a code browser with the help of Ctags which is explained in detail.
The fifth chapter titled "What every developer should know about the kernel" is a turning point in the book and gives a comprehensive understanding of the working of the Linux kernel. It is by far the largest chapter - with nearly 100 pages devoted to this topic - in this book. In this chapter the author talks in lucid detail about the different modes in Linux, the process scheduler, device drivers, the I/O scheduler and the memory management in user space, understanding all of which is instrumental in writing better programs for Linux.
The next two chapters deal with Linux processes and the communication between processes. Here one gets to know more about the technical vagaries related to processes such as forking, cloning, process synchronization and the basics of inter process communication. The author has introduced several APIs and basic examples of each.
In the 8th chapter, the author introduces many tools which are installed by default in most Linux distributions which aid in debugging communication between processes. The tools include (but are not limited to) lsof, fuser, stat, hexdump, strace and so on. And each tool is accompanied by its usage and its output with a short discussion of the output.
In the 9th chapter titled "Performance Tuning", one gets to know more about fine tuning ones Linux program. Here the author explains the factors affecting system performance as well as the tools for finding system performance issues.
Finally, the last chapter of this book explores some of the most common debugging tools and techniques for Linux. More specifically, I found the discussion on the use of GNU debugger quite informative.
At the end of each of the 10 chapters in the book, the author has provided a short synopsis of the tools that are used. Also many additional online resources have also been listed where one can acquire more knowledge about the topic being covered. Through out the book, noteworthy sections have been highlighted in dark background which makes it quite eye catching and also easy for quick reference.
The book is written with a slant towards the C language especially when depicting the examples in the latter half of the book. But that is something which can be understood considering that the bulk of the Linux kernel has been written using C language.
Book Specifications
Name : The Linux Programmer's Toolbox
ISBN No: 0-13-219857-8
Author : John Fusco
Publisher : Prentice Hall
No of Pages : 600
Price : Check the latest price at Amazon.com
Verdict : An excellent resource for those who are interested in improving their productivity as a Linux programmer.
Most programmers with Windows background will be forced to make a paradigm shift while embarking to program for Linux. While the Windows programmers could take deceptive comfort within the cozy confines of a Visual IDE, when they make the shift to write Linux programs, they are suddenly faced with the hard facts of programming as it really is. And this book could be an ideal companion for this set of programmers who wish to lessen their learning curve and make programming for Linux a much more pleasurable experience.
Having said that, I found this book to be an ideal companion for any programmer (not necessarily only of Windows background) who wish to develop programs for Linux.
Sunday, 11 March 2007
IPCOP Firewalls - Closing borders with Open Source

The book titled "Configuring IPCOP Firewalls" published by Packt Publishing is authored by two people Barrie Dempster and James Eaton-Lee and is divided into 11 chapters. The first chapter gives a brief introduction to firewalls and explains technical concepts such as OSI reference model, an introduction to TCP/IP and a brief outline of the parts that comprise a network. Even though I did not find anything new in this chapter, I realized that this is meant for people who are new to the world of computer networks and aims to bring them upto date with the various technologies associated with it. A network administrator intending to pick up skills in configuring and setting up IPCOP, can circumvent this chapter and directly go to the second chapter which gives an introduction to IPCOP - its different features, and in which all ways it can be effectively used.
The authors have explained the concepts in an easily understood way with the aid of necessary screen-shots. One of the salient features of IPCOP is its web based interface which allows one to configure all aspects of it from a remote location. In fact, IPCOP is designed to be controlled from a remote location and serves all its configuration parameters via the Apache web server. In the second chapter, one gets to know all the features of IPCOP including the different services it offer.
One thing that struck me while going through this book was that the authors are fully immersed in explaining the configuration aspects of IPCOP which is done entirely via the web interface. So much that other than the first chapter - "Introduction to firewalls", the third chapter titled "Deploying IPCop and Designing a network" and the 10th chapter titled "Testing, Auditing and Hardening IPCop" where the readers are made to digest some theory, the rest of the book is a how-to sort of book which I found to be ideally suited - especially for people who are the least bothered about theory and just want to set up IPCop and get on with what ever they were doing.
In the third chapter, we are introduced to the unique feature used by IPCop to segregate the network depending upon its vulnerability. And in the succeeding chapter, the authors walk one through installing IPCop on ones machine. Here each and every installation step is explained with the help of a screenshot which makes understanding the procedure much more intuitive.
The chapter titled "Basic IPCop Usage" gives a good introduction to the web interface provided by IPCop. Reading this chapter, I was able to get a good feel for the IPCop interface. More specifically, one gets to know how to configure IPCop to provide different services such as DHCP server, support for Dynamic DNS, editing the hosts file and so on. Mind you, the IPCop interface is quite rich in functionality even providing options to reboot or shutdown the machine remotely. In this chapter, apart from the introduction to the web interface, the authors have also provided a few tips related to logging in to the remote machine running IPCop using SSH.
Put in simple terms, IPCop is a specialized Linux distribution which contain a collection of tools which revolve around providing robust firewall capabilities. The tools bundled with IPCop range from the ubiquitous iptables, services such as DNS, DHCP to tools which specialize in intrusion detection such as snort. The sixth chapter titled "Intrusion Detection with IPCop" explains the concept of intrusion detection and how one can use snort IDS bundled with IPCop to effectively find out what is passing through our network and thus isolate any harmful packets.
From there, the book moves on to explain how to use IPCop to set up a virtual private network (VPN). By way of an example, the authors explain how to setup a VPN between two remote networks with each end having a IPCop firewall in place. This chapter covers different VPN scenarios such as host to net, net to net connections as well as configuring IPCop to detect the Certifying Authority certificates.
The 8th chapter is a rather short one which explains how to effectively use proxying and caching solutions available in IPCop to manage the bandwidth.
One of the biggest advantages of IPCop is that it is possible to extend it to provide additional features by way of addons. Addons are generally developed by third parties and are usually developed with an aim to provide a feature that the developers of IPCop have missed. There are a whole lot of addons available for IPCop. The 9th chapter introduces the most popular addons available for IPCop such as SquidGuard - a content filtering addon, LogSend - an addon which send the IPCop logs to remote email accounts, AntiSpam, integrating ClamAV anti virus solution and more. The authors have also explained how to install and enable these addons using the IPCop web interface.
As I said earlier, the tenth chapter titled "Testing, Auditing and Hardening IPCop" has more of a theoretical disposition where the authors list some of the common attributes towards security and patch management and also some of the security risks and a few common security and auditing tools and tests.
Book Specifications
Name: Configuring IPCop Firewalls
ISBN No: 1904811361
Author: Barrie Dempster and James Eaton-Lee
Publisher: Packt Publishing
Price : Check the latest price at Amazon.com
Rating: A very good book to pick up skills in configuring firewalls using IPCop
One thing I really like about this book is the practical approach taken by the authors in explaining how to accomplish a certain task. Each section is accompanied by the relevant screenshots of the web interface with a brief explanation of the options available. The book is well designed with a number of tips provided in each section highlighted in big square brackets which makes it quite eye catching. Even though I found the book a bit short on theory, it is an ideal resource which provides a hands on approach to people who are more interested in installing and setting up IPCop firewall solutions in ones network rather than pondering about the theoretical concepts of the same.
Wednesday, 28 February 2007
Python Phrasebook - Essential Code and Commands

But the Phrasebook series is a set of books on a variety of programming languages which is published by Sams Publishing which aims to address this need. The advantage of the phrasebook is that it is small enough to be held in the palm of your hand. And the number of pages are no more than 300. Which means it is the exact dimension and size of an average pulp novel. But the difference is that each of those 300 pages contain a wealth of knowledge in the form of bits of useful code which can be readily used by programmers.
One such phrase book is the Python Phrasebook which has a very rich collection of customizable code snippets. "The Python Phrasebook - Essential code and commands" is authored by Brad Dayley and is divided into 10 distinct chapters each catering to a particular aspect of the Python language.
While the first chapter provides an overview of the Python language, the succeeding chapters provide bits of code in Manipulating strings in python, Managing data types, managing files, threads and databases in python and so on.
To highlight the usefulness of this little book, suppose I want to say find the right code to access a list using Python. I can do it in a number of ways. I could troll the internet to get the exact code, go through a good book on python which may or may not contain the exact code I want or make use of the easier way which is to use the Python phrasebook as a ready reference and find the exact code I am looking for in the "Managing data types" chapter. This little book contain a chapter on implementing internet communication where the author provides bits of code to achieve tasks related to sockets. And also chapters which show the code to process HTML and XML files using python.
One thing worth noting is that each code snippet is accompanied by an explanation of the code and also a short example program which utilize the code. This makes it much more easier for a Python programmer to understand the use of the code. And all code snippets address real life problems. So you will find code snippets to say, retrieve images from HTML documents, allowing users to upload files via CGI scripts, connecting to a MySQL database server, defining lists, splitting strings and so on which range from the common things to the other end of the spectrum of accomplishing specialized tasks.
To give a preview of what you get in this book, here is a sample excerpt from the Chapter 7 titled "Implementing Internet Communication".
Retrieving Email from a POP3 Server
The text below is the copyright of Sams Publishings.
mServer = poplib.POP3('mail.sfcn.org')The code
mServer.user(getpass.getuser())
mServer.pass_(getpass.getpass())
numMessages = len(mServer.list()[1])
for msg in mServer.retr(mList+1)[1]:
The poplib module included with Python provides simple access to POP3 mail servers that allow you to connect and quickly retrieve messages using your Python scripts.
Connect to the POP3 mail server using the poplib.POP3(host [,port [,keyfile [,certfile]]]) method, where host is the address of the POP3 mail server. The optional port argument defaults to 995. The other optional arguments, keyfile and certfile, refer to the PEM-formatted private key and certificate authentication files, respectively.
To log in to the POP3 server, the code in pop3_mail.py calls the user(username) and pass_(password) methods of the POP3 server object to complete the authentication.
NOTE: The example uses getuser() and getpass() from the getpass module to retrieve the username and password. The username and password can also be passed in as clear text strings.
After it’s authenticated to the POP3 server, the poplib module provides several methods to manage the mail messages. The example uses the list() method to retr ieve a list of messages in the tuple format (response, msglist, size), where response is the server’s response code, msglist is a list of messages in string format, and size is the size of the response in bytes.
To retrieve only a single message, use retr(msgid). The retr method retur ns the message numbered msgid in the form of a tuple (response, lines, size), where response is the server response, lines is a list of strings that com- pose the mail message, and size is the total size in bytes of the message.
NOTE: The lines list returned by the retr method includes all lines of the messages, including the head- er. To retrieve specific information, such as the recipi- ent list, the lines list must be parsed.
When you are finished managing the mail messages, use the quit() method to close the connection to the POP3 server.
The Program : pop3_mail.py
import poplib
import getpass
mServer = poplib.POP3('mail.sfcn.org')
#Login to mail server
mServer.user(getpass.getuser())
mServer.pass_(getpass.getpass())
#Get the number of mail messages
numMessages = len(mServer.list()[1])
print "You have %d messages." % (numMessages)
print "Message List:"
#List the subject line of each message
for mList in range(numMessages) :
for msg in mServer.retr(mList+1)[1]:
if msg.startswith('Subject'):
print '\t' + msg
Using Python to Fetch Files from an FTP Server 159
break
mServer.quit()
The Output: From pop3_mail.py code above
password:
You have 10 messages.
Message List:
Subject: Static IP Info
Subject: IP Address Change
Subject: Verizon Wireless Online Statement
Subject: New Static IP Address
Subject: Your server account has been created
Subject: Looking For New Home Projects?
Subject: PDF Online - cl_scr_sheet.xls
Subject: Professional 11 Upgrade Offer
Subject: #1 Ball Played at the U.S. Open
Subject: Chapter 3 submission
Book Specification
Name : Python Phrasebook - Essential code and commands
ISBN No: 0-672-32910-7
Author : Brad Dayley
Publisher : Sams Publishing
No of Pages : 300
Price : Check the latest price at Amazon.com
Comments : An Ideal resource for Python programmers. Acts as a ready made code source for achieving a variety of tasks in Python.
Wednesday, 7 February 2007
Book Review: Beginning SuSE Linux - 2nd Edition

The book "Beginning SuSE Linux" is authored by Kier Thomas and published by APress. As the name of the book indicates, it is geared towards beginners in GNU/Linux who have set their eyes on trying out the SuSE Linux distribution. The book is divided into 7 different parts with the first part of the book discussing the pros and cons of using Linux as a part of ones daily routine. In this part, the author gives a well balanced view of what Linux is all about and the history behind its formation.
The second part of this book contain chapters which hand hold a person in installing SuSE Linux on ones machine. The author starts by explaining the concept of partitions, backing up your data and the benefits of dual booting between diverse OSes. The 5th chapter titled "Installing SUSE Linux" gives a thorough introduction to installing this Linux distribution on ones machine. And the steps are accompanied by screen-shots which makes it rather intuitive to follow. SuSE provides a number of installation modes and one gets to know the best way of installing it. One thing worth noting is that SuSE allows the user to shrink his Windows partition from within its Installer and this book explains it in a clear way in the section on partitioning the disk. In fact the manner in which the author has explained the steps leaves no room for doubts while installing SuSE. The succeeding chapter lists the possible problems one might face and the solutions for these problems. Most Linux users would be aware of one or more of these problems but to a new Linux user, these could be a real time saver and will save their sanity when they face these problems.
Part 3 of this book is titled "The No-Nonsense getting started guide" and has a collection of 6 chapters. These chapters give a good introduction to the SuSE Desktop - more specifically to the Gnome desktop which is the default one in SuSE. In the 8th chapter titled "Getting everything up and running", the author explains how to setup and configure the diverse hardware which form a part and parcel of a computer. For instance, this chapter deals with configuring the sound card, setting up and managing the printer including a printer on the network which is connected to a Windows machine, importing photos from a digital camera and more. But what is worth noting is that SuSE has its own unique methods and GUI tools to accomplish these tasks and the author explains these via the SuSE specific tools where ever applicable.
There is a separate chapter on securing the machine running SuSE Linux where the author impresses upon the readers the necessity of securing ones machine. He further goes on to explain the different ways of securing SuSE which includes steps to update the software. This chapter also dwells deeply on using Aparmor - SUSE's industrial grade security system.
It is really thoughtful of the author to include a chapter detailing the various commonly used Windows software and their possible Free replacements.
The 4th part of the book titled "Shell and beyond" comprises of 5 chapters deals with educating the new Linux user on the usage of command line to accomplish ones tasks. The author starts by providing a gentle introduction to the shell, the different terminals available in Linux and then gradually moves on to explain the usage of different commands which provide the true power to Linux. In the chapter titled "Understanding Linux files and users", he gives a detailed explanation of the concept of files, their permissions and how they relate in the Linux as well as explain the concept of mounting. Even though I was conversant with most of what the author was explaining, reading the book, I couldn't help feel that this book is an excellent resource for a Linux neophyte who is looking forward to taking his first baby steps in learning to be productive in Linux, more specifically SuSE Linux.
The next three chapters deal with getting SuSE Linux to play all the proprietary music and video file formats. One of the inherent disadvantages of Linux owed mostly due to the ideological stance of GPL is that it cannot play music and video encoded in a proprietary file format out of the box. But with a little effort, it is possible to provide support for these proprietary file formats in Linux. In these chapters, the author gives a good run down on the various music and video codecs and ways of getting support for them in SuSE Linux. He introduces different software which allow one to not only just play music but also to categorize, burn music onto removable media and even rip music from audio CDs and save them on to ones hard disk. Surprisingly, I found this book much more than a mere how-to-do-it sort of book as the author provides details of related facts from a lay man's perspective where ever applicable. For instance, in the chapter titled "Movies and Multimedia", while explaining how to enable media players to play the files encoded in these formats, he impresses upon the readers the ethical issues surrounding the DRM and patents.
There is a whole chapter dedicated to image manipulation where many features of the GIMP software has been explained. The author has done a splendid job of explaining this image manipulation editor within the constrains of this chapter.
The next 8 chapters deal with using SuSE in an office setup. SuSE Linux comes bundled with a plethora of applications which form a part and parcel of any office setup. This includes word processors, spreadsheets, a database, presentation software and email client just to name a few of them. This book has dedicated a chapter each in explaining how to put these software to productive use in an office setup. Catering to those die hard MS Word enthusiasts, there is also a chapter on making MS Office to work natively in SuSE Linux if at all you have a licensed copy of it lying around.
The seventh and final part of the book titled "Keeping your System Running" provides details on the vagaries of system administration such as installing, removing and updating software binaries, compiling software from source and installing it, managing users and groups optimizing your system, backing up data and scheduling tasks.
The final chapter which is the 34th chapter of this book deals with explaining various ways of connecting to the SuSE Linux machine remotely where the author explains about SSH and related tools.
This book contain three appendices with a glossary of Linux terms being one of them where the newbies among us gets to understand the meaning of Linux related geek terms. There is also an appendix containing a Bash command index which - embracing authors own words - provides a whistle stop tour of commands that can be used at the Bash Shell.
Book Specifications
Name : Beginning SuSE Linux - From Novice to Professional (2nd Edition)
ISBN No : 1-59059-674-9
Author : Kier Thomas
Publisher : APress
No of Pages : 728
Price : Check the latest price at Amazon.com
Rating : A comprehensive book, ideal for newbies who wish to learn to be well versed in installing and using SuSE Linux.
I have always maintained that writing a good book is an art. It is not just enough if the person is well versed in his area of expertise. Rather, he should also be a good communicator and should be able to sustain the reader's interest in the subject through out the book. Kier Thomas shines through in his narration of the concepts quite well. He explains in a simple, lucid and entertaining way different ways of configuring things in SuSE Linux from a users perspective. This is definitely a good book for those of us who look forward to installing and becoming productive in using SuSE Linux.
Friday, 26 January 2007
Free Book - Linux Kernel in a Nutshell
One of the advantages of using GPLed software is that anybody who wish to use or modify the code can do so without fear of any repercussions. Ditto for the documentation of the software. This has at times tempted many a book author to release their books under a liberal license and make their efforts available for free in an electronic format.
One such author is Greg Kroab-Hartman who has released his book titled "Linux Kernel in a Nutshell" under the Creative Commons Attribution-ShareAlike 2.5 license which allows you to download and redistribute the book.
This book is not new rather, it has been significantly revamped to include details of the 2.6.18 Linux kernel.
This book covers the entire range of kernel tasks, starting with downloading the source and making sure that the kernel is in sync with the versions of the tools you need. In addition to configuration and installation steps, the book offers reference material and discussions of related topics such as control of kernel options at runtime.
The author claims this book is targeted at the lay person who wish to delve deep into understanding the Linux kernel and apart from a basic familiarity of the Linux shell commands, no particular prerequisites are expected from the reader. So it is a how-to sort of book which explains the steps that lead to properly building, customizing , and installing the Linux kernel.
So why should you recompile a Linux kernel ?
There are many advantages to compiling a Linux kernel. For one, you need enable only those modules which are required by your machine. For example, if your machine does not have support for infra red or do not have a need for PCMCIA, then you can disable those features in the kernel configuration and build your custom kernel. This will make the kernel lean and speed up the boot process. Similarly, If you intend to run Linux on a 486 machine (Yes it is entirely possible), you can turn off all the other processor specific support in the kernel configuration file and build a kernel targeted specifically at your processor.
So if you are the curious one who wish to learn how to configure, compile and install your own Linux custom made kernel then this book will be very useful.
Table of contents of "Linux Kernel in a Nutshell"
- Title page
- Copyright and credits
- Preface
- Part I: Building the Kernel
- Chapter 1: Introduction
- Chapter 2: Requirements for Building and Using the Kernel
- Chapter 3: Retrieving the Kernel Source
- Chapter 4: Configuring and Building
- Chapter 5: Installing and Booting from a Kernel
- Chapter 6: Upgrading a Kernel
- Part II: Major Customizations
- Chapter 7: Customizing a Kernel
- Chapter 8: Kernel Configuration Recipes
- Part III: Kernel Reference
- Chapter 9: Kernel Boot Command-Line Parameter Reference
- Chapter 10: Kernel Build Command-Line Reference
- Chapter 11: Kernel Configuration Option Reference
- Part IV: Additional Information
- Appendix A: Helpful Utilities
- Appendix B: Bibliography
- Index
All the chapters have been made available as individual PDF files and can be downloaded from the author's website. This book is published by O'Reilly and if need be, you can also buy a printed version of the book. It is a very nice book which teaches the art of configuring, building and installing your very own custom Linux kernel.
Sunday, 21 January 2007
Book Review: SELinux by Example

The book "SELinux by Example" is authored by three people - Frank Mayer, Karl Macmillan and David Caplan and is published by Prentice Hall. The target audience for this book is SELinux policy writers and system administrators with more content dedicated to be put to use by policy writers. There are a total of 14 chapters and 4 appendices spread just over 400 pages. The 14 chapters are in turn broadly divided into three parts with the first part containing chapters which provide an overview of SELinux, its background and the concepts behind it. The second part contain 7 chapters which are most useful for SELinux policy writers and contain detailed explanation of the syntax used in writing the policy files. It is the third part namely "Creating and Writing SELinux Security Policies" which could be most put to use by system administrators where the authors provide enough details of working with SELinux.
In the second chapter, the authors introduce the concept of type enforcement access control, understanding of which is imperative to ones knowledge of SELinux. They further talk on the concept of roles and multi level security. And true to the title of the book, all these concepts are explained by analyzing the security controls of the ubiquitous passwd program.
In the succeeding chapter the authors explain the underlying architecture of SELinux. More specifically, how SELinux integrates with the Linux kernel via the Linux security module (LSM), the organization of the policy source file and how to build and install policies.
SELinux policies to a large extent are based on object classes. For example, you can create an object class and associate a set of permissions to that class. And all objects associated with that class will share the same set of permissions. In the fourth chapter, one get to know about different types of object classes and the permissions that can be assigned to these classes. A total of 40 classes and 48 permissions are discussed in this chapter.
The next chapter titled "Types Enforcement" goes into a detailed analysis of all the types and attributes as well as the rules that could be used. The majority of SELinux policy is a set of statements and rules that collectively define the type enforcement policy. Going through the chapter, I was able to get a fair idea of the syntax used in writing TE policies.
Keeping in mind the complexity of the subject, it helps a great deal that at the end of each chapter, there is a summary section where the authors have listed the important points covered in the chapter. More over, one gets to answer a couple of questions and check one's knowledge about the topic being discussed.
In the 6th chapter, the authors explain in detail the concept of roles and their relationship in SELinux. In fact, what I really like about this book is the fact that each concept of SELinux has been dedicated a chapter of its own. For instance, constraints, multilevel security, type enforcement, conditional policies,... all are explained in chapters of their own.
One thing worth noting is that Fedora Core 4 and RHEL 4 and above ship with the targeted policy by default. Where as to completely lock down a Linux machine, you need to embrace the strict SELinux policy. But this has the side effect of causing breakages with some of the existing Linux applications which expect looser security controls. In targeted policy, the more confining rules are focused on a subset of likely to be attacked network applications. So in most cases, one can manage by using targeted policy. This book mostly deals with the strict policy of SELinux and in chapter 11, the authors dissect the strict example policy maintained and updated via the NSA and Fedora Core mailing lists.
But there is another policy called the Reference Policy which is an attempt to water down the strict policy maintained by NSA and in the process make it easier to use, understand, maintain, also to make it more modular and this is covered in the succeeding chapter titled "Reference Policy".
The chapter titled "Managing an SELinux system" is one which the system administrators will relate to, where the authors throw light on the hierarchy of SELinux configuration files. The purpose of each file is explained in simple terms. And considering that SELinux comes bundled with a rich set of tools meant to be used by system administrators, one gets to know the usage of some of them and also learn about the common problems that are faced by administrators while administering an SELinux system.
And in the last chapter of the book which is the 14th chapter, one is introduced to the task of writing policy modules. Here the authors hand hold in the creation of a policy module for the IRC daemon for Fedora Core 4 from start to finish which involves right from the planning stage to writing and applying the policy module, to the final testing of the module.
This book also includes 4 appendices which contain a wealth of knowledge on SELinux. I especially liked appendix C which lists all the object classes and permissions as well as appendix D which has a list of SELinux system tools and third party utilities with explanations.
It could be just me but I found that I was better able to assimilate what the authors explained when I read the 13th chapter of this book first and then went back to read the 4rd chapter onwards. Having said that, I find this book to be an excellent resource for people interested in developing SELinux policies and to a lesser extent a resource for system administrators. At the very least, this book imparts a deep understanding of the features, structure and working of SELinux.
Book Specifications
Name : SELinux by Example
ISBN No : 0-13-196369-4
Authors : Frank Mayer, Karl Macmillan and David Caplan
Number of Pages : 430
Publisher : Prentice Hall
Price : Check the latest price at Amazon.com
Rating : A very informative resource ideal for SELinux policy writers, Linux/Unix integrators and to a lesser extent to System Administrators.
Tuesday, 2 January 2007
Book Review: Core Python Programming - 2nd Edition

I found the book titled "Core Python Programming" authored by Wesley.J.Chun and published by Prentice Hall to be an ideal book to learn the wonderful Python language. This book is quite voluminous, with 23 chapters spanning 1050 pages. The book is divided into two parts the first part titled Core Python which contain 14 chapters which impart a sound understanding of the semantics of the language and the second part titled "Advanced Topics" which contain a collection of 9 chapters which give a good introduction to the specialized uses such as in database programming, network programming, using threads in python, GUI programming and so on.
In the first chapter of the book, the readers get to know the various features of Python and the steps needed to install Python on ones machine. When you install Python on your machine, it also provides its own shell where you can execute pieces of python code. The author has taken advantage of this functionality of Python in narrating the concepts throughout the book. Each concept and syntax is followed by bits of code which the readers can try out in the Python shell in its entity. I found this process much easier in learning this language as one need not go through the write -- compile -- execute cycle which is more prevalent in the traditional languages.
In depth coverage has been provided for important concepts such as lists, tuples and dictionaries as well as data-types and string sequences and they have been provided separate chapters of their own. The sixth chapter titled "Sequences: Strings, Lists and Tuples" is the second largest in the book and is quite detailed in its coverage of the topic.
Chapter 9 deals with file manipulations where the author introduces all the built in functions available in Python which allow one to open, read from and write to a file. Interestingly, the functions are also illustrated by aid of short easy to understand examples. A couple of modules related to file handling are also introduced in this chapter.
Errors and exceptions form the basis of the 10th chapter where different errors and exceptions supported in Python are explained. This chapter also explains how programmers can create custom exception classes which I found quite informative.
One of the biggest advantages of Python is that all its functionality is split up into modules. A module could be just a single python file which contain a collection of functions or classes which can be re-used in programs written in Python. And all one has to do is import the module into ones programs to start using those pieces of code. The chapter 12 titled Modules give a firm understanding of this concept and also introduces different ways in which you can import external pieces of code into the Python program.
Chapter 13 titled "Object Oriented Programming" is by far the largest chapter in this book and spans over 100 pages. In this chapter, the author endeavors to give a sound base to Object oriented concepts as well as how they relate to programming in Python. The author introduces a large number of Python classes, methods and descriptors in this chapter.
Regular expressions play a very important part in programming verily because manipulating text/data is a necessity. And it is possible to easily modify and mould data to ones choosing by way of regular expressions. Python has strong support for regular expressions. The second part titled "Advanced concepts" of the book starts with a chapter on regular expressions. In this chapter, one gets to know about the regular expression module and many functions associated with the module. The author also provides a couple of examples which give insights into the ways in which regular expressions can be used in Python to reformat data.
The next two chapters give an introduction to the world of sockets and how Python can be used to write client server programs.
Multithreaded programming forms the basis of the 18th chapter. Here the author introduces a couple of modules available in Python which make it quite easy to create threads in ones Python program.
I found the chapter titled "Web Programming" very interesting to read. Especially since Python is used in a large way to create dynamic websites. And the next chapter titled "Database programming" gives a sound introduction to the Python objects which allow one to easily connect to and retrieve data from the databases.
I found this book really informative, especially suited for upcoming Python programmers. At the end of each chapter, there is an exercise section which imparts a nice touch to this book as it allows you to test your knowledge. Even though the advanced topics (second part of the book) are not covered in depth, the author succeeds in providing enough knowledge about the relevant Python modules and functions followed by a couple of examples which whets ones appetite without overwhelming the reader. This is the second edition of the book and it has been significantly revamped to include new features introduced in Python 2.5.
Book Specifications
Name : Core Python Programming 2nd Edition
ISBN No: 0-13-226993-7
Author : Wesley J. Chun
Number of Pages : 1050
Publisher : Prentice Hall
Price : Check the latest price at Amazon.com
Rating : Excellent Book to start learning the Python language.
The author Wesley J. Chun has been a former employee at Yahoo and has played a major role in creating Yahoo Mail and Yahoo People Search using Python. He has over 20 years of experience in the IT field with over a decade of experience programming in Python.
Readers please note: I had originally contributed this review to Slashdot.org
Friday, 10 November 2006
Book Review: Ubuntu Hacks
Read more »
Wednesday, 25 October 2006
Book Review: Building Flickr Applications with PHP

The book "Building Flickr Applications with PHP" authored by Rob Kunkle and Andrew Morton is a unique book which aims to lessen the learning curve associated with developing Flickr applications with PHP. The book, all of 9 chapters spanning around 200 pages is targeted at photographers, bloggers and web designers who would like to make greater use of the photos they have stored in their Flickr account.
To integrate Flickr on ones website, it is imperative to first have a good feel of the Flickr interface. In the first two chapters, the authors give a sound understanding of the Flickr interface. We get to know about different ways by which it is possible to categorize the photos and understand the Flickr terminology such as tags, sets and groups, ways in which you can post Flickr photos on to your blog right from the Flickr interface and more. These two chapters give a sound understanding of the core functionality of Flickr.
Phlickr is an open source PHP 5 library which acts as an interface between the PHP based website and the Yahoo Flickr API. This book uses this library to integrate Flickr with ones websites. The third chapter of this book walks one through the installation and configuration of Apache web server, PHP and Phlickr API on ones machine.
In the fourth chapter the authors give a brief run down of the essential PHP syntax which will help a PHP beginner to brush up his knowledge in the language.
It is only from the 5th chapter onwards that one is introduced to the meat of the topic. In this chapter, with the aid of example code, the authors explain how to display a Flickr photo and all its properties on ones website coded using PHP. This chapter also introduces two Phlickr library classes Phlickr_Photo and Phlickr_AuthedPhoto which play an important role in displaying the photos from Flickr website.
The next chapter titled "Getting Organized: Working with Flickr Photo Sets" is an extension of the previous chapter where in one gets to know how to organize the photos using sets and groups. What is interesting is that each section in this chapter is a how to do it section which contain the desired PHP code with an explanation of how it works.
Chapter 7 reveals another dimension to this whole project by introducing the simpleXML - the PHP 5 interface which allows one to easily search through and find data from an XML file. This chapter also explains how to access the Flickr tags, search through them, and even assign new tags while uploading the photos to the Flickr website all this using PHP.
RSS feeds and syndication form the basis for the 8th chapter. RSS is a lightweight XML schema which allows websites to present structured data about content they have posted. This chapter analyzes the different types of RSS such as the ver 1.0, 2.0 and the atom XML.
The last chapter solves tasks such as batch adding of photos to Flickr account, searching and displaying the group photos, showing a random photo from a particular group, displaying the RSS data in a user readable format, showing the latest photos from a group and so on.
Book Specifications
Name : Building Flickr Applications with PHP
ISBN : 1-59059-612-9
Authors : Rob Kunkle & Andrew Morton
Publishers : Apress
No. of Pages: 200
Price : Check the latest price at Amazon Store or compare prices.
Rating: Very Good
Category: Beginner to advanced. Good buy for bloggers and personal website owners who would like to integrate their Flickr photos seamlessly on to their websites.
This is a nice book which explains how to integrate one of the most popular Web 2.0 successes - namely Flickr - seamlessly into ones website using PHP. Even though the book is relatively small and concentrates on a niche topic, the authors have done a pretty good job of walking through all the necessary steps in a precise and clear manner.
Subscribe to:
Posts (Atom)