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!