Programming and writing about it.

echo $RANDOM

Tag: Writings

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/

 

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.

Follow

Get every new post delivered to your Inbox.

Join 66 other followers