Sunday, August 06, 2006

A phenomenon called Ajax

Web applications have evolved a great deal over time. But it wouldn't be wrong to say that the most remarkable transition in web applications is what we've been experiencing in the last few years. This new emerging phenomenon is, what people call, the Web 2.0

For most of the history of the web, client side development has been seen as a lesser technical task. Most (all?) of the power of web based applications was concentrated at the server and the client was pure HTML which basically tells that this particular image or text should be displayed on the screen in this way. This was because most of the users were not on high speed connections or the application tasks required a lot of computing power which clients could not manage or maybe because the data and the logic had to be kept secret. This so called thin-client/fat-server architecture led to an entirely new user interface for web applications which was quite different from the user interfaces provided by desktop operating systems.

Some of the technologies comprising the Web 2.0 intend to change that user interface. One of them is called Ajax, an abbreviation for Asynchronous Javascript and XML. Ajax put the aspect of programming back into client-side rather than the mere markup it used to be. Now what do I mean by those keywords? Let me elaborate.

Ajax is a technology which can be used to give web-based applications a desktop-application like responsiveness and capabilities. Let me take the example of GMail, the poster boy of Ajax. Most of you have used GMail as well as other web based email clients like Yahoo! Mail and Hotmail. One of the difference between them is that GMail (once loaded) appears more responsive and fast, than others. When you click on a message, it loads and shows the message, without the whole page reloading again. This is achieved using some clever javascript programming on the client side by which requests to the server for data are sent in the background (Asynchronously) while normal user interaction can continue in the foreground. When the data fetching completes, the new data is displayed by javascript inside the page without initiating a page reload or refresh.

So how does XML come into the picture? XML (eXtensible Markup Language) is the data format in which the data is usually sent to the client side from the server. A javascript function receives the data, parses it into a DOM (Document Object Model) and renders it on the screen. Too many keywords, eh?

Once again client side programming is fun and new innovative applications of Ajax are coming up fast. Ajax powers various Maps' applications such as Google Maps and Onyomo Maps. Services like Windows Live, Yahoo Mail Beta, Google Suggest and our very own Indian Onyomo.com all utilize the power that Ajax offers. Interesting to note is the fact that the technologies that comprise Ajax viz. Javascript and XML are older than the concept of Ajax. GMail showed the world that they can be combined into a potent combination which can power an entirely new breed of innovative web applications which are more responsive and more desktop like (a capability hitherto difficult to achieve).

The subject is vast and time constraints do not allow me to delve into a lot of detail at the moment. But in case people are interested I may come up with specific tutorials and examples. You can find a lot of resources on these topics simply by googling them.

Since I haven't introduced myself yet; I am Shalin Shekhar Mangar, a final year student of JSS Academy of Technical Education, Noida. I have recently joined a IIT-Delhi based startup called Onyomo.com

Tuesday, August 01, 2006

What is cryptography and how can it help you?

What is cryptography (or cryptology) ?
cryptography n. art of writing or solving ciphers (a secret or disguised writing)

It protects a message or file from being read by an eavesdropper (one who listen to a private conversation) who has no other means of access to either the original text of what is protected, or the key with which it is encrypted.

How does cryptography work?
You use a program to encrypt it; the program will change the letters into symbols and other weird characters, so when someone opens the file they cannot read it. If you encrypt something and send it to someone the other person will need to have the program to decrypt it.

What can I encrypt?
You can use it to encrypt your e-mail that prevents people from reading it in transit. You can use it to protect the entire contents of your hard disk by encrypting everything. But if you use the Internet, there is at present, no encryption technique available to prevent your ISP (Internet Service Provider) from monitoring your connection, and seeing what web sites you visit. Theoretically, however, you could make a secure connection with your browser to a web site that then serves as a browser, accessing web pages for you that you request, and then sending them to your browser in encrypted form. There are anonymizing services on the Internet for other functions, but these services have been subjected to legal action at times, and required to give up their logs.

Since the Internet is terribly new and complicated, the issue involved can be made clearer by illustrating it in terms of older technology. You can use a code, or a voice scrambler, to keep someone eavesdropping on a telephone conversation of yours from understanding what you are saying.

Saturday, July 29, 2006

Email Spamming

Today in every part of the world, millions of internet users are checking their inbox every second. And these people must be aware of most effective internet problem. Can you guess it?
No!
Its Ok.
I tell you.
The problem about which I am highlighting here is of receiving mails from unknown person or organization. In internet language, such mails are termed as SPAM.
Spam is basically message that is related to earn quick money, winning a jackpot and travel trip, advertising different products or some sex-related materials. Such mails are really unwanted and those who send them are called spammers.

Why the name ‘SPAM’?
‘SPAM’ was the first canned meat product that did not require refrigeration introduced in 1937. But why these unwanted mails are termed as spam is unknown. Or, it may come when some Vikings of Monty Python, highly influential team of British and American television comedians who later branched out into films, overshadows other words by shouting the word ‘spam’ excessively. Actually, internet spam do the same task, it overshadows other mails in the inbox and thus occupy unnecessary bytes.

Friday, July 28, 2006

Programming and Girls

So what happens if you-the-geek goes up to your girlfriend (wait! a geek who has a girlfriend? ahem!) ? She says "Ya [your_name_here_o_geek_god], I know it's good for me. But I don't know anything!"

Hmm. Don't worry, it's the same ol' story everywhere and let me tell you; people, all the world over, are debating about how to get more women into computer science. So what steps can we take to bring our favorite girls (comeon, you can't leave me out just because I don't have a girlfriend!) to the fantastic world of programming and computer science in the real sense of the word. Let me forewarn you, the journey is tough and filled with terrors unforseen; of missing (mis-placed?) semi-colons and strange un-decipherable (un-compilable?) code.

So how did we become good programmers? Ofcourse I know the code runs with the blood, and the neurons function in harmony to move our fingers on the keyboard. And the code? what code? it's a direct brain-se (like dil-se) to the computer. Oops, I just got carried away. Flashback...yeah girls and programming. It's something like language and mathematics. You need to learn the nuances of the lingo and become expert enough to be able to express the delicate and precise balance of a mathematical equation. You miss a plus or a minus and it does not compute. You forget to place the equals sign and the stupid compiler can't understand a thing. It's like teaching a child to stand on his/her feet, to walk, to run. We practiced hard enough day and night to reach this kind of dexterity and everybody else must do the same.

It helps an awful lot if you're good at language (an area where girls are better than us, and don't kill me for saying this boys). And it helps an awful lot if you're good at mathematics (no boy, you're looking at the wrong place for a compliment). And remember, 'Practice makes a woman perfect'.

Ok, it's late at night and I need some sleep (yes, geeks do sleep sometimes). I'll wait for the first non-male (ofcourse I mean female by that) comment on this post to continue this geek-talk. And she'll also get a cadbury's eclairs from my side if possible :-)

Coming up next:
  • A survival guide to programming for newbies.
  • What will I get from a programming contest (I can never win against those #*#$)?
  • ... (that's a secret)
  • ... (will tell you about this only if you sign a non-disclosure agreement with me)
Disclaimer: If you're a girl, please don't mind; and If you do, please try to find a way to forgive me. After all all this is just some crazy geek-talk, right? ;)

Thursday, June 29, 2006

Geek Learning Painting!!!


I have decided to learn painting! And the decission has no inspiration from anyone's advice. It was completely on my part. Surprissed!
Everyone was surprissed with my decission, my mom, my sis and even the the arts teacher with whom I met today for learming painting was laughing in surprise. After all a techie learning painting is not something you encounter that easily!

I have been thinking of doing something which I have never done in my life. Something which I have never tasted in my life. Something which I may start from the crap. Something in which Im dummey. Of course there are tons of such things and I want to do many of these. To keep things simple I decided to start with such a thing.

I saw the painting by my sis when sitting in my drawing room and the great idea of me painting such a canvas flashed in my mind. A scenery with signature Saurabh. How is the idea! Brilliant!

I will be going to painting classes from tomorrow. I think learning painting by investing 6 hours a week when you have 168 hours to waste every week is a fair deal. Let's see how is atmosphere there. Meet the people there.

Monday, June 26, 2006

Insight into DP & BFS

Hmmm, thanks to two nice problems, I got some valuable reading of Dynamic Programming and Breadth First Search [Trees].

562. Dividing Coins
I did this program, I didnt even use recursion, yet I think the technique is called Dynamic Programming. From Cormen, I found out that the problem is similar to 0-1 Knapsack problem, and Shalin Bhaiya confirmed the same. However, I think the method I followed made the problem even simpler than 0-1 Knapsack.

439. Knight Moves
This was the TKP problem I was talking about. Used a BFS algo, but however, I didnt exactly use a tree. I used a queue instead. I wonder what is the method I used.. I mean whether what I did comes under DP or not, whether it is indeed BFS or not... Anyway, having done this program gives me tremendous confidence!

Sunday, June 25, 2006

TCCC Logos

Here are the logos that Anshul and I submitted at TCCC Logo Designing competition:
361


360


359


385


287


286

Sunday, June 18, 2006

Clock Hands & Circumference

Problem 579. Clock Hands
Took me 33 minutes, 43 seconds to code and successfully submit. Simple problem, shouldn't have taken me so long. I derived the wrong formula and even did a WA submission! I should be ashamed of myself... This, I think, was the easiest problem in the entire ACM collection...

Problem 438. The Circumference
Anshul found out the appropriate formula from TMH, I tried deriving it. Anshul coded the problem, I debugged it. Anshul wrote the algo, I implemented the input/output format. Teamwork! This problem done quite easily. Just submitted the code. My submission took ACM judge 0.000 seconds, while Anshul's took 0.004 seconds. I wonder why, coz we submitted the same file twice. Anyway, I am rank 1088 for that problem.

Friday, June 09, 2006

Pic

I found a very interesting pic while surfing on net. Here it is. Hope also find it interesting.

Tuesday, June 06, 2006

Life's Little Instruction Book

Here's an e-mail forward from Anshima ma'm...:



[My comments are in italics]

  • Have a firm handshake.
    Agree, and I do this!
  • Look people in the eye.
    Should be done, but sometimes I don't do it, esp. with girls.
  • Sing in the shower.
    Sing always :-P
  • Own a great stereo system.
    No! Instead own a digital camera.
  • If in a fight, hit first and hit hard.
    Not a bad thought... Something I'll have to reconsider.
  • Keep secrets.
    Yesssss!!! Keep your own, keep others', but try to pretend not to be secretive.
  • Never give up on anybody. Miracles happen everyday.
    I have had examples to show how true this is.
  • Always accept an outstretched hand.
    Unless its Purnima Kapoor's. hahahahaah.
  • Be brave. Even if you're not, pretend to be. No one can tell the difference.
    Agreed and I am very brave!
  • Whistle.
    Just watch out if there are girls around or not.
  • Avoid sarcastic remarks.
    When required, learn the art of making cool sarcastic remarks too!
  • Choose your life's mate carefully. From this one decision will come 90 per cent of all your happiness or misery.
    Oh God! 90% would now make me think twice, thrice... or may be even ten times...
  • Make it a habit to do nice things for people who will never find out.
    I always do it, esp. for girls... hahah
  • Lend only those books you never care to see again.
    Read R.K.Narayan's 'A Bookish Topic'.
  • Never deprive someone of hope; it might be all that they have.
    This is something worth thinking about. On looking back on the things I have done, I think I have been able to instill hope into hopeless people... ;-)
  • When playing games with children, let them win.
    Heheh, I even let my mom win... ;-)
  • Give people a second chance, but not a third.
    Oh god! There is someone I know whom I have given more than 10 chances!
  • Be romantic.
    This line shdn't have featured in a geek-blog... hahahah
  • Become the most positive and enthusiastic person you know.
    Well, that I am, unless people behave properly with me.
  • Loosen up. Relax. Except for rare life-and-death matters, nothing is as important as it first seems.
    Be cool always...
  • Don't allow the phone to interrupt important moments. It's there for your convenience, not the caller's.
    Don't attend too many phone calls!
  • Be a good loser.
    That I am...
  • Be a good winner.
    That I am...
  • Think twice before burdening a friend with a secret.
    Akriti, are you reading this? hahah
  • When someone hugs you, let them be the first to let go.
    Hugging people can be as suffocating as Pythons/Cobras... heheh
  • Be modest. A lot was accomplished before you were born.
    Indeed true, esp. in the geek world.
  • Keep it simple.
    KISS=Keep It Simple & Stupid
  • Beware of the person who has nothing to lose.
    Let people be beware of you. Have a "nothing to lose" attitude, even if you have everything to lose.
  • Don't burn bridges. You'll be surprised how many times you have to cross the same river.
    Always shut the taps off after drinking water. Maybe if you don't, there'll be no water again when you feel thirsty again.
  • Live your life so that your epitaph could read, No Regrets.
    Indeed, do whatever you feel like doing, even at the expense of routine boring things that are supposed to be done, but you dont feel like doing them.
  • Be bold and courageous.
    Be daring, and never let girls take an upper hand with you ;-)
  • When you look back on life, you'll regret the things you didn't do more than the one's you did.
    "I am here to do everything, and yet I'll do well academically" -- Ishan Chattopadhyaya [18-1-06, UCER canteen]
  • Never waste an opportunity to tell someone you love them.
    OH NOOOOOOOOO!!!!! That can be disasterous, trust me!
  • Remember no one makes it alone. Have a grateful heart and be quick to acknowledge those who helped you.
    Of course, and I do this.
  • Take charge of your attitude. Don't let someone else choose it for you.
    While playing pool, you decide which shot you wanna take.
  • Visit friends and relatives when they are in hospital; you need only stay a few minutes.
    Indeed!
  • Begin each day with some of your favorite music.
    Nahhh, thats a stupid idea :-P
  • Once in a while, take the scenic route.
    Yeah!!
  • Send a lot of Valentine cards. Sign them, 'Someone who thinks you're terrific.'
    Dangerous idea, but I think I'll try it out this time.
  • Answer the phone with enthusiasm and energy in your voice.
    Heheh, indeed... don't be Vivek Narang on the phone.
  • Keep a note pad and pencil on your bed-side table. Million-dollar ideas sometimes strike at 3 a.m.
    It always happens with me!
  • Show respect for everyone who works for a living, regardless of how trivial their job.
    Show more respect for those doing trivial jobs.
  • Send your loved ones flowers. Think of a reason later.
    And then pay the price... phew, this again is a stupid idea.
  • Make someone's day by paying the toll for the person in the car behind you.
  • Become someone's hero.
    Be a hero in college :-P
  • Marry only for love.
    Considering the phenomenon of population explosion, dont marry at all...
  • Count your blessings.
  • Compliment the meal when you're a guest in someone's home.
  • Wave at the children on a school bus.
    Make sure they aren't ver naughty.
  • Remember that 80 per cent of the success in any job is x-udd on your ability to deal with people.
    PR is the most impt skill one can learn.
  • And finally.... Don't expect life to be fair.
    Phew! How dangerous this line is!

Fmt

Started doing the Fmt [848] program of ACM. Its a boring program requiring no skill, but just dirty text fitting. I'll do it today, I don't predict any major difficulties. It would be nice for my record to submit the program successfully in one attempt, and then I'll redo the Parantheses problem [673] with Stacks again.

Got Programming Challenges bound, given Tenenbaum's book for binding. Hope to finish these books off substantially soon. Would have to go to Kalyani [near Kolkata] and to Delhi prior to that for circuit components and RF ICs. Just trying to get the reservations ASAP.

Today, Manas and Brijesh expected for a session on C for tomorrow's C practicals. However, I have Physics practicals tomorrow, and that too from 3pm to 5pm... Long and a boring day ahead tomorrow.