Monday, November 2, 2009



The My Recent Documents folder on the Windows XP Start menu displays a list of files and documents that you most recently used.

Removing the Recent Documents link from XP Start Menu

To remove the My Recent Documents folder from XP Start Menu, try this:

  • Right-click Start, and then click Properties
  • Click Customize
  • Click the Advanced tab
  • Under Recent documents, uncheck List my most recently opened documents
  • Click OK, and then OK.

Equivalent registry value

  • Open Registry Editor and navigate to:

HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Explorer \ Advanced

  • Backup the key to a file. See Backing up.. article
  • Set the value of Start_ShowRecentDocs accordingly.

Value of 0 - List my most recently opened documents is disabled
Value of 2 - List my most recently opened documents is enabled

Automate the above with REG file

Download this REG file sets Start_ShowRecentDocs registry value to 0
Undo REG file which sets Start_ShowRecentDocs registry value to 2 (default)
Different setting for the Windows Classic Start Menu

For the Classic Start Menu, set NoRecentDocsMenu to 1 in this key:

HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Policies \ Explorer

NoRecentDocsMenu value may not exist by default. If so, create a new value of type REG_DWORD and set it's data to 1

Sunday, October 25, 2009

Software bug

A software bug is the common term used to describe an error, flaw, mistake, failure, or fault in a computer program or system that produces an incorrect or unexpected result, or causes it to behave in unintended ways. Most bugs arise from mistakes and errors made by people in either a program's source code or its design, and a few are caused by compilers producing incorrect code. A program that contains a large number of bugs, and/or bugs that seriously interfere with its functionality, is said to be buggy.

Common types of computer bugs

Conceptual error (code is syntactically correct, but the programmer or designer intended it to do something else)

Maths bugs

  • Division by zero
  • Arithmetic overflow or underflow
  • Loss of arithmetic precision due to rounding or numerically unstable algorithms

Logic bugs

  • Infinite loops and infinite recursion
  • Off by one error, counting one too many or too few when looping

Syntax bugs

Use of the wrong operator, such as performing assignment instead of equality test. In simple cases often warned by the compiler; in many languages, deliberately guarded against by language syntax

Resource bugs

  • Null pointer dereference
  • Using an uninitialized variable
  • Access violations
  • Resource leaks, where a finite system resource such as memory or file handles are exhausted by repeated allocation without release.
  • Buffer overflow, in which a program tries to store data past the end of allocated storage. This may or may not lead to an access violation. These bugs can form a security vulnerability.
  • Excessive recursion which though logically valid causes stack overflow

Co-programming bugs

  • Deadlock
  • Race condition
  • Concurrency errors in Critical sections, Mutual exclusions and other features of concurrent processing. Time-of-check-to-time-of-use (TOCTOU) is a form of unprotected critical section.

Teamworking bugs

  • Unpropagated updates; e.g. programmer changes "myAdd" but forgets to change "mySubtract", which uses the same algorithm. These errors are mitigated by the Don't Repeat Yourself philosophy.
  • Comments out of date or incorrect: many programmers assume the comments accurately describe the code
  • Differences between documentation and the actual product
How about some bugs for snacks?

Thursday, October 22, 2009

#include<stdio.h>
void main()
{
int a;
clrscr();
a=(scanf("%d",&a)+a-1)+(scanf("%d",&a)+a-1);
printf("%d",a);
getch();
}

Wednesday, October 21, 2009

#include<stdio.h>
void main()
{
int a=3,b=2,c;
c=printf("%*d%*d",a,1,b,1);
clrscr();
printf("%d",c);
getch();
}

To understand more about this printf, Click here

Monday, October 19, 2009

Kakuro puzzles resemble crosswords which use numbers instead of words. The aim of the game is to fill all the blank squares in the grid with only the numbers 1-9 so that the numbers you enter add up to the corresponding clues. When the grid is filled, the puzzle is complete. Sometimes called "Cross-sums" or "Kakro", Kakuro is Sudoku's bigger (and harder) brother.

Kakuro puzzle grids can be any size, though usually the squares within them have to be arranged symmetrically. As a rule of thumb, the more blank squares a puzzle contains, the harder it is, however this isn't always true, especially if it is a good quality puzzle.

NOTE: It is very important to note that a proper Kakuro puzzle has only 1 unique solution, and it will always have a logical way of reaching it, there should be no guesswork needed.



An easy Kakuro puzzle




Solution for the above puzzle

In discussing Kakuro puzzles and tactics, the typical shorthand for referring to an entry is "(clue, in numerals)-in-(number of cells in entry, spelled out)", such as "16-in-two" and "25-in-five". The exception is what would otherwise be called the "45-in-nine" — simply "45" is used, since the "-in-nine" is mathematically implied (nine cells is the longest possible entry, and since it cannot duplicate a digit it must consist of all the digits from 1 to 9 once). Curiously, "3-in-two", "4-in-two", "5-in-two", "43-in-eight", and "44-in-eight" are still frequently called as such, despite the "-in-two" and "-in-eight" being equally implied.

Solving techniques

Although brute-force guessing is of course possible, a better weapon is the understanding of the various combinatorial forms that entries can take for various pairings of clues and entry lengths. Those entries with sufficiently large or small clues for their length will have fewer possible combinations to consider, and by comparing them with entries that cross them, the proper permutation — or part of it — can be derived. The simplest example is where a 3-in-two crosses a 4-in-two: the 3-in-two must consist of '1' and '2' in some order; the 4-in-two (since '2' cannot be duplicated) must consist of '1' and '3' in some order. Therefore, their intersection must be '1', the only digit they have in common.

It is common practice to mark potential values for cells in the cell corners until all but one have been proven impossible; for particularly challenging puzzles, sometimes entire ranges of values for cells are noted by solvers in the hope of eventually finding sufficient constraints to those ranges from crossing entries to be able to narrow the ranges to single values. Because of space constraints, instead of digits some solvers use a positional notation, where a potential numerical value is represented by a mark in a particular part of the cell, which makes it easy to place several potential values into a single cell. This also makes it easier to distinguish potential values from solution values.

I find this game to be more interesting than Su-do-ku. I had never been interested in Su-do-ku though I like number puzzles in general! This game is a perfect replacement to Su-do-ku!

You can play this game online at http://www.kakuro.com/playonline.php



My First Kakuro puzzle (Took 19 minutes 32 seconds to solve this puzzle!)



Proud moment for me. So soon, it has become two years since this blog has been started. This blog was the first useful thing I did after turning 18 and it is growing old along with me! This is the 279th post in my blog. I planned to touch VVS Lakshman's magical figure of 281 to make this post memorable. But couldn't do it. Because I can't post in my blog just for the sake of posting. One kind request to my readers is that, if you want to comment on a post of mine, comment it here rather than mailing me or scrapping me in Orkut. Anyway, thank you for your support without which this milestone would have never been reached.

Sunday, October 18, 2009

This post is called ‘The Drop’.



Internal exam was a cakewalk for me. I had time to study from 8:30 to 10:45. I would study and then write exam from 10:45 to 12:45. Then after noon exam would be 2:00 to 4:00. I didn’t even go to my class during the internal exam. I studied with Raj Kamal in Mechatronics. I performed really well. Only a girl named Gauthami performed better than me. I was quite happy. I also noted that Johnson, Arun, Vimal Kumar were the other guys in the top ten. I took notice of them. Karthikeyan did reasonably well too; think he got the eleventh rank.

And then the classes went on for a month. Here I should mention about three staffs, Vijayanandhi Ma’am (Electrical Engineering), Sengodan Sir (Engineering Physics) and Velmurugan Sir (Engineering Drawing), next to my school teachers, these were rocking. They were giving their very best. I did exceptionally well in the second internal exam where none performed better than me. Till that, I did not make any serious friendship with any of my classmates. Johnson and Vanavan still were the only people I spoke with. Other than this I used to speak with Karthika, Kalyani and Jinju mostly to get the notebooks and observation works from them. He he. What else to speak? :-P.

Karthikeyan used to call me up once in a while. We discussed nothing but the subjects. Life was monotonous.

After the second internals, there was an announcement about a National Conference called Confluence and students could present paper in that. I did not know what a paper was not had idea of presenting a paper. Karthikeyan asked me whether I was interested in presenting paper. He informed me that Arun was already in the team. I thought for a while on the possibilities and replied positively. Karthikeyan became Karthi after sometime and I noticed that Arun was Arun Kumaar. The double a in his name was to be noted. Karthi suggested Solar Cell as the topic for our paper. We discussed with Sengodan sir on this. On a Sunday noon, Arun and Karthi came to my home. Arun was using computer at a rapid speed. Infact I noticed that during an English lab when, he changed the Show Hidden files from the folder option. But his speed was very much evident.

That day was like a training period with Arun and Karthi. Those guys taught me the shortcuts and I had never used Google images before that. That was also taught by those guys. Arun was using MS-Paint and Print Screen like magic. I had never seen such stuff before that. We used to get OD (On Duty attendance) for works on this paper. We later changed the topic as Solar Photo Voltaics. Prabu later joined our team.

Preparation went smooth. Meanwhile I joined Orkut and was introduced to chatting. Well, it was a kind of distraction to me. To be honest, I spent lot of time on this. But it helped me to get new friends. Especially, Deepa. I used to write my fan fiction work of Harry Potter in J K Rowling community. Deepa liked my work and sent me her friend request in Orkut. We used to spend lot of time chatting in Yahoo messenger. From being unknown strangers, we became very close friends. And due to excessive Internet usage (initially I had bandwidth restricted to 250 MB). I got a pretty fat bill! So I switched unlimited bandwidth. So I started downloading lot of movies.

I didn’t spend enough time on studies. In the third internal exam, from 1st rank I dropped alarmingly to the 11th rank. But the convincing part was that my performance was the same except for Maths. I still remember my mark. I scored 58. Karthi and Arun flunked but requested for marks from Sivasakthi Ma’am and cleared. So I wasn’t very much worried about my drop.

It was confluence day

We presented the paper. I don’t remember presenting it with flying colors. But we did a good job. Arun and I presented the paper. Karthi and Prabu took care of the slideshow.

Surge-2007 was an event organised by my seniors and the placement cell. I attended the Mock Press prelims. I had some ten GK questions and dialogue writing between Bill Gates and Lalu Prasad Yadav. I tried to be funny, by making all replies of Lalu in Hindi (I managed with the few words I know in Hindi). So I was able to clear the initial hurdle. And reach the finals. In the finals, I did pretty bad because I got the role as James Bond and I was against Vadivelu. So obviously I didn’t win the event. But, my schoolmate Gopalakrishnan who was studying IT in my college made it to the debate finals. Along with him he brought his friend, Gokul. He was into debate finals as well. They did really well in the finals. But there was one IT senior called Priyanka who stole the show. It was a wonderful evening. It was so late in the evening. I was waiting for my dad to come and pick me up.

Devaki Ma’am finally taught Linked Lists, Queue and Stack. I feel that it was an important phase in my programming career. Learning this stuff was very important.

It was the last week of the semester.

Semester was to be over.

I was not absent even for a single day in that year.

It was a Monday. I had to submit my mechanical lab records. So I took three hours leave. (3, 4, 5)- 6th and 7th hour was Mechanical lab, went to Vanavan’s room in hostel and finished the record. In the same week I had taken another couple of hours leave on Friday to finish Electronics lab record.

Those were the 5 hours; I was totally absent in that semester.

Top ten students from each class were given a scholarship of Rs. 10,000 by my college. Having performed well, I was an instant choice to that list. Unluckily, Johnson missed out. Arun and Karthi got it too.

I feel that, it should have been based on merit. But it had reservations.

1. OC-3
2. BC-3
3. MBC-2
4. SC/ST-2

If OC was 3 then BC, MBC, SC/ST all had rights to compete in OC and their reservation. But it was not the case.

Even when it was based on reservation, the reservation was not well-organised.
In my opinion, Arun was the only OC category guy to deserve it. In my class, there are only 3 OC students who joined through merit:

1. Arun
2. Karthikeyan
3. Kalyani

So naturally what happens is that, every year they would get it.

If it was similar to counseling, only Arun had the chance. But it was not the case. I do not know whose mistake it was. But it was a mistake.

Then the semester exams started. I did well in all the papers, except Engineering Drawing where I made 2 big blunders and knew that I would lose 30 marks in that paper for sure.

Overall I was happy with my performance in the semester examinations. In came holidays. I was glad that I would be entering my department the next semester!

The drop in academic performance was not hurting me because, I always believe, “Form is temporary and Class is Permanent”. I knew I could always bounce back, if I wanted to.

Journey will continue…

























This post would be called Fear.

Yes, fear because I was afraid of the persons who had taken up the same course as me. I picked up when there were 5 seats remaining. Which means that there were nearly 30 people who had far superior cut-off to me and they should be more intelligent than me. So I should work really hard to compete with them.



I had never been industrious in my life except for my eleventh standard and brief period in twelfth standard.

Till tenth, I had never understood the Chemistry equations. What the principle was? Thanks to Chemistry teachers - Suresh Sir, Sekar Sir and Chandra Sekar Sir (It might be odd for you to refer so many persons as sir, but this is how I call them. Habits are hard to die!). I clearly understood the fundamentals of Chemistry in my eleventh and twelfth! Only when the fundamentals are strong, it serves the purpose of being industrious!

Well, there was a bit of selfishness from my side too. I learnt chemistry well because it could come handy for bio-chemistry in first-year if I pick medicine. But learning Chemistry was off no use except that it helped me fetch a seat in Computer Science and Engineering in Kumaraguru College of Technology.

Ok coming back to fear, I enquired to my family members and relatives on what College was about. They said that, I had to learn everything in advance and during lecture hours should get the essence of what the professor or lecturer teaches and get clarity by posing queries.

So, I planned to study the subjects in advance. I studied few chapters from a subject called Electronic Devices and Circuits because I already had that book borrowed from my uncle. My best friend Raj Kamal had joined Kumaraguru College too. He took up Mechatronics course. Since he joined under Management quota he had 3 weeks of bridge course. I enquired him what was taught and how the college was. He was giving positive reviews about the college. I was happy on picking the college.

My First day in College

It was August 31 2006, a Thursday. In the morning there was a meeting for the parents which I attended with my mother and grandfather. A person named Kavidasan gave a wonderful speech.
He told that, days when the proverb applied “Slow and steady wins the race” were bygone and gave a new proverb “Fast and perfect wins the race!” My mother and grandfather left the college after the lunch which was provided by college.

A new life was about to begin.

I was surprised by the fact that, all First years will be in a separate block called Science and Humanities and I Shall enter computer science department only in my second year. I entered the science and humanities block. I quickly skimmed through the notice board. I saw that my Physics teacher was my Class Advisor and his name was Sengodan. I had never heard that name in my life before. There was a teacher in my school called Senram, which was the closest name I could remember.

When I entered the class, the first person I met was a guy called Suresh.

In our lives we don’t like few persons from the first sight. This guy Suresh was one such person. I didn’t like him from the moment I saw him. He introduced to me another guy called Johnson. You know what? I had never been a first bencher in my entire school life, probably due to my height and my talkative nature. Staffs would not prefer to have me in the first bench during school. I was a standing a example to what people call “Chatter Box”. But I planned to take the first bench in College.

And there was a guy called Vanavan who came to the first bench because all other benches were pre-occupied. One major question which all staffs asked during the first class of theirs was, “how many of you are from biology major and how many of you are from computer science major?” My heart would start beating a little faster whenever I see the huge crowd of computer science students (they had computer science as their major in twelfth). I was afraid of them. I feared that they knew the programming languages like C, Java, Visual Basic, HTML etc., which I had seen my school mates studying. I knew nothing!

My dad arranged a person named Kamalakannan he was the nephew of my dad’s colleague.
He taught me looping, arrays and pointers. More than what he taught, I must thank him for introducing me to Yashwant Kanetkar’s book titled ‘LET US C’. I already had a book called ‘Projects Using C’ written by PVN. Varalakshmi. I read ‘LET US C’ like a story book. Tried out few programs and compared my logic with the one in Varalakshmi book. This was how I spent my first two weeks in College. Computer Programming was a paper for me in the first year. It was taught by Prof. Devaki. She was initially teaching the basic computer terms, generation of computers and such theories. Other staffs had entered into the syllabus as well.

I had eight theory subjects:

1. Computer Programming
2. Engineering Physics
3. Engineering Chemistry
4. Engineering Maths
5. Engineering Drawing
6. Electronic Devices and Circuits
7. Electrical Engineering
8. Technical English

Couple of practical subjects

1. Basic Engineering Lab
2. Physics & Chemistry Lab

I had two more labs viz., Electronic Devices and Circuits Lab and Computer Programming lab. But there were no exams for that lab!

Couple of weeks passed. As I hated Suresh at the first look, I liked Shiva Guru at the first look. Since, I was travelling to College by bus, I made few friends in the bus. Shiva Guru, Sriram Ayyapan, Arshad and Prahadeesh.

I used to go to Mechatronics class for lunch with Raj Kamal. So I was not maintaining a great rapport with the day scholars of my class. In fact, my term with both day scholars and hostellers was very bad mainly because of Electronic Devices and Circuits class. Since I had already prepared for that class, I would be able to follow what Sasikala Ma’am teaches. But none in the class except me and Johnson would follow that class completely. Johnson and Vanavan were my only pals in the class. In my Electronic Devices and Circuits Lab, my batchmates were Dinesh and Divya. Though they were not as close as calling pals, atleast they did not stare at me as the other classmates. Raj Kamal introduced to me a guy called Arun who was Raj Kamal’s entrance classmate. When that introduction took place, a guy passed a scorning look at me. I acknowledged it with another scornful look. I later learnt that his name was Karthikeyan.

So far I had spoken to only 5 to 6 odd persons in class. By now, I had known every person in the class by name mainly because of the attendance that is taken once every hour in college. In my school it was one-time attendance in morning and one-time in noon. Every hour attendance was pretty strange for me and it took some time to get used to it.

One day, there was an ellipse drawing exercise in engineering drawing class. I had completed that drawing. During break couple of girls, introduced themselves as Priyadarshini and Ramapriya and asked few doubts on drawing the ellipse. I had been wondering, whenever any person spoke to me, either Johnson or Suresh, it was for asking doubts to me. There was no discussion on movies or Harry Potter or any other book to which I was used to in school.

During bus travel, I used to read some book. So my bus mates that thought I was a nerd :-(. A misconception, most people tend to get when they see me.

The same day, after lunch there was a computer programming class. Devaki Ma’am asked a question on a simple assembly language program. My brain was working slowly; listening to a computer programming class after lunch was daunting task. Arun answered it, before I could get hold of what the question was. I was surprised, but fear factor was more than the surprise factor. There were people in the class who had better knowledge in computer than me.

And a week passed. Devaki Ma’am sent us an alternate in the form of Mr. Sivan Arul Selvan (he looked a perfect person to be cast as Uncle Vernon Dursley in Harry Potter), who did not teach us anything but questioned us on the computer configuration. Karthikeyan was called on to the stage and questioned on that. He said, he had a computer at home but did not know about configuration since he was a biology student.

There is a scene in Tamil film Vaali where the younger brother Shiva explains that his brother Deva is a deaf and mute person. But he hides that he is a dumb person by chewing a bubble gum. And since he can lip-read, nobody would detect that he his disabled.

Same applies to me as well. I was never proud of calling myself as a biology student in my class. Now that I have picked computer science, I like to address myself as a computer science student. I felt bad whenever biology was used as an escape route just as few Tamil medium students take that as an escape route in English classes.

I admired Sivan sir for the lively way in which he took the class. And two more weeks passed away, Internal exams were about to begin. Now I was feared of performing well in the exams.

Fear of losing makes you win. Fear of winning makes you lose! This was the lesson I learnt during this phase of college life!

Journey will continue...