Dec 26, 2007

after Alchemist comes Zahir

The zahir is said the Novel of Obsession...like The Alchemist was a Fable About Following Dream. Another best seller from Paolo Choelho. The Alchemist was mesmerizing ... I've just started to read the other one, hope it will not disappoint me.


I wish I could understand Portuguese to read the novel in its original form, because at times I felt the translation too simplistic. But at least you don't need to care for the symbolism or philosophy as long as you can make your journey with the author !

you also can download from here and share the experience..





Dec 5, 2007

SCJP Test Killer: refference book for scjp exam

I think this book is very useful for SCJP test takers. It contains sample questions that can give a good idea about the exam question set. So while preparing for the exam, it would be very helpful to go through this book, read and understand the questions and their answers, the logic behind the answers. Some given answers may be incorrect. But still it is highly recommended to go through all the questions to get good score on SCJP.
http://www.amazon.com/SCJP-Certified-Programmer-Java-310-065/dp/0071591060

Dec 2, 2007

our Sundarban, my Sundarban ...


It was the best of our time- when life seemed so wonderful that we each could declare ourselves a king, as if we don't know the definition of sadness and worry doesn't recognize us ! And what can be the best place for a monarch to build up his dream castle rather than in midst of mother could declare ourselvesnature !
so did we..and who needs to look farther when we have our SUNDARBAN ?

We started from Dhaka on February 3rd,2007 . The journey was no less worthier than the destination. After 2 days of river-journey , Sundarban embraced us with all her beauty and mystery. Whatever comes to my site, it feels like they are just waiting for me for all these years and whispering their welcome notes..all the trees emerging from lake-ground, the rainbow covering the whole horizon, even the deer that fled away out of fear seeing all these humans-seemed to have the deepest bond with me, as I have known them long since.
When we reached the beach I was mesmerized, the vastness of water had some kind of "killer" attraction..you cannot hold yourself back.When I returned, I just left a piece of my soul in the shore and I have to go back there one day to find it.
Wish I could bring that whole beach with me !

This is the largest mangrove forest in earth, some portions of the jungle are listed in the UNESCO world heritage . We do have the right to be proud of the sundarbans . But in this case love certainly supersedes pride.

And now it's december, we lost our golden time and most painfull thing-- Sundarban lost it's treasures in Sidr..this cyclone devastated our economy, taken our lives, and destroyed a bigger part of the beautiful forest. It showed its calamity for only one day and whole Bangladesh will be suffering the result for long, don't know for how many days and month the victims whose everything washed away in the cyclone will be waiting for a handful of rice. But I am being a bit selfish, the helpless faces , the orphaned children can draw out tears from my eyes, still the deepest shock to me is the loss caused in sundarban..it's like loosing one of my own possessions, a personal loss , a feeling of bereavement deep inside . Even if we do not penetrate its perpetual growth for 5 or more years , there is no guarantee how long it will take to recover. First it had to fight with poachers and now nature itself had its tax. We cannot left our dearest sundarban just to be a part of our memory , she has to be alive again, with the same evergreen charm, the same warmth and mystery .

Nov 12, 2007

when you have regained a long-lost treasure !!

That was the moment, a truly unbelievable moment...and I thought it would never come ! and I still can't believe..is it real ! I lost it, I yearned for it..so many times, so long a time...I hoped that a day will come when I would find it again...
It happened quite a several times , I woke up in the morning and the first thing came to my thought--this can be the day !", and it wasn't, for sure. Again, I walked across the street and for a moment , it glimpsed in my mind..this can be the road where I would find it again..and then I got my conscience back by the harsh street noise.
And then I learned to live without the least hope to find whatever I was seeking for so long ! And I made my heart forget , forget to hope for, to crave for...I was amazed by this power of forgetfulness, when brain triumphs over heart and life becomes less painful ( as you forget the difference of joy and sorrow , just left with a dull feeling of nothingness ) .
Then one day , just out of nothing , a ghust of wind brings back a trace of memory you left far back in time , then everything you decided to forget starts to reincarnate before you , you can feel that still you are but a human! all those moment of bliss, all affliction that had made you up, whirl around you and drive you to the singularity where life gives you a second chance to choose !
And I thank Almighty ( who else to thank ! ), that He brought back to me such a treasure that I always have revered. It's never late, no matter how long ,it's always worth waiting !

Oct 13, 2007

Eid Mubarak...

And again another Eid has come today !! It's the first Eid after I have started my carrer, so it's very special for me. It's again the same old routine for Eid day....get ready with new dress & ornaments, visit all relatives , and after a whole day of gossiping and eating, seat before the TV , try to watch "SPECIAL" rubbish programmes !

In every other country, people get discount on purchase in occasion of festival, but as we are Bangladeshis, we ought to be exceptional, so we raise the price of everything, specially things that are essential in Ramadan. We don't even complain for this anymore, that's our own way !
The streets of Dhaka is quiet and traffic-jam-free for these few days as many people have left the city to meet their near and dear ones, yesterday I went to the mall with my sister , mom was away with her sisters...ya we had our fun while they have theirs ! Anyway, Eidee is another unmissable part of Eid, this time , as I have my own job now, I think I cannot escape from giving Eidee to my little cousins..so I have kept aside new bundles of notes for them, hope they spare me for little amount.

When I was younger , I used to get up in the roof along with my sisters and cousins
to see the new moon which brings the message of Eid. And dressing up with new clothings was trully a matter of rejoicing that time. Children are so blessed with the power of being happy with every little bliss Allah has bestowed upon us !! So lucky they are !!!

Whatever, still Eid is really a wonderful part of our life, don't know why, whether I enjoy the Eid day or not, the very thought brings a rush of joy in mind, all the month-long preparation , all these long9ing just for one day, however boring or interesting that day really happens to be, the excitement of preparing for Eid never looses its charm !

We try to keep a smiling face all day long, try to serve every one with the very best of hospitality, to show everyone that we are as happy as them (or even more )! Not a single trace of cobweb in wall, no dust in the furniture, no disparage in expression, no harshness in speech; Everything seems so perfect, so colourful, like we have nothing more to want for !!!

And when the day is past, again we return to ourselves, return to the real world, our weary , exhausted world , waiting for another Eid to come !

Oct 12, 2007

struts ,jsp,mysql with unicode support

jsp, mysql, struts with unicode character set support should have been an easy task, I found ample reference in web, still I had to face a lot of complications while setting up a website ( jsp based )which can take Bangla ( a unicode character set ) input from users, process the input via struts framework, store it in MySQL database and again display them in the same website. For Bangla text, it must have unicode support in the JSPs . The underlying database is mysql and we have used Struts to implement the MVC architecture. Our task was to provide it character set UTF-8 support in every layer.
Now I describe what we really done to make it :

Make the database Unicode compatible:


MySQL’s default character encoding is Latin1. We have to change it to utf-8 for Unicode compatibility.
    • Install mysql 5, if any previous version is already installed, first uninstall it.
    • If you need the data already inserted n the database, don’t forget to keep the backup. Dump it to a file using mysqldump. We here call the file dump.sql.
    • Every database has a database character set and a database collation.
    • The CREATE DATABASE and ALTER DATABASE statements have optional clauses forspecifying the database character set and collation:
CREATE DATABASE db_name
[[DEFAULT] CHARACTER SET charset_name]
[[DEFAULT] COLLATE collation_name]

ALTER DATABASE db_name
[[DEFAULT] CHARACTER SET charset_name]
[[DEFAULT] COLLATE collation_name]


See for more ..
For example :


“Drop database dbname;”
“CREATE DATABASE dbname CHARACTER SET utf8 COLLATE utf8_general_ci;”
    • Replace all latin1 instances with utf8 in the dump.sql file .
    • Load the dump into the new DataBase, run the script dump.sql. If you are creating a whole new database without using any previous data, then this step is not needed.

    • If you are uncertain about the character set or collation of the result returned by a string function, you can use the CHARSET() or COLLATE() function to find it.
    • For example:
mysql>SELECT USER(),CHARSET(USER()),COLLATION(USER());

USER()| CHARSET(USER())| COLLATION(USER())|
------------------------------------------------------

dba@localhost| utf8 | utf8_general_ci |
    • Now the database is Unicode compatible , but the JDBC driver or database connector has to know it; so we have to tell it through the connection string. We have to append this with the connection string : useUnicode=true&characterEncoding=UTF-8”.
For example:


String username="root";
String password="";
String url=
"jdbc:mysql://hostname/databsename?useUnicode=true&characterEncoding=UTF-8";
try {
Class.forName("com.mysql.jdbc.Driver").newInstance(); this.connection=DriverManager.getConnection(url,username,password);
}
catch(ClassNotFoundException ex){}

Thus we are done with the database.

Page encoding:

this is for the jsp pages to recognize utf-8 and use unicode encoding, so that your browser knows that it should use the character set utf-8. Put the following line at the top of your page; it will ensure that the Content-Type header is set appropriately
<%@page contentType="text/html;charset=UTF-8"%>

To set page encoding to utf-8 , this is what you should write:

<%@page  contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
put the correct meta tags in your HTML pages:
  • meta http-equiv="Content-Type" content="text/html; charset=UTF-8" 

If you're using forms, be sure to add this in the form:

 method="post"

accept-charset="UTF-8"
enctype="multipart/form-data"
As we are running the web application in Tomcat, it's better add the parameter
-Dfile.encoding=UTF-8
to Java options in catalina.bat/catalina.sh file to tell JVM that you are using utf-8.
Filter for Struts Action :

As I have already said that we are using Struts action for submitting our forms, we have to make sure that our encodings are intact through struts. The default character encoding of struts is iso-8859-1. So, we have to use this filter so all our request and response undergo this filter to view unicode character properly. To do this, just create a java class, suppose Filter.java .

public class Filter implements javax.servlet.Filter {

private FilterConfig filterConfig;
public void init(FilterConfig filterConfig) throws ServletException {
this.filterConfig = filterConfig; }

public void doFilter(ServletRequest servletRequest,ServletResponse servletResponse,FilterChain filterChain) throws IOException, ServletException {

servletRequest.setCharacterEncoding("utf-8");

servletResponse.setCharacterEncoding("UTF-8");

// Set the content type in the header of the response servletResponse.setContentType("text/html;charset=UTF-8");

filterChain.doFilter(servletRequest, servletResponse);
}
public void destroy() {}
}

Register this filter in web.xml file and define the mapping for this filter in web.xml file .

Hopefully this is all we need , still if anything goes wrong, don't worry, keep patience and think cool headed,

this is the lesson I learned while working in this project which now supports Unicode in all its layers.



Sep 29, 2007

naming history of TOMCAT and ANT

this time i got curious myself... why a technical product is named after a cartoon character? who does not know about Tom and Jerry ! even the "nerdest" person of the world who never watches TV is familiar with these two name. but why apache calls its web container /application server TOMCAT ?
The creator of Tomcat ,James D Davidson , had initially hoped that the project would become open sourced and, since most open source projects had O"Reilly books associated with them featuring an animal on the cover, he wanted to name the project after an animal.He came up with Tomcat since he reasoned the animal represented something that could manage for itself without help of others ( are cats really of this nature !!!!). His wish to see an animal cover eventually came true when O'Reilly published their Tomcat book with a tomcat on the cover !

And ANT was there to build tomcat ! this Java-based build tool was developed as a side-effect of the creation of Tomcat as an open source project. According to Ant's original author, James D. Davidson, the name is an acronym for "Another Neat Tool".

Later explanations go along the lines of "ants do an extremely good job at building things", or "ants are very small and can carry a weight dozens of times their own" - describing what Ant is intended to be. Another resemblance with the animal world !

Ramadan and Loadshedding..

it's mid Ramadan..the most important month for the muslims, we are observing fast , expressing our devotion to Allah by not taking any food and drink from dawn to dusk, and still.....we are facing load shedding, unbearable temperature and most painful->scarcity of water ! today i started to write something on my blog and out of nothing i heard my ups making that annoying sound of sound notifying power failure, and it was 4 times this very day and it took 1 hour for each spell of load shedding ! when i got back home from BUET overcoming the huge traffic jam and burning sun, i hoped to get relaxed a bit; but no way, it was power failure again. no matter which government rules us, it is our destiny to undergo these punishment for being born in a country which stands first every year for extreme corruption !

Ramadan is the month to practice austerity , but it seems now it has become the period when people get more prodigal extravagant with their expenditure..it can't even think of what will happen after nest 2 or 3 years...may Allah help us all to choose the right path !

why JAVA is named "JAVA" ...


yapp, one of my friend got stuck by this question on her job interview..and then i also got blank when she told me about it. i searched the web at once for the significance of this nomenclature...
and this is what i got...
James Gosling, who joined Sun in 1984, recalls the moment ,"It's surprisingly difficult to find a good name for a programming language, as the team discovered after many hours of brainstorming. Finally, inspiration struck one day during a trip to the local coffee shop". No wonder Sun uses the picture of a coffee cup as their brand icon !
Others have speculated that the name Java came from several individuals involved in the project: James gosling, Arthur Van hoff, Andy bechtolsheim.

Isaac Asimov ...the master of science fiction ..

At last i have finished reading all seven novels of the legendary FOUNDATION series by Isaac Asimov. i came by the first book Foundation(the first episode) when i just passed higher secondary in 2001 and was totally spell bound by the writing style and the power of the story. I just had to have the other ones..but the books were very expensive and i dared not to spend that lot of money that time..
at last the bangla translation had been published for three of them ..
"foundation and empire"(episode 2)
"foundation's edge"(episode 4)
"foundation and earth". (episode 5)
i bought " foundation's edge " from "ekushey boimela" of Bangla academy on February 2002 and "foundation and earth" on 2003. After reading these three in bangla I was lucky to get "the second foundation" as a gift from one of my friend, it was the original English version and one of the most thrilling one for me, the other one is "foundation and empire" . Though I have not read them in order as they are intended to be read still it was not impossible to get the excitement !
True to say, I was not at all happy with the ending in " foundation and earth", just felt that Asimov is not writing with full passion, he was just using his reputation to deliver a best seller without concerning about the readers' satisfaction...


The story of the foundation was over , but to satisfy the readers hunger for more from this series another 2 books of this series was published, these two deal with the past history of the foundation ! .. by this time i got accustomed with computer and internet and downloaded all 7 . But reading soft copy from the computer monitor is still difficult for me.. I started to read "Harry potter and the deathly hallow " before and gave up :( !! but this time I was determined ! and at last i finished the whole "Prelude to foundation" (the pdf I downloaded ) and it was the first complete eBook i have finished reading . Now i am really excited and am getting used to it...
the last novel of this series(and the last book of Asimov ) "Forward the foundation" has just disappointed me. it is not only boring, also repetitious ! But at least I realized one thing .. i was a science fiction fan from my school life and read as many si-fi as i could get..and most Bangladeshi writers who are filling their pocket and bank account by writing si-fies are doing nothing but copying the idea of Asimov and Arthur C Clarke-- the same plot, same story with a little change here and there .

However, the first four were tremendous, if you are a true si-fi fan , don't miss them at all !!

Aug 14, 2007

our lunatic squad ...


tanvir irfan sir is one of the nicest and finest teachers i ever got in life. we had a great time with tanvir sir and i will never forget what he said in the last class we have with him . he insisted that we should not only do great work, also express those with strength , because the world is not an easy place,you have to establish your way or fall behind . sir wrote about our batch on his personal website ...



"Pagla CSE-2001 (April 12, 2006) April 12 is the entrance day of CSE batch- 2001 students. They arranged a few programmes to celebrate the day. Most funny- they have named their batch "Pagla" (mad), because I used to call them "pagla" affectionately. They also made a common t-shirt for all of them with graphics and text symbolizing "pagla" on it. "


Aug 13, 2007

where have all the flowers gone...

water, water everywhere , not a drop to drink !! yes, this is really the situation now in Bangladesh. the flood might have over, but not the sufferings gone. people are still in misery; the relief work is not sufficient this year, actually they are never sufficient..how can you fill the lap of a mother who have lost her child ! no food, no shelter can repay this ! we can just have mere hope ...

Aug 7, 2007

and they follow you even in your dreams...

i needed to escape,to hide...but i could go nowhere, so invited those who were always lost into some other world and shared my moments with them! they just say your own feelings with their words...and you wonder how could they creep into your mind and sketch everything with those small verses !!
O DO NOT LOVE TOO LONG

SWEETHEART, do not love too long:
I loved long and long,
And grew to be out of fashion
Like an old song.

All through the years of our youth
Neither could have known
Their own thought from the other’s,
We were so much at one.

But O, in a minute she changed —
O do not love too long,
Or you will grow out of fashion
Like an old song.

--W.B.Yeats


THE LOVER PLEADS WITH HIS FRIEND FOR OLD FRIENDS

THOUGH you are in your shining days,
Voices among the crowd
And new friends busy with your praise,
Be not unkind or proud,
But think about old friends the most:
Time’s bitter flood will rise,
Your beauty perish and be lost
For all eyes but these eyes.
-W.B.Yeats

you can leave poetry, but poetry never leaves you...

Let Nature be your teacher:
Sweet is the lore which Nature brings.
Our meddling intellect
Misshapes the beauteous forms of things.
We murder to dissect.
Enough of Science and of Art:
Close up those barren leaves;
Come forth, and bring with you a heart
That watches and receives."
— WORDSWORTH.

Jul 29, 2007

new seven wonders !!!!




I was utterly shocked on the announcement of the new seven wonders of the world ! how come the pyramid of Giza has been left out ! if pyramid can't make us woder, then we must have lost our sence of woderment...

yes, peoples' choices vary indeed,but Egypt always have had some spell over me. i've never been there but i've promised myself ..i must stand before thise tombs and feel the pride of being a human being after all. and that moment i wont think about the cruelty or greed of the rulers who tried to deify themselves.. i will just wonder about the great minds who brain-stormed day and night for perfection. 
"The new seven wonders of the world" announced July 7 following a global poll to decide a new list of human-made marvels. The contest was organized by the New7Wonders Foundation—the brainchild of Swiss filmmaker and museum curator Bernard Weber—in order to "protect humankind's heritage across the globe." The seven new wonders are Christ the Redeemer" statue in Rio de Janeiro , Brazil ,the Colosseum in Rome, India's Taj Mahal, the Great Wall of China, Jordan's ancient city of Petra, the Inca ruins of Machu Picchu in Peru, and the ancient Maya city of Chichén Itzá in Mexico.


At last the Mayans got some respect they have deserved for long..the invaders destroyed most of the relics, cultural icons and the few people who escaped from homicide could not preserve their identity well. now we can just remember their glory and pay some respect to these ruins !




Jul 25, 2007

speciality about numbers !!

0 is the additive identity.
1 is the multiplicative identity.
2 is the only even prime.
3 is the number of spatial dimensions we live in.
4 is the smallest number of colors sufficient to color all planar maps.
5 is the number of Platonic solids.
6 is the smallest perfect number.


I found this very interesting...to find more visit this page ;

I went there while reading the february issue of SPECTRUM.
The article was "THINGS YOU MAY NOT KNOW ABOUT NUMBERS
" .

really interesting one...just go through it!

Jul 22, 2007

a great article ...about intelligence


yes, this one is really a great one. i was hugely moved reading this article on IEEE 's SPECTRUM magazine' s April edition. Jeff Hawkin revealed a newer vision about thinking. he is working in this field for a long time and going on with new energy and idea everyday.
here anyone can get the online version of this article:

Learn Like A Human

By Jeff Hawkins

http://www.spectrum.ieee.org/apr07/4982
http://money.cnn.com/magazines/business2/business2_archive/2007/02/01/8398989/index.htm

for years scientists are trying to resolve the mystery of human brain..how we really think, and they are not stuck with only human thinking, rather trying to build machines that can think! To make intelligent machines , our first job is to define intelligence , what actually makes us different and superior to all living beings. what makes us intelligent is our learning power, we learn from experience , we gather ideas through our perceptions, the more we learn the better we perform, and the faster we think. Our brain is nothing but a general purpose learning machine!

"One of the baffling aspects of the brain is that it decides what to learn on its own !"
....................................

in this article Jeff talks about HTM model , the outcome of intense research of numenta institute. He established this institution out of his interest about human intelligence and thinking process, though his field was electrical engineering. This new start really inspired me greatly ..a person never gets old if he always strives for knowledge, his thirst for new idea always keep him active and lively. And in the field of INTELLIGENCE computer science and neurobiology walks hand in hand , you never get tired however long this walk is ...you reach a new world and this is so exciting, you never feel bored. At every step, you find something new, and the truth is, all of these are actually inside you, the more we go through, the more we know about ourselves !!

let's think about thinking...

It strikes me every time when i start to think about our thinking process..whenever i meet a new person, whenever any of us meet anyone for the first time, we try to predict about his/her personality or more accurately, what is that person thinking about us ! We accept it or not, every single instance of time, every moment we go through, has something to add to our personality, our behavior. Sometimes the effect is so deep that it reshuffles our idea about life and living. Everyday our perception tries to make us fitter and worthier for the world we live !