Showing posts with label English. Show all posts
Showing posts with label English. 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!

30 January 2011

Real hackweek, protected hackweek and long hackweek

I have been using KVM a lot, but never took time to understand how kvm works. I used some time from this hackweek to get rid of that regret.

Virtual Machine eXtensions instructions allow trap-and-emulate virtualization. And KVM exposes VMX in a convenient way to userspace in Linux. Virtual Machine Monitors(VMM) like qemu-kvm use the KVM API exposed by linux to emulate virtualize software.

x86_64 processors boot in real-mode. In this mode it can use only 16-bit addresses, ie., upto 1MByte RAM. The execution would begin at physical address 0xFFFFFFF0. Then the software has to switch to protected mode where protection and paging is possible. Paging is optional, but almost all OSes use demand paging extensively. Now 4 GBytes of linear address space is used. And then CPU can be switched to long mode i.e., 64-bit mode. Paging should be disabled in 32-bit mode, before switching to long mode. There are also other modes of operation like virtual-8086 mode to allow executing legacy real-mode software from protected mode, SMM for OS transparent execution of OEM specific code.

I had limited time and very very limited skill at hand. So aiming for the sky was not an option. Hence wrote a very simple VMM that directly starts the guest at address 0H, in 32-bit protected mode with paging disabled. And supports only insb and outsb as the only form of interaction possible for the guest. The guest is a simple static linked 32-bit program that doesn't use any library, and linked to start from 0x0. The guest simply reads a byte using insb and sends byte+1 back via outsb. The guest would halt, when it gets the, "Answer to the Ultimate Question of Life, the Universe, and Everything". The VMM reads the byte value to pass to the guest from stdin and prints its response in stdout.

The KVM API is really very easy to understand and use. But some knowledge of the processor was required to make use of it. Intel manuals helped there. I don't have good understanding of things yet, but something is better than nothing.

I was occupied by quite a lot of things in life and work in the recent past. So I wasn't really planning to participate and make this a real hackweek. Also a National holiday for Republic day of India, bang in the middle of the week prevents this hackweek from being a long hackweek! But seeing videos of my colleagues from various parts of world having fun, I couldn't resist and decided to go for the virtual hackweek. I thank my employer for giving me this protected hackweek, and let me learn/do things protected from everyday work.

04 August 2010

Wrong from illite"race"y

"Right to education" act mandates all schools, including those elite ones, should admit 25% of students from its locality without any test or filtering. I think this is a very good move by Government of India.

But the schools and highly literate rich parents are not welcoming this. No one is denying them the rich the right to education. But they want to remain elite and are afraid of the poor.

http://expressbuzz.com/cities/bangalore/controversial-circular-decried/195084.html
http://www.mybangalore.com/article/0810/parents-in-bangalore-not-okay-with-rte-act.html

http://expressbuzz.com/cities/bangalore/parents-say-no-to-inclusive-classrooms/195349.html

Their concerns are
1. Quality of education will suffer.
2. Rich students will learn foul language from poor students.

They should think for a moment, how they felt when their kid was denied admission by a school, which is considered to be slightly better than the one, where their child is currently studying! Not getting admission there will not affect their kid by much. But imagine the difference, it could mean to the poor kid.

Class system by birth still remains. Just that it has become modernized. The rich wants to makes sure that the poor cannot get quality education or get richer. The ancient class system was not as bad as, this mindset of these literates! Gandhiji would be proud of you, intelligent Indians. Untouchability is a sin.

All poor and illiterates are not bad in character or lack mental ability. Not all rich and educated have the best of character with highest mental ability. One's character or intelligence has nothing to do with his economical status.

I firmly believe that if this gets implemented correctly, many of the toppers will be from the 25%. I wonder what is the opinion of "Youth for equality" on this issue. IMO this 25% reservation is not a reservation. But the 100% only rich and educated is the 100% reservation. I love RTE.

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.

06 April 2010

English == UK || English==USA ?


I know sometimes UK is called as English. For the first time, I saw US as being called as English. So Googlificially, by default, English is US English, not UK English. No wonder there are more people in USA, India, and Nigeria than in UK, who can speak English!

05 April 2010

Who is Linux?

Yesterday, I was bored in the afternoon and had a digital camera with me. I thought of making my own steadicam, but then when I saw the tux over my TV, this contest came to my mind. And the result is an entry to the competition.

I spent only few minutes. I think it is quiet OK, given its very low production value. I am not trying to win, but just like I send crappy patches to Linux and waste kernel developers time, I uploaded it to waste 43 seconds of your time.

30 March 2010

Do you know Mahatma?

The Indian 5 rupee coin comes in so many size/shape/design now-a-days.



And it is going to be a tough task to have automatic vending machines accept them. The picture has only few types of 5 Rupee coins, I had at a time. There are many more in circulation.



Till I saw one of the 5 rupee coin which had "MAHATMA BASAVESHWARA" inscribed on it, I assumed Mohandas Karamchand Gandhi is the only Mahatma!




So who is this Mahatma Basaveshwara ? Are there any other people, who are called Mahatma? I found Jyotirao Phule.

Guess, now coins are released in memory of people, incident etc.. instead of stamps. Can you think of anything equivalent that could be done digitally? Or something is already in use?

22 March 2010

Back from National Free Software Conference - 2010

I, along with Chen, the Maintainer of Gnome Evolution project gave a talk in National Free Software Conference - 2010, Bangalore. Our talk was titled "Developing a Free software, Inside story"

I talked about who all are developing Linux Kernel, and how one can get started etc... Then Chen talked from his perspective. It was an inspiring speech, even I felt greatly motivated by him. He started with how he was excited, when he made changes to the software he used and showed it to his friends when he was new to open-source. Later he talked about Gnome and Evolution community. In the end he had lot of fans around him, and it took him nearly an hour to leave the hall after the talk!

Before our talk, we attended couple of talks. "Free Software Business Model – Software as a service" by someone from CGI. It was the usual corporate talk explaining CGI's business and then what is SaaS, PaaS, IaaS,... There was "Debate on Open Standards draft 2.4" by Venkatesh Hariharan, Policy Director, Red Hat and Prabir Purkayastha, Knowledge Commons. It was about Indian government's policies regarding mandating open standards and formats.

I came to know about this conference only 2 days ago for the first time. It was hosted by the Free Software Movement of Karnataka(FSMK), co-sponsored by Dept of IT Karnataka, Kerala IT Mission and Govt of West Bangal. The punch-line of the conference was "Free Software is the Future... The Future is ours..." I predict in future, Conferences won't provide network as everyone would have mobile Internet themselves. And this conference was ready for tomorrow already!

20 March 2010

Weird binary!!

I read about weird binary at Varun Kumar's blog (http://varunkumar-n.blogspot.com/2010/03/weird-binary.html)

Number system with base as –2 (minus two) is commonly referred to as “Weird Binary”. Like binary number system, weird binary also uses the binary symbols 0, 1. The bit positions in weird binary represent the powers of (-2). For example: 11001 in weird binary represents 9 in decimal system. Weird binary
This number system reminds me a saying in Tamil regarding tough situations, "For every foot of climbing, Slipping 2 feet". ஜான் ஏறுனா மொழம் சறுக்குது .

So How to convert from decimal to weird-binary(base minus 2)?

But I didn't want to check-out others solutions to the problem, before trying it myself. I wanted to find a pen and paper way to calculate it, similar to the one we use to convert from decimal to binary. And found it interesting!


Just at every alternate step, instead of going for the maximum multiple of 2 less than previous balance, find the minimum multiple of 2, greater than previous balance.
IOW, at alternate steps, if the remainder was 1, add 1 to next balance(quotient).

Weird-binary can be used to represent negative numbers without any special sign-bit. But I still couldn't think of any use for this negative two base system. Can you? Is it being used anywhere?

15 March 2010

Unclear advertisements...

There are so many advertisements for TVs and DTH services on TV! In many of them, they show a blurry picture, and then as a TV frame crosses the screen, the picture inside the frame is shown with crystal clear clarity. It simply means that the TV + service, I currently have is already delivering such quality picture ?!

Or do they mean that, the picture via there products is more clear than, even watching it directly? Then all the TV production teams should buy there TV and first get the picture on it, then shoot that picture and tele-cast it. ;-)

I understand advertising for TVs via TVs do help. And today, we go for multiple-TVs + multiple service providers. This is just a joak.

10 March 2010

Green fridge

An idea to save power.

Why not have a split-refrigerator similar to split a/c?
Wouldn't fridges releasing the heat inside an air-conditioned(cooling, not heating) room would make it hard for the a/c? Or does keeping the fridge inside the a/c room reduces the power used by fridge?

Any way I don't live in an air-conditioned apartment and I believe energy can neither be created nor destroyed. But my fridge heats my apartment, which I don't like during summer. I would like it to dissipate heat outside my apartment. But during winder it can continue to serve as a room-heater.

33% Ladies and 0% gentlemen

33% reservation for women. Will there be a rule to have a women PM/CM for 33% of time per-term? If it is OK to force a women representative for a constitution for a term, this should also be implemented.

At least we should implement 33% reservation for men as well, even though it is not needed right now, to maintain equality and avoid problems in the future. Also it would help hiding the gender based discrimination of law.

One solution could be the one in my school. One male representative and one female representative per constitution.

I can foresee a future protest by Eunuchs for reservation. It would be better if we can implement it now itself. Also I would like to know the basis for this particular 33%, why not 34%?

08 March 2010

What these advertisement mean to me

HDFC ATM
A guy parks his car in no-parking. Before the cops could tie his car to towing truck, he gets back in the driver seat.
Probable intended meaning: No crowds at ATM, and very fast service
I understood: ATM's without parking facility and no customers except law-breaking stupids

Ashirwad Atta
A young daughter of the family is too fast and active doing like stealing chappathi's, removing clothes from the drying line, when it rains before her mother could.
Intended meaning: Ashirwad atta keeps the girl healthy and energetic
Conveyed meaning: Everyone else, who also eat the same atta are dull and lethargic.

Did you ever had such interesting mis-interpretations?

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.

27 October 2009

GWUN

2030 AD. For the GWUN project sponsored by UN, 8700000 instances of the distributed GWUN clients are running busily on Linux Servers.

The global warming has already had a huge effect on the earth. And it seemed to be getting worse in the last 2 years. The poles were melting, sea-level rose, many countries have sub-merged in the sea and the life on earth was fast reducing.

The goal of the GWUN project is to compute the top reasons for global warming and the ways to protect life on earth. The scientists were eager to know the results. The situation was getting worser by the day. Huge corporations around the world sponsored more nodes for the project to speed it up. After busily computing for 27 months, the results were ready.

GWUN result: GWUN project machines were hosted at the Poles, to reduce the power consumption required for cooling those machines. Reducing power consumption was considered as a key factor to prevent global warming. But that released heat directly in the polar region of the earth. If the same amount of heat was released in an already warmer place, the earth's atmosphere would have managed to release/absorb the energy and the polar ice wouldn't have melted.

Beware of Glogle warming. Unknown preventive measures could be the real culprits.

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?

17 June 2009

White ignored in India?

Four coloured tri-colour flag. (நான்கு வண்ண மூவர்ணக்கொடி)



Is it because white is not considered as a colour?



No. The wheel is not considered!

It is composed of three colours with a meaning and a navy-blue wheel in the center. Mexico and Croatia also have tri-colour flags with more than 3 colours! See http://en.wikipedia.org/wiki/Tricolour

10 May 2009

Mother's day story

The story that disturbs me the most.

A monkey and its baby were caught in flood. The mother held its baby above the water level. Slowly the water level raised. Knee level, hip, chest, throat.. the monkey dropped its baby in the water and stood on top of it.

Thats why they are called monkeys.