Ruby and MongoDB Web Development Beginner’s Guide Review

I remember the days when I’ve used MongoDB  in simple Ruby on Rails (RoR) project using Mongoid. It’s so simple to use MongoDB with RoR without knowing much about it. While using MongoDB, as a project requirement, I became more interested about it and decided to dig more. The moment I wanted to learn more about it, I found the book Ruby and MongoDB Web Development written by Gautam Rege. Thank goes to my colleague Rubayeet Islam, who suggested me this book. When I started reading it, I started feeling at home as I’ve already familiar with several Ruby/Rails/MongoDB concepts that I’ve learned during my works. However, here is my overall feelings about the book.

The first four chapters of the books talks solely about MongoDB. You will learn how to install it, run it, query it, use complex queries etc. and all of these using the default mongodb client.

Continue reading →

jQuery Mobile: Part 2 – Making multiple pages and linking them

Hey fellas, in the first part of our jQuery Mobile journey we have learned how to make the first jQuery Mobile page. That was quite easy and fun. As we ain’t going to give those introductions again, I believe, its a good idea to have a look into the previous part.

In this part we will dig a bit more. We will see how can we make more than one pages and link to each other.

Continue reading →

jQuery Mobile: Part 1 – Making your first mobile page

Happy days are coming soon as jQuery Mobile 1.0 is already in Beta 2 phase which is going to enter Beta 3 in, probably, next month and then to Release Candidates (RC). However, the current state of jQuery Mobile is very well qualified for playing. So, I wish to write some beginner level blog posts as I discover it. If you find any mistake, error and/or you have any suggestion, please feel free to notify me.

Today we will see how to create first page with jQuery Mobile 1.0 Beta 2. We will see other things in near future, may be :P.

Continue reading →

Review on my Android based Chinese clone of IPad!

On November 2, 2010 I have ordered this item from eBay! I was skeptical whether I will get the item in hand or not because our postal service is still of medieval age! And the most shameful thing is that the dishonest custom and postal service officers even keep the items for themselves it attracts their attention. Moreover, last time sent me two books for reviews however these bloody custom officers asked BDT 2000 tax for these though the books were gift! My bad luck is that, being a student I could not afford that high tax/excise duty!

All such experiences made me thinking that I won’t get things in hand! However, on the last week of November, 2010 I received the items (I have also ordered a speed light for my DSLR). Most interesting thing is that two items came from different countries and order in two days gap. However, I received both at a time. Now, let me say something more about the APad! Continue reading →

Macbook Pro, the missing keys

After purchasing the Macbook Pro on July, 2010 I noticed that some keys that I use most frequently, are missing on the keyboard. After passing more than 1 month, I also noticed my coding speed drastically reduced due to missing of those keys. So, I started Goolaptop keyboardgling for help. Though I did not like the solutions but still better than unavailability. The reason of my dislike is the combination of multiple keys! Here, I write how to perform some tasks whose keys are missing.

Home/End of Line
These two keys are used very frequently during programming. We can go home / end of the line using the following combination: Continue reading →

Passing filename arguments to PHP from shell and space issue…

Today, while working with a project to import thousands of articles from text files to wordpress,  I had faced a trouble while I am executing a shell script to iterate through all text files and call a PHP script with sending the filename as argument. The PHP script would then process the file as our requirement. The shell script looked like:

for i in `find . -type f -name '*.txt'`;


php import_posts.php $i


Here, $i would be the filename and it is passed to PHP script for processing. But the problem is that, when the filename (including directory name) consists any whitespace in its name, the script would broken. For example, some files path looked like
/home/user/articles/Internet Business/Web Hosting/how_to_start_your_company.txt

Here, notice the space after Internet and Web. The shell script was breaking just after Internet. It was sending /home/user/articles/Internet as argument to PHP script and obviously PHP script was failed to find this file.

After searching a lot, finally I found a solution.

It was really simple. I am quoting from his blog:

If none of your files or folders have spaces in their names, then this isn’t a problem, but that is increasingly unlikely nowadays.  If your songs do have spaces in their filenames, then the solution is to change how the shell splits that output.  This is controlled by the variable $IFS, which is set to spaces, tabs, and newlines by default.  We’d like it set to just newlines, so we do:

So, here is the solution. I just put the following line at the top of my shell script.

export IFS=$'\n'

After that everything is fine. The script is running exactly how I intended it to run.

Thanks for Anthony for his solution.