Tuesday, 22 July 2008

UPA Survives the Trust vote

So, finally the big drama is over and the government survives the trust vote in the parliament!


Dr. Manmohan Singh is the 7th Prime Minister to win the trust vote.


With 271 being the magic number to be reached, the UPA allies managed 275 against 253 in opposition, with the others abstaining from voting.



The climax of the event can be judged from the fact that Punters had bet more than Rs 500 crore on the much publicised event of the year. It is speculated that the amount crossed 2500 crore by the end of the day!!!

This is what was said about a week ago:

Bookies think the UPA would not get more than 274 seats, so they are offering higher payouts to punters who bet their money on seats above 274.

According to one punter, the market expects cross voting by four SP lawmakers but UP Chief Minister Mayawati would not allow at least two other lawmakers of her Bahujan Samaj Party, who are in jail, to travel to New Delhi for the vote, reducing the halfway mark.

"Yet, we are sure the UPA will get more than nine seats from small regional parties, but cannot cross 280-seat mark," he said.

The trust vote, scheduled at 5 pm today, was postponed at the last minute to 6pm and the proceedings were nothing short of a classic case of climax. What was disappointing (though entertaining) was that the entire diaspora was not centered around the deal and its merits/demerits, but rather on the politics behind it and picking of MPs and parties over one another with pouring criticisms and sarcastic remarks. The bargains between them were visible clearly as both sides were desperate for support.

A new twist to the drama was added when a few MPs (rumoured to belong to BJP,) marched into the parliament with cases full of cash claiming that they had been bribed for abstaining!
The Lok Sabha witnessed high drama when a Bharatiya Janata Party member shocked the House by walking into the well with a bag full of currency notes, which he claimed was given by a Samajwadi Party leader in return for his support in the trust vote.
And with Laloo and Mayawati's comments adding more comedy than productive discussion on the deal, the show was more pitifully entertaining than intellectually enlightening.

The results were not disgraceful though, thankfully, and since I was supporting the deal all through, there should be no reason for complaint!

It will be fun to watch world reaction to today's development. Most interesting would be to watch China's response (and the left's response to that).

Update (As I write): Karat, on behalf of CPI(M), has already made a statement that the winning of trust vote by the Manmohan Singh government as the "sad day" of Parliamentary democracy as it was accompanied by charges of bribery and horse trading.

The story has just begun, the deal is still a long way from being a law...

In case you need some food for thought, read yet another conspiracy theory on the Indo-US Nuke Deal here: http://ia.rediff.com/news/2008/jul/22rajeev.htm

Sunday, 8 June 2008

JDK in its newest release...

This post follows an interesting development at the BOSUG meet this saturday.

I met an employee at Thoughtworks (until then I hadnt heard of the company). Its a software consultancy based company completely based on open source and focussed on quality and performance.

So these guys try out all the newly released versions of open source software and conduct variety of unit tests and several other benchmarks to test out improvements and select the best Open source app for the customers. The discussion this time was regarding JDK 6.

The newest release, in its JIT compiler improvements, produces targetted code compiled to exploit the benefits of the microprocessor architecture of the running machine. Also the adverse effects of reflections (where some common method calls loop over 50 or so times before getting to their destinations) and method call loops seem to have reduced drastically due to better optimizations in the JIT.
The result, as claimed by thoughtworks, is that JDK 6 provides 2.5 times better (faster) performace than version5. Theres more on this performance improvement here, and how best to exploit it here

Some additional info about the performance improvements:
Many deployers in the field, using pre-release versions, have reported noticeable runtime performance improvements, in the "two-digit range" according to Sun, which translates to anywhere from 5% to 24% improvement. Note that this is anecdotal, of course, and depends on what tasks you're performing. However, the JIT has been improved, with better runtime analysis of program characteristics, and the performance improvements have been agreed with by external users.

Desktop support may not be as relevant for the enterprise community, except for rich clients. System tray support, splash screen support, and other elements have been added.

JSE6 now has dynamic language support. It comes pre-delivered with Netscape's Rhino, a Javascript engine, and the scripting project's home page documents many other available scripting languages, including Ruby, Python, awk, Jelly, Pnuts, and Scheme.

Java SE 6 also has new diagnostic capabilities. For example, profilers and debuggers can now attach to a running JVM without specifically using a debugging-capable configuration. For example, if a problem is found at run-time for a production server, a debugger can attach to it without restarting the server, a valuable feature for issues that show up after the server has been running for a long period.


Now, when one talks about performance, the obvious notion is that nothing can get better than targeted assembly code. But thats zero on interoperability, so here's java for that. But somewhere on this transition, the performance suffers partly on effects of interpretation of bytecode and various other overheads. Needless to mention, the JVM on various platforms are not exactly quite consistent in their look and feel, so application starts looking and behaving differently on different machines. Of course for the performance critical (or real time) applications, C/C++ would be the default preference for producing fastest code with some lever of interoperability.

This always has been the belief to the extent that it has been generalized to imply that "any language in its native form gives better performance than one that runs on a virtual machine like jvm". That belief comes now to be questioned as it is claimed (by thoughtworks again) that JRuby runs faster and is better space optimized than native Ruby itself. The explanation is that this is accounted for by the superior JIT compiler optimizations which ensure coherency among objects being accessed together.

Seems like the easier route for developers may not actually tax them on performance anymore. But its just the beginning. I havent really tried out version 6 so far, but user targetted apps with interoperability in mind definitely must go in for it as the best option.


Monday, 2 June 2008

Firefox 3 .. on the way

This post follows my new experience with firefox 3 beta 5.

Im not usually the kind who downloads the latest and greatest to test them out. I generally prefer the stable versions to work with rather than experiment with.

But with fedora 9, I gave it a try.


The features are good.








First Impression:
  • User interface, although mostly similar, has grown better.
  • Web pages layouts (when opened) have become more beautiful: Button styles, text boxes, frames etc and other page elements seem to look slick(er than on earlier versions).
  • The tab edges are squared rather than rounded on previous releases... and this blends well with the gnome desktop.GTK supporters should rejoice.
  • Full screen goes REALLY full screen. So on my 12.1" laptop, i get maximum leverage for viewing web pages. really helpful and cool.
Usability:
  • Much faster (is expected)
  • Few points to prove this: On firefox 2, some of the popular blog posts with a cazillion comments used to take ages to load (the comments would only appear much later). Firefox 3 loads them in a breeze. (not that its too much faster, that depends on ur net connection; but its smoother and not jerky and really pleasing to use :-) )
  • Theres a slight issue in installng adblock. But latest devbuilds here work effortlessly: http://adblockplus.org/devbuilds/
  • Although I dont use too many extensions, some people do and they faced problems getting their extensions to work on beta. But mostly lifehacker solved their problems: http://lifehacker.com/355973/make-your-extensions-work-with-the-firefox-3-beta. Cool for me.. i just stick to the basics without depending on too many extras... keeps me independent of the platform.
  • The auto complete on the address bar makes it more user friendly, in that it provides extra information in the drop down besides just the url. positive to some, negative to some. not a difference to me.
PROBLEMS?
Havent run into any serious problems yet, but yes:
  • VERY VERY SLOW SCROLLING. they like to call it smooth scrolling, but its too annoying to use. rather than improve aesthetics, it removes the users command of the page.
  • Adobe flash plugin installer doesnt install automatically. Manual install necessary. I havent tried other plugins yet, but some others might face similar problems. I installed mine through yum
All in all a pretty cool browser. waiting for the final release...

btw, the firefox community is eyeing at setting a new guiness world record for most downloads in 24 hours, when firefox 3 is released.

http://www.spreadfirefox.com/

Join us in our mission to set a Guinness World Record for the most software downloaded in 24 hours!

Till then, its beta 5. Just hoping that the scroll fix is out soon.

Sunday, 25 May 2008

Easy SSH technique (SSH Public key based authentication - Howto)

SSH is a technique used to login remotely to another machine and execute commands from your own machine.
For simplicity, we will call the machine that you are sitting at as the local machine, while the machine you wish to connect to, as the remote machine.

so,
USER : [LOCAL_MACHINE] -----------ssh------------------> [REMOTE_MACHINE]

(Obvious assumptions are that the remote machine should be switched on before you attempt to login and that a valid network connection should exist between the machines)

Normally, this would present a security threat, so you cannot login without supplying the password to your account first.

When I first arrived for my internship, I was given a thin client (Sun RAY) and had to connect to a machine (intel) remotely everytime I needed to use utilities like firefox, gnuplot etc. (Of course, everytime I logged in I had to open up obvious utilities like firefox/mozilla)
$>ssh -X garl-intel1
$>abhishek@garl-intel1's password:
garl-intel1.serc.iisc.ernet.in> /usr/local/firefox/firefox
But this process can get annoying sometimes:
  • When you wish to login frequently (almost everytime you boot your local machine) you have to keep typing in the password again and again.
  • If you wish to run a shell script at your local machine which executes a set of commands on the remote machine, it asks you for password at every command to be executed. Wouldnt it be simple if I could write a script here that runs a couple or more of commands on a remote machine without me having to type in the password every time? Lets assume I have a script that has the following lines:

    ssh -X garl-intel1 xpdf ./abc.pdf
    ssh -X garl-intel1 gnuplot gp.sh
    scp ./abc.ps abhishek@garl-intel1:./a/abc.ps

    I would have to type in my password for each of these commands.
So this post is for those who are looking for an easy way to use ssh without any hassles at all. For simplicity, I have numbered the steps. I assume you are in my position and the remote machine is garl-intel1.serc.iisc.ernet.in
Step 1
Make sure the default shell is bash. (type bash and press enter if not)
Check the ssh connection to make sure its okay and works fine. For me, its:
>bash
$>ssh garl-intel1
$>abhishek@garl-intel1's password:
garl-intel1.serc.iisc.ernet.in> who

Step 2
Create a Simple Cryptographic Key by the following commands:
$> ssh-keygen -t rsa
Now assign a passphrase (if it asks, for simplicity just enter you connection password) and press enter twice (when it asks for location) to store the key in its default location.
Normally the default location is ~/.ssh/id_rsa (private key); ~/.ssh/id_rsa.pub (public).
In case you need to change your passphrase later, you need to type:
$> ssh-keygen -p
Step 3>
use scp to copy the id_rsa.pub file to remote machine. This is called installing the key.
$> scp .ssh/id_rsa.pub abhishek@garl-intel1:.ssh/authorized_keys2
The procedure should be over in a flash. (It will ask for your login password to complete).
Step 4>
From now on, you can type [ssh garl-intel1] to connect. But it still asks for passphrase everytime which is annoying. So to turn this off make sure you are in the bash shell and type:
$> ssh-agent $BASH
$> ssh-add
Now type in the current passphrase for the last time and press enter.
Step 5>
Done!
Now you need to login using [ssh garl-intel1] without any hassles.
Step 6>
A note about security: The remote machine is still password protected. It is not open to attacks through this process. BUT, the current local machine has been authorized to login without asking for user password. So as long as the local machine is secure and access is given only to authorized users, the server is secure as well.

However, if any time you wish to remove all keys. Type in the following in a bash shell:
$> ssh-add -D (delete all keys)
$> ssh-add -d key (to delete specific key)
$> ssh-add -l (to list all keys)

And now, its playtime.

Saturday, 24 May 2008

The most wanted gadget of the next decade.. the new XO-2 (OLPC)

For those not familiar, the OLPC group aims to provide children in developing nations with low-cost computers.


Although it seems like a noble cause on the outset, it has been criticised for several reasons including but not limited to:
- profit making attempts by various vendors through unscrupulous means
- Top bureaucrats adjusting purchase policies in accordance with manufacturer-friendly contracts as opposed to open and transparent means

The recent period has been a difficult one for OLPC, during which the entire ethos and aim of the project has been called into question. One former employee, Ivan Krstic, blasted the organisation for becoming a vehicle for creating the "economic incentives" for a particular vendor.
Apart from these, functionality is also of some concern. One user mentions how he tested a beta release and found problems in basic operation.
However that is not what this post is about. Its about the future plans of the next generation XO. Its supposed to be a touchscreen based book-shaped gadget half the size of the current one (now that is something everyone would vouch to get - IMHO). Here are further details:




The new XO-2 machine will be developed by the team behind the One Laptop per Child project. It will have two touch-sensitive screens and be about half the size of the original, iconic white-and-green XO device. Nicholas Negroponte, the founder of OLPC, also said the XO-2 will have a foldable book-like feel to it.

"The next-generation laptop should be a book," he said. The screen will be optimised to ensure it can be seen both in low light conditions and bright sunlight, while power consumption will be reduced to just one watt. Negroponte said the laptop would be ready for launch by 2010.

Users will be able to switch between using the computer in a book-like vertical format, a normal horizontal format, and even as a touchscreen tablet PC.

“Younger children will be able to use simple keyboards to get going, and older children will be able to switch between keyboards customised for applications as well as for multiple languages,” said the organisation.

More information at thejournal and geekzone

Geekpics offers some stats as well.

The next gernation OLPC (the XO-2) will have:

  • Dual 16x9 proportioned sunlight-readable touch screens

  • Keyboard and touchpad both replaced by touch screens

  • Physically smaller than XO-1; size and weight more like a book

  • 1 watt power consumption

  • Target price of US$75 to large educational buyers


Now theres just one point worth noticing here: "the machines will have enhanced dual-display capabilities with touch-sensitive screens." There. We have seen a preview of the technology in the just launched iPhone and it has been loved by many (probably some of the performance aspects need to be worked out, but the touch sensitive addition has been most undoubtedly the defining factor of the trend of mobile phones today).

Now imagine an ultra portable device which u can carry along as a notebook (not a laptop-notebook; the notebook-notebook!) and be able to access documents, run applications, watch videos, pics, surf the net, check your mail wirelessly and what not. And besides, you could also load in ebooks to read in a friendly gadget like that.

Fancy?

Imagine a mobile phone integrated into it. You dont need anything else at all. Some users fret over the possibility of having to use touchscreens. I see it as just the future. People will adapt and the technology will adapt making it easy for both. Another slight concern is the processing power and the low grade features offered. But I think we can trust the technology gurus and the economies of scale which should eventually bring a compromise between features and cost. Until then, its waiting time...

Check out a video of the features:


A Better coverage of the unveiling-of-the-plan reveals that the gadget is aimed to be cheaper than even the current $188. Now the current XO was targetted at 100$ and it came out at 188. The XO-2 is targetted at $75! Only time will tell how it comes out and what it actually offers.
As tekno_boy puts it, "Forget MACbook Air, the coolest thing on the horizon in the computing world might be something bound for the third world."


Thursday, 17 January 2008

QUARK 2008 is coming!

2007 is behind us, and we’re all staring madly into a very promising 2008. And it is time for an exciting festival coming up - QUARK 2008! If you are a College going student in India, you won’t want to miss the party. Encompassing three days of engineering perfection, the campus will play host to some of the finest minds in the fields of engineering and the sciences. QUARK '08 will witness students vying to master the arena of technology as they compete in a medley of events spanning all aspects of innovation.

In case you are wondering, the registrations are up @ www.bits-quark.org.

There are many exciting competitions lined up for you. The core events provide you ample opportunity to showcase your talents and win prizes along the way. Ranging from Computer science to electronics, robotics, mechanical and corporate, there are events that test you for every dimension of an engineer's skills. Registrations have started and the deadline (Jan 25) is approaching. Start registering at http://www.bits-quark.org/index2.php?id=register
(In case you face problems in registering due to heavy traffic / load on the site, mail the event managers with your team details).

We are holding a range of different workshops in QUARK '08, pertaining to fields as diverse as Aeromodelling to Origami. We are having workshops in the fields of Robotics, Telescope Making, Linux User Group (LUG)-Install Fest and so on. Under the Specials section, you get an opportunity to test your skills with Sudo-'Q' (Its more than just an array of numbers), M^+KA (The ultimate Gaming Zone), Paper PPT and Open Showcase. For the Nobel geeks, we provide an opportunity to showcase your innovative minds in our very own version of the Ignobel.

Our Aurora - QUARK@Twilight special events are bound to leave you starry eyed about the ways we can make Engineering an Artist's canvas.



To know more about the events and QUARK, visit the official QUARK website at http://www.bits-quark.org



The registration for all the events has commenced. For information regarding your stay at campus visit the 'Hospitality' section on QUARK website. The Hospitality Team is there to ensure your nice and comfortable stay in the land of Sand, Surf and QUARK!

Saturday, 1 December 2007

Richard Stallman's Speech on Intellectual Property and Software Patents

Here are some extracts of an interesting speech by Richard Stallman (RMS) on Intellectual Property and software patents etc. An interesting read...

Prof. Jyothi John, Head of Computer Engineering Department introduces Stallman:

It's my privilege and duty to welcome the most distinguished guest ever we had in this college.

Mr. Richard Mathew Stallman launched the development of the GNU operating system in 1984, the goal being to create a completely free Unix-like operating system. The organisation that was founded in 1985 to further this purpose is the Free Software Foundation.

Stallman is a visionary of computing in our times, and is the genius behind programs such as emacs, gcc, the GNU debugger and more. Most importantly, he's the author of the GNU general public licence, the licence under which more than half of all free software is distributed and developed. The combination of GNU with Linux, the kernel, called the GNU/Linux operating system, now has an estimated twenty million users worldwide.

Stallman's concept of free software talks about freedom, rather than about price. His ideas g a long way into ensuring development of software for the welfare of society, collectively developed by programmers who do not "lock up" their work, but rather release it for others to study, modify and redistribute.

Stallman received the Grace Hopper award from the Association for Computing Machinery for 1991, in 1990 he was awarded MacArthur Foundation Fellowship - other recipients of this prestigious award include Noam Chomsky and Tim Berners-Lee. In 1996, an honorary doctorate of Technology from the Royal Institute, Sweden was awarded to him. In 1998, he received the Electronic Frontier Foundation's Pioneer award, along with Linus Torvalds. In 1999 he received the Yuri Rubinski Memorial award.

Today, Stallman will be talking about the danger of software patents. In fact this is one of the most important aspect of the freedom of programming because the aspect of software patents may make all programmers potential lawbreakers because unknowingly they may be violating some of the patents registered by some other company.

Stallman's speech:

After that introduction, I am sure many of you want to know about Free Software. But unfortunately that's not what I am supposed to speak about. In fact, this topic, software patents, is not very closely related to the issue of Free Software. Software patents are a danger that affect all programmers and all computer users. I found out about them of course in working on Free Software because they are a danger to my project as well as to every other software project in the world.

There is a very unfortunate phrase that you may have heard. It is the phrase "intellectual property". Now, there are two things wrong with this phrase. One - it prejudges the most important policy question about how to treat some kind of ideas or practices or work. So, whatever it assumes that they are going to be treated as some kind of property. Now, this is a public policy decision and you should be able to consider various alternatives to choose the best one. Which means you shouldn't name the whole field, name the question with with a term that prejudges what kind of answer you use.

But second and and even more fundamental, that term is actually a catalogue for totally different areas of law including copyrights, patents, trademarks, trade secrets and various other things as well. Now these areas of a law in fact have almost nothing in common. What the laws say is totally different from one to the next. Their origins are completely independent and the public policy issues that they raise are completely different. So the only intelligent way to think about them is to pick one of them and think about it; think about them separately.

So the intelligent way to talk about them is never to generalise about them but to talk about a specific one, you know, talk about copyrights or talk about patents or talk about trademarks, but never lump them all together as intellectual property because that is a recipe for simplistic conclusions. It is almost impossible to think intelligently about "intellectual property" and so I refuse to do that. I just tell people why the term is a mistake and then if you ask me for my opinion on copyrights or my opinion on patents it will take me an hour to tell you it. But they are two different opinions and my opinion on trademarks is something completely different as well.

So the most important thing for you to start with is never mix copyrights and patents as topics. They have nothing to do for each other. Let me tell you some of the basic differences between copyrights and patents: a copyright deals with a particular work, usually a written work and it has to do with the details of that work. Ideas are completely excluded from it. Patents, by contrast - well, patent covers an idea. It's that simple and any idea that you can describe - that's what a patent might restrict you from doing.

Now, copyrights have to do with copying; if you wrote something that was word for word the same as some famous novel and you could prove that you did this while you were locked up in a room and you have never seen that novel, this would not be copyright violation because it's not copying. But a patent is an absolute monopoly on using a particular idea. Even if you could show that you thought of it on your own that would be considered totally irrelevant. It doesn't help you.

Now, copyrights exist automatically. Whenever anything is written, it is copyrighted. Patents are issued through an expensive application process. There is an expensive fee and even more expense in paying lawyers, which of course tends to be good for big companies and the patent office says that it only issues patents for things that are unobvious. However, practically speaking, in many patent offices the criterion is unobvious to somebody with an IQ of fifty. And they have all sorts of excuses to ignore the fact that whenever any programmer looks at it his first statement is, "this is absurd, it's obvious." They say, "well, this is hindsight". So they have an excuse to completely ignore the judgement of everybody who really is a programmer.

Now, copyrights last an extremely long time. In the US today it's possible for copyrights to last for a 150 years, which is absurd. Patents don't last that long; they merely last for a long time - 20 years which in the field of software, as you can imagine is a long time. Now there are many other differences as well. In fact every detail is different. So the worst thing you should ever do is to learn something about copyrights and suppose that the same is true of patents. No, more likely it is not true of patents. If it's true of copyrights, it's not true of patents. That would be a better guideline if you had to guess.

...

Well, since we in the GNU project needed a data compression program and since we could not use compress we began looking for some other compression program. We found that somebody came forward and said, "I have been working on this algorithm for a year and now I have decided I am going to contribute it to you. Here is the code". We were a week away from releasing this program when I just happened to see a copy of the New York Times , which doesn't happen very often, and it just happened to have the weekly patents column and I noted it and so I read it. It said that somebody had got a patent for inventing a new method, a better method of data compression.

Well, that was not in fact true. When I saw this I thought we'd better get copy of this patent and see if it's a problem and it turned out to cover exactly the same algorithm that we were about to release. So this program was killed one week before it was released. And in fact that person, that patent holder had not invented a better method because in fact it wasn't new, but that doesn't matter. He had a monopoly.

So eventually we found another compression algorithm which is used in the program that's known as GISA. But this illustrates the danger that you face: even if you had unlimited resources, you couldn't find out about all the patents that might endanger your project.

...

When the United States entered the World War I, nobody in the US could make a modern airplane. And the reason was that modern airplanes use several different techniques that were patented by different companies and the owners hated each other. So nobody could get a license to use all these patents. Well, the US Government decided that this was an unacceptable state of affairs and essentially, paid those patent holders a lump sum and said we have nationalised these patents and now everybody go make airplanes for us. But the amount to which this happens, the frequency and the seriousness of it varies according to how many different ideas go in one product. It varies according to how many points of patent vulnerability there are in one product. And in that question, software is at the extreme.

...

More <here>

Copyright (C) 2001 Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA

Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.