tag:blogger.com,1999:blog-69125543843450047162024-03-05T02:58:26.106-08:00Blogging 4 LifeErangahttp://www.blogger.com/profile/13623662059085087252noreply@blogger.comBlogger57125tag:blogger.com,1999:blog-6912554384345004716.post-57812235590684593002020-01-19T21:08:00.005-08:002020-01-19T21:11:51.616-08:00Not able to install SSMS 18.4, Set is stuck showing "Loading Packages. Please wait"<h1 style="background-color: white; border: none; clear: both; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; height: auto; line-height: 46.8px; list-style-type: none; margin: -10px 0px 35px; outline: 0px; padding: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="background-color: transparent; font-style: inherit;"><span style="font-size: small;">I could able to fix this with following steps:</span></span><span style="font-size: small; font-weight: normal;">1) Removed "C:\Program Files (x86)\Microsoft SQL Server Management Studio 18" folder<br />2) Deleted registry key "HKLM\SOFTWARE\WOW6432Node\Microsoft\Microsoft SQL Server Management Studio"<br />3) Installed SSMS</span></span></h1>
Erangahttp://www.blogger.com/profile/13623662059085087252noreply@blogger.com0tag:blogger.com,1999:blog-6912554384345004716.post-10107571203899001022015-01-01T09:44:00.002-08:002015-01-01T09:44:37.484-08:00Brand new year - 2015<b><span style="font-size: large;"><br /></span></b>
<b><span style="font-size: large;">2015 with Golden Ratio</span></b><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKW_Vcm4RJvCzY08WDxbkmAfqhu5zEji4xxipcOG8XC-h8cHtMB0wCEZMm9J0_4RGM-zRvXipkTcvzZFJPCJT2XwJsmjE4jEjk1Y8QOagRKe8wevjWYO9NG5CMNrFjTu-fytUUwTE5mrBA/s1600/2015.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKW_Vcm4RJvCzY08WDxbkmAfqhu5zEji4xxipcOG8XC-h8cHtMB0wCEZMm9J0_4RGM-zRvXipkTcvzZFJPCJT2XwJsmjE4jEjk1Y8QOagRKe8wevjWYO9NG5CMNrFjTu-fytUUwTE5mrBA/s1600/2015.png" height="181" width="320" /></a></div>
Erangahttp://www.blogger.com/profile/13623662059085087252noreply@blogger.com0tag:blogger.com,1999:blog-6912554384345004716.post-23030535140178371052014-01-02T00:56:00.000-08:002014-01-02T00:56:14.516-08:00Its Twenty FourtyBrand new year...!!!!.Happy New year,,,,,,,Erangahttp://www.blogger.com/profile/13623662059085087252noreply@blogger.com0tag:blogger.com,1999:blog-6912554384345004716.post-8483256388865975342011-01-04T04:44:00.001-08:002011-01-04T04:44:20.581-08:00tablediff command line utility in SQL Server<p>Above tablediff utility is very useful for comparing tables.It is not only tells us which records / columns are different but can also generate a SQL script to update the second table to make it the same as the first table.</p> <p>You have to navigate to following path the use this utility</p> <p><strong>SELECT 'C:\Program Files\Microsoft SQL Server\100\COM></strong></p> <p>Then type command ;</p> <p align="center"><strong>tablediff –?</strong></p> <p align="justify">Then it shows all the options as follows <br /> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCSrG17YgT-ty7gUFUmfheEs_83v6hiBeIv2xXNpG9xusRX2UtpDq6CcyaB-STXEeVTQZy9m1vd_5swyBXxo9VyNZWD9QPMIB3OGJqeDKtVBKKlZvhzy2C6IboD7QVAWW7nMwc_pa_KuRE/s1600-h/tablediff%5B5%5D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="tablediff" border="0" alt="tablediff" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMMxhm3mE79qy_PkQhPvqMiwTjs7jL4x8IvX5ImbnVjLlD4amfEKf3ceUmzwq0J9KmrYcuZzBTED5rSknO5JD9kGkqQ47h5fnwfL_XZmh2AO6s8iR1UyijeOoEGB_gt-AN3zHOvunR0yqC/?imgmax=800" width="414" height="346" /></a></p> <p align="justify">But only limitation is you could compare one table at a time. Even though you can do some interesting work to overcome this. That is Just go to the SQL sever and type following command execute it. So it will generate the script for all the table. Then you can add it into .bat file.</p> <p>SELECT 'C:\Program Files\Microsoft SQL Server\100\COM>tablediff -sourceserver "SourceDBName" -sourcedatabase "T1" -sourcetable ' + '"' + name +'" ' + '-destinationserver "DestinationDBName" -destinationdatabase "T2" -destinationtable ' + '"' + name +'" ' + ' -o d:\' + name +'_Script_out.txt' <br />FROM dbo.sysobjects <br />WHERE xtype = 'U' </p> Erangahttp://www.blogger.com/profile/13623662059085087252noreply@blogger.com0tag:blogger.com,1999:blog-6912554384345004716.post-28196675920389246352011-01-03T03:45:00.000-08:002011-01-03T03:59:26.099-08:00SQLCMD command line utility<p>To run multiple external scripts do as follows;</p><p>Suppose you are having following scripts in a folder. c:\scripts\script1.sql, c:\scripts\script1.sql</p><p>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.</p><p>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 </p>Erangahttp://www.blogger.com/profile/13623662059085087252noreply@blogger.com0tag:blogger.com,1999:blog-6912554384345004716.post-2869223456330556962011-01-03T03:10:00.000-08:002011-01-03T03:58:58.813-08:00Recurrent Work–Automate them<p><strong>Problem</strong> </p><p>Sometimes we do some recurrent works those can be automated. </p><p>Few months back in a integration of two project I had to create multiple database scripts to merge those two. There are more than twenty scripts.Initially I run those one by one and it took long time to create the DB. </p><p><strong>Mistake</strong> </p><p>We don’t care to automate those recurrent work .Just Do at the point you need. Once you get to know its recurrent you will regret I could have automate this. </p><p><strong>Lesson Learned</strong> </p><p>By automating recurrent works [Those can automate] you can save your time</p>Erangahttp://www.blogger.com/profile/13623662059085087252noreply@blogger.com0tag:blogger.com,1999:blog-6912554384345004716.post-67698623319315621602011-01-03T03:00:00.000-08:002011-01-03T04:01:38.084-08:00SQLCMD command line utility<p>Recently I work with SQLCMD utility and it is quite interesting. You can enable it in your Management studio as follows;</p><p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwgPwymiAMVzWloJnErZlFlpJuwXmXdqnBHRSaQ3AelJYAwPBdyAM4dP-L0HNojwfWrwVG9HQPosXhZNBAybemQrnJZrBz-1rS-ZhfVDP_XOp_x326St6YCw76p69GNXcUNsYLg9wNkEFa/s1600-h/sqlcmd_1%5B3%5D.png"><img style="BACKGROUND-IMAGE: none; BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px; PADDING-TOP: 0px" title="sqlcmd_1" border="0" alt="sqlcmd_1" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTBXZV05q7MktjrIN-lHqDUl40OR3ktPhNH910WrWPEtM3X5lvWbUq7bW6XLiVJSBtSB0nrQ-p02eQenwtDWfJ3o615wDpJea2G28CJJVolUSG0DloxfL71WMsbK0cfTAL7xi7L0jb6aiY/?imgmax=800" width="375" height="285" /></a></p><p>Then you can make use color coding and syntax highlighting as well . Other than this ,you can enable this SQLCMD mode in your normal command line by setting path variable to binn folder as following example</p><p>C:\Program Files\Microsoft SQL Server\100\DTS\Binn\</p><p>Then just open command line and then type this command.It will show the option available;</p><p>-sqlcmd –?</p><p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOsDA25wlvz_d6JjRBeGpOyOqZbZKUPevvLgXaaniYxQaPtluf0U9GJ4uoxvnVoRCNlGJJP-VR1LpkixIqG4RJRMy5pCFS3NG1NZCgDGbRTy3WN2EbmjPdsuaQn7PhziLOTzbogXyTK6ur/s1600-h/sqlcmd_2%5B3%5D.png"><img style="BACKGROUND-IMAGE: none; BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px; PADDING-TOP: 0px" title="sqlcmd_2" border="0" alt="sqlcmd_2" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjud7W-HNtVSp3Z_LYdO4SSRujNIaaM6NCMxeSxGtu7iLIyED5JKVi8nTWWX_i8CBonJZWripOMZXv4g7MaPdacXc8rnVHjKDmwoyg0oSGTa2_A_qWndz2LTavJEwZdxDcGLZ9FlNi0ssVT/?imgmax=800" width="436" height="251" /></a></p><p>To connect to a database and query for data</p><p>sqlcmd -S ERANGA-PC\SQLEXPRESS -d T1 -U sa -P Qwer1234 –q “Select * from Student”</p>Erangahttp://www.blogger.com/profile/13623662059085087252noreply@blogger.com0tag:blogger.com,1999:blog-6912554384345004716.post-33898115437291154342010-12-31T01:32:00.001-08:002010-12-31T01:32:24.304-08:00Twenty Ten Last Day<p>Today is the last day of this year..This will be the last post in this year . <img style="border-bottom-style: none; border-right-style: none; border-top-style: none; border-left-style: none" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWMnrK1zIbVuBTr6GX1ZQaEd3XL2q7hRrVuFNN2pPXjwi8WISmFouDhcIItn1gtN0OrGJJqDmu3r38kNDtyNAt3WhMU7fiqyKNX7LxUcuWJ4d74RT53r3-tZqvvYZM51r1FZkmRr1y6qs2/?imgmax=800" /> Lot of things happened in this year and already every things has added to our life as a experience. </p> <p><img style="border-bottom-style: none; border-right-style: none; border-top-style: none; border-left-style: none" class="wlEmoticon wlEmoticon-angel" alt="Angel" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFQjI0a-JZDqBTShaTDEDJ-mEYtVKCAmQAgQG-LjgcN_YARTocbmxWqIzemBCv-S8x-mKzAEbpSDXXWVjarPclj982o5ez9RJMo2TeZstK9uMQWcQzfJmCV-T-z0Q75VMZ0KwBHJiYT5I_/?imgmax=800" /> For everybody……</p> <blockquote> <p>        HAPPY NEW YEAR!!!!!!!!!!!!!<img style="border-bottom-style: none; border-right-style: none; border-top-style: none; border-left-style: none" class="wlEmoticon wlEmoticon-winkingsmile" alt="Winking smile" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5JF8ItNpjqTSX2drMtgct6lnB5L2wNFHTzlrYlBKb5eA8xFrdPbP3iIfe6q6U_pB2I929CFO7hcyQQh5t4vNjqK9fLPyG-OKWrfBb3GzRrc2RlPrZ8PpXSl8lEbLa1wJFIBRyEvzQxcKg/?imgmax=800" /></p></blockquote> Erangahttp://www.blogger.com/profile/13623662059085087252noreply@blogger.com0tag:blogger.com,1999:blog-6912554384345004716.post-43413213429570873692010-11-29T20:06:00.001-08:002010-11-29T20:12:18.469-08:00Importance of good user message<p><span style="color:#cccccc;"><strong>Problem</strong></span></p><p><span style="color:#cccccc;">Company 1</span></p><p><span style="color:#cccccc;">Dear Valued Customer,Your Mobile invoice value for [date] is<br />Rs[Amount] & the total outstanding value at date is Rs[Amount].<br />Thank you.</span></p><p><span style="color:#cccccc;">Our record indicate an overdue of Rs.[][date] pls settle the same by date to enjoy uninterrupted services.Pls ignore if settled.</span></p><p><span style="color:#cccccc;">Company 2</span></p><p><span style="color:#cccccc;">Dear Valued customer,Your bill dated date is now due.Please make payment.if already settled pls ignore this sms.</span></p><p><span style="color:#cccccc;">Given messages are received from two different telecom company in Sri Lanka when there is a due payment . </span></p><p><span style="color:#cccccc;"><strong>Mistake</strong></span></p><p><span style="color:#cccccc;">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. </span></p><p><span style="color:#cccccc;"><strong>Lesson Learned</strong></span></p><p><span style="color:#cccccc;">So good message should polite,short and informative. </span></p>Erangahttp://www.blogger.com/profile/13623662059085087252noreply@blogger.com0tag:blogger.com,1999:blog-6912554384345004716.post-85309770368138812122010-11-24T17:58:00.001-08:002010-11-24T18:01:55.092-08:00Appreciation<p>Today I got this touching email:</p> <p align="justify">One young academically excellent person went to apply for a managerial <br />position in a big company. <br />He passed the first interview, the director did the last interview, made <br />the last decision. <br />The director discovered from the CV,  that the youth's academic result is <br />excellent all the way, from the secondary school until the postgraduate <br />research, never has a year he did not score. <br />The director asked, "Did you obtain any scholarship in school?" and the <br />youth answered "none". <br />The director asked, " Is it your father pay for your school fees?" the <br />youth answered, my father passed away when I was one year old, it is my <br />mother who paid for my school fees. <br />The director asked, " Where did your mother worked?" the youth answered, my <br />mother worked as cloth cleaner. The director requested the youth to show <br />his hand, the youth showed a pair of hand that is smooth and perfect to the <br />director. <br />The director asked, " Did you ever help your mother washed the cloth <br />before?" The youth answered, never, my mother always wanted me to study and <br />read more books, furthermore, my mother can wash cloths faster than me. <br />The director said, I had a request, when you go back today, go and help to <br />clean your mother's hand, and then see me tomorrow morning. <br />The youth felt that its chance of landing the job is high, when he went <br />back, he happily wanted to clean his mother's hand, his mother feel <br />strange, happy but mixed with fear, she showed her hand to the kid. <br />The youth cleaned his mother's hand slowly, his tear drop down as he did <br />that.  It is first time he found his mother's hand is so wrinkled, and <br />there are so many bruises in her hand. Some bruises incites pains so strong <br />that shiver her mother's body when cleaned with water. <br />This is the first time the youth realized and experienced that it is this <br />pair of hand that washed the cloth everyday to earn him the school fees, <br />the bruises in the mother's hand is the price that the mother paid for his <br />graduation and academic excellence and probably his future. <br />After finishing the cleaning of his mother hand, the youth quietly cleaned <br />all remaining clothes for his mother. <br />That night, mother and sons talked for a very long time. <br />Next morning, the youth went to the director's office <br />The director noticed the tear in the youth's eye, asked: " Can you tell you <br />what have you done and learned yesterday in your house?" <br />The youth answered, " I cleaned my mother's hand, and also finished <br />cleaning all the remaining clothes' <br />The director asked, "Please tell me your feeling." <br />The youth said, Number 1, I knew what appreciation, without my mother, is <br />there would not the successful me today. Number 2, I knew how to work <br />together with my mother, then only I can realize how difficult and tough to <br />get something done.  Number 3, I knew the importance and value of family <br />relationship. <br />The director said, "This is what I am asking, I want to recruit a person <br />that can appreciate the help of other, a person that knew the suffering of <br />others to get thing done, and a person that would not put money as his only <br />goal in life to be my manager. You are hired. <br />Later on, this young person worked very hard, and received the respect of <br />his subordinates, every employees worked diligently and in a team, the <br />company's result improved tremendously. <br />A child who has been protected and habitually given whatever he did, he <br />developed "entitlement mentality" and always put himself first. He is <br />ignorance of his parent's effort. When he started work, he assumed every <br />people must listen to him, and when he became a manager, he would never <br />know how suffering his employee and always blame others. </p> <p align="justify">For this kind of people, he can have good result, may be successful for a while, but <br />eventually would not feel sense of achievement, he will grumble and full of <br />hatred and fight for more. If we are this kind of protective parent, did we <br />love the kid or destroy the kid? <br />You can let your kid lived in a big house, eat a good meal, learn piano, <br />watch a big screen TV. But when you are cutting grass, please let them <br />experienced it. After a meal, let them washed their plate and bowl together <br />with their brothers and sisters. It is not because you do not have money to <br />hire a maid, but it is because you want to love them in a right way. </p> <p align="justify">You want them to understand, no matter how rich their parent are, one day their <br />hair will grow gray, same as the mother of that young person. The most <br />important thing is your kid learn how to appreciate the effort and <br />experience the difficulty and learn the ability to work with others to get <br />thing done.</p> Erangahttp://www.blogger.com/profile/13623662059085087252noreply@blogger.com0tag:blogger.com,1999:blog-6912554384345004716.post-80877901266566772010-11-23T20:35:00.001-08:002010-11-24T18:00:16.782-08:00Visual Studio Data Compare Not working<p>Sometime you can be able to view Data compare menu in you visual studio toolbar. Once you go there and select one option nothing will happen. To get it into work you have to run following command in your VS command prompt.</p><p align="center">devenv /setup</p>Erangahttp://www.blogger.com/profile/13623662059085087252noreply@blogger.com0tag:blogger.com,1999:blog-6912554384345004716.post-58183984487810943292010-11-23T02:36:00.001-08:002010-11-23T02:39:56.173-08:00Chain of Responsibility Pattern<p>This pattern I used for handling scenario as follows;</p><p>Applying permission on user to view some data is based on many criteria and those are having a sequence. </p><p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9pT3kJq5j8hkO5CzYKMpP7vDuY_SrYmXwM89IwWcGMSTcJNxBki03wn6wre0mJhf9cQPiLAS_g_HWlWWtbenqsUg3m27IqKXlNpdy7grdjvWAePj8gY6Ej51wNI7_ttDkmsPV3DSYqWYz/s1600-h/image%5B4%5D.png"><img style="BACKGROUND-IMAGE: none; BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px; PADDING-TOP: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyQddIo-E2RayIHBgUqOFTmgf270ErjJNP1ScxglAPSsatAOY2iSlx9l1XFKXS1wVPxZ3b6isXPJMqKMaKcxggc6JIGPmUU-ZGV7sXYEblZEav_1VizFNGfTNUQAyQn3k3Imi6BcsxLCVK/?imgmax=800" width="420" height="89" /></a></p><p>By Appling this chain of responsibility pattern I could able to arrange the code nice manner , very easy to add new criteria as well as change the sequence. </p>Erangahttp://www.blogger.com/profile/13623662059085087252noreply@blogger.com0tag:blogger.com,1999:blog-6912554384345004716.post-24067277933004143752010-11-17T05:11:00.001-08:002010-11-17T19:33:51.613-08:00Organized well<p align="justify">In your desktop where is your taskbar? Most of them keep it as default . That is in bottom of the screen like this.</p><p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijFoLYgPbmmNqvz6vUnZxKkgMc_2PAzttDjYqn4QxeBvhUy6mcPmXLGKKRuKJrMm-YzHzs-6wmPVVCR8sAE75N9FdyBwmbi9vo0ZWr_EAS7sJ_T2-jbAFuYX8NL6XG424N5iHdzgC8_5d2/s1600-h/image%5B5%5D.png"><img style="BACKGROUND-IMAGE: none; BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px; PADDING-TOP: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6A8hj3j58dZ-fQXCrOycAdTS8u4cF1xL5td3FCMsJRgAT8ie_xw568WV0wJun2L42iFob8m1D5mq588dc-4DUkuJizk0iR7hY0con5VRDYahQFFjR25EQjXPnb-_ASlrnPtptHzUlr1o3/?imgmax=800" width="417" height="28" /></a></p><p align="justify">Till few months back I also kept as that manner. But now I have positioned it right side of the screen. By keeping in this position its is very comfortable to access the list . High number of items can be arranged in this position in a very organized manner. If you are using wide screen, this is the effective position to use the maximum use of the screen. Following screen gives idea of comparison of the positions.</p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicPju6X1oi5V4gPT_mBh0U1QEqVTlxYl9fvd9yVvvTp67BJJfpAqXNWmPWPioRSTzgZ9ZTW0-_Dxy5XNe2E6aWvV-sJeRQmRR1HYTWM-B9KG4HdGEgWjCSHtSF8MF7-MVeFCY1h6PQcviL/s1600-h/organizewell%5B4%5D.png"><img style="BACKGROUND-IMAGE: none; BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px; PADDING-TOP: 0px" title="organizewell" border="0" alt="organizewell" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjd7vO_ELABI-WzrPAMkUgIKtv3_guEdi0k3Nq0P_XLIdu254Ds360YBis9D_AiyvSyMMlwkNZH4f8l2e3umCFmvlIUyxk90ziQwuhAVGqJctaufoXTs-bhyphenhyphentDSeiRXT9kHiablz0sCbwvv/?imgmax=800" width="434" height="273" /></a> <p>Other than those when positioning the task bar we should concern about followings; </p><ul><li>Continually remove unwanted items, otherwise cant directly access the what we want so it will be a time consuming task.</li><li>Arrange the width of the task bar up to user preference.</li></ul><p>Enjoy the right side arrangement of the taskbar.<img style="BORDER-BOTTOM-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-TOP-STYLE: none; BORDER-LEFT-STYLE: none" class="wlEmoticon wlEmoticon-smilewithtongueout" alt="Smile with tongue out" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0BuTMo5PrmVTN67ubSYZ0MzmPNG_mamAZbHLZf4DyXpJVBpM3ukcYbopLUBjk0RQHstt5hJgAKTdwkorSo3lF7GzUb7xOdhR4XrfBrxla3tbhJZeUufIV7O5_UOJC6fWyD5oUl8bH9RsF/?imgmax=800" /></p>Erangahttp://www.blogger.com/profile/13623662059085087252noreply@blogger.com0tag:blogger.com,1999:blog-6912554384345004716.post-17099374014882243242010-11-17T04:19:00.001-08:002010-11-17T04:24:20.305-08:00Before You Refactor<p>Refactoring need to be done by every programmer and it leads to have a maintainable code base.Rajith Attapattu has highlighted very good points when doing refactoring</p><ul><li>The best approach for restructuring starts by taking stock of the existing<br />codebase and the tests written against that code.</li><li>Avoid the temptation to rewrite everything.</li><li>Many incremental changes are better than one massive change.</li><li>Many incremental changes are better than one massive change.</li><li>New technology is an insufficient reason to refactor.</li><li>New technology is an insufficient reason to refactor.</li><li>Remember that humans make mistakes.</li></ul><p>Other than above, good practices can be found <a href="http://sourcemaking.com/refactoring">in here</a>.</p>Erangahttp://www.blogger.com/profile/13623662059085087252noreply@blogger.com0tag:blogger.com,1999:blog-6912554384345004716.post-23031971459882391952010-11-17T03:25:00.001-08:002010-11-17T03:28:20.283-08:0097 Things Every Programmer Should Know<p>Some sections of above book I read few months back and today I got a thought to read it again. There are more than 97 things programmer should know<img style="BORDER-BOTTOM-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-TOP-STYLE: none; BORDER-LEFT-STYLE: none" class="wlEmoticon wlEmoticon-winkingsmile" alt="Winking smile" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhP3tSr7YkE3VHfceLYqQNQKGVm8t7lmdHslpfYsVt2HJVumO4rKEO-9-LJAJeU9927WY0BJ1aBie3yqqI5WxJ0jEF2tcUab7rU2MSg9y8b6NLr4Qqlwqo7q7keIzkwmLD6JNVlP7T9wEKA/?imgmax=800" /> but this is great collection and good prioritized list to follow. No need to read it from top to bottom , can switch to any topic as we like. <img style="BORDER-BOTTOM-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-TOP-STYLE: none; BORDER-LEFT-STYLE: none" class="wlEmoticon wlEmoticon-rollingonthefloorlaughing" alt="Rolling on the floor laughing" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjX0kvkr7-Fui3s53Q_rRHc3s6SC-HkOzafP7ewwBwm7ypXYxtRQFk_TsxCxZ8dPJ41P9oonnanCgYzt0qUVbVDYu70NXb4JX8v5FBPRd00cvLEUtjBB6nyTViond6sclo4fiGwoLKn21ET/?imgmax=800" /> . Also it’s proud to find one author from Sri Lanka who is <a href="http://rajith.2rlabs.com/">Rajith Attapattu</a></p>Erangahttp://www.blogger.com/profile/13623662059085087252noreply@blogger.com0tag:blogger.com,1999:blog-6912554384345004716.post-63783651411497553562010-11-17T02:48:00.001-08:002010-11-17T02:48:16.575-08:00Ship It Review -2<p>You need to focus following three area to built up a great product and ship it successfully ;</p> <ol> <li>Techniques</li> <li>Infrastructure</li> <li>Process </li> </ol> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBRCEGf_6d_rMfqaSe_Sc5AKxUpydhp24v5fNwW3-Z5TvNNfCbx28zgjgdxYWP7IeSIr-DeSksK1cIy8Wb84PkdkhcAyV_y_sVzNb21v9YIamFPsWcewxQiP-xsSrOA5TDoCgLVOjWDSSD/s1600-h/image%5B4%5D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizt13BaV5p19RCF3JdiAhotxZyKKi2HDLsLhrr5121iLl88SCIaXLtv-NL3tF1GyMtYQyX37zCQNCB19Kr8uA5LFKSWbJ4TyBDSQ8wqUGwMs1nYRmywBOLzuS0w3MgVbb6EMHcZnqTw9zp/?imgmax=800" width="360" height="275" /></a> <p>The book highlights importance of following areas comes under the tools and infrastructure,</p> <p> Manage Assets , Script Your Build , Build Automatically , Track Issues, Track Features, Use a Testing Harness , On Choosing Tools ,When Not to Experiment.</p> <p>These factors lead  for building a good infrastructure by saving time, and enhancing effectiveness.In the beginning of the chapter two ,it gives nice quote by <em>John Carmack.</em></p> <p align="center">. . the cost of adding a feature isn’t <br />just the time it takes to code it. The <br />cost also includes the addition of an <br />obstacle to future expansion.. . . the <br />trick is to pick the features that <br />don’t fight each other.</p> <p align="justify">Shortly the code should be according to the <a href="http://en.wikipedia.org/wiki/Open/closed_principle">Open close principle</a>. </p> Erangahttp://www.blogger.com/profile/13623662059085087252noreply@blogger.com0tag:blogger.com,1999:blog-6912554384345004716.post-86771562133313938512010-11-17T02:12:00.001-08:002010-11-17T02:18:04.607-08:00Rubber Ducking<p>Actually this is great concept we can used for improve our coding and also to find the missing areas in our scenario. <a href="http://c2.com/cgi/wiki?RubberDucking">Find More</a></p><p>Concept :</p><p>Place a rubber duck on your monitor and describe your problems to it. There's something magical about stating your problems aloud that makes the solution more clear.</p><p><img style="DISPLAY: block; FLOAT: none; MARGIN-LEFT: auto; MARGIN-RIGHT: auto" src="http://materialconcern.com/wp-content/uploads/2008/12/duckyshotorig.jpg" width="175" height="191" /></p>Erangahttp://www.blogger.com/profile/13623662059085087252noreply@blogger.com0tag:blogger.com,1999:blog-6912554384345004716.post-64188622835544450742010-10-28T05:10:00.000-07:002010-10-31T21:35:26.487-07:00The transaction is in doubtSometimes you may get this error when you use transaction scope .<div style="text-align: center;"><b> The transaction is in doubt</b></div><div style="text-align: justify;">I also got this error recently and able to find the reason for it. That is because of the some of the readers had not properly disposed. Actually in this case you can use Using keyword to overcome this.</div><div style="text-align: justify;"><br /></div><div style="text-align: justify;"><b>Exception :</b>System.Transactions.TransactionInDoubtException was unhandled by user code</div><div style="text-align: justify;"> Message="The transaction is in doubt."</div><div style="text-align: justify;"><br /></div><div style="text-align: justify;"><b>Solution : </b> using (reader)</div><div style="text-align: justify;"> <span class="Apple-tab-span" style="white-space:pre"> </span>{</div><div style="text-align: justify;"><span class="Apple-tab-span" style="white-space:pre"> </span>}</div>Erangahttp://www.blogger.com/profile/13623662059085087252noreply@blogger.com1tag:blogger.com,1999:blog-6912554384345004716.post-78172684469377926192010-10-16T05:13:00.000-07:002010-11-17T03:09:14.526-08:00Ship It Review -1This books has been described <b><i>Habits </i></b>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. <div><br /></div><div><b>Story:</b></div><div><br /></div><div><div style="TEXT-ALIGN: justify">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,</div><div style="TEXT-ALIGN: justify">and it became a habit.</div></div>Erangahttp://www.blogger.com/profile/13623662059085087252noreply@blogger.com0tag:blogger.com,1999:blog-6912554384345004716.post-36836696409400712742010-10-16T05:09:00.000-07:002010-10-16T05:13:29.126-07:00Ship ItRecently i got a book called <a href="http://www.pragprog.com/titles/prj/ship-it">Ship it</a> . That is quite inserting book .Erangahttp://www.blogger.com/profile/13623662059085087252noreply@blogger.com0tag:blogger.com,1999:blog-6912554384345004716.post-670081656951637112010-10-15T00:25:00.000-07:002010-10-15T00:45:10.794-07:00Dead Code Problem<div><p class="MsoNormal"><b>Problem</b></p><p class="MsoNormal">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.</p><p class="MsoNormal"><b>Mistake</b></p><p class="MsoNormal">Had left dead dead code and missing comments .</p><p class="MsoNormal"><b>Lesson learned</b></p><p class="MsoNormal">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 descriptive comment . Otherwise omit them . That is the best way to achieve clean code.</p></div>Erangahttp://www.blogger.com/profile/13623662059085087252noreply@blogger.com2tag:blogger.com,1999:blog-6912554384345004716.post-6935956133156504482010-10-05T02:21:00.000-07:002010-10-05T02:29:33.907-07:00Schema Compare does not support SQL Server 2008<span class="Apple-style-span" style="font-size: medium;">If you going to compare two SQL Server 2005 databases with SQL Server 2008 database using Visual 2008 you would get this error.</span><div><div><span class="Apple-style-span" style="font-size: medium;"><br /></span><div><b><span class="Apple-style-span" style="font-size: medium;"> Schema Compare does not support SQL Server 2008</span></b></div><div><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><b><span class="Apple-style-span" style="font-size: medium;"><br /></span></b></span></div><div><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><b><span class="Apple-style-span" style="font-size: medium;">To resolve this you can use :</span></b></span></span></div><div><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><b><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Arial, Helvetica, sans-serif; font-weight: normal; "><b><span class="Apple-style-span" style="font-family: Tahoma, Arial, sans-serif; font-weight: normal; "><h2 id="DownloadName" class="header details-h2" style="margin-top: 27px; margin-right: 0px; margin-bottom: 24px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 20px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-top-color: transparent; border-right-color: transparent; border-bottom-color: transparent; border-left-color: transparent; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; line-height: 1.4em; width: 636px; letter-spacing: -0.06em; font: normal normal normal 2.2em/normal 'Segoe UI', Arial, sans-serif; display: inline !important; background-position: 0% 0%; background-repeat: no-repeat no-repeat; "><a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=bb3ad767-5f69-4db9-b1c9-8f55759846ed&displaylang=en#filelist"><span class="Apple-style-span" style="font-size: medium;">Microsoft® Visual Studio Team System 2008 Database Edition GDR R2</span></a></h2></span></b></span></b></span></span></div><div><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; font-size: 14px; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><b><span class="Apple-style-span"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span"><span class="Apple-style-span" style="font-weight: normal; letter-spacing: -1px;"><br /></span></span></span></span></b></span></span></div><div><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; font-size: 14px; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><b><span class="Apple-style-span"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span"><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Arial, Helvetica, sans-serif; font-size: 14px; "><span class="Apple-style-span" style="font-family: Tahoma, Arial, sans-serif; font-size: 11px; "><h2 id="DownloadName" class="header details-h2" style="margin-top: 27px; margin-right: 0px; margin-bottom: 24px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 20px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-top-color: transparent; border-right-color: transparent; border-bottom-color: transparent; border-left-color: transparent; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; line-height: 1.4em; width: 636px; font: normal normal normal 2.2em/normal 'Segoe UI', Arial, sans-serif; display: inline !important; background-position: 0% 0%; background-repeat: no-repeat no-repeat; "><span class="Apple-style-span"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span"></span></span></span></h2></span></span><span class="Apple-style-span" style="font-weight: normal; letter-spacing: -1px;"><br /></span></span></span></span></b><br /><br /></span></span></div></div></div>Erangahttp://www.blogger.com/profile/13623662059085087252noreply@blogger.com0tag:blogger.com,1999:blog-6912554384345004716.post-75772576738290133222010-09-29T19:40:00.001-07:002010-09-29T19:51:14.726-07:00I Like Google Flintstone’s image<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.google.lk/logos/2010/flintstones10-hp.jpg"><img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 420px; height: 175px;" src="http://www.google.lk/logos/2010/flintstones10-hp.jpg" border="0" alt="" /></a><span class="Apple-style-span" style="font-size: large;">I like this </span><span class="Apple-style-span" style="line-height: 21px; "><b><span class="Apple-style-span" style="font-size: large;">Flintstone’s 50th Anniversary image</span></b><span class="Apple-style-span" style="font-size: large;"> of Google. Very creative and attractive...</span><a href="http://www.dotsperiod.com/574/flintstone-50th-anniversary-on-google-doodle-today/"><span class="Apple-style-span" style="font-size: large;">More info</span></a><span class="Apple-style-span" style="font-size: large;">...</span></span>Erangahttp://www.blogger.com/profile/13623662059085087252noreply@blogger.com0tag:blogger.com,1999:blog-6912554384345004716.post-9123358490552119942010-09-27T22:56:00.000-07:002010-09-27T22:58:05.950-07:00Understand how things are coupled<p class="MsoNormal"><b>Problem</b></p> <p class="MsoNormal">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.</p> <p class="MsoNormal"><b>Mistake</b></p> <p class="MsoNormal">Missed one of the affected scenarios of the filtering.</p> <p class="MsoNormal"><b>Lesson learned</b></p> <p class="MsoNormal">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...</p> <p class="MsoNormal">Anyway got chance to improve my knowledge on designed pattern.</p>Erangahttp://www.blogger.com/profile/13623662059085087252noreply@blogger.com0tag:blogger.com,1999:blog-6912554384345004716.post-38440019580756690182010-09-07T04:20:00.000-07:002010-09-07T04:26:35.272-07:00IntegrationMy next task will be the integration of a project which has two versions. Today i started working on it . Finished outline part and hope to identify the common mistakes we have done. So next post will be on highlighting the practices we should follow .Erangahttp://www.blogger.com/profile/13623662059085087252noreply@blogger.com0