Posts

Showing posts from 2014

Book Review: The Contract by Zeenat Mahal

Image
  Title: The Contract Author: Zeenat Mahal Genre: Romance Source : A copy provided by author for review Synopsis: Shahira, a 30 year old single mom to an eight year old boy, and a school teacher by profession, gets a rather unusual marriage proposal from Hussain. That of a contract marriage -where she would be responsible for raising his 11 year old daughter and taking care of his mother, while him -the so called husband -will be globetrotting on his business. Concerned of her son's future and securing financial security for herself, she chose to accept it. Little did she realize that this is going to change her life for good! Discovery: I first happened to read the preview of the book when it was one of the nominations for “Book of the Month” in July 2014 on Indusladies.com. It was a promotional event by “Indireads” where they were giving away 5 free copies to the winners participating in the giveaway. Recently received a copy of the book, thanks to the author f...

Setting up EJB3 Development Environment with Eclipse and JBoss

Image
I gave up my 30 day Programming challenge   after a few days only, partly due to time-constraints and partly because the problems I had been working on didn't seem challenging enough.Learning EJB3 took a priority and I started on that path. Here on my blog I will share my journey as I progress on the path. The first step was picking up a good book. I had purchased EJB3 In Action long back, so planned to go with it.I had recently seen a review about the second edition of this book.I thought the second edition will be pretty much the same as the first one with a little bit of addition here and there about EJB 3.1.Don't know what motivated me to take a peek at the second edition, and that very moment I decided to start with the second edition only. Got a soft copy in mobi format, so that I can read it on Kindle app in my mobile and tab. I read through Chapter 1 which is kind of introduction or the 25000 feet view of EJB3. Once I started chapter 2, I felt the need to se...

Day# 5 of Java Programming Practice- Change the first letter of each word in a sentence to Uppercase.

Image
This problem also seemed simple and I didn't take much time to write this one. In fact I decided to move on to the next problem again today and post two of them together. But on reading the next problem I felt that I will be able to do it better once I am through with regular expressions. So, taking a break to read through the topic of regular expressions before diving into the next problem.   Here is the problem and my solution of the day. The problem is just to change the first letter of each word in a sentence to capital case.  

Day#4 of Java Programming Practice- Two Simple programs

Image
Today's program turned out to be quite simple , so I completed two of them. the first problem is to replace each letter of the string to its subsequent letter and change the case of all vowels in the resulting string to capital. All characters other than alphabets should be left as is. Here is my program and its output: The second program is to keep adding all numbers from 1 up to a given argument. Here is the program and its output: Closing this not so interesting day, will be back again tomorrow with something interesting hopefully.

Day#3 of Java Programming Practice- Longest word of a Sentence

Image
Today's problem is finding longest word of a sentence.The twist being, in case any of the words has punctuation marks, the punctuation should be ignored while calculating the length of that word. My first choice to separate each word in the sentence was by using a String Tokenizer, but when I looked in the documentation for the syntax, it told me that using split is a better idea. This twist of ignoring punctuation mark got me thinking , and this is the program I wrote along with the output. Though it gives correct output, I felt it to be an ugly version. I started looking on the net for a better solution, Though I didn't get an exact solution of this problem, I did get an interesting idea that helped in making the program look better. So here is the second version of my program.  This made me realize that I need to work on learning regular expressions properly. And the learning notes will certainly make it to a post on this blog.  Signing off for tod...

Day#2 of Java Programming Practice: Return Factorial of a number

Image
Taking a first look at this problem, I decided to skip it as it seemed very simple. Then I thought, may be instead of using the simple for-loop, I will try writing it using recursive function. This did turn out to be a challenge for me because I had always avoided learning and practicing recursions. This is the final version of the program I wrote and its output:  On successful completion of the above, I started searching the solutions on the net for a better approach. This led to posts where it was mentioned that my approach won't give correct results for large numbers as the factorial will be out of range of int and long. So, we need to use BigInteger to solve the problem. Taking the advice, I started working on updating my program to make use of BigInteger. This again was a challenge for me as I was not familiar with the availability and usage of BigInteger methods and fields. This is the final version of the program and its output.  As I was struggling with writ...

Java Programming Practice- A new 30 day challenge

Image
It has been a long while since I worked on improving my technical knowledge or tried polishing my existing skills. Its never too late, so starting now. Here comes my latest 30 Day challenge. For coming 30 days, I will write one practice program everyday , compare it with other examples floating on the net, and find out what would have been a better way to do that. The practice program of the day: Reverse the String passed to a method. Here is what I wrote:   The output of the program is something like this :  gnirtS esreveR fo tset si sihT   Now for the better way of doing it: Instead of converting to character Array and then looping through I could have used the charAt method of the String class directly inside the loop. Here is the updated version:     We can reverse an input String also using the inbuilt reverse() method of the Stringbuffer and StringBuilder. But here is one approach (using recursion) that caught my eye: ...

Book Review: Those Pricey Thakur Girls

Image
Title: Those Pricey Thakur Girls Author: Anuja Chauhan Genre: Fiction Source : Self-purchased Copy Synopsis: The story revolves around the residents of 16, Hailey Road. Retired Judge Lakshmi Narayan Thakur -the man of the house, his wife Mamta Thakur and their five beautiful daughters named alphabetically from A to E. The protagonist is D- Debjani Thakur, who lands up a job as a newsreader in the national channel DD .Dylan Singh Shekhawat- her father's kot-piece partner cum friend's son - unaware of her whereabouts, bashes her thoroughly through his article in the newspaper India Post he is working for. As fate has it, they happen to meet - the twists and turns of events following their meeting is something to be found out on reading the book. Discovery: I had read the first novel from Anuja Chauhan "The Zoya Factor" and had loved it thoroughly. So, recently when I came across this title in one of the book selling sites, I picked it up just because th...

Book Review : Tuesdays With Morrie

Image
  Title: Tuesdays With Morrie Author: Mitch Albom Genre: Biography Source: Self-purchased copy Synopsis: Tuesdays With Morrie is a short account of the discussions between a 78 year old Professor Morrie Schwartz and his student Mitch Albom during the last 14 weeks of his life. Morrie was Mitch's favourite professor and on the day of his graduation, he had promised Morrie that he would be in touch with him. He could not keep his promise and it was only after 16 years of his graduation that he met Morrie, that too after he saw him on a television show and came to know of his medical condition. The union strike at the newspaper he used to work in as sports writer gave him ample time to meet Morrie every Tuesday and thereon started the lessons on life. Life as viewed by a person on the bridge between life and death. Discovery: In the year 2007, heard about it from a colleague who was also a book-lover. Even got a copy of the e-book from him, somehow...

My First Book Review: Chanakya's Chant

Image
Title: Chanakya’s Chant Author: Ashwin Sanghi Genre: Historical Fiction Source: Self-purchased copy Synopsis: The novel has two stories running in parallel. On one side is the story of the well known strategist in ancient India - Chanakya, determined to take revenge of his father's murder and nurturing the dream of a united India under the rule of an able king. He saw the qualities he desired for a king in Chandragupta Maurya and trains him. The duo finally with Chanakya's wisdom are able to defeat the Macedonians and lay the foundation of an undivided India. On the other side, is the story of a strategist in modern India -Pandit Gangasagar, who saw the qualities of an able leader in a poor slum girl-Chandini Gupta and wants to make her the Prime Minister of India. Whether he succeeds in doing that or not is something to find out after reading the book. Discovery: I discovered this book around three years back, when happened to see many commuters in ...

Self Help to Contemporary Fiction

I was on a self development spree for past few months, it came out really well.I was able to diminish my stress (teeth grinding) to a great extent. I have done a lot of damage to myself, I can see and feel that. But slowly trying to recuperate and gain back whatever is reversible. A lot learned in the process, most significant is loving myself. It took time to actually get the meaning of loving myself, as I was under the impression that I already love myself and there isn't more to it. Thanks to the self help books I have been reading, it changed my perspective and I could realize that I have not been loving to myself. This realization was a big thing in itself and induced some nice changes. Still a long way to go. Besides the self-help literature, the 5 minute journal that I wrote just for a few days had a profound effect on my life. The Law of Attraction by Michael Losier that I read and loved a lot also contributed to some wishes fulfilled by the Universe. A lot is yet to b...

My First 30 Day challenge- Giving up tea

Image
Recently had been reading Steve Pavlina's blog "Personal Development for Smart People" and came across the post " 30 Days To Success ". Quite interesting and motivating. It inspired me to undertake one new challenge every month and form some good habits in the process. What should be the first challenge ? I have been trying for a long time to wake up early, but haven't been successful yet. So , I started giving thoughts to what is it that makes me lazy in the mornings(sometimes I would just keep lying even if I wake up). Finally I came to the conclusion that may be it is the caffeine that is not giving me good sleep at night leading to all the grogginess in the mornings. So, this became my first 30 day challenge- giving up my morning and afternoon tea. How far am I in the challenge now? I am now near to completion (23/30) of the challenge, I had started on 3rd April and the finishing line is 3rd May.I am very happy that I could achieve this challe...

Advantage of living in Present

I had decided to make meditation my habit of the month for the month of February. But I couldn't keep up. Similarly I had tried to keep waking up early as my habit of month January, but struggling with it until now. Feel sad about it, but the good part is I didn't give up. I am still trying everyday. I am keeping my alarm set and everyday try to wake up early. Am sure ,soon I will succeed and one day, I will have this habit hardwired in me. However, another good thing is I have been keeping up with my meditation practice once at home (in morning- whatever little time I have) and once in office (guided meditation). I read few chapters of the book 8 minute meditation and came to know of different things to focus on. One thing which I found quite interesting was this- as every thought comes to your mind, classify it as past/future. I thought of trying this method not at the meditation time, but throughout my day. And the thing that amused me most was that 90% of my time either I ...