Friday, 15 June 2012

The secret of success , a Short story -- from Socrates

Some day long ago, one of my good friend send me this story. Having touched by it i think it is worth sharing so ...

The motivation to succeed comes from the burning desire to achieve a purpose.
Napoleon Hill wrote, "Whatever the mind of man can conceive and believe, the mind can
achieve."
A young man asked Socrates the secret to success. Socrates told the young man to
meet him near the river the next morning. They met. Socrates asked the young man to
walk with him toward the river. When the water got up to their neck, Socrates took the
young man by surprise and ducked him into the water. The boy struggled to get out but
Socrates was strong and kept him there until the boy started turning blue. Socrates
pulled his head out of the water and the first thing the young man did was to gasp and
take a deep breath of air. Socrates asked, 'What did you want the most when you were
there?" The boy replied, "Air." Socrates said, "That is the secret to success. When you want success as badly as you wanted the air, then you will get it." There is no other
secret.
A burning desire is the starting point of all accomplishment. Just like a small fire cannot
give much heat, a weak desire cannot produce great results.

Thursday, 14 June 2012

 Dalai Lama’s 18 rules for living  

At the start of the new millennium the Dalai Lama apparently issued eighteen rules for living.  
On my oneNote i copy paste, from internet, what ever i feel i would like to read later. And this is one of those. 

   1. Take into account that great love and great achievements involve great risk.  
   2. When you lose, don’t lose the lesson.  
   3. Follow the three Rs:  
         1. Respect for self  
         2. Respect for others  
         3. Responsibility for all your actions.  
   4. Remember that not getting what you want is sometimes a wonderful stroke of luck.  
   5. Learn the rules so you know how to break them properly.  
   6. Don’t let a little dispute injure a great friendship.  
   7. When you realize you’ve made a mistake, take immediate steps to correct it.  
   8. Spend some time alone every day.  
   9. Open your arms to change, but don’t let go of your values.  
  10. Remember that silence is sometimes the best answer.  
  11. Live a good, honourable life. Then when you get older and think back, you’ll be able to enjoy it a second time.  
  12. A loving atmosphere in your home is the foundation for your life.  
  13. In disagreements with loved ones, deal only with the current situation. Don’t bring up the past.  
  14. Share your knowledge. It’s a way to achieve immortality.  
  15. Be gentle with the earth.  
  16. Once a year, go someplace you’ve never been before.  
  17. Remember that the best relationship is one in which your love for each other exceeds your need for each other.  
  18. Judge your success by what you had to give up in order to get it.  

Thursday, 31 May 2012


List of programming quotes.


I have gathered them for different sources, while doing "Bakker" (time-pass, if you are from DA-IICT you might know it and might be a pro at it even!  ) or just surfing.  It is good read in pass time. Hope you like some of them and possibly inspire you for programming :)


"Typing is no substitute for thinking." -- R.W. Hamming


"I find it appalling that you can become a programmer with less training than it takes to become a plumber." -- Bjarne Stroustrup


ZagNut’s Law: Arrogance is inversely proportional to ability.


"A good designer must rely on experience, on precise, logical thinking, and on pedantic exactness." -- Nigel Shaw


"Omit needless local variables." -- Strunk... had he taught programming


"DON'T BE LIBERAL IN WHAT YOU ACCEPT!"


"Software Engineers don't have Trophy Wives; they have Presentation Layers."


"We learn more from our mistakes than we do from getting it right the first time."


"A method shall have one and only one return statement."

"If you can understand what C++ template compilation errors mean, then you're probably ready to learn Chinese"


My first rule of debugging: "If you get a different error message, you're making progress."


My golden rule of database management: "Do not unto others' databases as you would not have done unto yours."


My general rule of software development: "Design should be top-down, but implementation should be bottom-up."
"The registry is evil."


"Every tool is a hammer."


"Examine carefully the choices and go with what you enjoy, not what you think will be commercial in 5 years. In all the time I've been in the business, I and everyone I know have guessed wrong about what will be hot in the coming years; so focus on what you enjoy. Besides, at a certain point, programming is programming and which language you do it in becomes much less interesting than the problems you're solving."



“ Rules of Optimization:
Rule 1: Don't do it.
Rule 2 (for experts only): Don't do it yet.
 ” 
- Michael A. Jackson




“ It's hard enough to find an error in your code when you're looking for it; it's even harder when 
you've assumed your code is error-free. ”                                                                   - Steve McConnell


“ Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. ” - Brian Kernighan





“ It's not at all important to get it right the first time. It's vitally important to get it right the last time. ” - Andrew Hunt and David Thomas









“ First, solve the problem. Then, write the code. ” 
- John Johnson




“ Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. ” - Rick Osborne




“ Any fool can write code that a computer can understand. Good programmers write code that humans can understand. ” - Martin Fowler


“ Linux is only free if your time has no value. ” - Jamie Zawinski



“ Copy and paste is a design error. ” - David Parnas


“ Any code of your own that you haven't looked at for six or more months might as well have been written by someone else. ” - Eagleson's law




"I have the ability to arrange 1's and 0's in such an order that an x86 processor can actually interpret and execute those commands. It's called Computer Programming, but it's the closest that a man can ever get to giving birth in my opinion. And I somehow feel responsible for the future existence and acceptance of my "child". I'd spend hours trying to find the tiny bug that causes my child to misbehave or act strangely. But that's my mild superpower... I make the world a better place by writing mindless back-end programs that no-one will ever see nor even know that it's there. But I know; and that's all that matters." — Alucard.

"Profanity is the one language all programmers know best."


About C & Unix


"It's 5.50 a.m.... Do you know where your stack pointer is ?"

C /n./: A programming language that is sort of like Pascal except more like assembly except that it isn't very much like either one, or anything else. It is either the best language available to the art today, or it isn't.
— Ray Simard.

"If it wasn't for C, we'd be writing programs in BASI, PASAL, and OBOL."

"I have yet to meet a C compiler that is more friendly and easier to use than eating soup with a knife."

"In My Egotistical Opinion, most people's C programs should be indented six feet downward and covered with dirt." — Blair P. Houghton.

"Going from programming in Pascal to programming in C, is like learning to write in Morse code." — J.P. Candusso.

"Trying to outsmart a compiler defeats much of the purpose of using one." — Kernighan & Plauger

"#define QUESTION ((bb) || !(bb))" — Shakespeare

"Any C programmer here ? Yeah i got a C in programming class. That counts ?"

"In C expressions, you can assume that *, /, and % come before + and -. Put parentheses around everything else." — Steve Oualline, C Elements of Style.

"I will not be a lemming and follow the crowd over the cliff and into the C." — John (Jack) Beidler.

"Because we are returning a copy for postfix ++ expressions, statements such as (c++)++; won't work as expected." — Weiskamp & Flamig

"Evolution of the C programmer:
0 months to 1 month: complete beginner
1 month to 1 year: incomplete beginner
1 year to 2 years: acolyte
2 years to 3 years: adept
3 years to 8 years: expert
at 8 years: discovers comp.lang.c
8 years+: buggrit, back to beginner again !"

— Richard Heathfield.


"... one of the main causes of the fall of the Roman Empire was that, lacking zero, they had no way to indicate successful termination of their C programs." — Robert Firth.


"I've never met anyone responsible for C language code maintenance who speaks well of the C Language.

Anyone out there who LIKES to maintain C code ?" — Ted Dennison.

"C is quirky, flawed, and an enormous success." — Dennis M. Ritchie (1941-2011).

"A C program is like a fast dance on a newly waxed dance floor by people carrying razors." — Waldi Ravens.

"The C Programming Language — A language which combines the flexibility of assembly language with the power of assembly language."


"The more I C, the less I see."

"Fixing Unix is easier than living with NT." — Jonathan Gilpin.


"There are two major products that come out of Berkeley: LSD and UNIX. We don't believe this to be a coincidence." — Jeremy S. Anderson.


"I liken starting one's computing career with Unix, say as an undergraduate, to being born in East Africa. It is intolerably hot, your body is covered with lice and flies, you are malnourished and you suffer from numerous curable diseases. But, as far as young East Africans can tell, this is simply the natural condition and they live within it. By the time they find out differently, it is too late. They already think that the writing of shell scripts is a natural act." — Ken Pier, Xerox PARC.


"The original Unix solved a problem and solved it well, as did the Roman numeral system, the mercury treatment for syphilis, and carbon paper."


"Confucius say: He who play in root, eventually kill tree."


"To err is human... to really foul up requires the root password."


"Unix is the answer, but only if you phrase the question very carefully."

"19 Jan 2038 at 3:14:07 AM" — The end of the word according to Unix (232 seconds after Jan 1st 1970).

"Unix is user-friendly. It's just very selective about who its friends are."

"UNIX: It's not just 'User-Unfriendly', it's 'Proactively User-Hostile' !"


"Programming graphics in X is like finding sqrt(pi) using Roman numerals. "


"The number of the beast — vi vi vi."


"In years past, I knew of someone who used emacs as his login shell, the only thing he found wanting in emacs was a good text editor. So he ended up using vi." — Anonymous


"VMS is a text-only adventure game. If you win you can use unix." — W. Davidson.


"The big difference between UNIX and VMS:

To do anything on UNIX, you need to know an obscure command.

To do anything on VMS, you need to know an obscure option to SET."

Rest you can find here : -  http://www.gdargaud.net/Humor/QuotesProgramming.html 


From twitter


"There are only two kinds of programming languages: those people always bitch about and those nobody uses.” Bjarne Stroustrup."


"If your Boss can't say No to His Boss, Change the Job." - Bilal Ahsan

Data structures are more like age of empires.. You keep on improving them..



If you have actually read all quotes you certainly have great patience, interest in programming and if you keep practicsing, You gonna be "rockstar" in world of programming. All that is needed, not IQ, is "practice". Believe me. :)

Thursday, 12 April 2012


Checking Current version of ubuntu

While working on finding solution to my sound problem on ubuntu , i had to find version number of OS , so Just googled it and type it here with hope that concise answer will be useful , as they are rare!


To check your Ubuntu version using the command line:
  1. Open a Terminal (Applications -> Accessories -> Terminal) or Press CTRL+ALT+T.
  2. Type lsb_release -a and press Enter.
  3. The Ubuntu version will be displayed on the screen.

Tuesday, 10 April 2012

MongoLabs Question.

During my recent work with deploying site on Heroku, using database of  MongoDb I came to know we need to use MongoLabs addon also. So my question was, Can developer share same Database across many apps, deployed on Heroku? As in our project we need to share database. So i questioned there support team and i must say they replayed promptly. There answer was "Yes, what you're trying to do is possible. You'll want to share and use the same MONGOLAB_URI for your database with each of your applications running on Heroku." 


So using same MONGOLAB_URI did it for me. Thanks for reading. This is my first post. Please do comment if any question/suggestion or if this post helped :)
 
 
Copyright © Ramanjali
Blogger Theme by BloggerThemes Design by Diovo.com