Showing posts with label idea. Show all posts
Showing posts with label idea. Show all posts

20 April 2012

Ban helmets

It is mandatory to wear helmets, seat-belts etc... which saves the irresponsible driver in case of an accident. Wont this protection make the driver try higher speeds, which (s)he may not, if (s)he will not have those protection?

If I were in charge, I will not mandate and might even ban helmets, seat-belts, airbags, other similar safety features that is there to protect the driver, instead of preventing the accident and make sure the driver gets hurt in case of accidents. so that drivers will drive more carefully. ;-)

08 April 2012

I can has bokeh

I have a 4.5 years old point and shoot camera


But always dream about those beautiful photos with shallow DoF, bokeh...

I can do that for macro..But portraits?? :(

No DSLR, so what?

Took out of focus images that will be my background


Get them on the TV, and pose in front of it


ta da.. I got what I wanted...!!!!!!!!!!


Similarly

But enough of these..

I've bought this today!!
And can do this with a click of button!

13 June 2010

Hackweek V


I had been toying with the idea that, to split a file on my hard-disk, I have to read and write to a new file and then truncate the old file. But isn't it lots of unnecessary I/O. I already have all the data on disk. I should be able to change the meta-data alone and mark the file contents after some length as a different file.

So during this hackweek, I implemented 2 system calls on Linux, sys_split and sys_join. And added support for these calls to the FAT file-system. http://lkml.org/lkml/2010/6/9/200 With this patch one can split a file into 2 or join 2 files without doing much I/O!

Why FAT?
Normally creating a new file and then truncating a file approach, needs temporary free space as well. I once had a need to split files when there was no free space available. On advanced filesystems, sparse-file support(i.e., files with holes) helped. But FAT does not support sparse files. Also I wanted these to work on thumb drives which are mostly formatted as FAT32.

SLE11 SP1 release
This Hackweek was scheduled to follow the release of SLE11 SP1. And all the Bangalore employees, who worked for SLE11 SP1 were given a portable 160 hard-drive as a gift in the middle of hackweek. The transcend disk has a one-touch back up button, which works to sync selected folders, using a proprietary software available only on Windows. No support in Linux or Mac.

gnireenignE one-touch button

I thought, if the button press could be detected, I could use it to unmount the disk! So I set out to reverse engineer it. Usbmon + KVM + windows XP. Got the usbmon traces. I was expecting to see a simple Interrupt endpoint. But it was a bulk end-point only interface. And the software was continuously polling to get the button status. It was quite interesting to decipher the USBS and USBC's, but the SCSI/ATAPI payload had an unknown command DFh. And I assumed that by sending the command, if a button had been pressed in between, I would get a different value. And was trying hard for hours. But failed. Then took few more traces using Windows. Tried hard. When I almost gave up, I found couple of return bytes slightly different! Voila. The return value is different, only if the button is held down during the command. Now, I have a script to sync/unmount with a one-touch button! If you have this device, you can modify the script to do what ever you want it to do. Let your creativity flow freely.

08 February 2010

save what?

World always admires great marketing shows, and we need at least one of them to be at prime, always. Of late it was the fruit seller's job to amuse the crowd. His show has made people go nuts and buy whatever he sells for a premium. But his last show missed his magic. I guess, if he had continued for some more time, people might have even booed at him. Looks like he has aged and we need a new face.

Last years NaN I/O show had an amazing presentation that created a tsunami(beta). But the buzz could not keep up. A key difference between the fruit buzz and the spider's buzz is that, those who were blindfolded by the fruit seller had committed by purchasing the crap and so they continue to cheat themselves and others by spreading good things about the iFruits. But those were caught on the spiders net were not really trapped yet and wont look like fools by admitting that the tsunami(beta) is indeed crap. But initially spider's signature idea of making one feel privileged and proud to have access to tsunami(beta) was quiet a success.

When sellers run-out of ways to excite the crowd, to sell their crap, they try to capitalize on patriotism, morality etc.. IOW attack our low EQ. They would help us save the mars, the jupiter, the sun, the ant, the rat, etc.. so that one can feel proud buying their crap. As many of them are already helping us to paint the earth pink or whatever color we like, one is unable to kindle the excitement with that anymore.

But recently a little known, once locally popular, watermolecule is able to make use of us to advertise for them, by igniting our feeling to save our cat and in process pride of our nation. Most of us don't even know that the no of cats left quoted by watermolecule is from an estimate from 2008. And by signing and repurring their message we feel that we can save the cat, but in the process we are just working for free for watermolecule. Todays educated people, like us think, that we can boil the ocean by writing "FIRE" on our amateurfile picture and sharing it on the ass-book.

I really wonder what needs to be done to make us non-idiots and not to fall for these tricks. Formal education and experiencing many successful nations is not enough, it seems. But I do admire those on the biz, who are able to come up with ways to exploit us. If you have read till this line, I think you surely are one of those who is likely to fall prey to such marketeers. BTW this post just for fun and may not reflect even my opinion.

24 August 2009

13 steps

I was using the stair-case instead of lift, whenever possible, in my office, for the past couple of weeks. I park my motorcycle in 0th floor and my office is in 6th floor. Each floor has 2 stretches of 13-steps each. Even though there are even number of steps(26) between 2 floors, it was split in to two stretches of odd number of steps(13).

The problem with odd -number of steps is that, if you don't watch your step, you would make the first step with your dominant leg(say right leg) at each stretch by one-step more than the other leg. That would burden that leg by 1-step at each stretch. There are 12 -stretches to the 6th floor. so 12 -steps more than the other leg. This can create an imbalance and knee problems! Does Vaasthu take care of these stuff?

08 July 2009

Atomic git

As I wrote in git-pull-mishap-and-git-clean, the problem with git is that, operations are non-atomic. For example, if a git-pull is interrupted, or fails due to lack of disk space or network problem, the resulting repository will be in an in between state. This is problematic. It would be nice if git operations are atomic, in this sense.

A solution could be to have the git repository inside another git repository. For example, have the linux-2.6.git repo inside another git repo, say git-o-git. When you do a pull in linux-2.6.git, and if it succeeds do a `git commit -a` in the outer git-o-git. If it fails for some reason, one can go back to previous version of linux-2.6.git repo by doing a `git clean -d -f` and `git checkout -f` in the outer git-o-git.

It should be possible to add wrapper scripts to `git` and do this auto magically. May be it could be called as git WC, as it is built on top of git porcelain, which is built on top of git plumbing commands. ;-)

Has anyone tried this already?