Showing posts with label humor. Show all posts
Showing posts with label humor. Show all posts

Sunday, June 7, 2015

Love you Linzie !


Linzie was sitting still; eyes filled with tears. Henry was a bit shocked and confused to see tears in her eyes where he rather had expected a delighted face.

What is wrong with Linzie? Let us go back in time.


   
It was a Friday night. Linzie and Henry just had their dinner. Henry, a smart and geeky software developer looking at his laptop seriously like if he is trying to figure out a way to send rocket to Mars. Linzie, a full time house wife that whole heartedly enjoys her job.After completed her cleaning work in the kitchen, Linzie comes and sit next to Henry.
 
Linzie : You still working dear? ! Do you remember it is Friday night?
Henry: Yeah, I have some work pending to be completed for the week. I had to lend hand to a friend from some other team during day time to resolve a critical issue in their project.
Linzie : That’s great. By the way I have a small question for you? !
Henry : Yes?  !
Linzie : Do you think I’m the right person for you?
Henry: Why this question all of a sudden?
Linzie : It’s been there for a while. But it came out today only.
Henry: Of course, you are the perfect match for me.
Linzie : You are a very high tech person. I don’t go much into the basics even. I wish I was able to help you with your work.
Henry : oh… Come on Lin! Do you know that you are the inspiration for me to do a good quality job? Actually you are the one who taught me all the basics that helped me to become a successful techie.
Linzie : I helped you? ! how? I do not get anything at all.
Henry: Let me explain
 
  1. There is a concept called threading in software programming. Rather than waiting for one big time consuming process to complete, let it run in the background and let others work in parallel.The way you handle multiple jobs like answering a phone while making coffee helped me understand multitasking and I’m able to build efficient and responsive programs with it.
  2. Some days you make excessive amount of food and keep them in refrigerator. So we do not to spend a lot of time every day for cooking. I use the very same theory in programming. I do not do expensive and time consuming data retrieval from database every time when I need it. Rather I store the retrieved data in a cache and use them till they become expired.
  3. There is a concept called pre-compilation in SQL where prepare things beforehand and keep them ready for use. The days when you need to cook for me in the morning, you cut the vegetables and keep everything ready on the previous night itself. That helped me understand the theory very well and I use it in programming where ever possible and appropriate.
  4. Every time once you done with cooking, you clean the vessels and put them back in place neatly so no one will feel uncomfortable coming to kitchen and do some preparation. That taught me the concept of refactoring.  Refactor the code once completed the implementation so the code will look more neat and readable.
  5. When you place the ingredients in the kitchen cupboard you arrange them category wise so main ingredients are in one segment, spices are in another segment likewise which taught me to arrange my code region wise so the system events will be in one region, custom functions written by me will be in another region etc etc. Hence when I go and look at my code after a while or if someone else got to go through my code, anyone can locate the places easily.
  6. One thing I appreciate is you have labeled all the ingredient bottles and boxes in the kitchen so I can easily identify the items just by looking at the label when you are not at home. I follow the same good practice in programming where I give meaningful names for variables and methods as much as possible.
  7. Every week you take clothes out of suitcase and arrange them in the front part of dressing cupboard which helped me to understand the concept of keeping frequently accessed objects in memory so time and effort for the retrieval can be reduced.

And there are many more. Still do you think you are right?
 
(Flash back ends)
 
Linzie looked in to the worried eyes of henry wiping her own tears out.
“No. I’m perfectly alright.It’s tears of joy. I was overwhelmed by your response and your love even though I did not understand the programming part of those theories. I’m so lucky. Love you honey”


“Love you too Linzie!”
 
Henry’s mind voice: “Thank God. No more questions.  I can peacefully work.”


Sunday, March 1, 2015

Poor Broker



Mukesh- a newly married guy meets his friend Mithun  - a geek software developer, after a long time in a restaurant. In the middle of the conversation, Mukesh expresses his concern about the daily fight between his wife and mother.

“It’s hard to find a day without arguments and fight between them. Even simple things would trigger the fight. “Said Mukesh sadly.

Mithun :  No worries buddy. I’ll try to help you even though I never faced this kind of problems. There is something called design patterns in software architecture. It has solutions for any and every problem in the world.
                     
Mukesh : Oh God! Why did I tell my problem to this crazy fellow that eats software and sleeps with software non-senses. (says to himself)
 
Mithun  :  Give me a day, Mukesh ! …a single day is enough. I’ll go through all the patterns and find a solution for you.
 
Mukesh : Hey, It’s ok. I know you are very busy these days. I’ll try to resolve that on my own. Thanks for willing to help me.
 
The very next day Mukesh gets a call from Mithun.
Mukesh  : (mind voice) He must have found some crazy solution for my problem. Anyway, let’s listen what he says.
 
Mukesh picks up the phone. Mithun speaks on the other end in a glad tone.
 
“Hey buddy! I found a solution for your issue. You will find it as an apt approach”
 
Mukesh : What is that?
 
Mithun  : There is a pattern called “Broker pattern” in software architecture. That means

“A broker component is responsible for coordinating communication, such as forwarding requests, as well as for transmitting results and exceptions.”
 
You could use that pattern in your case.  I understand that the incompatibility between mother and wife interfaces causes the problem and there seems to be lot of misinterpretations of messages happen.
Invoking a broker will definitely make a difference.

Broker needs do the following things.
 
  1. Make sure that no direct communication happens between mother and wife interfaces at least for the conflicting concerns.
  2. Forward the requests and pass the results back.
  3. Interpret the messages that passed in an appropriate and advantageous way.
  4. Sometimes broker may need to modify the messages/results before pass it to the receiver.
  5. Exceptions and security concerns should be handled very well and in case of exceptions acceptable messages should be passed to the receiver rather than directly throwing the exception message.
 
And you may wonder where to find the broker for you. I know the most suitable broker in your case is
“YOU”.
 
Mukesh agrees to try this solution.
 
After  a week…
 
Mukesh calls Mithun…..
 
Mukesh : Buddy! It is amazing. You gave me the best solution. By the way, where can I buy the “software design patterns” book that you referred?