Wednesday, November 4, 2009

And the winner is
INDIAN National Highway Department (Painting Division)



One summer day in France in 1826, Joseph Niepce took the world's first photograph. It's a photo of some farm buildings and the sky. It took an exposure time of 8 hours. Voila! It had to feel pretty incredible, like magic.

No one's exactly sure how he did this or what chemicals were used. All that's known for sure is that the photo is on an 8"x 6.5" pewter plate. It's so faint it has to be tilted in order for the light to catch it just right, to see it. The Getty Museum in California did two weeks of tests in 2003 in a joint project involving the Rochester Institute of Technology and France's Centre de Recherches sur la Conservation des Documents Graphiques (try saying thatthree times fast). Then it went back on display at the University of Texas in a new air tight case, where it's been on display since 1964. I'm not sure why we have it and the French don't, but "hah".

The current theory about how the photograph was taken is that Niepce coated the pewter plate with bitumen, a petroleum derivative sensitive to light. After it spent those 8 hours hardening, he washed the plate with a mixture of oil of lavender and white petroleum. This dissolved the portions of the bitumen that didn't 'see' direct light, so didn't harden. Pretty damn clever. Niepce called his work a "heliograph," in a tribute to the power of the sun.

Article Source:World’s First Photo. Really?!!!!

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…