Pages

Installed ubuntu

Finally I am up with the Ubuntu on my vaio notebook. I was totally fed up of vista, which was sucking up the memory with its beast like processes. It was so sluggish that it was getting harder and harder to bear with. I am still keeping the copy of vista on my notebook as its the licensed version and Sony didn't ship any CD for it, just the recovery partition. Although i have made the recovery DVDs, but these DVDs will just copy the OS to machine (something different than installing) and will wipe off any partitions (and hence the data) that is written on other partitions. OEM sucks!!!

Anyways, the installation has not been particularly smooth. I had to install linux twice because once the system was booted from the recovery partition. damn, it removed the linux partition. Then i went on to modify the GRUB's menu.lst to hide the vista's recovery partition from the boot menu. WARNING: if you are installing linux and have vista's recovery partition, the boot loader may show two Vista/Longhorn OS under 'Other Operating Systems'. In such case, first boot in linux, edit the /boot/grub/menu.lst and comment out entry for the OS thats is poiting to recovery partition. (You will probably have to google a bit about GRUB)

Thank God, I had already copied all my data to another laptop (through network). Will have to copy that back. Well that was expected, and windows had warned me about it. But my point is they should keep a provision for keeping other drives intact. Now its all done, and am bit relaxed.

I am a complete linux newbie, and i hardly know anything about this OS. Am gearing up myself to use it now on for my development works. Ubuntu looks very user-friendly and is quick. But there are many things for which i may have to turn back to vista for a while.

I am happy :) as am posting this blog using ubuntu. Will post more about the same very soon.

Wishes

Firstly, a very happy diwali to all. And a very happy birthday to me :)
Yes, coincidently this year my b'day and diwali are on the same day.

New Hotmail

Hotmail is undergoing some changes. They claim that they are making it faster, cleaner, simpler. These lines are so cliche. Does anyone ever make any service slower, messier and complex?

When I happened to check my Hotmail inbox after long time today, I was surprised by a message that said it didn't recognize my browser and I should use either IE, ffx or opera.Now the funny part is, I was already using ffx. You have an option to continue anyways. I chose that. The display was simply horrible. I mean Fonts and overall look and feel. I tried in IE8 as well. No improvement. May be its not rendering properly on my VAIO with vista. I tried on desktop PC. There viewed it on IE 6. Fonts were better. But heck, old look was much better, cleaner and faster.

I think the transition is not over as of now. But what they are serving you now is a total crap. The old interface was much cleaner than what it looks today. The interface is even slower. My whole point is they should not have released such an unbaked version.

Microsoft has always been slow in implementing features. Be it anything. For example, when everyone else has already implemented IM feature (inside the mail) long back, they are still to incorporate it.

Anyways lets hope for Hotmail to get better. You can share your experiences with me regarding the same.

One year

In all this, I just forgot that my blog has completed an year on 13-14th of Oct. (Belated) happy b'day to it :)

Blogging

Thanks a lot to blogger for such a great service. To all, those who are not blogging yet, do it. Its fun. There are numerous famous blogging services out there available for free. Choose anyone. Blogging is incredibly easy.

Blogs are great place to share your thought on just anything. It doesn't matter how good you write as long as someone is there who is reading it. Even if no-one is reading it, it gives you satisfaction that you are writing something. I have just limited the scope of blogging by saying the above lines. There is definitely a lot more to it.

The first difficulty in creating a blog is setting up your mind (and not the blog). The second is choosing the service. Then comes choosing a URL. Mind it, choose a URL such that it doesn't change with time. Don't give it name based on your present state of mind. Or something that will not hold true after some time. For example, thirdyearstudent.xyzblogsite.com etc. Now think yourself, are you always gonna be in third year? This name may be pertinent if it actually will always have posts related to third year students only. That is, your are always gonna write about it. That said, choose some sensible name that actually reflects the purpose of blog. Every caution you take while choosing a (non anonymous) email-id should be taken while choosing the blog url/name. I simply use my name for all the stuffs. I don't want to conceal my identity behind some cryptic names (And even my brain can't think of any creative names). But you may want to do so. Do so, but sensibly.

Why am i saying URL should not change? Because someone in the other corner of world may be bookmarking your page or hyperlinking to your blog which would point nowhere once you change the URL itself.

Now what should one write? I don't know. I dont have any goals for myslef. But a blog dedicated to specific subjects receive more attention by limited audience. Blogs written on more general topics receive lesser attention by greater audience.

Do blog. I would love to hear from anyone who is reading this. (well if I am talking about blogs, I should've said read ;)

Relations

Every relationship has its limits. Don't cross them.

Wierd Widespread Web

Web is growing, taking new shapes, crossing boundaries, reaching billions of humans (and to remotely-any-humans too). Some alien words have become part of our lives, some made it to dictionaries as well. (pop quiz: what URL stands for?). The web has evolved from static to dynamic pages to web based services to semantic web.

Emails, IMs, Search Engines, Social Networks, Blogs, Wikis, Audio/Video Streaming etc. are just the tip of iceberg. There is whole lot more, huge and massive. Rich Internet Applications are delivering desktop-apps like functionalities in the browser windows. Server Side Technologies are powering billions of hits a day. There is so much going on and beyod that, that it doesnt make any sense to belabor its importance.

What I would like to cover in some of my posts in future is some really cool and useful web based services that I found useful and am using or have used them for some time or would like to use them or would like YOU to use them. And also would love to discuss some common problems that we are facing on the web.

PS: I will tag these posts with 'web'.

Back again

Hey all! Am back again. Was too occupied with SCJP (Sun Certified Java Programmer). Managed to pass the exam with 69/72, that's about 95.83%. Feeling relaxed and relieved. Partying with Darpan (my cousin).

Meanwhile lot of things happened. Is it? I don't know what. I am just putting it this way to give you a feel that the world was not sitting idle while I was studying. I hardly have any idea of what happened.

Again, just writing because I felt like, nothing more to it. Will be writing more in coming days. Although have loads of work , but will manage to update you with some good stuff.

Stay Tuned!

हिन्दी में प्रथम लेख

कई बार मुझे इस बात का एहसास होता है कि हिन्दी हमारे देश कि प्रमुख भाषा होते हुए भी कंप्यूटर पर कदाचित् ही उपयोग में लायी जाती है। शायद इसकी एक वजह हिन्दी की देवनागरी लिपि हो सकती है, जो कि मूल रूप से कंप्यूटर पर लिखी जाने में थोडी कठिन होती है। प्रायः हमारे कुंजीपटल पर अंग्रेजी अक्षर अंकित होते है और हिन्दी कुंजियों का क्रम शायद ही कोई जानता हो। परन्तु अब अंग्रेजी कुंजीपटल के माध्यम से भी देवनागरी बड़ी ही आसानी से लिखी जा सकता है। यह लेख उपरोक्त कथन का जीवंत उदहारण है।

तो फ़िर क्या वजह है कि हिन्दी का उपयोग आज भी व्यापक रूप से नही हो रहा। हमारे देश मैं इंटरनेट का उपयोग करने वालो कि संख्या दिन प्रतिदिन बढ़ रही है, पर हिन्दी लिखने वालो का प्रतिशत आज भी नगण्य है। एक आम उपयोगकर्ता आज भी हिन्दी मैं लिखना नही जानता। कहने को तो आज हम सूचना प्रौद्योगिकी की महाशक्ति है, पर हम हमारी ख़ुद की भाषाओँ में ही लिखना नही जानते।

हम अपने सामने ऐसे कई उदहारण रख सकते जिन्होंने अपनी भाषाओँ को ससम्मान इंटरनेट तक पहुँचाया। जर्मनी एवं दुसरे यूरोपियन देश, चीन, जापान, थाईलैंड, अरबिक देश आदि आज कामयाबी से व्यापक तौर पर अपनी भाषाओँ का उपयोग कर रहें हैं। पर हम आज भी अंग्रेजी पर पूरी तरह अवलंबित हैं।

कोई दोमत नही कि आज हम जहाँ है उसमें अंग्रजी का महत्वपूर्ण योगदान है। अंग्रेजी की वजह से ही हमने सूचना प्रौद्योगिकी में यह मुकाम हासिल किया है। पर इस वजह से आज हिन्दी का तिरस्कार होने लगा है। यदि आप हिन्दी बोल रहें हो तो लोग आपको नीची निगाहों से देखने लगते है। कम से कम तथाकथित 'कॉस्मो' शहरों का 'मल्टीप्लेक्स कल्चर' तो यही कहता है। बच्चो को बचपन से हिन्दी बोलने पे सज़ा दी जाने लगती है। हिन्दी को प्रायः दूजी श्रेणी कि का दर्जा ही हासिल होता है। या तो अंग्रेजी कि वजह से, या उस प्रदेश कि प्रांतीय भाषा के सामने। कई लोग तो हिन्दी में बात करने वाले को सीधे-सीधे पिछडा करार दे देते हैं। लोग फ्रेंच, जर्मन या कोई विदेशी भाषा बड़े गर्व के साथ सीखते है। पर हिन्दी का ज़िक्र तक करते उन्हें शर्म आती है। यह दर्शाता है कि हम में कितना आत्मसम्मान है।

हो यह गया है कि हम ना तो घर के रहें है न घाट के। ना हमें ढंग से अंग्रेजी आती है, (जी हाँ, आज भी हमारी अंग्रेजी का आंग्ल-देशों में मज़ाक ही उडाया जाता है) ना ही हम ढंग से हिन्दी बोलने के काबिल रहे हैं, और ना ही अपनी प्रांतीय भाषा। और इस भाषा कि खिचडी को नये पीढ़ी की 'फैशन' करार दिया जाता है। मैं किसी हिन्दी के प्राध्यापक की तरह कोई भाषण नही देना चाहता, और मैं ख़ुद भी इसी 'फैशन' का जाने-अनजाने गुलाम बन चुका हूँ।

आज भी हमारे देश की ९० फीसदी से ज्यादा जनता (जो की पढ़ लिख सकती है ), प्रमुख रूप से हिन्दी या प्रांतीय भाषा का प्रयोग अपने रोज़मर्रा के कार्यो के लिए करती है। यदि उन तक हमें इन्टरनेट को पहुचना है तो अपनी भाषाओं को इन्टरनेट तक पहुचाना ही पड़ेगा। हम लोग भाग्यशाली है जो अंग्रेजी पढ़-लिख सकते है। परन्तु जो नही है उन तक इस चमत्कारी सूचना प्रौद्योगिकी को पहुचाने के लिए देशीय भाषाओं का इन्टरनेट तक पहुचना अत्यन्त आवश्यक है।

यद्यपि आज के दौर में अंग्रेजी अत्यधिक महत्वपूर्ण है परन्तु अपनी मातृभाषा का सम्मान करना भी हमारी ही ज़िम्मेदारी है। भले ही आप ख़ुद हिन्दी का प्रयोग ना करे, पर इस लेख को पढ़ कर यदि आप हिन्दी के लिए भी अपने ह्रदय में थोड़ा सा स्थान बना पायें, और हिन्दी को हीन भावना से देखे, तो भी मेरा यह लेख सफल है।

Chrome shows passwords

This is really very very stupid on your part if you are letting chrome save your password. Go to
Settings->Options->Minor Tweaks->Show Saved Passwords
Select the website name and click Show Password, and there your are. Your password is shown as plain text! (Of course it should be plain text if it wants to show you the password in readable format. Plain text was just an intensifier to show my disbelief ;).

The same functionality (you can read a-hole-in-security as well,) is also available on FireFox 3.0. Go to
Tools->Options->Security->Passwords->Saved Passwords
But there is Master Password to protect anyone else from seeing the list. If you have not yet checked Use a master password then pray God & leave to mercy of intruder. [By intruder I mean anyone who has access to your machine with your login credentials and with whom you do not want to share your passwords. It can be your roommate, colleague, friend..... or anyone, not necessarily a hacker. ]

If you let your browser save your passwords (which is indeed helpful, given there are tons of site you have registered to), I strongly recommend using a Master Password which is, actually, a password for all passwords. Before auto-filling any of your saved passwords, FireFox asks you to enter the Master Password. So all you have to remember just one password, the Master Password. And the intruder cannot access site using your password-to-that-site unless s/he knows your Master Password.

Chrome simply doesn't have any provision of Master Password. This implies anyone who can open the chrome on your machine (with your OS login) can see all of your saved passwords with just few clicks. Pretty straight forward and easy. So don't ever leave your machine unlocked if you are trusting chrome to keep your passwords safe because it assumes you keep you machine safe :)

Chrome Contd...

I am using chrome since yesterday and believe me, its terrfic. A refreshingly new broswer with amazing speed.

Some links to convince you:

benchmarking

why yet another broswer? Google's answer on their official blog

the official chrome comic

wikipedia link, (guys who update wiki are really quick :)

Google OS Blog,

There is lot more just a google away, Try it!

Hotmail on Chrome

When i was accessing hotmail from chrome, I was welcomed by this screen.

This was not a problem, just click continue and everything works fine. But why just MS site threw this ;-) ? Jokes apart, this is expected. New browser may take some time to be identified by some sites.

UPDATES: some of the functionalties are missing/not working.

Google Chrome - A Quick Look

Installation
Downloads very fast. Installs very quickly. Very easy.

Browser Startup
Very quick indeed. 10 times faster than ffx I'd say. Really lightning fast. Lets wait for some more features to add to it, like plugins etc.

Page Loading
I don't think browser can do much if your internet connection is screwed up. I didn't find any noticeable difference in terms of loading a page. For real benchmarking, test highly AJAXified sites on chrome. According to developers, V8 and WebKit would make rich internet applications work faster on chrome.

UI
Truly Awesome. Almost no UI. All you see is your webpage. Full marks for UI engineering. All not-so-used buttons/controls (which clutter up other browser's UI space) are safely hidden.
Window's title-bar's space is utilized for displaying tab. Even the browser's name is not shown anywhere on the screen. Looks like not a single pixel is wasted.

Tabs
Extremely Flexible Tabs, Pull out of one window, Push it in other window.
Secure. If one tab crashes, whole browser wont go down. (ffx3 on vista has become real pain in this regards)

Shortcuts
common shortcuts keys should work like they work for ffx/IE.
CTRL+TAB, CTRL+SHIFT+TAB, F5, CTRL+N, CTRL+T etc.
(They SHOULD work, for ease of new users)

Address+Search Bar
Address bar can act as search bar as well. (hmm...)

Application Shortcuts
drag and drop web applications shortcuts on desktop (..not a great deal, at least i think so)

Well well well....you can read about more features (downloads, security, incognito window etc) on chrome's site. Why am I wasting my time!!

Conclusion
Truly a new generation browser. Its worth giving a try. Very light weight and fast. Smart, streamlined and intuitive UI. But in the browser market, it has a long way to go.

Google Chrome

There was a time when browser used to be a separate application that was not a standard part of Operating System. People had options. Then came a big giant, and things would never be the same. Air would never be clean again. A cold war was set off. Do I need to tell more?

Internet Explorer, the blue E, had become synonymous to internet the same way Windows became synonymous to computer. [I have deliberately used internet in place of browser and computer in place of OS, so please, no hullabaloo regarding the same ;) ] . The little blue E was made an inseparable part of ubiquitous Windows. Though there was an Antitrust suit blah blah.. (which I don't want to discuss here).. it hardly made any difference.

Time kept passing by. The big M had now become a symbol of tyranny. The little E kept reigning the browsersphere. Given the backing of the big M, nobody could move E from its throne.

Meanwhile there was born a little g (then little), who had all good intents of organizing information. Little g would not intrude into business of others. It would just innovate (or take over small fishes in the pond).

At around same time a little m was born. By 2004 little m devised its flagship product named ffx (firefox, if you don't know). It was open source browser, all set to set all the records straight with M for whatever it had done to the poor chap NN (Netscape Navigator). And by far, it is climbing the ladder of success, successfully.

During all this, little g's growth had been exponential. Its journey from little g to bold face, font size 64, underlined, hyperlinked G was record breaking, jaws dropping.

G liked the good deeds of m. Shook hands. Together they looked like becoming a synomym of web 2.0. Glory of browser was coming back. People started realizing that Internet cannot only be explored by IE (and also computer cannot only be operated through a small service Window). G was ruling the web.

G should be having data of users like no other on the planet. G's offerings were increasing day-by day. G Offered win-win situation for businesses and end users by its Advertising services. G took control of everything, from search to email, blog to documents, code to health, finance to patents (and the endless list goes on). But somewhere in the back of its mind, G realized that all services it provides are still accessed through a medium (browser) on which it has little control.

Bang!!!! G lunched its own browser named chrome. They are giving good reasons as well. (Psst psst... has it got anything to with impending release of IE8)

As of now (2-Sep-2008), it (like all other Google products) is under Google's cool, all-new, exclusive forever-beta tag. Do they also think putting beta is trendy? because gmail, after 4 years, still has beta.

Anyways, I've always liked almost everything Google has offered. And am going to try this out as well and very soon gonna update you about it.

PS: Don't be deceived by the cynical language of this blog. I am a Google fan. I have respect to MS as well. They have done a lot good to the computing world. Please don't always disparage MS. It should really hurt the good folks working there.

PPS: Throughout this blog I have not mentioned the super brand with little i (and their broswer Safari). And also the browser with big O (Opera). This does not mean their contribution is insignificant. They were not here just because they would add a very little to the discussion. Now I have mentioned them, I feel better. Feel much safer from those iFanatics.

PPPS: You can find more on browser comparison (and almost anything that you can think of) on wikipedia

Delete data from tables

Ever needed to clear all the data from your database (usually while in development)?
You can use this script to clean the tables. It will work for oracle only, AFAIK.

-- script to clean the tables (ie the deleting the data only)
DECLARE
cursor c1 is select distinct table_name from user_tab_columns;

BEGIN
for v1 in c1 loop
dbms_output.put_line('cleaning '|| v1.table_name ||'...');
execute immediate 'Delete from '|| v1.table_name ||'';
dbms_output.put_line('done');
end loop;
dbms_output.put_line('completed');
END;

Disclaimer: I hold no responsibility for the havoc this script may create on your database ;) never use it on production databases.

Presentation on Log4j

I had presented this some time back at my workplace. May be you'll find it useful.

Log4j Logging Mechanism
View SlideShare presentation or Upload your own. (tags: log4jjava)

Interesting Identifiers in Java

Ever seen a declaration like

_ _ = new _();

or call to a method like

System.out.println(_._());


Try this example, you'll see, these are valid java statements.
read on..


package test.identifiers;

/**
* example that shows various legal identifiers
*
* @author Kunal
*
*/
public class LegalIdentifiers {

int $1 = 1; // valid
long _6 = 6L; // valid
char t = '\t'; // of course valid, did u have any doubt ;)

class t{
}
t $; // now here t is type & $ is object of type t

class _{
int _ = 0;
int _(){ // method with name of constructor
return _;
}
}
_ _ = new _(); // _ is an object of type _ (underscore)

void display(){
System.out.println(_._()); // interesting, isn't it?
}
// this is not a fill-in-the-blanks question
// it actually compiles and runs :)

// this means
String String = "String"; // is valid
// yes it is !!!
// so you can have variable name same as class name

public static void main(String[] args) {
(new LegalIdentifiers()).display();
}
}

Felt like writing just Anything

Once again i am feeling like writing. The same old story about not knowing what to write. There are things in life that make you feel good or bad. Almost everything you feel about something/someone can be boiled down to these two adjectives. Still we have coined thousands, if may be not a million, of adjectives to define every feeling defined in the world. Yet at times we run out of words to express ourselves. Language is the medium of communication, a medium to convey your thoughts to the other person (in fact to computers as well, now a days). It is a way of communication. It is One of the ways. This gives way to a thought that there are of course other ways as well. A hug of a friend is just irreplaceable with thousands of words. Sometimes a slap gives a better message to a kid than hundreds of warnings. You cant shy in words better than your eyes. Beauties can be defined in words but can never confined to words. All this is just a random musing over the very thought of writing something. I felt like writing something. I did it. I cant bound experiences in word but at least they give me power to share something about it. Without them (words), I could not have slapped this keyboard or stored my tears on the hard-drive. I think this is all for now :)

complicating things to get rid of complications

This blog is dedicated to me ;)

Well, as the title says, I really keep on complicating things just in search of some perfect solution that will take all the complications out of the thing/task at my hand. I think I will blog, I have had drafted many small articles which are still not complete. Always procrastinating things in hope of that golden day when every word written by me would seem perfect to me & finally I'll be able to post it.

I do code to earn my bread & butter. I have observed that I keep on refining/refactoring the code until everything becomes so customizable that it gets too complicated to understand at first sight. I have seen people who just do the work. They do great. They almost never drive themselves crazy for just a freaking line of code which doesn't seem right to them.

The point is to understand the 80-20 principle (Pereto's principle). 80% of work is done in 20% of time but the rest 20% takes the 80% of time to complete. This principle is amazingly true. Notice the time spent on each activity, even the trivial ones. We tend to spend a lot of time on the 'finishing touch'. And if you are not doing so then you are already on your way of learning the art of time management. The art is to cut the rest 20% of work at the point where you can just say you have completed your task. (Say at 90%... you saved 40% of total time just at cost of 10% of work.)... Well it’s easier said than done... :)

In fact, I fall in the category of those pigheaded perfectionists who consume whole 80% of time, still reach to 95% then again waste 20-25% of time & even after that believe there is something left to be done. And this last portion of work which I do really looks like a Monalisa hung on bathroom’s wall. It was really not needed. It doesn’t actually blend with the quality of rest of the things in place.

I do really waste a lot of time. I just can’t understand that why I complicate things so much. How do I convince myself that 90% is enough and is more than what is usually expected or done? Will write something more on the same topic, some other perfect day.