Sunday, December 26, 2010

Software Programmer’s Love !!! eNJOY

Mere… Company kee ladkiyaan sunder hain Aur lonely hain…
Problem ye hai ki bus voh READ-ONLY hain…

Shayad mere pyar ko taste Karna bhool gaye…
Dil sey aisa CUT kiya ke PASTE karna bhool gaye..

Tumhare samne hain itney items Kabhi hame bhi pick karo…
Hamare pyar ke ICON pe Kabhi to tum DOUBLE-CLICK karo…

Roz subha hum karte hai Itne pyar se unhe good morning…
Woh humhe ghoor kar dekhte hain Jaise 0 ERRORS but 5 WARNINGS…

Ho gayi galti humse, Click ho gaya mouse
Duniya ki parwaah chhodo, ban jaao meri spouse!

Tumse mila main kal to, Mere dil mein hua ek sound,
Lekin aaj tum mili To kehti ho: Your file not found!

Ab aur kaho na tum, “but” ya “if”
Tum ho meri zindagi ki animated gif

Aysa bhi nahin hai ke, I don’t likeyour face
Par dil ke computer mein, Nahin hai enough disk space

Ghar se nikalti ho tum jab, Pehen ke evening gown
Too many requests se, Ho jaata hai server down

Tumhaare liye pyaar ki application, Create main karoonga
Tum usse debug karna, Wait main karoonga

Tumhaara intezaar karte karte, Main so gaya
Yeh dekho mera connection, Time out ho gaya

Kya chaal hai tumhaari, Jaise chalti hai koi cat
What is your ICQ number, Aao karein chat

Tum jabse meri zindagi, mein aayi ho banke female,
Yaad raha na ab kuch, Na postman , Na e-Mail

Joh sadiyaon se hota aaya hai Woh repeat kar doonga…
Tu naa mili to tujhko dil sey Ctrl+Alt+Delete kar doonga…

Humse Kya Khata Hui Ki message Aanna Band Hai…….
Aap hi humse naraz hain ya Web Server band hai…….

Badli hai duniya , kuchch mein bhi badal gaya hoon
Pahle bekaar tha ab S/W Programmer ban gaya hoon

Project extend ho gaya to kya ho jaata hai?
Are Tankha milti hai aur timepass ho jata hai..

teri yaad me sanam raat bhar humne to wine piya
teri yaad me sanam raat bhar humne to wine piya
kabhi offline to kabhi online piya

Pyar ke sitaare jab gardish mein hote hai
Pyar ke sitaare jab gardish mein hote hai
Laila ghar mein aur majnoo project testing kar rahe hote hai

Kaash aisa ho

Aisi apni Wife ho………………

lambi jiski height ho,
Jeans jiski tight ho,
Chehara jiska bright ho,
Weight mein thodi light Ho,
Umar me difference slight ho,
Thodi see wo quiet ho,
Aise apni Wife ho.

Sadak per sab kahe kya cute ho,
Bhid me sab kahe side ho, side ho,
India ki paidaish ho,
Sas ki seva jiski khwahish ho
Aisi apni Wife ho.

Padosi jab baat kare to haath me knife ho,
Dinner candle light ho,
Hum Dono me na kabhi fight ho,
Milane ke baad dil delight ho,
Hey prabhu teri archana uski life ho.
Yeh kavita padhke sab kahe “Guru, tum right ho”,
Aise apni Wife ho.

Kaash yeh concept 0.0001 percent bhi right ho
Agar aisi apni wife ho to kya hasin life ho
Har kisi ki yahi farmaish ho
kudrat ki bhi aajmaish ho
Khudah ke software mein bhi bug ki na gunjaish ho
Ay kaash, kahin to ek aisi paidaish ho
aisi apni wife ho…

Engineer kaun hai???

ENGINEER WOH HAI JO AKSAR PHASTA HAI
INTERVIEWS KE SAWAAL MAE
BADI COMPANIYON KI CHAAL MAE
BOSS AUR CLIENT KE BAWAAL MAE

ENGINEER WOH HAI JO PAK GAYA HAI
MEETINGS KI JHELAI MAE
SUBMISSIONS KI GEHRAI MAE
TEAMWORK KI CHATAI MAE

ENGINEER WOH HAI JO LAGA RAHTA HAI
SCHEDULE KO FAILANE MAE
TARGETS KO KHISKAANE MAE
ROZ NAYE-NAYE BAHANE MAE

ENGINEER WOH HAI JO
LUNCH TIME MAE BREAKFAST KARTA HAI
DINNER TIME MAE LUNCH KARTA HAI
COMMUTATION KE WAQT SOYA KARTA HAI

ENGINEER WOH HAI JO PAGAL HAI
CHAI AUR SAMOSE KE PYAR MAE
CIGERATTE KE KHUMAR MAE
BIRDWATCHING KE VICHAR MAE

ENGINEER WOH HAI JO KHOYA HAI
REMINDERS KE JAWAAB MAE
NA MILNE WALE HISAAB MAE
BEHTAR BHAVISHYA KE KHWAAB MAE

ENGINEER WOH HAI JISE INTEZAAR HAI
WEEKEND NIGHT MANANE KA
BOSS KE CHHUTTI JAANE KA
INCREMENT KI KHABAR AANE KA

ENGINEER WOH HAI JO SOCHTA HAI
KAASH PADHAI PE DHYAAN DIYA HOTA
KAASH TEACHER SE PANGA NA LIYA HOTA
KAASH ISHQ NA KIYA HOTA

Employee Resignation

Poetic Resignation
The name is good, the brand is big
But the work I do is that of a pig
The work or the brand; what is my way?
I don’t know if I should stay.
To work, they have set their own way
Nobody will care to hear what I say
My will be NULL, they wont change their way
I don’t know if I should stay.
The project is in a critical stage
But to do good work, this is the age
This dilemma is killing me day by day
I don’t know if I should stay.
The money is good, the place is great
But the development is at a very small rate
Should I go for the work, or wait for pay
I don’t know if I should stay!
The managers don’t know what they talk
The team doesn’t know where they walk
That’s a bad situation, what say?
I don’t know if I should stay.
I can go to any other place
But what if I get the same disgrace
I can’t keep switching day by day
I don’t know if I should stay.
The -ves are more, the +ves are less
Then why have this unnecessary mess
No more will I walk their way,
It’s all done, I won’t stay.
Thanks & Regards
Employee
Manager Response
Reply: What I want to say?

(Manager)

The decision is good or decision is bad
Only God knows still I am glad
Keep moving in life that is what I can say
If you feel right go in the same way
May god give you the work, the challenge you want
Anyway there is always a second chance
Chances are there, grab them snatch them
That is what I can say
Keep on jumping companies to get more and more and more….
That will keep you always a fore (Even to me)
>From my experience I can tell you
Being in software development is like taking hell out of you
You are frustrated since you have no quality work
And you were frustrated because you had quantity work
It’s always like that previous job was better than the current one
And expects the new job will be much better than this one
But what you get is a frustration level up to sun
Than you will again send the resignation like this one
This is all what I want to say
Have you completed all the formalities?
Filled the form and got it signed from department humanities (HR)
Once done you can take all your cash
But don’t refer others as they will follow you’re a*s.
At last I appreciate your contribution to the company
Even though there was not any….
You will keep a copy of this with you for FYI
Don’t feel shy
As I also got it some time back from my old manger say Hi….
That is all what I want to say.
Thanks & Regards
Manager

Tuesday, December 21, 2010

Free Download Microsoft Office 2010 Full With Activation Key

Microsoft Office 2010 download links have been released to the public today. This public beta version of MS Office 2010 (v. 14.0.4536.1000) is now available for free download on Microsoft’s Official website.

Checkout archive for more MS office 2010 download links

Microsoft Office Professional Plus 2010 beta version also includes MS Publisher and Infopath 2010 along with Word, Excel, Outlook and Power point applications. Checkout what’s included with this download.

ms office 2010 download applications list

New Features Of Microsoft Office 2010

  • Outlook Social connector which includes the option to add friends to your social network direct from Outlook.
  • Built in screen capture for MS Powerpoint.
  • Upload or Save directly to Windows Live Sky Drive or SharePoint 2010.
  • Improved user navigation and Icons.
  • One click PDF saver.
  • Embed online videos into presentation.

Installation Requirements for MS office 2010

500 MHz 32-bit or 64-bit processor or higher
256 MB of system memory or more
3 GB of available disk space
1024x768 or higher resolution monitor
DVD-R/W Drive

Installer is around 700MB. Requires Online Activation after installation.

Supported OS : Windows XP SP3, Vista SP1, Windows 7

How To Activate Microsoft Office 2010 for Free

Go to the download page.

Click the ‘Get it Now’ button.

Sign in with your live id and fill out the small form to download the beta of Microsoft Office 2010 for free.

You will get the Microsoft Office Professional Plus 2010 Beta Product Key called MAK key to activate your evaluation copy of Microsoft Office Professional Plus 2010 Beta.

microsoft office 2010 product key

At the bottom, you will find the link to download MS office 2010 for free, both 32 bit and 64 bit versions.

For Activating the Office 2010, first you have to install the product and do the following steps.

Step 1: Open Microsoft Word 2010 Beta and click on the "File" tab. Next click "Help".

Step 2: Click “Change Product Key”.

Step 3: Enter the Multiple Activation Key (MAK).

Step 4: Entering the MAK key in Microsoft Word 2010 Beta automatically activates all the Office Professional Plus 2010 Beta applications. Click on the "File" tab to return to the Document view.

UPDATE: MS Office 2010 RC build 14.0.4734.1000 has been leaked on the internet and is rumored to be the latest RTM version of Microsoft Office 2010. The free keys which you got now doesn’t work with this version as it was a part of the Microsoft’s beta program.

But some users have managed to hack the activation procedure of Microsoft Office professional 2010 RC version which appears to be very simple as it only needs some files which we already have when installing the beta MS Office 2010 version. The two files which needs to be replaced seems to be tokens.dat and pkeyconfig-office.xrm-ms. The procedure for MS office 2010 crack is already available throughout major forums, where an user named SoLoR has made a script called ActivateOffice2010beta.7z which does the whole cracking procedure for you.

Since this version of MS office 2010 RC 14.0.4734.1000 is already cracked though some easy hacks, I don’t think Microsoft will release this as a final version now. So wait for an other RC build from Microsoft with this loop hole patched.

UPDATE: 18th September 2010

Here are the Official download links for MS Office 2010 [direct links]

This download contains Office Home and Student 2010, Office Home and Business 2010 and Office Professional 2010

Microsoft Office 2010 Single Image [One Setup file]

English 32-bit (x86): X16-32007.exe

English 64-bit (x64):X16-31970.exe

Microsoft Office Standard 2010

English 32-bit (x86): X16-32324.exe

English 64-bit (x64): X16-32361.exe

Microsoft Office Professional Plus 2010 (Retail Edition)

English 32-bit (x86): X16-32250.exe

English 64-bit (x64): X16-32213.exe

Summary: Free Download Microsoft Office 2010 With Activation Product key

Sunday, December 19, 2010

Automate Installation of XP

You can create a CD that can install Windows XP automatically, putting in all the details and answering all the dialog boxes.

The secret behind this is the answer file, which tells Windows what to do while it's installing. The answer file can be created using Windows setup manager.

Using this tool, you can make the answer file so powerful that you can even tell Windows to include or exclude individual components, set the display resolution, and more.

Here's the Steps involved in creating XP Automated Installation Disc:

Step 1: To begin with, insert your Windows XP installation CD into the drive and copy the entire contents of the CD to a new folder on your hard disk.

Step 2: Navigate to the Support > Tools folder on the CD and double-click the Deploy.cab file. Copy all the files to a new folder on your hard disk.

Step 3: The crucial part begins now, creating the answer file. To execute the windows setup manager, double click the Setupmgr.exe file from the contents of the Deploy.cab, which you just copied onto the hard drive.

Step 4: The first few steps of the wizard are self explanatory. Select the following options from the successive dialog boxes. Create a new answer file; Windows unattended installation (Select the appropriate Windows version); "Fully automated"; "No this answer file will be used to install from CD"; and finally, accept the license agreement.

Step 5: Under the General Settings, you can customize the installation of Windows by providing the default name and organization, display settings, time zone and the product key. Fill in the fields using the drop-down list or by keying in the details. If you don't select an option from the drop-down list, the default values will be used.

Step 6: After you are done click Finish and save the answer file as "winnt.sif" when you are prompted. Advanced users can further tweak the answer file by referring to the Help file called Ref.chm in the same folder.

Step 7: Finally copy the answer file to i386 folder in the Windows XP installation folder you created in the beginning.

Step 8: To burn a bootable installation disc, you need the boot sector of the Windows XP CD. Download it from here bootfiles.zip

Step 9: Launch Nero and select CD-ROM (Boot) from the New Compilation dialog box. Under the Boot tab, specify the boot sector file you downloaded and extracted. Set the emulation as "No emulation", and keep the boot message blank. Most importantly, remember to set the "Number of loaded sectors" as 4.

Step 10: Under the Burn tab, set the write method to disc at-once. Click the New button to to begin adding files and folders to the compilation. Drag all the contents of the Windows XP installation disc that you copied to your hard drive (with the answer file in the i386 folder) into the left pane. Insert a blank CD into the optical drive and hit burn button.

Your windows automated installation Disc is ready!

DOS Commands

all commands of win xp command line

DOS is sometimes helpful in detecting and correcting the errors in Windows such as p/w corruption, some files like "system restore files having viruses are not editable by explorer" Dos helps a lot in those cases

1. ADDUSERS Add or list users to/from a CSV file
2. ARP Address Resolution Protocol
3. ASSOC Change file extension associations
4. ASSOCIAT One step file association
5. AT Schedule a command to run at a later time
6. ATTRIB Change file attributes
7. BOOTCFG Edit Windows boot settings
8. BROWSTAT Get domain, browser and PDC info
9. CACLS Change file permissions
10. CALL Call one batch program from another
11. CD Change Directory - move to a specific Folder
12. CHANGE Change Terminal Server Session properties
13. CHKDSK Check Disk - check and repair disk problems
14. CHKNTFS Check the NTFS file system
15. CHOICE Accept keyboard input to a batch file
16. CIPHER Encrypt or Decrypt files/folders
17. CleanMgr Automated cleanup of Temp files, recycle bin
18. CLEARMEM Clear memory leaks
19. CLIP Copy STDIN to the Windows clipboard.
20. CLS Clear the screen
21. CLUSTER Windows Clustering
22. CMD Start a new CMD shell
23. COLOR Change colors of the CMD window
24. COMP Compare the contents of two files or sets of files
25. COMPACT Compress files or folders on an NTFS partition
26. COMPRESS Compress individual files on an NTFS partition
27. CON2PRT Connect or disconnect a Printer
28. CONVERT Convert a FAT drive to NTFS.
29. COPY Copy one or more files to another location
30. CSCcmd Client-side caching (Offline Files)
31. CSVDE Import or Export Active Directory data
32. DATE Display or set the date
33. Dcomcnfg DCOM Configuration Utility
34. DEFRAG Defragment hard drive
35. DEL Delete one or more files
36. DELPROF Delete NT user profiles
37. DELTREE Delete a folder and all subfolders
38. DevCon Device Manager Command Line Utility
39. DIR Display a list of files and folders
40. DIRUSE Display disk usage
41. DISKCOMP Compare the contents of two floppy disks
42. DISKCOPY Copy the contents of one floppy disk to another
43. DNSSTAT DNS Statistics
44. DOSKEY Edit command line, recall commands, and create macros
45. DSADD Add user (computer, group..) to active directory
46. DSQUERY List items in active directory
47. DSMOD Modify user (computer, group..) in active directory
48. ECHO Display message on screen
49. ENDLOCAL End localisation of environment changes in a batch file
50. ERASE Delete one or more files
51. EXIT Quit the current script/routine and set an errorlevel.
52. EXPAND Uncompress files
53. EXTRACT Uncompress CAB files
54. FC Compare two files
55. FDISK Disk Format and partition
56. FIND Search for a text string in a file
57. FINDSTR Search for strings in files
58. FOR /F Loop command: against a set of files
59. FOR /F Loop command: against the results of another command
60. FOR Loop command: all options Files, Directory, List
61. FORFILES Batch process multiple files
62. FORMAT Format a disk
63. FREEDISK Check free disk space (in bytes)
64. FSUTIL File and Volume utilities
65. FTP File Transfer Protocol
66. FTYPE Display or modify file types used in file extension associations
67. GLOBAL Display membership of global groups
68. GOTO Direct a batch program to jump to a labelled line
69. HELP Online Help
70. HFNETCHK Network Security Hotfix Checker
71. IF Conditionally perform a command
72. IFMEMBER Is the current user in an NT Workgroup
73. IPCONFIG Configure IP
74. KILL Remove a program from memory
75. LABEL Edit a disk label
76. LOCAL Display membership of local groups
77. LOGEVENT Write text to the NT event viewer.
78. LOGOFF Log a user off
79. LOGTIME Log the date and time in a file
80. MAPISEND Send email from the command line
81. MEM Display memory usage
82. MD Create new folders
83. MKLINK Create a symbolic link (linkd)
84. MODE Configure a system device
85. MORE Display output, one screen at a time
86. MOUNTVOL Manage a volume mount point
87. MOVE Move files from one folder to another
88. MOVEUSER Move a user from one domain to another
89. MSG Send a message
90. MSIEXEC Microsoft Windows Installer
91. MSINFO Windows NT diagnostics
92. MSTSC Terminal Server Connection (Remote Desktop Protocol)
93. MUNGE Find and Replace text within file(s)
94. MV Copy in-use files
95. NET Manage network resources
96. NETDOM Domain Manager
97. NETSH Configure network protocols
98. NETSVC Command-line Service Controller
99. NBTSTAT Display networking statistics (NetBIOS over TCP/IP)
100. NETSTAT Display networking statistics (TCP/IP)
101. NOW Display the current Date and Time
102. NSLOOKUP Name server lookup
103. NTBACKUP Backup folders to tape
104. NTRIGHTS Edit user account rights
105. PATH Display or set a search path for executable files
106. PATHPING Trace route plus network latency and packet loss
107. PAUSE Suspend processing of a batch file and display a message
108. PERMS Show permissions for a user
109. PERFMON Performance Monitor
110. PING Test a network connection
111. POPD Restore the previous value of the current directory saved by PUSHD
112. PORTQRY Display the status of ports and services
113. PRINT Print a text file
114. PRNCNFG Display, configure or rename a printer
115. PRNMNGR Add, delete, list printers set the default printer
116. PROMPT Change the command prompt
117. PsExec Execute process remotely
118. PsFile Show files opened remotely
119. PsGetSid Display the SID of a computer or a user
120. PsInfo List information about a system
121. PsKill Kill processes by name or process ID
122. PsList List detailed information about processes
123. PsLoggedOn Who's logged on (locally or via resource sharing)
124. PsLogList Event log records
125. PsPasswd Change account password
126. PsService View and control services
127. PsShutdown Shutdown or reboot a computer
128. PsSuspend Suspend processes
129. PUSHD Save and then change the current directory
130. QGREP Search file(s) for lines that match a given pattern.
131. RASDIAL Manage RAS connections
132. RASPHONE Manage RAS connections
133. RECOVER Recover a damaged file from a defective disk.
134. REG Registry: Read, Set, Export, Delete keys and values
135. REGEDIT Import or export registry settings
136. REGSVR32 Register or unregister a DLL
137. REGINI Change Registry Permissions
138. REM Record comments (remarks) in a batch file
139. REN Rename a file or files.
140. REPLACE Replace or update one file with another
141. RD Delete folder(s)
142. RDISK Create a Recovery Disk
143. RMTSHARE Share a folder or a printer
144. ROBOCOPY Robust File and Folder Copy
145. ROUTE Manipulate network routing tables
146. RUNAS Execute a program under a different user account
147. RUNDLL32 Run a DLL command (add/remove print connections)
148. SC Service Control
149. SCHTASKS Create or Edit Scheduled Tasks
150. SCLIST Display NT Services
151. ScriptIt Control GUI applications
152. SET Display, set, or remove environment variables
153. SETLOCAL Control the visibility of environment variables
154. SETX Set environment variables permanently
155. SHARE List or edit a file share or print share
156. SHIFT Shift the position of replaceable parameters in a batch file
157. SHORTCUT Create a windows shortcut (.LNK file)
158. SHOWGRPS List the NT Workgroups a user has joined
159. SHOWMBRS List the Users who are members of a Workgroup
160. SHUTDOWN Shutdown the computer
161. SLEEP Wait for x seconds
162. SOON Schedule a command to run in the near future
163. SORT Sort input
164. START Start a program or command in a separate window.
165. SU Switch User
166. SUBINACL Edit file and folder Permissions, Ownership and Domain
167. SUBST Associate a path with a drive letter
168. SYSTEMINFO List system configuration
169. TASKLIST List running applications and services
170. TIME Display or set the system time
171. TIMEOUT Delay processing of a batch file
172. TITLE Set the window title for a CMD.EXE session
173. TOUCH Change file timestamps
174. TRACERT Trace route to a remote host
175. TREE Graphical display of folder structure
176. TYPE Display the contents of a text file
177. USRSTAT List domain usernames and last login
178. VER Display version information
179. VERIFY Verify that files have been saved
180. VOL Display a disk label
181. WHERE Locate and display files in a directory tree
182. WHOAMI Output the current UserName and domain
183. WINDIFF Compare the contents of two files or sets of files
184. WINMSD Windows system diagnostics
185. WINMSDP Windows system diagnostics II
186. WMIC WMI Commands
187. XCACLS Change file permissions
188. XCOPY Copy files and folders

Odd Advertisements slogans

Advertisement In A Long Island Shop:

Guitar, for sale........ Cheap....... . .......no strings attached.





Ad In Hospital Waiting Room:
Smoking Helps You Lose Weight ... One Lung At A Time!






On a bulletin board:
Success Is Relative. The more The Success, The more The Relatives.





When I Read About The Evils Of Drinking...
I Gave Up Reading


My Grandfather Is Eighty And Still Doesn't Need Glasses....
He Drinks Straight Out Of The Bottle.





You Know Your kids Have Grown Up When:
Your Daughter Begins To Put On Lipstick..
Or when your Son starts To wipe It Off





Sign In A Bar:
'Those Of You Who Are Drinking To Forget, Please do Pay In Advance.'





Sign In Driving School:
If Your Wife Wants To Learn To Drive, Don't Stand In Her Way....





Behind Every Great Man,
There Is A Surprised Woman.





The Reason Men Lie Is Because
Women Ask too Many Questions..





Getting Caught
Is The Mother Of Invention.





Laugh And The World Laughs With You,
Snore And You sleep Alone





The Surest Sign That Intelligent Life Exists Elsewhere In The Universe
Is The Fact That It Has Never Tried To Contact Us.





Sign At A Barber's Saloon In Detroit :
We Need Your Heads To Run Our Business..



Sign In A Restaurant:
All Drinking Water In This Establishment Has Been Personally Passed By The Manager.

A letter written by a father to his children!

The following letter is worth reading; please do so when you have a few minutes!

A wonderful letter written by a father to his children!




I am writing this to you because of 3 reasons:

1. Life, fortune and mishaps are unpredictable; nobody knows how long they live! Some words are better said early!

2. I am your father, and if I don't tell you these, no one else will!

3. What is written is from my own personal bitter experiences that perhaps could save you a lot of unnecessary heartaches.

Remember the following as you go through life:

1. Do not bear grudge towards those who are not good to you. No one has the responsibility of treating you well, except your mother and I. To those who are good to you, you have to treasure it and be thankful, and ALSO you have to be cautious, because, everyone has a motive for every move. When a person is good to you, it does not mean he / she really likes you. You have to be careful, don't hastily regard him / her as a real friend.

2. No one is indispensable, nothing in the world that you must possess. Once you understand this idea, it would be easier for you to go through life when people around you don't want you anymore, or when you lose what / who you love most.

3. Life is short. When you waste your life today, tomorrow you would find that life is leaving you. The earlier you treasure your life, the better you enjoy life.

4. Love is but a transient feeling, and this feeling would fade with time and with one's mood. If your so called loved one leaves you, be patient, time will wash away your aches and sadness. Don't over exaggerate the beauty and sweetness of love, and don't over exaggerate the sadness of falling out of love.

5. A lot of successful people did not receive good education, that does not mean that you can be successful by not studying hard!

Whatever knowledge you gain is your weapon in life. One can go from rags to riches, but one has to start from some rags!

6. I do not expect you to financially support me when I am old, either would I financially support your whole life. My responsibility as a supporter ends when you are grown up. After that, you decide whether you want to travel in a public transport or in your limousine, whether rich or poor.

7. You honor your words, but don't expect others to be so. You can be good to people, but don't expect people to be good to you.

If you don't understand this, you would end up with unnecessary troubles!

8. I have bought lotteries for umpteen years, but I never strike any prize. That shows if you want to be rich, you have to work hard!

There is no free lunch!

9. No matter how much time I have with you, let's treasure the time we have together. We do not know if we would meet again in our next life!


Your Dad

Sunday, October 31, 2010

Your Astro Sign

Which baby are you?

These are adorable and I'll bet they fit your b-day/personality ......... ......





------------ ---JANUARY BABY-------- --------- ---
Pretty/handsome. Loves to dress up. Easily bored.
Fussy. Seldom shows emotions. Takes time to
Recover when hurt. Sensitive. Down-to-Earth.
Stubborn.


----------FEBRUARY BABY ------------ --------
Abstract thoughts. Loves reality and abstract.
Intelligent and clever. Changing personality.
Attractive. Sexiest out of everyone.
Temperamental. Quiet, shy and humble. Honest
And loyal. Determined to reach goals. Loves
Freedom. Rebellious when restricted. Loves Aggressiveness. Too sensitive and easily hurt.
Gets angry really easily but does not show it.
Dislikes unnecessary things. Loves making friends
But rarely shows it. Horny. Daring and stubborn.
Ambitious. Realizing dreams and hopes. Sharp.
Loves entertainment and leisure. Romantic on the Inside not outside. Superstitious and ludicrous.
Spendthrift. Tries to learn to show emotions.





------------ -----MARCH BABY ------------ --------
Attractive personality. Sexy. Affectionate Shy and Reserved. Secretive. Naturally honest, generous
And sympathetic. Loves peace and serenity.
Sensitive to others. Great kisser. Easily angered.
Trustworthy. Appreciative and returns kindness.
Hardly shows emotions. Tends to bottle up Feelings. Observant and assesses others.


------------ ------APRIL BABY ------------ -------
Suave and compromising. Funny and humorous.
Stubborn. Very talkative. Calm and cool. Kind and
Sympathetic. Concerned and detailed. Loyal. Does
Work well with others. Very confident. Sensitive.
Positive Attitude. Thinking generous. Good Memory. Clever and knowledgeable. Loves to look For information. Able to cheer everyone up and/or
Make them laugh. Able to motivate oneself and
Others. Understanding. Fun to be around.
Outgoing. Hyper. Bubbly personality. Secretive.
Boy/girl crazy. Loves sports, music, leisure and Traveling. Systematic. Hot but has brains.

------------ -----MAY BABY ------------ -----
Stubborn and hard-hearted. Strong-willed and Highly motivated. Sharp thoughts. Easily angered.
Attracts others and loves attention. Deep feelings.
Beautiful physically and mentally. Firm Standpoint.
Needs no motivation. Shy towards opposite sex.
Easily consoled. Systematic (left brain). Loves to Dream. Strong clairvoyance. Understanding.
Sickness usually in the ear and neck. Good Imagination. Good physical. Weak breathing. Loves
Literature and the arts. Loves traveling. Dislike
Being at home. Restless. Not having many children.
Hardworking. High spirited.


------------ JUNE BABY ------------ -
You've got the best personality and are an Absolute pleasure to be around. You love to make New friends and be outgoing. You are a great flirt
And more than likely have an a very attractive
Partner. A wicked hottie. It is also more than likely
That you have a massive record collection. You
Have a great choice in films, and may one day
Become a famous actor/actress yourself - heck,
You've got the looks for it!!!


------------ ----JULY BABY ------------ --
Fun to be with. Secretive. Difficult to fathom and to Be understood. Quiet unless excited or tensed.
Takes pride in oneself. Has reputation. Easily
Consoled. Honest. Concerned about people's Feelings. Tactful. Friendly. Approachable.
Emotional temperamental and unpredictable.
Easily hurt. Witty and sparkly.
Spazzy at times.
Not revengeful. Forgiving but never forgets.
Dislikes nonsensical and unnecessary things.
Guides others physically and mentally. Sensitive
And forms impressions carefully. Caring and Loving. Treats others equally. Strong sense of
Sympathy. Wary and sharp. Judges people
Through observations. Hardworking. No difficulties In studying. Loves to be with friends Always broods
About the past and the old friends. Waits for Friends. Never looks for friends. Not aggressive Unless provoked.
Loves to be loved. Easily hurt
But takes long to recover.

------------ AUGUST BABY ------------ ---
Outgoing personality. Takes risks. Feeds on attention. No self control. Kind hearted. self
confident. Loud and boisterous. VERY revengeful.
Easy to get along with and talk to. has an 'every
thing's peachy' attitude. Likes talking and singing.
Loves music. Daydreamer. Easily distracted. Hates
not being trusted. BIG imagination. Loves to be loved. Hates studying. In need of 'that someone'.
Longs for freedom. rebellious when withheld or
Restricted. Lives by 'no pain no gain' caring.
Always a suspect. Playful. Mysterious. 'Charming'
or 'beautiful' to everyone. Stubborn. Curious.
Independent. Strong willed. A fighter.


------------ SEPTEMBER BABY ------------ ---
Active and dynamic. Decisive and haste but tends
to regret. Attractive and affectionate to oneself.
Strong mentality. Loves attention. Diplomatic.
Consoling, friendly and solves people's problems.
Brave and fearless. Adventurous. Loving and
caring. Suave and generous. Usually you have
many friends. Enjoys making love. Emotional.
Stubborn. Hasty. Good memory. Moving, motivates
oneself and others. Loves to travel and explore.
Sometimes sexy in a way that only their lover can
understand.


------------ ---OCTOBER BABY ------------ -------
Loves to chat. Loves those who love them. Loves
to takes things at the centre. Inner and physical
beauty. Lies but doesn't pretend. Gets angry
often. Treats friends importantly. Brave and
fearless. Always making friends. Easily hurt but
recovers easily. Daydreamer. Opinionated. Does
not care to control emotions. Unpredictable.
Extremely smart, but definitely the hottest AND
sexiest of them all.


------------ ---NOVEMBER BABY ------------ --------
Trustworthy and loyal. Very passionate and
dangerous. Wild at times. Knows how to have fun.
Sexy and mysterious. Everyone is drawn towards
your inner and outer beauty and independent
personality. Playful, but secretive. Very emotional
and temperamental sometimes. Meets new people
easily and very social in a group. Fearless and
independent. Can hold their own. Stands out in a
crowd. Essentially very smart. Usually, the
greatest men are born in this month. If you ever
begin a relationship with someone from this month,
hold on to them because their one of a kind.



------------ ---DECEMBER BABY ------------ ---
This straight-up means your the most good-looking
person possible... better than all of these other
months! Loyal and generous. Patriotic. Competitive
in everything. Active in games and interactions.
Impatient and hasty. Ambitious. Influential in
organizations. Fun to be with. Easy to talk to,
though hard to understand. Thinks far with vision,
yet complicated to know. Easily influenced by
kindness. Polite and soft-spoken. Having lots of
ideas. Sensitive. Active mind. Hesitating, tends to
delay. Choosy and always wants the e best t.
Temperamental. Funny and humorous. Loves to
joke. Good debating skills. Has that someone
always on his/her mind. Talkative. Daydreamer.
Friendly. Knows how to make friends. Abiding.
Able to show character. One guy/girl kind of
person . Loveable. Easily hurt. Prone to getting
colds. loves music.

A story worth sharing

4 years ago, an accident took my beloved away and very often I wonder,

how does my wife, who is now in the heavenly realm, feel right now? She

must be feeling extremely sad for leaving a husband who is incapable to

taking care of the house and the kid. 'cos that is the exact feeling that

I have, as I feel that I have failed to provide for the physical and emotional

needs of my child, and failed to be the dad and mum for my child.





There was one particular day, when I had an emergency at work. Hence, I

had to leave home whilst my child was still sleeping. So thinking that

there was still rice leftovers, I hastily cooked an egg and left after

informing my sleepy child.





With the double roles, I am often exhausted at work as well as when I am

home. So after a long day, I came home, totally drained of all energy.

So with just a brief hug and kiss for my child, I went straight into the

room, skipping dinner. However, when I jumped into my bed with intention

of just having a well-deserved sleep, all i heard and felt was broken porcelain

and warm liquid! I flipped open my blanket, and there lies the source of

the 'problem'... a broken bowl with instant noodles and a mess on the bedsheet

and blanket!





Boy, was I mad! I was so furious that I took a clothes hanger, charged

straight at my child who was happily playing with his toy, and give him

a good spanking! He merely cried but not asking for mercy, except a short

explanation:





"Dad, I was hungry and there wasn't anymore leftover rice. But you

were not back yet, hence I wanted to cook some instant noodles. But I remembered

you reminding me not to touch or use the gas stove without any adults around,

hence I turned on the shower and used the hot water from the bathroom to

cook the noodles.. One is for you and the other is for me. However, I was

afraid that the noodles will turn cold, so I hid it under the blanket to

keep it warm till you return. But I forgot to remind you 'cos I was playing

with my toys...I am sorry Dad..."





At that moment, tears were starting to run down my cheeks...but I didn't

want my son to see his dad crying so I dashed into the bathroom and cried

with the shower head on to mask my cries. After that episode, I went towards

my son to give him a tight hug and applied medication on him, while coaxing

him to sleep. Then, it was time to clear up the mess on the bed. When everything

was done and well past midnight, I passed my son's room, and saw that he

was still crying, not from the pain on his little buttock, but from looking

at the photograph of his beloved mummy.





A year has passed since the episode, I have tried, in this period, to focus

on giving him both the love of his dad and mum, and to attend to most of

his needs. And soon, he is turning seven, and will be graduating from kindergarten..

Fortunately, the incident did not leave a lasting impression on his childhood

memories and he is still happily growing up.





However, not so long ago, I hit my boy again, with much regret. This time,

his kindergarten teacher called, informing me of my son's absence from

school. I took off early from work and went home, expecting him to explain.

But he wasn't to be found, so I went around our house, calling out his

name and eventually found him outside a stationery shop, happily playing

computer games. I was fuming, brought him home and whack the hell out of

him. He did not retaliate, except to say, 'I am sorry, Dad'. But after

much probing, I realized that it was a 'Talent Show' organized by his school

and the invite is for every student's mummy. And that was the reason for

his absence as he has no mummy.....





Few days after the caning, my son came home to tell me, the kindergarten

has recently taught him how to read and write. Since then, he has kept

to himself and stayed in his room to practise his writing, which I am sure,

would make my wife proud, if she was still around. 'cos he makes me proud

too!





Time passes by very quickly, and soon another year has passed. It's winter,

and its Christmas time. Everywhere the christmas spirit is in every passer-by...Christmas

carols and frantic shoppers....but alas, my son got into another trouble.

When I was about to knock off from the day's work, the post office called.

Due to the peak season, the post master was also on an edgy mood. He called

to tell me that my son has attempted to post several letters with no addressee.

Although I did make a promise never to hit my son again, I couldn't help

but to hit him as I feel that this child of mine is really beyond control.

Once again, as before, he apologized, ' I'm sorry, Dad' and no additional

reason to explain. I pushed him towards a corner, went to the post office

to collect the letters with no addressee and came home, and angrily questioned

my son on his prank, during this time of the year.





His answer, amidst his sobbing, was : The letters were for Mummy.





My eyes grew teary, but I tried to control my emotions and continued to

ask him: " But why did u post so many letters, at one time?"

My son's reply was: " I have been writing to mummy for a long time,

but each time I reach out for the post box, it was too high for me, hence

I was not able to post the letters. But recently, when I went back to the

postbox, I could reach it and I sent it all at once..."





After hearing this, I was lost. Lost at not knowing what to do, what to

say.....





I told my son, " Son, mummy is in the heavenly kingdom, so in future,

if you have anything to tell her, just burn the letter and it will reach

mummy. My son, on hearing this, was much pacified and calm, and soon after,

he was sleeping soundly. On promising that I will burn the letters on his

behalf, I brought the letters outside, but couldnt help opening the letter

before they turn to ash.





And one of the letters broke my heart....





Dear Mummy,





I miss you so much! Today, there was a 'Talent Show' in school, and

the school invited all mothers for the show. But you are not around, so

I did not want to participate as well. I did not tell Dad about it as I

was afraid that Dad would start to cry and miss you all over again. Dad

went around looking for me, but in order to hide my sadness, I sat in front

of the computer and started playing games at one of the shops. Dad was

furious, and he couldnt help it but scolded and hit me, but I did not tell

him the real reason. Mummy, everyday I see Dad missing you and whenever

he think of you, he is so sad and often hide and cry in his room.. I

think we both miss you very very much. Too much for our own good I think..

But Mummy, I am starting to forget your face. Can you please appear in

my dreams so that I can see your face and remember you? I heard that if

you fall asleep with the photograph of the person whom you miss, you will

see the person in your dreams. But mummy, why havent you appeared?








After reading the letter, I cant stop sobbing. 'cos I can never replace

the irreplaceable gap left behind by my wife....

Friday, August 6, 2010

5 Tips on improving Programming Logic

Tip 1: Learn the language ‘C’

You might be an expert .NET, Java or PHP developer, but I would recommend that you MUST learn ‘C. We all know why ‘C’ is the most powerful programming language, but I am not recommending learning ‘C’ to you because of its power in programming.

‘C’ offers you a structured style of programming. You have one file with the main() method and the execution begins from there and the execution flow proceeds as you have directed it to.

The main advantage in ‘C’ is that it allows you to play around with memory directly. This I believe is very important if you need to understand how data is passed from one memory block to another. The reason is that you start to visualize in your minds eye how data moves in your program.

The next step is to develop programs that will help you improve your logic.

Tip 2: Develop programs that test your mind skillsEver heard of the Fibonacci series?

Ever built a program that will allow the user to type his/her name and allow to bounce off that name on the screen from one corner to another like a ball?

Ever thought of creating a library for a Menu Bar system?

All these are examples of programs that you can develop to improve your mind and programming skills.

I remember the time I was at college and I would spends nights after nights to build my own library for screen interface for menu bars, windows, text fields, etc. In a UNIX box I would use the ncurses library and build it. I would then try and replicate the same in Windows using the conio.h file and some assembly code.

Try to develop as many programs as possible in ‘C’, this will help you improve your programming logic.

Following are some programs that I can help you with:

1.Write a program (WAP) to find the max, min, average and total of numbers entered by the user
2.WAP to accept a string from the user and find the number of vowels and the vowels that got repeated the most.
3.WAP to accept an array of numbers and sort the same using Bubble Sort Algorithm.
4.WAP to accept a string from the user and print all its permutations and combinations.
5.WAP to accept to accept a number from the user and test if it is a Fibonacci number or not.
I can go on and on with such questions.

Tip 3: Locate code and try to understand why it was written that way

Use the internet or college library to locate code written by another developer. Try to understand why it was written that way and understand it completely. Once you have understood why it was written they way it is written, check to see if you could improve that logic.

The main objective of this exercise is to get your brain thinking.

Tip 4: Solve logic puzzlesCheck your local newspaper. One section of your newspaper will be filled with series of logic puzzles and riddles. Try solving them. Don’t get disheartened if you can’t solve them or take a long time to solve them. Remember that you are in the learning and improving stage. Things will be slow, but you will make progress.Your brain will be trained to think differently with every puzzle that you try to solve. This is because now you know a new method of solving. You could apply the same thinking pattern to your programs as well.

As a standard prescription, I would prescribe solving Suduku puzzles. Will help you improve your logic, concentration and skills of grouping and organizing.

Tip 5: Help other people build logic

Once you start feeling confident about yourself and your logic capabilities, you should immediately start helping people. Subscribe to a forum and start helping people there. The benefit of helping people on forums is that you get to learn new problems that people face. This immensely adds to your knowledge. Just imagine the power you would have once you start to learn problems faced by other people and how you or someone else resolved it.

I have seen friends following this advice but shying at the last moment. Why? Because they don’t want to be ridiculed in the forum. Don’t be scared of other people ridiculing you. Look at it as a learning experience. People who ridicule you would be the one’s with more experience… and learning from people who are experienced is no harm at all.

The purpose of Life

Here’s my attempt to write a short post, which for me means staying under 2,000 words.

Channeling my inner Seth Godin, here we go…

What is the purpose of life?

The purpose of life is to increase your alignment with truth, love, and power.

You are here to:

1.Discover and accept ever deeper truths.
2.Learn to love more deeply and unconditionally.
3.Develop and express your creativity.
#1 leads to wisdom.

#2 leads to joy.

#3 leads to strength.

The point of life is to learn to be wise, joyful, and strong — all at the same time and without compromising or sacrificing any of these. In order to improve one, you must improve all three.

If these pursuits aren’t your life’s highest priority, you’ve missed the point of life entirely. You’ll have a better sense of that when you die, at which point you will lose:

1.Your physical body
2.All your stuff (money, home, possessions)
3.Your positions and titles
4.Your physical relationships
If there is an afterlife, it’s likely that the only element of your existence you can possibly retain is your consciousness. Therefore, if you seek to increase your alignment with truth, love, and power, you may have the opportunity to retain those gains even after your physical death because such gains are nonphysical. Everything else stays here.

On the other hand, even if there is no afterlife, the pursuit of truth, love, and power while you’re here will make your physical existence much more meaningful and fulfilling as you experience it. Physical life becomes significantly easier when you root yourself to the permanent instead of chasing the temporary. Truth, love, and power are permanent because they’re universal concepts. Wherever there is consciousness, these concepts have meaning.

Regardless of what happens when you die, if you center your life around the pursuit of truth, love, and power, you can’t lose. You’ll have done your best.

Whenever you turn your back on truth, love, or power, you distance yourself from experiencing wisdom, joy, and strength. This means you’ll experience confusion, unhappiness, and weakness instead. Whatever problems you currently face can be resolved by realigning yourself with truth, love, and power.

Truth.

Love.

Power.

This is how you win the game of life.

Three tricks

TRICK #1
An Indian discovered that nobody can create a FOLDER
anywhere on the computer which can be named as ‘CON’.
This is something pretty cool…and unbelievable. ..
At Microsoft the whole Team, couldn’t answer why this
happened!
TRY IT NOW ,IT WILL NOT CREATE ‘ CON ‘ FOLDER

———— ——— ——— ——— ——— ——— ——— ——— —–

TRICK #2
For those of you using Windows xp, do the following:

1.) Open an empty notepad file
2.) Type ‘Bush hid the facts’ (without the quotes)
3.) Save it as whatever you want.
4.) Close it, and re-open it.

is it just a really weird bug? Confused?

———— ——— ——— ——— ——— ——— ——— ——— —–

TRICK #3
Microsoft crazy facts

This is something pretty cool and neat…and
unbelievable. .. At Microsoft the whole Team,
including Bill Gates, couldn’t answer why this
happened!

It was discovered by a Brazilian. Try it out
yourself…

Open Microsoft Word and type

=rand (200, 99)

And then press ENTER

IT’S REAL JUST DO IT AND SEE..AMAZING!!!!!

How to develop your Logic

Java Sudoku Solver

Tuesday, August 3, 2010

10 Major Differnces in between C and C++

C++, as the name suggests is a superset of C. As a matter of fact, C++ can run most of C code while C cannot run C++ code. Here are the 10 major differences between C++ & C…

1. C follows the procedural programming paradigm while C++ is a multi-paradigm language(procedural as well as object oriented)

In case of C, importance is given to the steps or procedure of the program while C++ focuses on the data rather than the process.
Also, it is easier to implement/edit the code in case of C++ for the same reason.

2. In case of C, the data is not secured while the data is secured(hidden) in C++

This difference is due to specific OOP features like Data Hiding which are not present in C.

3. C is a low-level language while C++ is a middle-level language

C is regarded as a low-level language(difficult interpretation & less user friendly) while C++ has features of both low-level(concentration on whats going on in the machine hardware) & high-level languages(concentration on the program itself) & hence is regarded as a middle-level language.

4. C uses the top-down approach while C++ uses the bottom-up approach

In case of C, the program is formulated step by step, each step is processed into detail while in C++, the base elements are first formulated which then are linked together to give rise to larger systems.

5. C is function-driven while C++ is object-driven

Functions are the building blocks of a C program while objects are building blocks of a C++ program.

6. C++ supports function overloading while C does not

Overloading means two functions having the same name in the same program. This can be done only in C++ with the help of Polymorphism(an OOP feature)

7. We can use functions inside structures in C++ but not in C.

In case of C++, functions can be used inside a structure while structures cannot contain functions in C.

8. The NAMESPACE feature in C++ is absent in case of C

C++ uses NAMESPACE which avoid name collisions. For instance, two students enrolled in the same university cannot have the same roll number while two students in different universities might have the same roll number. The universities are two different namespace & hence contain the same roll number(identifier) but the same university(one namespace) cannot have two students with the same roll number(identifier)

9. The standard input & output functions differ in the two languages

C uses scanf & printf while C++ uses cin>> & cout<< as their respective input & output functions

10. C++ allows the use of reference variables while C does not

Reference variables allow two variable names to point to the same memory location. We cannot use these variables in C programming.

Best practices for programming in C

Styles and Guidelines

  • Use a source code style that makes the code readable and consistent. Unless you have a group code style or a style of your own, you could use a style similar to the Kernighan and Ritchie style used by a vast majority of C programmers. Taken to an extreme, however, it's possible to end up with something like this:
    	int i;main(){for(;i["]

    --Dishonorable mention, Obfuscated C Code Contest, 1984. Author requested anonymity.

  • It is common to see the main routine defined as main(). The ANSI way of writing this is int main(void) (if there are is no interest in the command line arguments) or as int main( int argc, char **argv ). Pre-ANSI compilers would omit the void declaration, or list the variable names and follow with their declarations.
  • Whitespace

    Use vertical and horizontal whitespace generously. Indentation and spacing should reflect the block structure of the code.

    A long string of conditional operators should be split onto separate lines. For example:

    	if (foo->next==NULL && number <>

    might be better as:

      	  if (foo->next == NULL
    
    && number <>

    Similarly, elaborate for loops should be split onto different lines:

    	for (curr = *varp, trail = varp;
    
    curr != NULL;
    trail = &(curr->next), curr = curr->next )
    {
    ...

    Other complex expressions, such as those using the ternary ?: operator, are best split on to several lines, too.

    	z = (x == y)
    
    ? n + f(x)
    : f(y) - n;

  • Comments

    The comments should describe what is happening, how it is being done, what parameters mean, which globals are used and any restrictions or bugs. However, avoid unnecessary comments. If the code is clear, and uses good variable names, it should be able to explain itself well. Since comments are not checked by the compiler, there is no guarantee they are right. Comments that disagree with the code are of negative value. Too many comments clutter code.

    Here is a superfluous comment style:

    	i=i+1;        /* Add one to i */
    

    It's pretty clear that the variable i is being incremented by one. And there are worse ways to do it:

      		  /************************************
    
    * *
    * Add one to i *
    * *
    ************************************/

    i=i+1;

  • Naming Conventions

    Names with leading and trailing underscores are reserved for system purposes and should not be used for any user-created names. Convention dictates that:

    1. #define constants should be in all CAPS.
    2. enum constants are Capitalized or in all CAPS
    3. Function, typedef, and variable names, as well as struct, union, and enum tag names should be in lower case.

    For clarity, avoid names that differ only in case, like foo and Foo . Similarly, avoid foobar and foo_bar. Avoid names that look like each other. On many terminals and printers, 'l', '1' and 'I' look quite similar. A variable named 'l' is particularly bad because it looks so much like the constant '1'.

  • Variable names

    When choosing a variable name, length is not important but clarity of expression is. A long name can be used for a global variable which is rarely used but an array index used on every line of a loop need not be named any more elaborately than i. Using 'index' or 'elementnumber' instead is not only more to type but also can obscure the details of the computation. With long variable names sometimes it is harder to see what is going on. Consider:

         for(i=0 to 100)
    
    array[i]=0

    versus

         for(elementnumber=0 to 100)
    
    array[elementnumber]=0;

  • Function names

    Function names should reflect what they do and what they return. Functions are used in expressions, often in an if clause, so they need to read appropriately. For example:

         if (checksize(x))

    is unhelpful because it does not tell us whether checksize returns true on error or non-error; instead:

         if (validsize(x))
    

    makes the point clear.

  • Declarations

    All external data declaration should be preceded by the extern keyword.

    The "pointer'' qualifier, '*', should be with the variable name rather than with the type.

    	char        *s, *t, *u;
    

    instead of

    	char*   s, t, u;

    The latter statement is not wrong, but is probably not what is desired since 't' and 'u' do not get declared as pointers.

  • Header Files

    Header files should be functionally organized, that is, declarations for separate subsystems should be in separate header files. Also, declarations that are likely to change when code is ported from one platform to another should be in a separate header file.

    Avoid private header filenames that are the same as library header filenames. The statement #include "math.h'' includes the standard library math header file if the intended one is not found in the current directory. If this is what you want to happen, comment this fact.

    Finally, using absolute pathnames for header files is not a good idea. The "include-path'' option of the C compiler (-I (capital "eye") on many systems) is the preferred method for handling extensive private libraries of header files; it permits reorganizing the directory structure without having to alter source files.

  • scanf

    scanf should never be used in serious applications. Its error detection is inadequate. Look at the example below:

    	#include 
    

    int main(void)
    {
    int i;
    float f;

    printf("Enter an integer and a float: ");
    scanf("%d %f", &i, &f);

    printf("I read %d and %f\n", i, f);
    return 0;
    }

    Test run

    Enter an integer and a float: 182 52.38

    I read 182 and 52.380001

    Another TEST run

    Enter an integer and a float: 6713247896 4.4

    I read -1876686696 and 4.400000

  • ++ and --

    When the increment or decrement operator is used on a variable in a statement, that variable should not appear more than once in the statement because order of evaluation is compiler-dependent. Do not write code that assumes an order, or that functions as desired on one machine but does not have a clearly defined behavior:

    	int i = 0, a[5];
    

    a[i] = i++; /* assign to a[0]? or a[1]? */

  • Don't let yourself believe you see what isn't there.

    Look at the following example:

    		while (c == '\t' || c = ' ' || c == '\n')
    
    c = getc(f);

    The statement in the while clause appears at first glance to be valid C. The use of the assignment operator, rather than the comparison operator, results in syntactically incorrect code. The precedence of = is lowest of any operator so it would have to be interpreted this way (parentheses added for clarity):

    		while ((c == '\t' || c) = (' ' || c == '\n'))
    
    c = getc(f);

    The clause on the left side of the assignment operator is:

    		(c == '\t' || c)
    

    which does not result in an lvalue. If c contains the tab character, the result is "true" and no further evaluation is performed, and "true" cannot stand on the left-hand side of an assignment.

  • Be clear in your intentions.

    When you write one thing that could be interpreted for something else, use parentheses or other methods to make sure your intent is clear. This helps you understand what you meant if you ever have to deal with the program at a later date. And it makes things easier if someone else has to maintain the code.

    It is sometimes possible to code in a way that anticipates likely mistakes. For example, you can put constants on the left of equality comparisons. That is, instead of writing:

    	while (c == '\t' || c == ' ' || c == '\n')
    
    c = getc(f);

    You can say:

    	while ('\t' == c || ' ' == c || '\n' == c)
    
    c = getc(f);

    This way you will get a compiler diagnostic:

    	while ('\t' = c || ' ' == c || '\n' == c)
    
    c = getc(f);

    This style lets the compiler find problems; the above statement is invalid because it tries to assign a value to '\t'.

  • Trouble from unexpected corners.

    C implementations generally differ in some aspects from each other. It helps to stick to the parts of the language that are likely to be common to all implementations. By doing that, it will be easier to port your program to a new machine or compiler and less likely that you will run into compiler idiosyncracies. For example, consider the string:

    	/*/*/2*/**/1

    This takes advantage of the "maximal munch" rule. If comments nest, it is interpreted this way:

    	/*  /*  /2  */  *  */  1

    The two /* symbols match the two */ symbols, so the value of this is 1. If comments do not nest, on some systems, a /* in a comment is ignored. On others a warning is flagged for /*. In either case, the expression is interpreted this way:

    	/*  /  */  2  *  /*  */  1

    2 * 1 evaluates to 2.

  • Flushing Output Buffer

    When an application terminates abnormally, the tail end of its output is often lost. The application may not have the opportunity to completely flush its output buffers. Part of the output may still be sitting in memory somewhere and is never written out. On some systems, this output could be several pages long.

    Losing output this way can be misleading because it may give the impression that the program failed much earlier than it actually did. The way to address this problem is to force the output to be unbuffered, especially when debugging. The exact incantation for this varies from system to system but usually looks something like this:

    	setbuf(stdout, (char *) 0);

    This must be executed before anything is written to stdout. Ideally this could be the first statement in the main program.

  • getchar() - macro or function

    The following program copies its input to its output:

    	#include  
    

    int main(void)
    {
    register int a;

    while ((a = getchar()) != EOF)
    putchar(a);
    }

    Removing the #include statement from the program would cause it to fail to compile because EOF would then be undefined.

    We can rewrite the program in the following way:

    	#define EOF -1
    

    int main(void)
    {
    register int a;

    while ((a = getchar()) != EOF)
    putchar(a);
    }

    This will work on many systems but on some it will run much more slowly.

    Since function calls usually take a long time, getchar is often implemented as a macro. This macro is defined in stdio.h, so when #include is removed, the compiler does not know what getchar is. On some systems it assumes that getchar is a function that returns an int.

    In reality, many C implementations have a getchar function in their libraries, partly to safeguard against such lapses. Thus in situations where #include is missing the compiler uses the function version of getchar. Overhead of function call makes the program slower. The same argument applies to putchar.

  • null pointer

    A null pointer does not point to any object. Thus it is illegal to use a null pointer for any purpose other than assignment and comparison.

    Never redefine the NULL symbol. The NULL symbol should always have a constant value of zero. A null pointer of any given type will always compare equal to the constant zero, whereas comparison with a variable with value zero or to some non-zero constant has implementation-defined behaviour.

    Dereferencing a null pointer may cause strange things to happen.

  • What does a+++++b mean?

    The only meaningful way to parse this is:

    		a ++  +  ++  b
    

    However, the maximal munch rule requires it to be broken down as:

    		a ++  ++  +  b
    

    This is syntactically invalid: it is equivalent to:

    		((a++)++) +  b
    

    But the result of a++ is not an lvalue and hence is not acceptable as an operand of ++. Thus the rules for resolving lexical ambiguity make it impossible to resolve this example in a way that is syntactically meaningful. In practice, of course, the prudent thing to do is to avoid construction like this unless you are absolutely certain what they mean. Of course, adding whitespace helps the compiler to understand the intent of the statement, but it is preferable (from a code maintenance perspective) to split this construct into more than one line:

    	++b;
    
    (a++) + b;

  • Treat functions with care

    Functions are the most general structuring concept in C. They should be used to implement "top-down" problem solving - namely breaking up a problem into smaller and smaller subproblems until each piece is readily expressed in code. This aids modularity and documentation of programs. Moreover, programs composed of many small functions are easier to debug.

    Cast all function arguments to the expected type if they are not of that type already, even when you are convinced that this is unnecessary since they may hurt you when you least expect it. In other words, the compiler will often promote and convert data types to conform to the declaration of the function parameters. But doing so manually in the code clearly explains the intent of the programmer, and may ensure correct results if the code is ever ported to another platform.

    If the header files fail to declare the return types of the library functions, declare them yourself. Surround your declarations with #ifdef/#endif statements in case the code is ever ported to another platform.

    Function prototypes should be used to make code more robust and to make it run faster.

  • Dangling else

    Stay away from "dangling else" problem unless you know what you're doing:

    		if (a == 1)
    
    if (b == 2)
    printf("***\n");
    else
    printf("###\n");


    The rule is that an else attaches to the nearest if. When in doubt, or if there is a potential for ambiguity, add curly braces to illuminate the block structure of the code.

  • Array bounds

    Check the array bounds of all arrays, including strings, since where you type "fubar'' today someone someday may type "floccinaucinihilipilification". Robust production software should not use gets().

    The fact that C subscripts start from zero makes all kinds of counting problems easier. However, it requires some effort to learn to handle them.

  • Null statement

    The null body of a for or while loop should be alone on a line and commented so that it is clear that the null body is intentional and not missing code.

    	while (*dest++ = *src++)
    
    ; /* VOID */

  • Test for true or false

    Do not default the test for non-zero, that is:

    	if (f() != FAIL)
    

    is better than

    	if (f())
    

    even though FAIL may have the value 0 which C considers to be false. (Of course, balance this against constructs such as the one shown above in the "Function Names" section.) An explicit test will help you out later when somebody decides that a failure return should be -1 instead of 0.

    A frequent trouble spot is using the strcmp function to test for string equality, where the result should never be defaulted. The preferred approach is to define a macro STREQ:

    	#define STREQ(str1, str2) (strcmp((str1), (str2)) == 0)
    

    Using this, a statement such as:

    	If ( STREQ( inputstring, somestring ) ) ...
    

    carries with it an implied behavior that is unlikely to change under the covers (folks tend not to rewrite and redefine standard library functions like strcmp()).

    Do not check a boolean value for equality with 1 (TRUE, YES, etc.); instead test for inequality with 0 (FALSE, NO, etc.). Most functions are guaranteed to return 0 if false, but only non-zero if true. Thus,

    	if (func() == TRUE) {...

    is better written

    	if (func() != FALSE)

  • Embedded statement

    There is a time and a place for embedded assignment statements. In some constructs there is no better way to accomplish the results without resulting in bulkier and less readable code:

    	while ((c = getchar()) != EOF) {
    
    process the character
    }

    Using embedded assignment statements to improve run-time performance is possible. However, you should consider the tradeoff between increased speed and decreased maintainability that results when embedded assignments are used in artificial places. For example:

    	x = y + z;
    
    d = x + r;

    should not be replaced by:

    	d = (x = y + z) + r;

    even though the latter may save one cycle. In the long run the time difference between the two will decrease as the optimizer is enhanced, while the difference in ease of maintenance will increase.

  • goto statements

    goto should be used sparingly. The one place where they can be usefully employed is to break out of several levels of switch, for, and while nesting, although the need to do such a thing may indicate that the inner constructs should be broken out into a separate function.

    	    for (...) {
    
    while (...) {
    ...
    if (wrong)
    goto error;

    }
    }
    ...
    error:
    print a message

    When a goto is necessary the accompanying label should be alone on a line and either tabbed one stop to the left of the code that follows, or set at the beginning of the line. Both the goto statement and target should be commented to their utility and purpose.

  • Fall-though in switch

    When a block of code has several labels, place the labels on separate lines. This style agrees with the use of vertical whitespace, and makes rearranging the case options a simple task, should that be required. The fall-through feature of the C switch statement must be commented for future maintenance. If you've ever been "bitten" by this feature, you'll appreciate its importance!

    	switch (expr) {
    
    case ABC:
    case DEF:
    statement;
    break;
    case UVW:
    statement; /*FALLTHROUGH*/
    case XYZ:
    statement;
    break;
    }

    While the last break is technically unnecessary, the consistency of its use prevents a fall-through error if another case is later added after the last one. The default case, if used, should always be last and does not require a final break statement if it is last.

  • Constants

    Symbolic constants make code easier to read. Numerical constants should generally be avoided; use the #define function of the C preprocessor to give constants meaningful names. Defining the value in one place (preferably a header file) also makes it easier to administer large programs since the constant value can be changed uniformly by changing only the define. Consider using the enumeration data type as an improved way to declare variables that take on only a discrete set of values. Using enumerations also lets the compiler warn you of any misuse of an enumerated type. At the very least, any directly-coded numerical constant must have a comment explaining the derivation of the value.

    Constants should be defined consistently with their use; e.g. use 540.0 for a float instead of 540 with an implicit float cast. That said, there are some cases where the constants 0 and 1 may appear as themselves instead of as defines. For example if a for loop indexes through an array, then:

    	for (i = 0; i <>

    is quite reasonable, while the code:

    	gate_t *front_gate = opens(gate[i], 7);
    
    if (front_gate == 0)
    error("can't open %s\n", gate[i]);

    is not. In the second example front_gate is a pointer; when a value is a pointer it should be compared to NULL instead of 0. Even simple values like 1 or 0 are often better expressed using defines like TRUE and FALSE (and sometimes YES and NO read better).

    Don't use floating-point variables where discrete values are needed. This is due to the inexact representation of floating point numbers (see the second test in scanf, above). Test floating-point numbers using <= or >=; an exact comparison (== or !=) may not detect an "acceptable" equality.

    Simple character constants should be defined as character literals rather than numbers. Non-text characters are discouraged as non-portable. If non-text characters are necessary, particularly if they are used in strings, they should be written using a escape character of three octal digits rather than one (for example, '\007'). Even so, such usage should be considered machine-dependent and treated as such.

  • Conditional Compilation

    Conditional compilation is useful for things like machine-dependencies, debugging, and for setting certain options at compile-time. Various controls can easily combine in unforeseen ways. If you use #ifdef for machine dependencies, make sure that when no machine is specified, the result is an error, not a default machine. The #error directive comes in handy for this purpose. And if you use #ifdef for optimizations, the default should be the unoptimized code rather than an uncompilable or incorrect program. Be sure to test the unoptimized code.


Miscellaneous

  • Utilities for compiling and linking such as Make simplify considerably the task of moving an application from one environment to another. During development, make recompiles only those modules that have been changed since the last time make was used.

    Use lint frequently. lint is a C program checker that examines C source files to detect and report type incompatibilities, inconsistencies between function definitions and calls, potential program bugs, etc.

    Also, investigate the compiler documentation for switches that encourage it to be "picky". The compiler's job is to be precise, so let it report potential problems by using appropriate command line options.

  • Minimize the number of global symbols in the application. One of the benefits is the lower probability of conflicts with system-defined functions.
  • Many programs fail when their input is missing. All programs should be tested for empty input. This is also likely to help you understand how the program is working
  • Don't assume any more about your users or your implementation than you have to. Things that "cannot happen" sometimes do happen. A robust program will defend against them. If there's a boundary condition to be found, your users will somehow find it!

    Never make any assumptions about the size of a given type, especially pointers.

    When char types are used in expressions most implementations will treat them as unsigned but there are others which treat them as signed. It is advisable to always cast them when used in arithmetic expressions.

    Do not rely on the initialization of auto variables and of memory returned by malloc.

  • Make your program's purpose and structure clear.
  • Keep in mind that you or someone else will likely be asked to modify your code or make it run on a different machine sometime in the future. Craft your code so that it is portable to other machines.

Conclusion

It is a common knowledge that the maintenance of applications takes a significant amount of a programmer's time. Part of the reason for this is the use of non-portable and non-standard features and less than desirable programming style when developing applications. In this article we have presented some guidelines which have stood us in good stead over the years. We believe that these guidelines, when followed, will make application maintenance easier in a team environment.


Reference

  • Obfuscated C and Other Mysteries by Don Libes, John Wiley and Sons, Inc., ISBN 0-471-57805-3
  • The C Programming Language by Brian W. Kernighan and Dennis M. Ritchie, Second Edition, Prentice-Hall, ISBN 0-13-110370-9
  • Safer C by Les Hatton, McGraw-Hill, ISBN 0-07-707640-0
  • C Traps and Pitfalls by Andrew Koenig, AT&T Bell Laboratories, ISBN 0-201-17928-9

Friday, May 14, 2010

Just For Fun

What did the elephant say to the naked man?
How do you breathe through that thing?

I've used up all my sick days, so I'm calling in dead.

Two goldfish are in a tank. One says to the other, "Do you know how to drive this thing?"

What is the difference between a woman and a magnet?
Magnets have a positive side!

WOMAN: The most efficient money reducing agent known to man-kind!

How many men do you need for a mafia funeral?
Only one. To slam the car boot shut

What are 3 words you never wanna hear whilst making love? Honey, I'm home!

We will now upgrade your brain, please wait....Searching....searching...still searching....sorry,NO BRAIN found...!

When a man talks dirty to a woman, it's sexual harassment. When a woman talks dirty to a man, it's $3.95 per minute.

Out of my mind. Back in five minutes.

Born Free. . . . .Taxed to Death.

Never let a man's mind wander, it's too little to be out on it's own!!!!

My girl and me, we are so perfect, she loves me, and I love myself too...

Hi, do you want to have my children? No.?? ...Okay, then can we just practice?

Jesus loves you... everyone else thinks your an asshole�

Q:What is the difference between a wife and a girlfriend?
A:About 45 pounds!!

Minds are like Parachutes. They work best when open.

As a computer, I find your faith in technology amusing
Accept me as I am.
Don't try to change me.
Love me for who I am.
If you do then you will see,
how strong my love can really be.

God made me the way I am.
I have no problem with that.
Everyone is different,
you must accept that fact.

I can only be the
person that you see.
I won't change for anyone
for I can only be me.

We all are different,
this is true .
I can only be me,
I can't be like you.

Accept me as I am
no matter what it takes.
I know I'm a good person,
because the Lord
don't make mistakes..!!!

Tuesday, April 6, 2010

Software Development Life Cycle Models

I was asked to put together this high-level and traditional software life cycle information as a favor for a friend of a friend, so I thought I might as well share it with everybody.

The General Model

Software life cycle models describe phases of the software cycle and the order in which those phases are executed. There are tons of models, and many companies adopt their own, but all have very similar patterns. The general, basic model is shown below:

General Life Cycle ModelGeneralModel

Each phase produces deliverables required by the next phase in the life cycle. Requirements are translated into design. Code is produced during implementation that is driven by the design. Testing verifies the deliverable of the implementation phase against requirements.

Requirements

Business requirements are gathered in this phase. This phase is the main focus of the project managers and stake holders. Meetings with managers, stake holders and users are held in order to determine the requirements. Who is going to use the system? How will they use the system? What data should be input into the system? What data should be output by the system? These are general questions that get answered during a requirements gathering phase. This produces a nice big list of functionality that the system should provide, which describes functions the system should perform, business logic that processes data, what data is stored and used by the system, and how the user interface should work. The overall result is the system as a whole and how it performs, not how it is actually going to do it.

Design

The software system design is produced from the results of the requirements phase. Architects have the ball in their court during this phase and this is the phase in which their focus lies. This is where the details on how the system will work is produced. Architecture, including hardware and software, communication, software design (UML is produced here) are all part of the deliverables of a design phase.

Implementation

Code is produced from the deliverables of the design phase during implementation, and this is the longest phase of the software development life cycle. For a developer, this is the main focus of the life cycle because this is where the code is produced. Implementation my overlap with both the design and testing phases. Many tools exists (CASE tools) to actually automate the production of code using information gathered and produced during the design phase.

Testing

During testing, the implementation is tested against the requirements to make sure that the product is actually solving the needs addressed and gathered during the requirements phase. Unit tests and system/acceptance tests are done during this phase. Unit tests act on a specific component of the system, while system tests act on the system as a whole.

So in a nutshell, that is a very basic overview of the general software development life cycle model. Now lets delve into some of the traditional and widely used variations.

Waterfall Model

This is the most common and classic of life cycle models, also referred to as a linear-sequential life cycle model. It is very simple to understand and use. In a waterfall model, each phase must be completed in its entirety before the next phase can begin. At the end of each phase, a review takes place to determine if the project is on the right path and whether or not to continue or discard the project. Unlike what I mentioned in the general model, phases do not overlap in a waterfall model.

Waterfall Life Cycle ModelWaterFallModel

Advantages

  • Simple and easy to use.
  • Easy to manage due to the rigidity of the model – each phase has specific deliverables and a review process.
  • Phases are processed and completed one at a time.
  • Works well for smaller projects where requirements are very well understood.

Disadvantages

  • Adjusting scope during the life cycle can kill a project
  • No working software is produced until late during the life cycle.
  • High amounts of risk and uncertainty.
  • Poor model for complex and object-oriented projects.
  • Poor model for long and ongoing projects.
  • Poor model where requirements are at a moderate to high risk of changing.

V-Shaped Model

Just like the waterfall model, the V-Shaped life cycle is a sequential path of execution of processes. Each phase must be completed before the next phase begins. Testing is emphasized in this model more so than the waterfall model though. The testing procedures are developed early in the life cycle before any coding is done, during each of the phases preceding implementation.

Requirements begin the life cycle model just like the waterfall model. Before development is started, a system test plan is created. The test plan focuses on meeting the functionality specified in the requirements gathering.

The high-level design phase focuses on system architecture and design. An integration test plan is created in this phase as well in order to test the pieces of the software systems ability to work together.

The low-level design phase is where the actual software components are designed, and unit tests are created in this phase as well.

The implementation phase is, again, where all coding takes place. Once coding is complete, the path of execution continues up the right side of the V where the test plans developed earlier are now put to use.

V-Shaped Life Cycle ModelVShapedModel

Advantages

  • Simple and easy to use.
  • Each phase has specific deliverables.
  • Higher chance of success over the waterfall model due to the development of test plans early on during the life cycle.
  • Works well for small projects where requirements are easily understood.

Disadvantages

  • Very rigid, like the waterfall model.
  • Little flexibility and adjusting scope is difficult and expensive.
  • Software is developed during the implementation phase, so no early prototypes of the software are produced.
  • Model doesn’t provide a clear path for problems found during testing phases.

Incremental Model

The incremental model is an intuitive approach to the waterfall model. Multiple development cycles take place here, making the life cycle a “multi-waterfall” cycle. Cycles are divided up into smaller, more easily managed iterations. Each iteration passes through the requirements, design, implementation and testing phases.

A working version of software is produced during the first iteration, so you have working software early on during the software life cycle. Subsequent iterations build on the initial software produced during the first iteration.

Incremental Life Cycle ModelSpiralModel

Advantages

  • Generates working software quickly and early during the software life cycle.
  • More flexible – less costly to change scope and requirements.
  • Easier to test and debug during a smaller iteration.
  • Easier to manage risk because risky pieces are identified and handled during its iteration.
  • Each iteration is an easily managed milestone.

Disadvantages

  • Each phase of an iteration is rigid and do not overlap each other.
  • Problems may arise pertaining to system architecture because not all requirements are gathered up front for the entire software life cycle.

Spiral Model

The spiral model is similar to the incremental model, with more emphases placed on risk analysis. The spiral model has four phases: Planning, Risk Analysis, Engineering and Evaluation. A software project repeatedly passes through these phases in iterations (called Spirals in this model). The baseline spiral, starting in the planning phase, requirements are gathered and risk is assessed. Each subsequent spirals builds on the baseline spiral.

Requirements are gathered during the planning phase. In the risk analysis phase, a process is undertaken to identify risk and alternate solutions. A prototype is produced at the end of the risk analysis phase.

Software is produced in the engineering phase, along with testing at the end of the phase. The evaluation phase allows the customer to evaluate the output of the project to date before the project continues to the next spiral.

In the spiral model, the angular component represents progress, and the radius of the spiral represents cost.

Spiral Life Cycle ModelSpiralModel

Advantages

  • High amount of risk analysis
  • Good for large and mission-critical projects.
  • Software is produced early in the software life cycle.

Disadvantages

  • Can be a costly model to use.
  • Risk analysis requires highly specific expertise.
  • Project’s success is highly dependent on the risk analysis phase.
  • Doesn’t work well for smaller projects.

And that’s it. If you have any input, especially your views on advantages and disadvantages of any particular model, feel free to leave them in the comments and I can add them to my copy.