Saturday, October 23, 2010

Doodle it up - My first google chrome extension !! :-)

Google is really a part and parcel of our daily life. It has become so inevitable to our daily lives. I have taken a bit of my time to quickly develop a simple Google Chrome Extension to customize your daily visits to google. Wouldn’t you love to see your own picture instead of the boring google logo everytime you open google’s homepage? Yes. This is exactly what this extension does.

Here are step-by-step instructions for installing the extension:

  • Download the extension from here

  • Install the extension by clicking "Continue"

  • Confirm the installation by clicking "Install"

  • You will see the confirmation message

  • Goto chrome://extensions and click on options under "Doodle it up" extension

  • In the page that opens up, enter the URL of the image and then click on Save Settings

  • Now, goto Google and Voila! you have your own image instead of the Google logo!



Please post your comments/suggestions as comments.

-Vignesh

Friday, October 15, 2010

Happy Birthday APJ Sir !! :-)

Today is the 77th birthday of the people's president of India, Dr.A.P.J. Abdul Kalam. He is a dreamer and wants to see India as a developed nation by 2020.

You have really been a friend, philosopher and guide for the entire generation of youth in India. We love you sir!!

HAPPY BIRTHDAY!!



Happy Birthday APJ Sir !! :-)

Here are a few of his inspiring quotes:

  • As a child of God, I am greater than anything that can happen to me.

  • Be more dedicated to making solid achievements than in running after swift but synthetic happiness.

  • Climbing to the top demands strength, whether it is to the top of Mount Everest or to the top of your career.

  • Do we not realize that self respect comes with self reliance?

  • Educationists should build the capacities of the spirit of inquiry, creativity, entrepreneurial and moral leadership among students and become their role model.

  • English is necessary as at present original works of science are in English. I believe that in two decades times original works of science will start coming out in our languages. Then we can move over like the Japanese.

  • God, our Creator, has stored within our minds and personalities, great potential strength and ability. Prayer helps us tap and develop these powers.

  • Great dreams of great dreamers are always transcended.

  • I was willing to accept what I couldn't change.

  • If a country is to be corruption free and become a nation of beautiful minds, I strongly feel there are three key societal members who can make a difference. They are the father, the mother and the teacher.

  • If we are not free, no one will respect us.



-Vignesh

Saturday, October 9, 2010

root - The king of kings - Question (Part 1)

After these many years of linux, i have finally found something that root cannot do but a non-root user can do! Yes, its true and it was difficult for myself to believe this in the first place. Its like the phrase, “I saw binary numbers floating in my dreams, wait a second, i think i saw a two!”.

I have always not liked the fact that root is the king of linux and he never respects anyone else. Of course we need a system administrator who should be able to control the entire system, but at the same time, using a system administrator account should not be considered as dangerous, as many of the linux distros warn me.

Consider a simple case, root executes rm -rf * from a directory that is owned by xxxxxx and permissions set to 700. root will be able to successfully do this as he has no limits (which is the cause of the danger). I feel that root should still respect the permissions and not be able to do this in one step. If he really knows that he wants to do it, first he should change the permissions of the file (say to 720) and then perform the rm. By this, it requires two mistakes to screw up, rather than one. But the point is, root should respect permissions and he should modify the permissions when he clearly knows what he is doing and must not be entitled to do anything arbitrarily.

Now, to the actual topic. Here’s what a normal linux user would think is always true:

user@user$ marry me
fuck off!
user@user$ sudo marry me
with pleasure sir!


The point of the above statements is that, no matter what, root can always do anything and everything, unless i recently found one exception. I was able to run a command as non root but not as root.

user@user$ touch foo
user@user$ sudo touch foo
touch: Permission denied


Can anyone figure out how on earth could this happen ? (Yes it is really possible!). I’m posting this as two parts (Question and Answer). I will post the scenario i came up with along with the explanation how it is theoretically correct in the next part. If you know of such a scenario, please share it on comments :-)

-Vignesh

Sunday, October 3, 2010

DBMS - The art that is taught as a science !!

Note: This post is not intended for a general crowd of audience. This post rambles on about something that the current college syllabi lack and suggests some changes to improve it. If you are interested in reading the previous sentence, then go on. Otherwise just close this tab and move on with your work instead of wasting time here :-)

We all know that database is a software that is used to store, organize, blah blah blah our data. Any person who is taking up a programme related to computer science would have learnt this definition for a short answer question in his/her database management systems course. After having worked with a database that grows by approximately 40000 rows a day, I now realise that the college level courses on DBMS could do much better than what they actually are doing now.

Insights

How the indian college DBMS courses work? Lets have a quick bulleted list of items that a student does during his DBMS course spanning one full semester.

  • Reads through the differences between File Management System (FMS) and DBMS

  • Reads about ACID properties and byhearts them for answering in the examination

  • Reads about various normal forms (and byhearts them for writing short answers in exam). Almost all the DBMS courses say that there are only 4 normal forms (1st, 2nd, 3rd and Boyce-Codd) and they always omit even the fact that there are actually 3 more normal forms (4th, 5th and the 6th)

  • Whiles away time with Entity Relationship (ER) diagrams which is the student's life saver in exams (as there is no such thing as THE right answer, anything that makes sense will fetch you marks)

  • Learns basic SQL and does a huge list of CRUD (Create, Read, Update, Delete) commands. The most complex query one writes here involves a query with another inner query

  • Argues over whether SQL should be pronounced letter by letter (like an abbreviation) or as SeQueL (like an acronym)

  • Reads about and byhearts various types of joins and remembers all of them for writing in the exam with a single example

  • Optionally, develops an information management system (famous ones include Library Management System, Airline Reservation System, etc.) at the end of the course, where the actual system will consist of nothing but data entry. This project will, of course, go into his/her resume during the interviews

  • Towards the fag end of the course, reads something about how the DBMS does some basic operations internally. Most of the students omit this as it is covered in the last few weeks of the semester when students are busy with some other work



The problem

The main problem lying around here is the difference between theory and practice. The beauty about DBMS is that everything that works out perfectly on theory performs worse in practice. For example, consider normalisation. In theory, and according to college syllabi, Boyce-Codd Normal Form is the best that a database could be designed. But in practice, it might kill the database if it mostly consists of reads (because of the increased number of costly joins even for simple reads).

Almost all the colleges teach DBMS in theory and they never consider the practical aspect. And yeah, developing an information management system over the period of the course does NOT count as practice. The information management systems which students develop as a part of their DBMS course hardly involves more than 10 rows per table. And most of the students develop it in the mindset of deceiving the faculty for marks rather than to actually learn DBMS which is the actual objective. DBMS is all about scalability and hence teaching DBMS in small scale is like teaching something that is totally illogical.

What can be done?

Again, let me make a bulleted list of points that i think can be done to bridge the theory to practice gap that is found in the DBMS courses. I am not an expert in DBMS and these are just my humble views on what i feel could be changed.

  • First major change to be done is to teach DBMS in the actual scale in which it is to be used. In the lab classes, don't let the students create their own tables and add 5 or 10 dummy records. Give them a preloaded table with ten lakh rows and make them query against that table. This will make them write better queries naturally as every query is going to take some time to spit out the output they want.

  • The above step also makes the student to learn about indexes. Indexes are one thing that is really useful in DBMS (i am in the process of writing an article about database indexes - will be posting it once its complete). None of the courses on DBMS really teach about the practical benefits of indexes. When a large table is given, students will have to define indexes and exploit them in their queries.

  • Instead of making students worry about JDBC, ODBC, etc. leave the frontend language to their choice and just lay constraints on the backend DBMS system. For example, don't force them to use Visual Basic, which makes a student focus more on learning ODBC and designing forms rather than designing databases.

  • Make the joins practical. Don't just teach the various types of joins for the sake of short answer questions. Make it such a way that the student is really comfortable with how exactly the different types of joins work.

  • And for god's sake stop teaching stuff about File Management Systems. We are in an era where there is a group that says even SQL and DBMS is not needed (For more about this google for NoSQL).



Closing thoughts

Database Management Systems are the arteries and veins of any corporate business. Hence, learning the complexity and scale involved in it is really inevitable and important. Making proper use of the DBMS course in colleges would be a real boost to the student's career. If the changes i suggested here are incorporated in a course, then that will definitely also save the time that a student spends on preparing DBMS for interviews.

To conclude, "In theory there is no difference between theory and practice. Whereas in practice, there is". DBMS is more of an art which is being taught in colleges as a science. If this change happens, quality of students being spit out of college every year will become better for sure.

-Vignesh

Monday, September 27, 2010

Happy Birthday Google (12 years old) !! :-)

Today google celebrates its 12th birthday! Started in the year 1998 by two stanford guys in a garage, google has been the one thing that has transformed the whole world. Began as a search engine, today they work on almost all the cutting edge technology in the world (rather they invent most of the cutting edge technology).

Happy Birthday Google (12 years old) !! :-)


Google has really become an integral part of almost all of our lives. Google co-founder Sergey Brin's dream when he initially thought about google was to "download the entire internet in his computer" and thats what they have achieved today!

As some rightly say, "when a noun becomes a verb, technology has really matured" and thats exactly what google is.

Happy Birthday Google !! May you make the life of more and more software engineers easy day by day !! :-)

Do you have a google moment to share ? Do it in the comments :-)

-Vignesh

Saturday, September 25, 2010

Bom Sabado - The orkut virus !!

If you are still one among those who give a damn about orkut, then this might be one thing that your really care about. Today, orkut has been hit by a vulnerability that is really a security threat for your account.

Bom Sabado - The orkut virus !!


The virus is called "Bom Sabado", meaning "Good Saturday" in portugese. This is yet another XSS attack, thereby making it the second XSS attack on a major website this week. Earlier this week, Twitter faced a similar attack. There is no official update from google yet on this issue.

What does it do?

When you open orkut and if you are affected by this virus (which could be possible if one of your friends are already affected), a piece of javascript will automatically run doing the following:

  • Makes your browser hang for a moment

  • Adds you to the attacker's communities (orkut equivalent of facebook fan pages) without your consent

  • Sends a scrap (orkut equivalent of facebook wall) to all your friends without your consent, with the text "Bom Sabado" and a piece of code that will do the same set of actions when your friend log in to his/her account



How to prevent this?

  • Unlike the twitter XSS attack, this is a severe one that steals your cookies and thereby impersonate your session. If you have logged in to orkut anytime today, clear your cookies and cache of your browser.

  • To be safe, change your google account password and security question. To do this, go to https://www.google.com/accounts

  • Do not visit orkut until google officially says that they have fixed it. For updates, keep looking here

  • If your account seems to be behaving crazy or if its totally compromised, then see here for a solution.

  • Delete your orkut account and join facebook !



I badly want to use orkut now!

If you badly want to use it now, then you can use this minor hack to do that. The virus seems to be loading the malicious javascript code from tptools.org and hence you can tweak this to point to something else in your hosts file.

Edit your hosts file (Windows - C:\windows\system32\drivers\etc\hosts; Linux - /etc/hosts) and add the following lines:
127.0.0.1 tptools.org
127.0.0.1 www.tptools.org

This tweak will make tptools.org will to resolve to your own system and hence the javascript will fail to load. Note that you are at your own risk, i am not responsible if your account gets compromised even after you make this tweak !!

I will try to update this post once there are some official responses from google.

-Vignesh

Random Thoughts !!

Today has been a really depressing day and i thought i will feel better if i write about something. Its really odd hours and i am wondering why i am sitting and typing something which, most likely, no one might even bother to read. But still, ever since i started writing my blog, it is one thing that i have been really obsessed with.

I know this post will not make any sense as i just wanted to get over time and scribble something. Here are some random thoughts that i have had about my blog ever since i have started writing it.

  • I first started writing the blog inspired by one of my college senior varunkumar. You can visit his awesome blog here

  • At the first thought, there were a few questions within me that will naturally arise to anyone who wants to start a blog. At first, i answered these questions myself as follows:

    • What will i write about ? - Some personal stuff and some technical stuff and hence i decided the description of this blog to be “From geekiest to craziest”

    • Who will read my blog ? - I thought of targetting my twitter/facebook followers initially and since then, i have been updating about my blog posts in facebook and twitter.

    • What do i get out of writing a blog ? - I did not know the answer for this initially. But now, i have figured out that every time you keep the last full stop on your post, you feel the immense pleasure of being able to convey something that people will really read ( and also that you have written something that google will really show in its search results !! )



  • The name of my blog, as many might not understand it. “Je L’ai Dit” means “I Said It” in french. I have described about this in the “who am i” page of this blog. Anyways, its just a small denotion that whatever the content of my blog is, i am totally responsible for creating it.

  • My blog is powered by wordpress and i use the theme InSense.

  • My bad (or good) luck, google started denying adsense for sub-domains a week before is started my blog. Adsense terms now states that you can apply for adsense only with a top level domain and not a subdomain.

  • As many might have not known, my blog has an alias URL http://www.jelaidit.co.in


As i said earlier, this post really does not makes much of sense, but it really has helped me to get my mind of out other things and given me a peace of mind. I really love my blog and i really love writing. Thanks to all you guys who have been keeping my blog going.

P.S.: I am not posting a status update on facebook/twitter about this post as it doesn't make sense.

-Vignesh