Tick! Tick! Tick! ... *** Bdoom ***

Posted by Praveen राठी in , , , , , , ,

Mumbai, Gorakhpur, Jaipur, Hyderabad, Bangalore, Ahmedabad ... they are everywhere now.
Watch out! you never know when you are going to step over a ticking bomb!


Friday - 8 serial blasts in Bangalore.
Saturday - 17 well planned blasts in Ahmedabad plus a live bomb found in Bangalore.
Sunday - Live bombs found in Surat and several more threats received by various regions of the country.


The moment something like this happens, our police starts finding who is behind this? Same now. Security agencies, intelligence agencies have started finding the similarities between the two blast events. Some of the key similarities found are:

>> Both the blasts were low-intensity blasts - the aim was just to create panic among the masses.
-- Who said? The fact is that the intensity was loud enough to take the lives of around 50 people. People are dying, panic is history.

>> Bombs in both the blasts contained the same explosive - ammonium nitrate.
-- Obviously, it's so cheap (even cheaper than milk) and available in bulk.

>> Both the blasts were done in BJP ruled states.
-- And so, people are assuming that Bhopal is the next in queue. Why?

>> Both the blasts used bicycles as carriers.
-- Since beginning (and especially after the fuel prices' hike), government has been asking people to use bicycles wherever possible. Terrorists seem to be more vigilant than our citizens. They are finding a big hit in bicycles for their purpose.


I have a few more similarities. Who knows they might be pointers to something very important?

>> Both the cities host the most prestigious IIMs of the country.
>> The names of both the cities contain 9 alphabets.


But what is the point in finding the similarities, when a group has already taken the ownership of the blasts - "Indian Mujahiddeen". And you know, they are daring enough to send an email even before the blasts. They are so sure of themselves that they won't be traced and caught. Are they so confident about themselves or about our security agencies?

So, why are we counting similarities - just to find the link between the two events? Yes, there is a link, very strong link. Not between these two blasts only, but all the blasts that have happened so far. The link is that they are done by people called terrorists - someone against humanity. And congratulations! we have a new group on the floor (Indian Mujahiddeen).

You know, India seems to be the softest target of terrorism.
Indian population is increasing, so the terrorists are also increasing their count (new groups are being created and more people are added to the old groups), but what is happening in the POLICE department? The ratio of police force to the total population in India is almost zilch. Someone needs to look at this aspect.

These kind of news add to the panic when Independence Day is just round the corner. In such kind of situation, people need to be more alert and more patient. I think its high time when we, citizens be on our toes. Be extra vigilant, extra cautious! Raise an alarm with the police whenever you suspect something / someone.

Powerpoint 2003 - File size

Posted by Praveen राठी in , ,

I am a bit confused about how Microsoft Office Powerpoint 2003 manages the size of the PPT. You can try this out. Follow these steps:
>> ... Create a fresh new PPT. Don't write anything into it.
>> ... Just save it on to your disk.
>> ... Check the size of the PPT file. For my case it is 8 KB.
>> ... Now save the file again (Ctrl+S). And now check the file size. It has changed. I got it as 13 KB.
>> ... Now keep saving this file again and again without writing anything into it (No change). You'll find the file size changing with every save you do. For me, it kept on increasing by 1 KB with every save.

Discovery: No change to the file, nor to its contents (absolutely untouched). Why is its size increasing with every save? Any answers?

Note: I tried doing the same with Powerpoint 2007. Everything is fine there. The size of the new PPTX file is 29.3 KB and the file size is not changing with subsequent saves. Looks like Microsoft has fixed the bug in this release.

चैन से सोना है तो जाग जाओ

Posted by Praveen राठी in , , ,

ज़ी न्यूज़ पर प्रसारित एक कार्यक्रम की टैग लाइन है ये.

क्या आपको कुछ साल पहले दूरदर्शन के किसी भी न्यूज़ रीडर की शक्ल याद है? शायद नहीं, लेकिन इतना ज़रूर याद होगा कि समाचार बोलते वक्त उनके चेहरे पर कोई भाव नहीं होते थे. आज देखिये, खबरों में कितने भाव, कितना मसाला, कितना ग्लामौर आ गया है.

ये भारतीय मीडिया को हो क्या गया है? हिन्दी समाचार चैनल तो सारी हदें पार कर चुके हैं. कुछ दिन पहले वैभव ने कुछ ब्रेकिंग न्यूज़ पेश की थी. पढ़ कर बहुत हँसा था. आज एक और ब्रेकिंग न्यूज़ मिली है. ज़रा गौर फरमाएं:









ये तो महज़ एक नमूना है. आप प्रतिदिन अपने इन समाचार चैनलों पर सास-बहु सीरियल भी देख सकते हैं.कितनी मेहनत करते होंगे हमारे हिन्दी न्यूज़ चैनल वाले इस तरह खबरें इकठ्ठा करने में. हैरत तो इस बात की है कि इतनी बड़ी दुनिया है, जहाँ हर समय कुछ न कुछ घटता रहता है, कुछ ऐसा जिसकी ओर जनता का ध्यान खींचना आवश्यक है, उन सब में से ये मिलता है दर्शकों के लिए.
जो कुछ मुद्दे हिन्दी समाचार चैनलों पर छाये रहते हैं, वो हैं:
>> खली (धोखे का शिकार बेचारा खली)
>> राखी सावंत (ने अपने बॉयफ्रेंड को थप्पड़ मारा)
>> लाफ्टर शो (मेज पर हाथ मार मार कर उसे तोड़ते नवजोत सिद्धू)
>> फिल्मी सितारों के अफेयर (यहाँ तक कि जानवरों के भी)
>> ... और न जाने ऐसे कितने हैं (लिखते लिखते रात हो जायेगी)
स्टार न्यूज़, आज तक, ज़ी न्यूज़, इंडिया टीवी - सभी एक ही थाली के चट्टे बट्टे.
बचा "NDTV इंडिया", इन बेचारों को शायद ऐसी ब्रेकिंग न्यूज़ नहीं मिल रही हैं. शायद इनके रिपोर्टर लोग बड़े नाकारा हैं और ठीक से काम नहीं करते. और शायद ऐसे काबिल रिपोर्टरों की कमी की वजह से ही इस गरीब चैनल को कोई पुरस्कार, अवार्ड इत्यादि नहीं मिलते.
वैसे मैंने कुछ नया तो नहीं लिखा है, लेकिन आज की इस ख़बर को पढ़ कर मुझे लगा कि इतनी ख़ास ख़बर को यहाँ जगह देनी चाहिए.

TOAD 9.0 - I found a bug

Posted by Praveen राठी in , , ,

TOAD is one of the most widely used editors to interact with the databases like Oracle, SQL Server etc. No prizes for guessing why is it the most popular editor - It provides so many fancy things to play around with the queries. The look and feel is really cool. There are utilities like Formatter Plus (to format your ugly looking queries), Code Xpert (to do a complete post-mortem of your PL/SQL code), SQL Optimizer (to guide you through your heavy weight queries) , then there are ready made code snippets to boost up your coding speed, fancy looking explain plans (perfectly readable) which can be seen animating.ER Diagram, Code Road Map, FTP, File comparison are other some of the very useful utilities.
I think, enough of praise. Now the bug!

I ran a very simple statement and tried to count the number of rows in the result set. The size of the result set can be seen at two different places. Marked in red in the image below:


Oracle is returning 798 rows. But, when I did a "Record Count" from the right-click menu of the "Data Grid", I got 804 as the count.



To further check this, I directly ran a SELECT COUNT ... query, and I got the count as 798. This clearly indicates that TOAD is being erroneous while counting the records.Inspite of being one of the finest SQL editors in the business, TOAD has its own set of limitations. Who doesn't have them by the way?

As told in my previous post, we are curerntly in the process of migrating some of our applications from Oracle 9i to 10g. And to my surprise, we have found so many issues with the Oracle 10g itself. Oracle 10g SQL optimizer has a lot of bugs in itself. We got back to Oracle Support team with our pain points. They admitted the issues and are working on it. For the time being they suggested us a work-around:

ALTER SESSION SET "OPTIMIZER_FEATURES_ENABLE" = "9.2.0";

Yes, as said by my manager, this is really ironical that we will be using 9i optimizer in 10g but it is what it is. :)

I was laughing out loud at this. Oracle has its 11i release set to launch and they have bugs with 10g optimizer. But never mind, that's the life of us - software engineers. So just chill !

Oracle SQL Optimizer - 9i vs 10g

Posted by Praveen राठी in , ,

We are currently in the process of migrating some of our applications from Oracle 9i to Oracle 10g. One of the problems that we faced while migrating the application code is the order in which the result is returned for a particular set of queries.
We have some dropdown boxes (e.g Country Name) in our application which are populated dynamically by a query like this:

SELECT DISTINCT country_name FROM countries WHERE current_rec_ind = 'Y';

The DISTINCT and "GROUP BY" are two clauses that inherently force the sorting of data set in case of Oracle 9i. So, when you have a DISTINCT or "GROUP BY" in your SELECT query, you are most likely to get the data set sorted by the columns in the SELECT list. This happens because the SQL Optimizer (Cost based) in Oracle 9i is implemented in such a way that it gets the lowest cost for a query when it first sorts the data and then removes the duplicates.
So, for the dropdown, we always used to get the country names sorted alphabetically.

But this is not the case with Oracle 10g. The SQL optimizer in 10g does not sort the data in order to remove duplicates. So, we were not getting the country names in proper order. Here are the explain plans of the same query in the two Oracle versions to make it clearer:



The second step in the plan makes it all clear.

This is one of the potential risks that should be considered for your application code while migrating from 9i to 10g. So, its always better to have an "ORDER BY" in your queries if you need sorted data to avoid backward compatibility problems.

Army Ranks: I wonder ...

Posted by Praveen राठी in , ,

I got my first SSB call when I was in 11th (I appeared for it thrice, but that's a different story, some other day). That time I was very very excited about our Armed Forces. While studying about Indian Army at that time, I noticed something about the Army ranks. Let me list the ranks in the top-down order. I learnt them by heart and I still remember:
---------- Officer Ranks ----------
1. General
2. Lieutenant General
3. Major General
4. Brigadier
5. Colonel
6. Lieutenant Colonel
7. Major
8. Captain
9. Lieutenant
---------- JCO Ranks ----------
10. Subedar Major
11. Subedar
12. Naib Subedar
---------- Other Ranks ----------
13. Hawaldar Major
14. Master Hawaldar
15. Hawaldar
16. Naik
17. Lance Naik
18. Sepoy

Ok, now I always wonder about the sequence of these ranks. I see a problem at one place. Look at the pattern:
> Before Captain, there is Lieutenant
> Before Colonel, there is Lieutenant Colonel
> And before General, there is Lieutenant General
All fine till here. Now see this:
> Hawaldar Major is after Hawaldar
> Subedar Major is after Subedar
> But why is Major General before General?

This question might be really absurd, but it just never goes out of my mind. I asked some people about this here at AFMC but didn't get any answer. Responses were like:
> "I don't know"
- Grrr!
> "I know the ranks but I never realised this pattern"
- Thank You!
> "Oh! is it? I never knew that General is after Major General"
- Dumbo, General is the highest rank in Indian Army.
> "Why should we bother?"
- Oh dear! there is nothing to bother about. This is just a question.

Someone wants to help?

Life - Back on Track

Posted by Praveen राठी

Yeah! it went off track last friday. With so many things to do, I was not finding time to prepare for PR 301. Weekend helped a lot and I managed to clear it yeasterday (84%).

The life is normal now with my exercise routine in place :)

Hopefully, you'll find me more active in this space now.