Tuesday, February 05, 2008

Old habits never die

One of the things I could never stand was reading code that had the parenthesis on the same line as the function declaration, and couldn't understand why people even bother with this format still. I finally found why this is so.

public void MyMethod (int arg1, string arg2, bool arg3) {
DoSomethingHere ();
}
 



"Notice in above code the parenthesis is inline with the method declaration. And apparently the reason for that was that back in the days the monitors didn't have high resolutions and writing the parenthesis in the same line saved you one line on the monitor screen.




[...]





Let me end this post with a short story that could apply to the above text. I read this in Steve Maguire's book Debugging the Development Process. The story goes like this:



'A boy asked his mother how come she cuts off the edges of a pot roast when putting it into the pot. Mother told him that that's how her mother taught her to do. So, boy went to his grandmother and he got the same answer. Then he went to his grand-grandmother and ask her the same question. The answer was: Well, back then my pot was to small and the meat didn't fit inside.'" - http://blogs.msdn.com/peterj/archive/2008/02/05/on-code-formatting.aspx






One thing I do notice and find interesting are peoples habits and sayings/proverbs that were past down generations ago. Sometimes I would watch a old movie, and hear them say a phrase that will catch my attention -- thinking -- how old is that saying?




I found a web site that shows the sources of some of these weird sayings: http://users.tinyonline.co.uk/gswithenbank/sayindex.htm 



 



Some samples:




  • Balls to the wall - This is not a reference to the male anatomy, as some would believe, but an expression from the world of aviation. On an aeroplane, the handles controlling the throttle and fuel mixture are often topped with ball-shaped grips, referred to by pilots as (naturally) balls. Pushing the balls forward, towards the wall of the cockpit, is to apply full throttle and the highest possible speed.



  • Go off half-cocked - The hammer of 17th century flintlock muskets was often very ornate and resembled a rooster or cock. To fully cock a gun was to prepare it for firing. The half-cock position was a 'safe' position to which the hammer or cock was drawn to permit access to the priming pan to charge and load the weapon. Pulling the trigger of a flintlock musket at half-cock will not fire the weapon. The hammer, which contains the flint, will not strike the frizzen with sufficient force to produce a spark and the primer charge in the pan will not ignite. This will only happen when the hammer is fully cocked, that is, completely drawn back.



  • Cut and run - An old nautical expression. In an emergency, it was sometimes necessary to cut the anchor cable, instead of going through the time-consuming business of winching up the anchor, in order to get away quickly ('run' before the wind, at full sail). The Armada was said to have done this off Calais on the approach of English fireships.



  • Cold Turkey - In the state of drug withdrawal an addict's blood is directed to the internal organs, leaving the skin white and with goose bumps and thus resembling a frozen plucked turkey. This expression goes back to the 1930s.



  • Give the bird - From theatrical slang; originally 'get the big bird', i.e. the goose, which hisses as people do when they make traditional sound of disapproval at a bad public performance.



Technorati Tags: ,,,

No comments: