countdown to what?

Go to google and click on the I’m feeling Lucky button without any query.

You will see a countdown timer.

Presumably the number of seconds left until the year gets over.

Or is it the final countdown? :D

Leave a Comment

swap them keys. do it now.

If you are on emacs then you need to read this and you really need to do your pinkie a favor and swap Control_L and CAPS.
In ubuntu you have options in System-Preferences-Keyboard-Layouts if you are not much familiar with xmodmap.

That’s one of the first things I picked up from that post.

Leave a Comment

Removing echo in irb while running in emacs

My emacs ruby setup was behaving strangely. While using the inferior ruby mode i.e. M-x run-ruby , the command given to the irb was echoing. Very annoying and no visible solution on the net.

I opened up inf-ruby.el and realized that ruby mode was built on top of the shell mode of emacs. Now the solution was simple. One just had to turn off echo in comint mode. Just add the following to your init.el (yes i use windows at work)

;; for turning of the echo

(defun echo-false-comint ()
(setq comint-process-echoes t))

(add-hook  ’comint-mode-hook  ’echo-false-comint)

And the world will seem like a better place to live in. Thank you emacs lisp. 

Leave a Comment

of github origins and removal

As described in this previous post, I was on my way to glory setting up my own source control.

This post is about setting up github.

The account creation is straight forward though one is also required to give the ssh key (not necessary) . Ample details on the site on how to generate on if you dont have already.

So my folly was of a typo. Somehow I typed git@github instead of git@github.com while adding remote source repo. After that when I tried to push the code I got the following error

ssh: github: Name or service not known
fatal: The remote end hung up unexpectedly

After a couple of permutation combinations i zeroed down on the cause. Now the simple thing was to remove the origin. Which is easy

git remote rm origin

Thats it. Good to go. Now one can specify another remote origin and continue as happy users.

Comments (1)

gitting things right

So this friday night found me setting up a source control for myself (finally).

I had no doubts about the capabilities of linus written git so I went ahead with it.

First step : getting git

The git package in ubuntu universe is 1.5.4 which is quite old so head to the git site for the latest package.

Second step : Installing git

Though this step is straightforward, one might face errors as i did.

The simple installation is three steps

~/git$ ./configure

~/git$ make

~/git$ make install

This should install git. If you face errors then the most common problem is that you might not be meeting all the dependencies required to compile git. Best way to ensure that the dependencies are met is to build dependencies of the git core by doing the following

~/git$ sudo apt-get build-dep git-core

After this everything should be hunkydory. This ubuntu forum discussion might be more useful.

After this I wanted a repository on the net. I chose github.

Make an account and follow the subsequent steps and you will be good to go.

Except , I faced a little problem because of my own folly which deserves another quick little post.

Comments (1)

Look Who Is Here

So I was not wildly speculating after all. A tiny new star is born. Google has announced the coming of ChromeOS.

First things first.

It will be a Linux Kernel(what else is new) running GoogleChrome on top. So it will be a platform we already know. The big bad web. No more service calls to the OS :D . It will essentially be a net OS for netbooks. Initially atleast. And then it will begin world domination. Lord save you. For a long time now I have been suspecting an evil empire rising.

As the faq of the matter points out, it will be free AND open source. The open sourcing will happen sometime later this year. The product will be available in the second half of 2010.

How does it change the world?

For good or bad, the world will change. The control buttons will change hands. Your life will be controlled by binary decisions (More than it is now). Your thought process will be controlled and directed to whatever the binary dictates. Do you think that is being too cynical? Wait and watch :D

Leave a Comment

iCan spend hours here

yes. here.

Leave a Comment

Re – Rethinking Http :)

My friend and colleague , Vishal  had these questions after reading this post of mine.

a. What do we mean by Half Duplex and Full Duplex?

These are communication jargons back from my electronic engg. days :)

A half duplex communication is a two way communication between two devices. But these two devices cannot communicate at the same time. In other words you can either transmit or recieve at a time but not both. A very good example is walky talky communication.

Colonel Vishal : Hello Capt. kgthegreat. What are you working on? Over.

Capt. kgthegreat : Hello hello , Colonel Vishal. I am still working on accesibility. Over.

You hit the transmit button and say something and then say over to signal the end of transmission and release the transmit button.  Now the other party repeats the same protocol to transmit.

A typical example from our software world will be a strict client server interaction. Firstly a handshake is done between the client and server. Then Client sends a request. Server recieves and then sends a response back. The HTTP protocol is designed the same way. You have HTTP request and response objects.

Whereas a Full Duplex communication is more like a modern day telephone conversation. You can transmit and recieve at the same time. Jonas Jacobi talked about getting this behaviour in HTML 5 Commmunication protocols.

Find more information here.

b. What exactly is Web Sockets?

Web Socket is a new Full Duplex interface defined under HTML 5 Specifications. And yes it is a protocol just like HTTP is a protocol. Like HTTP , if implemented , it will sit on top of TCP/IP Layer.

So instead of  ” http : //www.kumargaurav.info ” you will have “ ws : //www.kumargaurav.info ” if implemented.

I will let the people who helped creating it talk more about it.

Here is an excellent FAQ on websockets if there are more questions (which is a healthy sign).

Go here for HTML 5 Specifications which is work in progress.

Go here to know more about the most common network protocol.

Another general reading which I can suggest and personally endorse is Andrew Tanenbaum’s Computer Networks. Its a life changing experience :) .

c. Are we trying to say that Web Sockets is/are going to replace HTTP protocol?

No and Yes. No because it will take time (I think it is envisioned to be completely implemented and accepted by 2020) and yes because it is the right thing to do.  Another compramise in this direction is to make WebSocket sit on top of HTTP but I don’t know how good is that.

Leave a Comment

@GIDS 09 – Workshop on DSLs

Session by Venkat Subramaniam

What are DSLs?

DSLs are domain specific languages. The sole reason of their existence is to solve a single particular problem and to solve it well and better than any other general purpose language.

DSLs are not new as such. We come across a lot of examples of DSLs in our day to day coding. CSS , ANT etc. They have a purpose to their existence and it is difficult for you to make them deviate from their purpose unlike general purpose languages. And guess what. They are sooper good at their job. So DSLs make good sense.

So according to Martin Fowler , there are two types of DSLs , External and Internal. Internal DSLs are so called because they need a host language to define their look and feel. External DSLs have their own custom syntax and a parser is required to process them.   

How do I get Up and Running with My Very Own DSL? 

Answer is simple. You need a tool. There are some available. The best of the breed being ANTLR.  If you are an eclipse fanboi then take a look at xtext. My good friend and colleague , Phaneesh blogged about bloated softwares the other day. I am glad that some powerful stuffs still come in small packages. ANTLR is all of 2.93 mb :)  

Why do we need DSLs as an organisation?

As an organisation, we are looking at various new ways of development of new products and trying to better our software delivery model by changing the rules of the game. 

But we need to do it faster. We have tons of code in what is generally called as legacy architecture. In my opinion , we need good DSLs written by us to get things done faster and more efficiently. I know we are taking steps in those directions. DSLs will help us a great deal.

 

Get the whole presentation here. And while you are at it, browse the site. Its informative.

Leave a Comment

@GIDS 09 – Rethinking HTTP

I am at the Great Indian Developer summit 09 at IISC, Bangalore. Today is the Java Track

 

The Java Track

The Java Track

 

 

One interesting session I attended was Re-architecting the Web with HTML 5 Communication

Jonas Jacobi 

Why are we using http? Or rather, Why are we STILL using http?

Good Question. Because the powers to be decided that you , yes you are doomed to use http forever(?) whenever you want to connect to the internet.

No but really. Why are we still stuck on a half assed protocol such as http. Our backend interaction is not half assed nor is our desktop apps then why oh why is our internet experience be half assed. Why is client server interaction inherently half duplex rather than being full duplex.

One answer comes to mind. Http is half duplex. Why? Because HTTP and the internet was originally thought out to be a good toy for sharing intellectual documents (mainly text) until some one thought of the idea of expanding it and sharing pretty much everything. But somebody forgot to upgrade the protocol :) and this protocol was written way before (1983) I was born so its not me.

Then what is stopping us from upgrading this half assed protocol to something brand new and full assed. :D
Yes you said it. Let it flow , no? Why change it. Don’t fix it if it ain’t broken. Right? 

But it is hindering my interaction with the world. Why should I wait to hit the button everytime I want something. Don’t kid me with AJAX. Though it is a sooper sooper way to increase user experience but it is killing the servers with every small request (which is an HTTP Request which is a bloated block of data anyways) and I am inclined to think green here. With every http request I make I am leaving a Carbon Footprint behind me. 

So whats the solution? According to the speaker, the solution lies in yet another protocol which paradoxically(in my opinion) sits on HTTP and in future might sit on TCP/IP. They call it WebSockets. Interestingly this protocol was developed as a result of trying to control  a toy train using a browser.

Ok. So I stop here. I could not find a link a to the presentation but this blog post by Jacobi is pretty interesting. Google about websockets to know more.

Comments (1)

Older Posts »