Book Review: Working with Unix Processes

I am subscribed to PragPub’s mailing list and that’s where I came to know of this book: Working with Unix Processes [1], by Jesse Storimer. While working on some major projects, I was looking for a light reading and hence finally bought the book. I finished it quite fast (in a couple of days) and hence thought would write a review (also gives me an excuse to write a post on something other than my Google Summer of Code work).

Book Cover

Why you should read this book?

You should read this book, if you are an application developer (Ruby or any other language) and have absolutely no idea about what a process ID is, or what a fork() is. This book attempts to fill the gap that you may feel deep inside if you learnt programming in say, Ruby or Python. There is just so much going on in a Unix/Linux system that you owe yourself to know atleast as much as is introduced in this book. It even tells you about man pages on Linux! It talks about Inter-process communication, pre-forking, copy-on-write, and some of the really fascinating things that is just so cool to know.

But beware, it just touches the surface, this book can be used as an entry point into the fascinating world of knowing Linux internals. You may even be spurred to pick up a book on Linux system adminstration or one of the Richard Stevens books [2] to know that little more that makes Linux programming so awesome.

Summary:

To cut it short, considering my experience and background in working on Linux systems and being conversant with system calls, fork, exec and C programming and some experience with Network programming, I didn’t consider the 27$ very wisely spent. However, the author didn’t make any false promises and my expectations was clear: I was just looking for smome light reading. So, it was a good read overall. I did not try out the code examples, since I am not really very conversant with Ruby, so can’t comment on them.

If you have any familiarity with working with Linux systems and have some system adminstration/programming experience, buy this book if you are interested in getting an overview of things you may already know. However, if you don’t have any idea of what we talked in the earlier part of this blog post, then go buy it.

Congratulations to the author [3] for writing a short, to the point book which should serve its niche well.

[1] http://pragprog.com/book/jsunix/working-with-unix-processes

[2] http://www.kohala.com/start/

[3] Author: http://jstorimer.com/

Recent Articles: BoxGrinder, AppInventor, Parallel Programming, PiCloud

I have been experimenting with a lot of interesting projects lately. Some of them have made into articles.

  • Android Programming with App Inventor, published in the May 2012 issue of Linux Journal. Checkout AppInventor here.
  • Parallel Programming in C and Python, published in the May 2012 issue of Linux Journal. In this article I provide a how-to style introduction to working with OpenMP, Python’s multiprocessing module and PiCloud.
  • BoxGrinder: Virtual Appliance Manufactory, published in the May 2012 issue of Linux Magazine. BoxGrinder is an easy way to create Virtual Appliances. I have discussed it in some of my earlier blog posts. (Parallel Computing Appliance, ownCloud appliance)
  • PiCloud: An Easy way to the cloud , in March, 2012 issue of Linux For You. The article is now available online here

All my writings are listed here.

Explainer: Evolutionary Algorithms

Whenever you undertake an activity that seeks to minimise or maximise a well-defined quantity such as distance or the vague notion of the right amount of sleep, you are optimising.

Like I have mentioned elsewhere, I like to introduce complex (and not so complex) concepts in a popular science fashion – for consumption by even the high-school kid. Hence, when I was contacted by Bella from The Conversation, I was excited to write about Evolutionary Algorithms and optimization and what we as a group work on.

The article is now live here. Hope you enjoy the read. Many thanks to the team at The Conversation for the final touches on the article.

Snowy, your support in various ways is always appreciated.

Link: http://theconversation.edu.au/explainer-evolutionary-algorithms-3580

Book Review: Essentials of Metaheuristics

Getting the book: http://www.cs.gmu.edu/~sean/book/metaheuristics/

I picked up a copy of this book from the man himself, Sean Luke at the IEEE CEC 2011. I was “aware” of this book from a while back, so I thought it might be a good idea to pick a print copy for light readings during my travels post-conference. Here is a brief review of the book:

Synopsis:

As the author states, the book is a compilation of undergraduate lectures notes on Metaheuristics. It focuses on the applications of Metaheuristics to optimization problems including Multi-objective optimization, Combinatorial optimization and Policy optimization. Depending on your experience with Metaheuristics, this book will serve a different purpose for you:

  1. If you are quite well versed with them, this book will be a nice light reading, with interesting bits and pieces throughout
  2. If you are starting with them, or want to start with Metaheuristics, this book gives a nice well rounded view of the state-of-the art

Review

The book starts with an overview of gradient based optimization methods in Chapter 1 gradually moving to stochastic methods such as randomized hill-climbing, tabu search, simulated annealing in Chapter 2.

Chapter 3 introduces population methods — Evolution Strategies, Genetic Algorithms, Differential Evolution and Particle Swarm Optimization.

Over the last three chapters, the author introduces some fundamental concepts: the choice of representation of solutions, issues of exploration v$ exploitation and local optima traps.

Chapters 4-10 each discuss one specific topic. For example,  Chapter 4 is dedicated to representation of solutions — vectors, direct encoded graphs, program trees and rulesets.  Chapter 5 discussess parallel methods for metaheuristics and Chapter 7 talks about Multi-objective optimization. Chapter 8 and 10 talks about combinatorial optimization and policy optimization respectively. So, if you are looking for anything specific, you can directly jump to the relevant chapter (assuming, of course that you have the pre-requisite knowledge). As you can see in the ToC, most of the chapters from 4-10 depends on Chapters 3 & 4.

The book finally concludes with some descriptions of test problems and statistical tests that researchers often use to test their algorithms. The very important issue of selecting a proper random number generator is discussed in this chapter.

Conclusion

This book along with Evolutionary Computation: A Unified Approach (You may be interested in my review) is great for getting a holistic view of the Meta-heuristic methods, especially if you are more experienced with only one of them.

Getting the book: http://www.cs.gmu.edu/~sean/book/metaheuristics/

Article: Getting Started with Inotify

Update: The PDF is now available.

It’s always fun to peek into one of the umpteen features of Linux. In the April, 2011 issue of Linux For You I take a hands-on look at Inotify.

The source code for this article is available at https://bitbucket.org/amitksaha/articles_code/

In other news:

Going the Arch Way

In other news, I have finally switched to Arch Linux – courtesy, ArchBang i.e. ArchLinux + Openbox. Whereas its still early days, but its fun that Linux feels like the Linux of old. Editing rc.conf, .xinitrc, sshd_config by hand is sheer joy after having been in purely Ubuntu land for quite a while. The Arch Wiki is indispensable if you have Wireless woes to fix – like blacklisting some modules.

x2x

I was are of  x2x for a while, but didn’t have the resources to use it. But, having two desktops at work now, I just had the right reason to try it out.  Just followed the instructions here and had everything setup sweetly. In case your server is ArchLinux a.k.a a real Linux, you will need to edit your sshd_config to enable X11 forwarding, as described here

Arduino

Accidentally discovered Arduino and am looking forward to play with it with the Arduino Starter Kit.

Ray Bradbury

I am totally digging Ray Bradbury’s works. After finishing Dandelion Wine, I am currently hooked up with The Illustrated Man.

Research Update

Last, but not the least,  I have got a couple of papers accepted in the IEEE CEC 2011 at New Orleans, USA. yay!

New Article: Getting Started with Clojure

Update: A PDF of the print article is now available.

I take a beginner’s look at Clojure, as the title suggests in this article which is published by Linux For You in the March, 2011 issue.

If you happen to be one of the readers of this article, I would love to hear from you!

I have been away from the Java landscape for a while, but looks like I am getting into it again, in multiple ways. Clojure, being just one of the beginnings. I kinda liked leiningenso super simple!

Random scribbles: E-reading

So, the world E-reads these days from devices which have e-ink. I wasn’t sure if I would really like reading on 6/7″ screens. To mitigate the possible waste of $, I took a relatively less risky option — go for the funny sounding Android tablet, Pendo Pad. I installed the Kindle app for Android, and I have been really enjoying e-reading. The Amazon Kindle might just be something to spend on!

New Article: Serve Up Your Music with Zeya

A couple of the things I really like about Zeya is its “no – Flash” requirement (non-requirement?) and the simplicity of the design. As a user, I would like more features, hopefully those will come in time.

Please note that Zeya is a work in-process and some minor details might change by the time you read this. If you encounter bugs or desire features, report them on the Zeya mailing list.

My article  on Zeya is now up at the Linux Journal’s website. This incidentally is my first article in Linux Journal. I am excited to connect with an elite band of readers. Thanks LJ.

Write your next program on Linux

UPDATE:: This article is now available on line at http://www.linuxforu.com/how-to/write-your-next-program-on-linux/

Given the chance, (and the intellect) I would clone( ) myself into N different avatars and do all the things that everybody does and excel in them too.

I have made a humble beginning with my article Write your next program on Linux. This article published in the Indian monthly- Linux For You (May, 2010) is targeted to Indian college students/teachers to help them come out of the grossly-outdated DOS/Windows based programming environment and start programming in C/C++/Java on the shiny happy Linux operating system.

If you want to take a look at the article, please drop a comment here and i can share a pre-print PDF of the same.

New Article: Open Source tools to aid your research

Its often the case that we do not know of a great tool which would simplify our work as we go about our research work everyday. My hope as a novice researcher with this article is to acquaint the kind of software tools available in the Open Source world which are very useful, capable and fun to work with and we have looked at some of these today. I have made no attempt to be exhaustive here. There are a lot of other tools out there, which I haven’t yet used, so I have refrained from writing about them. I hope you have enjoyed reading this article as much as I have writing this one!

Read the full article at http://linuxgazette.net/174/saha.html

A primer on Ext4

Now that almost all distributions offer ext4 as the default file system, it’s high time we looked at the most compelling feature set of the file system and understood how to migrate from its predecessor. Now that almost all distributionsoffer ext4 as the default file system,it’s high time we looked at the most compelling feature set of the filesystem and understood how to migrate from its predecessor.

The January 2010 issue of Linux For You has published my article on Ext4 which, as the name suggests is a primer on Ext4 focusing on the geek user. If you happen to have a copy lying by, let me know how you find it!