Skip to main content

Posts

Showing posts with the label Reusable Experience

SQLCMD command line utility

To run multiple external scripts do as follows; Suppose you are having following scripts in a folder. c:\scripts\script1.sql, c:\scripts\script1.sql If you add the following example to .bat file ,it runs those scripts from the command line and outputs the queries and results to a text file located at C:\Result.txt. sqlcmd -S ERANGA-PC\SQLEXPRESS -d T1 -U sa -P Qwer1234 -i c:\scripts\script1.sql -i c:\scripts\script1.sql –o c:\scripts\Result.sql

Importance of good user message

Problem Company 1 Dear Valued Customer,Your Mobile invoice value for [date] is Rs[Amount] & the total outstanding value at date is Rs[Amount]. Thank you. Our record indicate an overdue of Rs.[][date] pls settle the same by date to enjoy uninterrupted services.Pls ignore if settled. Company 2 Dear Valued customer,Your bill dated date is now due.Please make payment.if already settled pls ignore this sms. Given messages are received from two different telecom company in Sri Lanka when there is a due payment . Mistake The way messages has presented is different .In company 1 first reminder message sends very polite manner. but it’s second message is not polite it directly gives the message . But message is informative but company 2 message is very polite and short but it s not informative.When reading, user gets two different impression over the message. Lesson Learned So good message should polite,short and informative.

Ship It Review -1

This books has been described Habits in interesting manner. Following story took from it and the story shows how we should go for a decision rather considering everybody doing it or becuse of we have already done it. Story: Did you hear the story of the woman who always cooked ham by cutting off and discarding a third of it first? When asked why, she said that was how her mother always cooked hams. When asked, her mother said that was how her mother had always cooked. They finally confronted Grandma, who admitted that when she was young, she didn’t have a pan big enough for an entire ham, so she always just cut the end off, and it became a habit.

Dead Code Problem

Problem Actually this problem occurred when i was doing integration two projects. [Phase1 and phase2 of a project] . Phase 2 is developed on top of the phase1. Parallel phase1 had changed lot . Mean time those were working on phase2 has commented existing phase 1 code without comments . Phase 1 and phase 2 merged with some conflicts. So we commented such places with the descriptive comment . After merged the result code base has merged those phase 2 commented parts. Also there was some of already dead code in phase 1. So it is difficult to understand weather this is actual dead code or commented one from phase 2. Mistake Had left dead dead code and missing comments . Lesson learned Normally developers leave dead code in their original code with the mind of future purpose. But this not a good habit to continue.As long as you use source control ,earlier code may exist. Problem will occur if you are not using such version control. In such a situation you can keep dead code with des...

Understand how things are coupled

Problem This problem was to add new filtering for one of already completed search scenario as well as another scenario. The search part is completely had been built using dynamic SQL. There for decided to build generic method which can used by all the scenario with the intension of reusability. Implemented filtering with the design pattern. ok.. Fine..Everything fine...But last moment find another placed which used this filtering which is tightly couple with the another SP..So couldn’t use this newly implemented method..Cant help...Had to written that filtering inside the SP. In this problem not much harm raised. We couldn’t achieve reusability because of tightly couple module. Mistake Missed one of the affected scenarios of the filtering. Lesson learned Before getting into a decision we need to identify the all the affected paths those areas already exist. And also need to understand how much each of them couple with other modules and SPs... Anyway got chance to improve my...