Sunday, October 3, 2010

Twitter as a Resource Proxy

Twitter is one intriguing medium that constrains you to a mere 140 characters while continuing to draw millions of users worldwide. Twitter sports a high signal-to-noise ratio with users constrained to write pithy messages.

This limitation imposed by twitter somehow attracts more and more users to announce lots and lots of things in the terse messages. With Facebook leading the social networking revolution (I presume it is), it is imperative for twitter to look for other options to make itself more desirable for users.

If you have not seen the new twitter you may want to read this . Here's what is worth observing. Among other things twitter allows you to view pictures and videos posted on a different website within your twitter page.
Forget visiting twitpic and yfrog. All the content will be accessible from within twitter. If you tagged your tweets with the location then a google maps image will be inlaid along with the tweet. That is UI Magic.

The distinguishing trait of twitter which attracts people will still not be violated. It is only that in 140 characters you will be expected to write information enough to identify the source of information.

While currently only pictures and videos are supported, it is likely that in the future twitter will allow you to render custom html within a frame (or whatever) on the twitter home page. Thus you could post entire blogs without being bogged down by the 140 char limit. It might also be possible to decorate content before rendering it on twitter.

Facebook currently generates a thumbnail view of the link that you post. But what I am talking about is completely different. Viewing the content within the twitter page ...
But wait isn't this what Google Reader does. Only thing is that Google Reader is a reader first and then a social networking portal.

With Google Chrome trying to the move all your computing needs to the cloud making your PC a mere viewer, twitter could go one step further by making its website the one stop tab (within chrome of course) to collate information from various sources and relate tweeple with the information.

To sum it up, looking forward it appears twitter will strategize by acting as a proxy for content hosted on remote servers without actually burdening its own servers.

Write an SMS/Tweet ... 3 Marks

At school, I remember that of the many types of writing exercises that we practised one of them was - Writing a Telegram. Mostly we wrote letters and essays, writing a telegram did form a small part of the curriculum.

However with the advent of the Internet and Mobile Phone revolution in India things like telegrams are so passé.
Most people in India currently use SMS to communicate short messages. I am not sure if the school curriculum has been adapted to account for these developments.

Imagine questions like

"Write SMS to tell your boss that you will be late for the meeting." (2 Marks).

"Compose a tweet to announce the launch of your new social networking website. Invent details to market your website. (Character Limit: 140)" (3 Marks).

It would be quaint at first sight but only meaningful to include such questions in the exam in place of those concerning the snail mail.

rm rm

What does the linux command rm do?
It accepts a file name as an argument and deletes that file from the file system.

What happens if the file name is rm itself?
It deletes the file without any error.

How?
Linux Kernel maintains the number of processes which have currently kept the file open. A file is removed from the disk only if the number of processes that have kept the file open and the number of hard links to the file are both zero.
So when rm command deletes the file it simply removes the hard link of the file to the disk area. But since rm process is executing, the rm file is open. When the rm process exits the kernel notices that there is no process holding the disk area and hence removes the file from the disk.

You can try this out. But don't do it with the rm file in the /bin directory. Instead make a copy of rm in some other directory and try
'./rm ./rm' from that directory.

Wednesday, September 29, 2010

A Solitaire Google Search Game to spend your time

Most of us get bored and need ways to spend our time. Thats when reading facebook updates of friends or browsing through other social networking media seems mundane and hackeneyed. Playing Solitaire on XP is too old school. This is the age of "The Internet".

At one such occassion when I was trifling my time, I thought of a simple game. The idea is not fully developed so use your imagination to build up on it.

The game requires you to Google. You must be thinking "googling is what I do to find anything under the sun but my missing shoes or pen, what is so new about it".

So where is the fun part?
Here is the game:
Search for a phrase. Note down the number of search results returned by Google. Your aim is to reduce the number of search results returned. That sounds simple...Right? Wrong!

Let n be the number of results returned by Google and s be your score for that query.

Play by the rules:

1. You are not allowed to search junk words. The words in your search query should be valid dictionary words.

2. If your search result returns the name of any person or place as the first result
s = 20*n

3. If n < 30 then s=1000,000. Penalty for searching something that will barely return any results.

4. You are discouraged to repeat search terms that were used in your previous queries. So if you use x terms in your query that have been used earlier, then your score can be something like
s = n*(x+1)

Add your own rules Here

In all other cases your s = n

Who knows you might end up discovering something new?

If still you are not able to pass your time, then write a blog post like this one.

Thursday, September 16, 2010

Google executes the code it owns to process data that you own

Google Chrome OS will allow you to run a browser on your PC. A browser that is Open Source but is really designed to provide a framework for web applications based on HTML and JavaScript standard for Web Applications to render their output to the browser tabs.

Of course though the browser is open source, the servers that ultimately master the content for the user run proprietary and closed source code. But that is another story.

Now the code that powers your PC is really on the server unlike the Windows Operating System which resides on our hard disks. Thus each time we wish to avail the services of our Netbook/PC we will have to authenticate with a Google Account. You don't run the code and
Google executes the code it owns to process data that you own and render it to your Open Source Browser.

Now what are the pros and cons of the cloud based solution that Chrome OS provides:
Good
1. There can be no software piracy (at least not in the form it exists today).
2. All computation code will run on Google's servers which can be optimized for a variety of workloads. This in turn could result in more energy savings.
3. Your PC will not hang if it is running something really demanding CPU time. Your other tab may well be rendering data. You will not be frustrated.
4. The cloud manages the backups of your data.
5. Lower Costs as Google will not charge you for using their systems (hopefully).
6. No data migration cost. Store Once Access Anywhere
7. Less Redundancy. All videos, movies and songs will be stored online and shared. There may well be some controls in place to prevent copyright issues. But better compression may be in the works.

Bad
1. Monopoly over your data to a single organization.
2. Advertisements will show up on your browser. You will have to pay for using the system without advertisements.
3. Out of the "box" (although there is no packaged software), you will have a fixed amount of storage. But if you find it really useful to store all your data on the cloud and access it from anywhere, you may have to pay some price for the storage. There may be different schemes on the quality of backup policies you use.
4. More demands on network bandwidth.

Neutral
1. You may prefer to use your favorite IDE for programming online and run the code on Google's servers for testing it.
2. If it becomes mainstream, you may end up writing code for the browser itself.
3. The HTML standard may be influenced depending on the popularity of the system. Application Developers may want easier programming models to send commands to the servers. Difficult to predict what the demand can be like.

But wait. The above is just my prediction. Let us wait for the actual changes in ecosystem that may ensue.

Do share your views on the topic.

Sunday, September 12, 2010

HTML and Javascript: The assembly language for the web

What is programming? In a broad sense every device exposes an interface for tweaking its behavior. How many different things one can achieve using the device is determined by the number of permutations allowed by the interface. The interface can be complex or simple to program.

Now lets jump to the more familiar area of computer programming!

To provide a software based interface to computer hardware assembly languages were created which I surmise must have greatly relieved the people who had to write binary machine code to make their programs work. Similarly fortran provided respite to assembly programmers. Followed by C++, Java, Python and numerous other languages under the sun. Of course the ease with which programs could be written with these new interfaces allowed complex tasks to be achieved.

Now let us draw a parallel in the world of web programming. I am a dabbler at best when it comes to programming for the web. But still I will be able to share some thoughts. The early web browsers provided an HTML based interface for programming them. With the increasing number of users, this HTML became sophisticated as demand for better presentation arose. Thus this HTML interface. CSS allowed the programmers to modularize their presentation style across web pages. How well a programmer could apply Software Engineering concepts like reusability, modularity and cohesion to the design of web pages along with the aesthetic considerations determined how readable and managable the websites were.

But this HTML provides only presentation tags. The web browser would have to go through a full page reload for each new request. Presto ... Enter Javascript. This allowed custom control flow to program the browser.

But why did I call HTML+javascript to assembly language of the web. Well HTML+javascript is widely used but is too basic for feature rich web applications. Each browser has different behavior with respect to the html and js on the page. So programmers should be coding separately for each browser and they are expected to maintain the code as well.

So what is the solution. Well of late I encountered JSF which provides a MVC architecture which allows you to write business code in Java while offloading the HTML and JS tasks to the framework itself. There are other frameworks like django which are popular. The underlying idea is this, HTML and JS provide a rudimentary "interface" for coding. So a new High Level model is developed

With the new Chrome OS being rolled out, it will be the aim of most web apps to treat HTML + JS as the target "assembly language" to be generated by the compiler for their framework. The browser is the incarnation of the "hardware" for which the "assembly language" is generated.

Did I just overcomplicate a simple Idea?

My take on Sociology meets Computer Science

The way I perceive it is that both Social Networking and Search Science would go through the same life cycle as other computing technologies like databases, operating systems.

When the industry felt the need to have a database or OS they developed software and then realized the shortcomings.
They invested heavily on research in universities which caused BSD and other projects delivered which found their way into commercial usage.
The use cases faced by the industry coupled with the research at universities concluded that there are certain axiomatic concepts which must be taught in engineering colleges and we had these courses finding their way to our curriculum and C/C++ which was earlier taught in engineering is now taught in school.
Finally we do have continued research in databases and os but it is focussed on addressing specific problems.

Similarly when the concepts relating to Social Networking and Web Search stabilize, it is inevitable that they will be taught in colleges and the research community will find something more exotic and yet unknown to mull over.

Did I sound philosophical?

Saturday, August 21, 2010

Stackexchange: Effect of URL naming scheme on DNS

Stackexchange creates a website for specific topics. People can post and respond to questions related to specific topics. The websites are highly dynamic with a good community waiting to respond to your questions so you get responses quickly.

Looks good.
The following is the link to the stackexchange site for Unix.
unix.stackexchange.com/questions

Once a topic gets voted enough, a website is created for it. Lots of websites already.


But the bad thing is the URL naming scheme. All DNS queries for all topics would go to Stackexchange DNS server and it needs to maintain a record for each topic. After the DNS response is received the browser will establish a new connection to the stackexchange servers. Lots of handshakes.

I feel at least the DNS query step could be made better by creating all topics in the domain of stackexchange.com. That way the local DNS servers (at the ISP) could cache the IP of the stackexchange server and only the usual TCP handshakes would go to the stackexchange servers.

Interestingly Google tried this long ago by giving a domain to each user and I created a domain by the name iamrohitbanga.googlesites.com but soon they moved all google sites users to URLs of the type sites.google.com/site/iamrohitbanga/.
Even wordpress does the same by giving each user a separate domain name managed by wordpress.com.

So wordpress.com not only has to manage user pages but also the DNS records for each user and respond to DNS requests for each connection that wants to read the blog.

Any ideas which design strategy is better?

Monday, May 3, 2010

What users can expect from Chrome OS?

Hello World

This is my first attempt at blogging. I will try to be brief. I plan to use this blog to share my ideas.

Coming to the point

This is how Chrome OS can change the ecosystem.

Earlier when people first started using PCs they used "dumb" terminals to connect to powerful computers. This was replaced by the PC which was powerful and shifted all computation tasks to your home. We then had series of powerful processors which enabled servers and workstations to perform faster and faster. People became interested in Operating Systems.

The Internet was yet another turning point. People now became interested in distributed computing not just to perform scientific calculations but also to distribute the load of websites which started catering to millions of users.

As the needs of users change new architectures take shape. So Google is attempting to change it all with its new Chrome OS. We again have seemingly dumb netbooks and smart phones (much smarter than what we had earlier) which can connect to the Internet but barely run applications like full featured word processors let alone MATLAB and other softwares. So what is the solution? Ensure that such devices run a full featured web browser with well defined behavior and shift all the computational load to the Cloud. This is what Chrome OS would be doing. So how does Google plan to build an application ecosystem:

Well lots of acquisitions and supporting companies which make Good Webapps which parallel the usability of the PC with the netbook.

List of acquisitions

picnik.com - photo editing application that runs in your browser

aardvark (vark.com) - a new search model which searches for people who can answer your question rather than webpages containing it as there may be no webpage containing the answer to your question.

etherpad.com - a wonderful text editor

labpixies.com - created a lot of gadgets for iGoogle.

docverse.com - integration with MS Office

So where do the users get the good net speed for running all there applications on the cloud. Google is already setting up its own Gigabit ISP network in US.

The good thing is that this will make Chrome OS popular. The desktop environments on Linux have still not very popular among non geeks. So may be a smooth user experience will allow non geeks to start using Linux. Chrome OS will probably make Linux usable for such non geeks. And hopefully offloading the things on the cloud will ensure automated backups and security that people want.

What I would want is being able to run all applications smoothly through a web browser. would like a web based IDE for programming with compilation and execution offloaded to the cloud (possibly a new programming model for the new web based OSs) , ability to access Mathematica without installing it (wolfram alpha - no Google hasn't acquired this one), suggestions for webapps for viewing particular document types all integrated into the Chrome OS.

The bad thing with this is that some of  the applications like etherpad and bumptop are not available for users until they are merged with the Google product line. But in the long term the users might get better applications.

Tuesday, March 9, 2010

Hello world!

Welcome to WordPress.com. This is your first post. Edit or delete it and start blogging!