Ruby Under a Microscope

Finally, I’ve started reading the book Ruby Under a Microscope written by Pat Shaughnessy. I was eagerly waiting for this book for quite long time. When it released recently, I saw that I can’t buy it using PayPal. I emailed the author asking how can I pay using PayPal. To surprise me most, the author sent me a copy of the book with the reply email. I guess, he could feel my interests to read this book. I can’t be more happy.

I’ve just started reading it and yet to complete the first chapter. I am loving what I’m reading. I’m feeling indebted to Ruby seeing how far it goes with my written codes :-). I had no idea that, internally, it cares so much about my code and does so many things before returning me what I expect.

Continue reading →

PHP Application Development with NetBeans

I’m huge fan of NetBeans IDE for PHP based application development. Though I’m fully comfortable writing codes in text editors developed in mediavel ages :p, I’ve seen how IDEs like NetBeans let you concern about your application problem only while they take care of project management, code refactoring, syntax highlighting, versioning, code completion and any other features.

However, we can get most out of IDE (and anything) if we knew its usages very well. NetBeans were missing such manuals until recently a guide is written by PHP developer M A Hossain Tonu. The title of the book is PHP Application Development with NetBeans which is published by Packt Publishing, U.K.

Continue reading →

install pg with native extension error

I was getting trouble to install pg gem. The error i was getting is

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

I also found some tips on SO. It was to locate the postgre’s config (pg_config) to bundler before running `bundle install` command. For general postgresql installation,

bundle config build.pg --with-pg-config=/usr/pgsql-9.1/bin/pg_config

(path was not same for me on Mac OSx. It was /Library/PostgreSQL/9.1/bin/pg_config)

But this did not solve my problem. I was still getting the same error when i was running bundler. However, when i tried to install the gem separately with this directive set, it worked fine.

gem install pg -- --with-pg-config=/Library/PostgreSQL/9.1/bin/pg_config

Now the gem is installed fine and i ran the `bundle install` and it was installed without issues.

Try it!

jQuery Mobile: Part 3 – Modifying default ‘loading’ and ‘error loading page’ messages

In the second part of this series we have learned how to link pages. If you followed them, probably, you’ve also noticed that a ‘loading’ message while you are visiting pages back and forth. jQuery Mobile shows this while it loads the page behind the scene. Well, you may not see this in fast connection or during testing in your computer as it loaded too fast. Similarly, jQuery Mobile shows ‘error loading page’ when it fails to load any page.

In my application, I wanted to change these texts as I wanted them in Bangla.  We were seeing these because they are set by default in the framework. By modifying the default properties, we can change them to something we want.

To do so we will hook into jQuery Mobile’s ‘mobileinit’ event. This event (on document object) is triggered just on the moment jQuery Mobile is started to load. So, we will have to override these before loading jQuery Mobile library.

So far, we have loaded the library files in the following order:

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 →