Author: hasin

So it was a long break – How about a wakeup?

I was extremely busy with a lot of tasks – beside these, I was able to manage really a small amount of time to spend with my family. Still I have to spend some time on nobobangla project and wordpress book. I couldnt develop myself as I used to. I lost most of study times for the little “Ubuntu”

But I am really planning to get back on the track. I am learning ruby, spending time on J2EE and definitely working with PHP. I will be regular to my group very soon, I have to.

Hey hasin, its time to wakeup….

Hey – It's just a rowCount()

Java is a cool language, everything in the bag – but you have to search a lot for some simple tasks. Just like what I was doing few minutes ago. These days I am learning J2EE, specially JSP, Struts etc… I was searching how to find out the count of rows in a resultset which is returned by a statement. But unfortunately I found these is no builtin property/method to find it out. However, after searching in net for a couple of minutes I found the following solution

Statement st =
   conn.createStatement( ResultSet.TYPE_SCROLL_INSENSITIVE,
               ResultSet.CONCUR_READ_ONLY);
ResultSet rs =
   st.executeQuery("SELECT * FROM employee WHERE id_emp LIKE '1%'");
rs.last();
count = rs.getRow();
rs.beforeFirst();

————————————————————-
Down the way, where the nights are gay,
and the sun shines
daily on the mountain top,
I took a trip on a sailing ship,
and when I reach Jamaica I made a stop.

But I’m sad to say,
I’m on my way,
won’t be back for many a day.
My heart is down,
my head is turning around,
I had to leave a little girl
in Kingston Town.
———————-
By – Harry Belafonte [Kinston Town]

Update June 21st

I met Dr. Shah Musa, one of the chip design architect from Intel corporation, to extend his Nobobangla project at a new level. So far the second phase is complete. As a lead developer of Nobobangla project phase I and II, I am extending a specll checker which works as an integrated module of MS word. I am also working for the “on-the-fly” nobobangla editor.

Last night I redesigned my resume to a short version. I removed all the detailed project info and kept only some important projects. Now its a two page short resume which highlight me and my workability.

FeedPHP is going to be an affliate of PHPClasses.org. Yesterday I talked to Manuel Lemos and finished the initial steps. He has written and great review to my book, Smarty. You can check out this review by clicking here

Its Rainbow – Can you see the seven colors?

Yesterday afternoon I received seven copies of my book, “Smarty”. Though I already thought that I missed the mail because it was so late. Good God that I finally got them. It was an awesome moment. When I see my books, my name there, It was beyond my imagination.

I remember when I mail David about wordpress and Got this chance to write Smarty. During the time Ayesha gave me an invaluable support and helped me to concentrate on my task. I am really grateful to her. David, Rushav, Arnab , Patricia and Nanda, From my Editors Panel also helped me upto the maximum. It was a great experience writing for Packt. My co-authors, Lucian Gheorge and Joao Prado were also very nice guy.

These days I am writing a book on wordpress. Hopefully it will be released by the end of this year. I have more three chapters to write.

FeedPHP is going to be the largest PHP News Source

php-feeds.gif

FeedPHP is a free RSS aggregator which collects feed, parse and display the titles with a link back to the original source. This is one top news source for PHP and relevant technologies. This website is currently displaying news feeds from different fields like PHP, PHP Blogs, MySQL, PostgreSQL, Ruby, Java and others. No doubt, this is going to be the largest PHP news source in near future.

The whole site is a single page with mod_rewrite tricks. For performance, the contents are cached for several minutes, otherwise my site will be convicted for consuming excess bandwidth from those sites. Moreover, the site will be extremely slow for consuming remote contents frequently. Output buffering was used to serve the content quickly.

BDBlogs.net – The first Bangla Blog Aggregator

Recently I have visited a site www.bdblogs.net which aggregates the posts from various bangla bloggers website. The service is really cool. The display all the posts in this page. When someone clicks over any post, it will redirect to the original blog. I like this service very much. But I suggest some modifications

1. Lets display more than 10 posts per page
2. Lets display the authors name under each post

Today I have subscribed to their RSS and you will find all their latest posts in my blog, at the lower right corner.

Thanks for developing such a service.

ZipLib2 – The Top rated class in phpclasses.org, compression category

I developed ZipLib2, a wrapper over the original Ziplib class, one year ago to create zipped archives using PHP. During this time It was in the top position in compression category in phpclasses. After arrival of dUnzip and some other very good classes, ZipLib2 losses its position and went to third/fourth place. After that I modified the code a little bit and add a huge documentation which was not present in previous release.

Now ZipLib2 is the Top user rated class in Compression Category with 82.4% rating. Thats some good result.

Visit : http://www.phpclasses.org/browse/package/2088.html

Caching – Save visitors time and Balance the load

Caching is a major process of speeding up your application. By caching the output of a potentially large scale operation and displaying that output later from that cache saves a lot of time. First if you have cached output of a large scale operation, just check whether the cache is out-of-date or not. If it succeeds all the parameters, display the cache which saves that time consuming procedures. These large scale operation may include fetching content from an remote source using CURL or any stream wrapper, or a database operation, or even a time consuming graph/chart generation.

There are several types of caching, like opcode caching, output caching etc. Compiler level caching are out of scope in this article. We are simply talking about the output caching. In this step PEAR::Cache or PEAR::Cache_Lite may save really a great amount of time. Lets take a look how.

In the following example we are using PEAR::Cache. You can also use Cache_Lite which functions great by sacrificing a bit performance.

<?
include("Cache/Output.php");

$cache = new Cache_Output("file");
if (!$cache->start($cacheid, "samplegroup"))
{
	//perform large scale operation
        echo "Hello";
	$cache->end();
}
else
{
	echo "Printing from Cache";
}

//display the cached content
echo $cache->get($cacheid);
?>

First time, the output is generated as usually. But from next time the output is displayed from cached bypassing the large scale operation.

You can flush content of any cached group by accessing it’s flush() method which looks like below

$cache->flush( “samplegroup”);

Thats it.

Free Software that made my life easier

Free Software that made my Life Easier

I am generally an open source enthusiast and try to use free software as much as I can. Here is some of this software those make my life a lot easier, reduce the everyday pain and finally saves my wallet from getting slim.

Office Package: No doubt I do stay on open office, the amazing office bundle developed by sun and thousands of contributors. The recent version of Open Office is really something that can fight with MS Office. I need not to use any other office package for my everyday office work.

Notepad: You may surprise, but I really need a faster editor for editing my daily code files with the feature that I die for, syntax highlighting. I find Notepad2 is amazingly slim and faster and can replace the built-in notepad application with much more rating.

Database: Well, yeah MySQL. That is my first choice over the proprietary Access. It helps me to keep track of my applications with enterprise features and scalability. And most of all, its free.

Blog: There are so many blog engines in the market but I do stay on the oldy goldy WordPress. If you are familiar with extending wordpress, then you definitely know how it can fulfill your entire requirement for everyday blogging, even for a small CMS. I love wordpress.

RSS Aggregator: Here comes the RSS Owl, the open source java based RSS feed aggregator that I rely to keep myself up-to-date. RSS Owl comes with built-in tabbed browser which reduces the pain of opening another browser to check the feed URL. Moreover its customization capability is very powerful and that’s all, I don’t need anything more.

Email: Ha Ha Ha, No place for Outlook. I like and trust on Thunderbird.

PDF Generator: I use Open Office’s built-in PDF printer. That works pretty fine for me and can generate almost every kind of PDF.

Organizer: Hey can you guess which One I do use for organizing me? Aren’t you? Yeah Is Sunbird, the organizer developed by Mozilla foundation.

Web Browsing: I stopped using “Blue E” years ago. I find myself in love with Firefox. I am extremely annoyed on Opera 8x versions because of their lack of support to rich text editors and a bug which sometimes erase your bookmark list after a crash.

Explorer: Here I sometime use Microsoft XP’s built-in explorer but I really depend on Total Commander Power pack edition. That may not be free at all, but it’s a shareware. But the shareware works pretty fine and hey, if you don’t mind buy it for 28 Euro.

Instant Messaging: You may already fall in love with YM or MSN but I do use all-in-one instant messengers. Sometime I use web based solutions and sometime I use desktop applications. For web based edition the Meebo is the most hassle free software. You need not to install it anywhere. Just go to www.meebo.com and start using IMs for free.

FTP Client: Here comes the award winning software FileZilla. It’s free and fast. You can depend on it for every kind of FTP operation.

Photo Organizer: Flickr is worlds most poplar free photo organizer and it do its job pretty fine. I use flickr for storing my everyday photos, organize them and share them with my friends. I really found no alternative of flickr.

Bookmark Manager: Yeah its del.icio.us.

Misc: I also use the following software, services for daily purpose
1. Stickies for sticky management
2. PHP Designer for editing PHP code
3. Unitty for SFTP and SSH
4. Net2FTP for web based FTPing