<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Turgay Kıvrak's Weblog</title>
	<atom:link href="http://turgaykivrak.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://turgaykivrak.wordpress.com</link>
	<description>Experiences, Pitfalls, Advices,Comments...</description>
	<lastBuildDate>Sat, 14 Jan 2012 18:16:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='turgaykivrak.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Turgay Kıvrak's Weblog</title>
		<link>http://turgaykivrak.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://turgaykivrak.wordpress.com/osd.xml" title="Turgay Kıvrak&#039;s Weblog" />
	<atom:link rel='hub' href='http://turgaykivrak.wordpress.com/?pushpress=hub'/>
		<item>
		<title>A software myth: Behind schedule, add more people</title>
		<link>http://turgaykivrak.wordpress.com/2011/04/21/a-software-myth-behind-schedule-add-more-people/</link>
		<comments>http://turgaykivrak.wordpress.com/2011/04/21/a-software-myth-behind-schedule-add-more-people/#comments</comments>
		<pubDate>Thu, 21 Apr 2011 22:59:08 +0000</pubDate>
		<dc:creator>turgaykivrak</dc:creator>
				<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://turgaykivrak.wordpress.com/?p=168</guid>
		<description><![CDATA[You may have already experienced severaral times that when a project is late or seems to be late, the first solution mostly applied is to add more people. But mostly, it makes the project later. It does not solve the problem but ironicaly creates more problems. Even with adding more people, sometimes,  the project can be [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=turgaykivrak.wordpress.com&amp;blog=3859710&amp;post=168&amp;subd=turgaykivrak&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="size-medium wp-image-177 alignleft" title="14014_project-schedule" src="http://turgaykivrak.files.wordpress.com/2011/04/14014_project-schedule.jpg?w=300&#038;h=195" alt="" width="300" height="195" /></p>
<p>You may have already experienced severaral times that when a project is late or seems to be late, the first solution mostly applied is to add more people. But mostly, it makes the project later. It does not solve the problem but ironicaly creates more problems.</p>
<p>Even with adding more people, sometimes,  the project can be delivered as working somehow. However, the team later has to deal with some bugs introduced by these people added. In this case, the problem is just delayed a little bit, and making it more time consuming. Because it always takes more time to fix an issue on an already delivered release.</p>
<p>You may find it hard to believe but Fred Brooks, in 1975, stated it clearly :  &#8220;adding people to a late software project makes it later&#8221; [1], and added that &#8220;Nine women can&#8217;t make a baby in one month&#8221;. (Brooks&#8217; Law)</p>
<p>&#8220;If we get behind scehulde, we can add more programmers and catch up.&#8221;[2].Unfourtunately, adding people to a late software is a software myth  and even worse it is commonly used.  Basically, software development is not like building a wall and software developers are not mason. You cannot add more manpower to increase the amount of the work done in a certain time.</p>
<p><strong>But why?</strong></p>
<p>Adding new resource makes others slower. Because they need to help/teach new ones. And you also cannot count them as efficient as the others. They need some time to understand and get used to the project.</p>
<p>Another reason is the increased communication overhead. For N developers, the communication channel number is N *(N-1)/2. As N increases, the number of communication channels increases and the amount of work done decreases.</p>
<p><strong>How to deal with the situation?</strong></p>
<p><strong>Honest promises</strong> : Be honest and don&#8217;t promise more than what is possible. This is important and applies to whole team including project managers.</p>
<p><strong>Reduce the scope</strong> : If possible, meet with the key stakeholders and check if  any of  functionalities can be dropped, or added in a later phase.</p>
<p><strong>Root cause analyze and fix</strong> : Find the root causes of the delay, not blaming anyone, and if possible, fix it. Sometimes it is the motivation of the team, and in this case, the factors which decrease the motivation should be carefully indetified and  solution to increase the motivation should be based on it.</p>
<p><strong>Realistic plan</strong>: Revise the project plan with delay and/or create a realistic project plan with more realistic revised estimations.</p>
<p><strong>When is it useful?</strong></p>
<p>Adding manpower can be useful if the current team has trouble with  some difficulties and they cannot easily overcome and the new members are experts for that kind of problems.</p>
<p>[1] The Mythical Man-Month: Essays on Software Engineering, Fred Brooks</p>
<p>[2] Software Engineering &#8211; A practitioner&#8217;s Approach,  Roger S. Pressman</p>
<br />Filed under: <a href='http://turgaykivrak.wordpress.com/category/software-engineering/'>Software Engineering</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/turgaykivrak.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/turgaykivrak.wordpress.com/168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/turgaykivrak.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/turgaykivrak.wordpress.com/168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/turgaykivrak.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/turgaykivrak.wordpress.com/168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/turgaykivrak.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/turgaykivrak.wordpress.com/168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/turgaykivrak.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/turgaykivrak.wordpress.com/168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/turgaykivrak.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/turgaykivrak.wordpress.com/168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/turgaykivrak.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/turgaykivrak.wordpress.com/168/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=turgaykivrak.wordpress.com&amp;blog=3859710&amp;post=168&amp;subd=turgaykivrak&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://turgaykivrak.wordpress.com/2011/04/21/a-software-myth-behind-schedule-add-more-people/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">turgaykivrak</media:title>
		</media:content>

		<media:content url="http://turgaykivrak.files.wordpress.com/2011/04/14014_project-schedule.jpg?w=300" medium="image">
			<media:title type="html">14014_project-schedule</media:title>
		</media:content>
	</item>
		<item>
		<title>A Collection of Lessons Learned From My Last Decade on Software Development.</title>
		<link>http://turgaykivrak.wordpress.com/2010/12/29/a-collection-of-lessons-learned-from-my-last-decade-on-software-development/</link>
		<comments>http://turgaykivrak.wordpress.com/2010/12/29/a-collection-of-lessons-learned-from-my-last-decade-on-software-development/#comments</comments>
		<pubDate>Tue, 28 Dec 2010 23:29:00 +0000</pubDate>
		<dc:creator>turgaykivrak</dc:creator>
				<category><![CDATA[Software Engineering]]></category>

		<guid isPermaLink="false">http://turgaykivrak.wordpress.com/2010/12/29/a-collection-of-lessons-learned-from-my-last-decade-on-software-development</guid>
		<description><![CDATA[No language fanatism : All languages are like tools in your toolbox. Just use the most suitable one, which is not necessarily the most popular one. Measure progress and make it visible, even when you are doing it yourself. Use board and charts. Code base is like your house. Always keep clean, otherwise after a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=turgaykivrak.wordpress.com&amp;blog=3859710&amp;post=149&amp;subd=turgaykivrak&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="font-size:small;"><span style="line-height:normal;"><br />
</span></span></p>
<div>
<ol>
<li><span style="font-family:Verdana;"><strong>No language fanatism</strong> : All languages are like tools in your toolbox. Just use the most suitable one, which is not necessarily the most popular one.</span><img src="http://turgaykivrak.files.wordpress.com/2010/12/toolbox-icon-scaled5001.png?w=204&#038;h=204" alt="" width="204" height="204" /></li>
<li><span style="font-family:Verdana;"><strong>Measure progress and make it visible</strong>, even when you are doing it yourself. Use board and charts.</span></li>
<li><span style="font-family:Verdana;"><strong>Code base is like your house</strong>. Always keep clean, otherwise after a while, you can find yourself in a mess. Refactor.</span></li>
<li><span style="font-family:Verdana;"><strong>Always be very humble</strong>. There is always someone better than yourself. The greatness is hidden in being small.</span></li>
<li><span style="font-family:Verdana;"><span style="font-family:verdana;"><strong>Continuous learning</strong></span>. There is no stop in learning, learn until death. Read beatiful codes, designs, books, blogs, etc. Improve your skills.</span></li>
<li><span style="font-family:Verdana;"><strong>No frozen well defined requirements</strong>. Change is part of life like time, it is in nature of things. So is in development, then always be prepared for it. It is not a thing that bites you, it is something to tackle.</span></li>
<li><span style="font-family:Verdana;"><strong>Help others</strong>. Always be open to help others, especially juniors. This is kind of being thankful of having knowledge. The best way to learn is to teach others.</span></li>
<li><span style="font-family:Verdana;"><strong>Unit test.</strong> The more unit test, the less debug. Skipping unit test to gain time is an illusion. </span><img style="height:79.2308px;" src="https://docs.google.com/File?id=dtgm4fn_41fhcbjzcz_b" alt="" /></li>
<li><span style="font-family:Verdana;"><strong>Keep being on the mid-way</strong>. Never overuse anything. Never overuse design patterns, never overrefactor, never overdesign, etc.</span></li>
<li><span style="font-family:Verdana;"><strong>Developers always underestimate</strong>. Most of &#8220;2-min work&#8221;s are not 2-min. Be aware of that and always add a little slack on estimations.</span></li>
<li><span style="font-family:Verdana;"><strong>There is no end in development.</strong> Stop developing at some point. </span></li>
<li><span style="font-family:Verdana;"><strong>Simplicity, simplicity, simplicity</strong>. Simplicity, simplicity, simplicity.</span></li>
<li><span style="font-family:Verdana;"><strong>No gossips</strong> : Never gossip. Never listen gossips. Never let them decrease your energy. Be smart and aware and observe environment to know what is going on, but no gossips. If you have a problem, talk to related people.</span></li>
<li><span style="font-family:Verdana;"><strong>Use version control.</strong> </span></li>
<li><span style="font-family:Verdana;"><strong>YAGNI </strong>:<span style="font-family:Verdana;">&#8220;Always implement things when you actually need them, never when you just foresee that you need them.&#8221; (Ron Jeffries). Developers always tend to develop things more generic, for possible future use purpose. However, most of this possible future never happens. So, even if we are very sure that we will need a feature in future, we should not implement it now, we should implement it when the expected future comes.</span></span><img style="height:225px;" src="https://docs.google.com/File?id=dtgm4fn_47hr2f2tc4_b" alt="" /></li>
<li><span style="font-family:Verdana;"><strong>Stabilize pursit of perfection with pragmatism.</strong> </span></li>
<li><span style="font-family:Verdana;"><strong>Continuous integration </strong></span></li>
<li><span style="font-family:Verdana;"><strong>Communication is important. </strong><span style="font-family:Verdana;">One of the most important and difficult thing is software development is communication. Clear communication in the team and clear communication with clients. And be very specific to unprofessional people.</span></span></li>
<li><span style="font-family:Verdana;"><strong>Focus on delivering working software and deliver frequently.</strong></span></li>
<li><span style="font-family:Verdana;"><strong>Remember the big picture.</strong></span></li>
</ol>
</div>
<br />Filed under: <a href='http://turgaykivrak.wordpress.com/category/software-engineering/'>Software Engineering</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/turgaykivrak.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/turgaykivrak.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/turgaykivrak.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/turgaykivrak.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/turgaykivrak.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/turgaykivrak.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/turgaykivrak.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/turgaykivrak.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/turgaykivrak.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/turgaykivrak.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/turgaykivrak.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/turgaykivrak.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/turgaykivrak.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/turgaykivrak.wordpress.com/149/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=turgaykivrak.wordpress.com&amp;blog=3859710&amp;post=149&amp;subd=turgaykivrak&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://turgaykivrak.wordpress.com/2010/12/29/a-collection-of-lessons-learned-from-my-last-decade-on-software-development/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">turgaykivrak</media:title>
		</media:content>

		<media:content url="http://turgaykivrak.files.wordpress.com/2010/12/toolbox-icon-scaled5001.png?w=204" medium="image" />

		<media:content url="https://docs.google.com/File?id=dtgm4fn_41fhcbjzcz_b" medium="image" />

		<media:content url="https://docs.google.com/File?id=dtgm4fn_47hr2f2tc4_b" medium="image" />
	</item>
		<item>
		<title>Arrogance, humility and software development</title>
		<link>http://turgaykivrak.wordpress.com/2010/01/23/arrogance-humility-and-software-development/</link>
		<comments>http://turgaykivrak.wordpress.com/2010/01/23/arrogance-humility-and-software-development/#comments</comments>
		<pubDate>Sat, 23 Jan 2010 21:33:38 +0000</pubDate>
		<dc:creator>turgaykivrak</dc:creator>
				<category><![CDATA[Other]]></category>
		<category><![CDATA[Software Engineering]]></category>

		<guid isPermaLink="false">http://turgaykivrak.wordpress.com/?p=109</guid>
		<description><![CDATA[One&#8217;s true greatness is inversly proportional to behaving as if one were great, just as one&#8217;s true smallness is inversly proportioanl to behaving as if one were small. (Anonymous) The more I learn, the more I realize I don&#8217;t know. (Albert Einstein) You should have heard about how arrogant developers are terrible in communication with [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=turgaykivrak.wordpress.com&amp;blog=3859710&amp;post=109&amp;subd=turgaykivrak&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<blockquote><p><em>One&#8217;s true greatness is inversly proportional to behaving as if one were great, just as one&#8217;s true smallness is inversly proportioanl to behaving as if one were small. (Anonymous)</em></p>
<p><em>The more I learn, the more I realize I don&#8217;t know. (Albert Einstein)</em></p></blockquote>
<p>You should have heard about how arrogant developers are terrible in communication with team members and client or you should have met an arrogant developer who never listens anyone else, thinks he knows everything and who is also very rude.</p>
<p>Once upon a time, you might have had at arrogant aggressive collages, who cover their frustrations with aggression, finding yourself in feeling of &#8220;never be part of anything which they are in&#8221;.</p>
<p><strong>What is arrogance?</strong></p>
<p>Arrogance is an offensive display of superiority and self-importance. It destroys professionalism by reducing the individual&#8217;s ability to think for himself or herself, making empathy for others difficult and removing the checks and balances of self-doubt.[1]</p>
<p>Arrogance is the reason for many failures. It could kill any company in any stage of its life. It could kill any work in any stage of its life. If you analyze the failures of the giants, you will see that most of their failures come from their arrogance.[2]</p>
<p>So why are people are arrogant? It is a mask hiding various types of states: It is a way to fill the inner emptiness with a big ego, actually, which makes them a slave of their own ego. Also, it is a way to cover up insecurity and frustration.</p>
<p>Personally, I don&#8217;t know anyone who likes arrogant people. They are not being more appreciated, not more admired, on the contrary, peoples dislike them.</p>
<p>I believe that it is one of the worst thing in business to have arrogants. They cause a tremendous amout of discord in the workplace. They ignore others and separate themselves from others, and pull down the energy level of the people.</p>
<p>Lets consider developers&#8217; arrogance, generally they cannot learn from others, they reject it. They even don&#8217;t listen others. They are very rude in discussions, which they make it go nowhere. So, in this situation, who is the looser? In the team, they hurt the team spirit. They are a kind of obstacle slowing down the team to reach the goal. To put it short, their damage is to both themselves and the team.</p>
<p><strong>How to deal with arrogant</strong></p>
<p>The belief of that you have to be arrogant  to survive  in an arrogant world is nothing but adding fuel to the fire. Considering it is more likely related with inner problems of the arrogant, responding with arrogance only makes you another arrogant, nothing more. It doesn&#8217;t help solving the problem with only exception that the arrogant may feel seeing himself in the mirror. But it is very hard to see it in negative response. Being cool and sedate or being confident in silence help more.</p>
<p><strong>If you feel arrogant</strong></p>
<p>When you feel arrogant,  here is the motto : Treat others as you would wish to be treated yourself. Think you&#8217;re just human, ordinary mortal human. Be sure , somewhere, there is a better professional than you, and also he/she is smarter and more genios than you.</p>
<p>Breaking of arrogance starts with seeing it, and knowing it. The people around you and feeling of something is wrong with you somewhere inside you may be hints. Accepting and seeing the truth of that we are at the same level of importance as others is a cure for arrogance.</p>
<p>The feeling you have when you see the greatness of your work and your thought should not lead to arrogance, you should be thankful to have that gift, keeping in mind that it is given to you to use in benefit of humans.</p>
<p>If you look at life, you can also easily see every extraordinary thing given to the human is supposed to be used in benefit of others and if he uses it for himself, like arrogance, he pays a lot for it. So, even if you are gifted, there is no excuse for being arrogant.</p>
<p>Arrogants are knocked out sooner or later, without any exception. One day, they find themselves brought down to the floor. This is how it works. You can easily find many instances of this situtaiton in the history. A lot of giants vanished because of thier unwarranted arrogance.</p>
<p><strong>Cofidence vs Arrogance</strong></p>
<p>Confidence and arrogance are different. Arroagance goes beyond healty confidence. Confidence is being aware that you know something, whereas arrogance is being overly concerned with aware that you know something.</p>
<p><strong>Humility</strong></p>
<p>Humility, or being humble, is the defining characteristic of an unpretentious and modest person, someone who does not think that he or she is better or more important than others. Because the concept of humility addresses intrinsic self-worth, it is emphasized in the realm of religious practice and ethics where the notion is often made more precise and extensive.[3]</p>
<p>Dignity of the knowledge and wisdom requires humility, which is one of the greater virtues one of the most appreciated personal qualities.Its absence is a direct obstacle to comunication; and can generate enemies, so it&#8217;s a necessary social behavior and part of being professional.</p>
<p>Humility comes with being aware of your strenghts, weaknesses and abilities. This also gives you the ability to approach situations in a superior way. Extreme humility [4] is a nice example for it.</p>
<p>Humility is more useful in problem solving; you don&#8217;t trust your self blindly and fail and blame other people or other things for failure. To put in another way, you will find that you are much more open to opportunities to learn and improve the project you are working on.</p>
<p><strong>And software development</strong></p>
<p>Humble people are a lot more pleasant and easy to work with. They don&#8217;t make their superiority an issue, they don&#8217;t always know better, they listen and respect and value others&#8217; ideas.</p>
<p>Arragont developers! You&#8217;re killing what you&#8217;ve done and your team&#8217;s work .You are not being more appriciated, not more admired, on the contrary, you are loosing them. Your ego keep you from being great developer. The more humble you are, the faster you&#8217;ll improve. So, why arogance?</p>
<p>Developers! Know your strenghts, your weeknesses, know what you know and what you don&#8217;t. Be open to communication, listen others, respect people. Be confident about yourself, but never ever be arrogant. Knowing yourself, your capabilities and inabilities leads you to a way for improving your skills.</p>
<p>Everybody can make mistakes, everybody can write code in poor quality, but the virtue is to admit it and learn from them.</p>
<p>Managers! Even you may be in a dazzling position, but it does not require to be arrogant. First of all, never ever be arrogant. And do not hire arrogant people. If you have any between your employees, give a bit time to them for recovering themselves from arrogance and also help them in doing that, if they still persists, get rid of them. Value confidence. Never forget your team is very important.</p>
<p><strong>References</strong></p>
<ol>
<li>Professionalism Initiative http://www.kumc.edu/som/professionalism.html</li>
<li>Success, Arrogance, Rise and Fall http://eclipse.sys-con.com/node/43873</li>
<li>Humility http://en.wikipedia.org/wiki/Humility</li>
<li>Extreme Humility http://c2.com/cgi/wiki/wiki?ExtremeHumility</li>
</ol>
<br />Posted in Other, Software Engineering  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/turgaykivrak.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/turgaykivrak.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/turgaykivrak.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/turgaykivrak.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/turgaykivrak.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/turgaykivrak.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/turgaykivrak.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/turgaykivrak.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/turgaykivrak.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/turgaykivrak.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/turgaykivrak.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/turgaykivrak.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/turgaykivrak.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/turgaykivrak.wordpress.com/109/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=turgaykivrak.wordpress.com&amp;blog=3859710&amp;post=109&amp;subd=turgaykivrak&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://turgaykivrak.wordpress.com/2010/01/23/arrogance-humility-and-software-development/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">turgaykivrak</media:title>
		</media:content>
	</item>
		<item>
		<title>Verify details of argument passed to the mocked object</title>
		<link>http://turgaykivrak.wordpress.com/2010/01/22/verify-details-of-argument-passed-to-the-mocked-object/</link>
		<comments>http://turgaykivrak.wordpress.com/2010/01/22/verify-details-of-argument-passed-to-the-mocked-object/#comments</comments>
		<pubDate>Fri, 22 Jan 2010 22:21:02 +0000</pubDate>
		<dc:creator>turgaykivrak</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Unit Test]]></category>

		<guid isPermaLink="false">http://turgaykivrak.wordpress.com/?p=106</guid>
		<description><![CDATA[Mockito,my favoritte mock library, introduced ArgumentCaptor with 1.8. ArgumentCaptor allows you to capture and store arguments passed the mocked methods. The captured arguments are available with the methods like getValue and getValues. So, the arguments can be easily verified by using standart JUnit assertions. ArgumentCaptor argument = ArgumentCaptor.forClass(Person.class); verify(mock).doSomething(argument.capture()); assertEquals("John", argument.getValue().getName()) Posted in Java, Unit [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=turgaykivrak.wordpress.com&amp;blog=3859710&amp;post=106&amp;subd=turgaykivrak&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Mockito,my favoritte mock library, introduced ArgumentCaptor with 1.8. ArgumentCaptor allows you to capture and store arguments passed the mocked methods.<br />
The captured arguments are available with the methods like getValue and getValues.<br />
So, the arguments can be easily verified by using standart JUnit assertions.</p>
<p><code><br />
ArgumentCaptor argument = ArgumentCaptor.forClass(Person.class);<br />
verify(mock).doSomething(argument.capture());<br />
assertEquals("John", argument.getValue().getName())<br />
</code></p>
<br />Posted in Java, Unit Test  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/turgaykivrak.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/turgaykivrak.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/turgaykivrak.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/turgaykivrak.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/turgaykivrak.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/turgaykivrak.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/turgaykivrak.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/turgaykivrak.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/turgaykivrak.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/turgaykivrak.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/turgaykivrak.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/turgaykivrak.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/turgaykivrak.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/turgaykivrak.wordpress.com/106/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=turgaykivrak.wordpress.com&amp;blog=3859710&amp;post=106&amp;subd=turgaykivrak&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://turgaykivrak.wordpress.com/2010/01/22/verify-details-of-argument-passed-to-the-mocked-object/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">turgaykivrak</media:title>
		</media:content>
	</item>
		<item>
		<title>Value Objects</title>
		<link>http://turgaykivrak.wordpress.com/2009/12/27/value-objects/</link>
		<comments>http://turgaykivrak.wordpress.com/2009/12/27/value-objects/#comments</comments>
		<pubDate>Sat, 26 Dec 2009 23:10:12 +0000</pubDate>
		<dc:creator>turgaykivrak</dc:creator>
				<category><![CDATA[DDD]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Software Engineering]]></category>

		<guid isPermaLink="false">http://turgaykivrak.wordpress.com/?p=101</guid>
		<description><![CDATA[The value objects are simple but very useful objects. Value object, one of the powerful concept from DDD, is an object that describes a characteristic of a thing. According Eric Evans, “An object that represents a descriptive aspect of the domain with no conceptual identity is called a value object. Value objects are instantiated to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=turgaykivrak.wordpress.com&amp;blog=3859710&amp;post=101&amp;subd=turgaykivrak&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The value objects are simple but very useful objects. Value object,  one of the powerful concept from DDD, is an object that describes a characteristic of a thing.</p>
<p>According Eric Evans,</p>
<p>“An object that represents a descriptive aspect of the domain with no conceptual identity is called a value object. Value objects are instantiated to represent elements of the design that we care about only for what they are, not who or which they are.” [Evans 2003]</p>
<p>Here a few characteristics of  value object:</p>
<ul>
<li>The key defining characteristic of a value object is that it has no identity. In other words, the intention of a value object is to represent a concept by it’s attributes only.</li>
<li>They should probably be immutable, once created they cannot be changed or altered.</li>
<li>They are not DTOs, not Java beans and not objects with public fields, they encapsulate data with some behavior. DTOs are bunch of data, which are not necessarily coherent, VOs contains high-chorent data with behavior. The purpose of DTOs is data transfer but the purpose of the VOs is domain representation.</li>
<li>They are mostly very simple objects.</li>
<li>They &#8220;swallow computational complexity&#8221;.</li>
<li>More extensible</li>
<li>More testable</li>
<p>Some examples of value objects are money, addresss, phone number, product code, email address, etc.. </p>
<br />Posted in DDD, Design, Software Engineering  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/turgaykivrak.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/turgaykivrak.wordpress.com/101/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/turgaykivrak.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/turgaykivrak.wordpress.com/101/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/turgaykivrak.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/turgaykivrak.wordpress.com/101/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/turgaykivrak.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/turgaykivrak.wordpress.com/101/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/turgaykivrak.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/turgaykivrak.wordpress.com/101/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/turgaykivrak.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/turgaykivrak.wordpress.com/101/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/turgaykivrak.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/turgaykivrak.wordpress.com/101/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=turgaykivrak.wordpress.com&amp;blog=3859710&amp;post=101&amp;subd=turgaykivrak&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://turgaykivrak.wordpress.com/2009/12/27/value-objects/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">turgaykivrak</media:title>
		</media:content>
	</item>
		<item>
		<title>A Concise solution for hashCode() and equals() implementations</title>
		<link>http://turgaykivrak.wordpress.com/2009/06/23/81/</link>
		<comments>http://turgaykivrak.wordpress.com/2009/06/23/81/#comments</comments>
		<pubDate>Tue, 23 Jun 2009 21:13:55 +0000</pubDate>
		<dc:creator>turgaykivrak</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://turgaykivrak.wordpress.com/?p=81</guid>
		<description><![CDATA[Currently, I was working on improving code quality. Some of the violations were due to the code generated by eclipse for hashCode() and equals() methods in the domain model classes. I was thinking on writing a builder classes for these methods, later on I just came across the Apache Commons Lang builder classes. It was [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=turgaykivrak.wordpress.com&amp;blog=3859710&amp;post=81&amp;subd=turgaykivrak&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Currently, I was working on improving code quality. Some of the violations were due to the code generated by eclipse for hashCode() and equals() methods in the domain model classes. I was thinking on writing a builder classes for these methods, later on I just came across the <a href="http://commons.apache.org/lang/">Apache Commons Lang </a>builder classes. It was even better than I imagined:)</p>
<p>Actually, <a href="http://commons.apache.org/lang/api/org/apache/commons/lang/builder/package-summary.html">the Apache Commons org.apache.commons.lang.builder </a>package contains builder classes to help implement methods like <em>equals() , hashCode() , compareTo()</em>, and <em>toString().</em>. They are implemented to follow rules from in <a href="http://java.sun.com/docs/books/effective/index.html">Effective Java</a> , by Joshua Bloch</p>
<p>Considering clarity, readability and maintainability of the code, they are very concise and consistent solution. </p>
<p><strong>The EqualsBuilder</strong><br />
Here is the sample usage of EqualsBuilder from API docs.<br />
<code><br />
public boolean equals(Object obj) {<br />
   if (this == obj) {<br />
         return true;<br />
   }<br />
   if (obj == null) {<br />
        return false;<br />
   }<br />
   if (!(obj instanceof MyClass)) {<br />
        return false;<br />
   }<br />
   MyClass other= (MyClass) obj;<br />
   return new EqualsBuilder()<br />
      .appendSuper(super.equals(obj))<br />
      .append(field1, other.field1)<br />
      .append(field2, other.field2)<br />
      .append(field3, other.field3)<br />
      <strong>.isEquals();</strong><br />
}<br />
</code></p>
<p>It is good to be carefull with <strong> isEquals() </strong>method, it is a common mistake to use equals() of the EqualsBuilder instead of isEquals().</p>
<p><strong>The HashCodeBuilder</strong><br />
Here is the sample usage of HashCodeBuilder:<br />
<code><br />
public int hashCode() {<br />
   return new HashCodeBuilder().<br />
      append(field1).<br />
      append(field2).<br />
      append(field3).<br />
      <strong>toHashCode();</strong><br />
}<br />
</code></p>
<p>It is good to be careful again with <strong>toHashCode() </strong>method, it is a common mistake to use hashCode() of the HashCodeBuilder instead of toHashCode().</p>
<p>Alternatively, you can use the reflection-based static methods:<br />
<code><br />
public boolean equals(Object o) {<br />
   return EqualsBuilder.reflectionEquals(this, o);<br />
}<br />
public int hashCode() {<br />
    return HashCodeBuilder.reflectionHashCode(this);<br />
}<br />
</code><br />
However, I think reflection implementations are not good for a real project: They are potentially much slower and it is very important for domain model, the fields icluded in these methods should be carefully and intentionally selected considering the implication on the model.</p>
<br />Posted in Design, Java  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/turgaykivrak.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/turgaykivrak.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/turgaykivrak.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/turgaykivrak.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/turgaykivrak.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/turgaykivrak.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/turgaykivrak.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/turgaykivrak.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/turgaykivrak.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/turgaykivrak.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/turgaykivrak.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/turgaykivrak.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/turgaykivrak.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/turgaykivrak.wordpress.com/81/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=turgaykivrak.wordpress.com&amp;blog=3859710&amp;post=81&amp;subd=turgaykivrak&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://turgaykivrak.wordpress.com/2009/06/23/81/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">turgaykivrak</media:title>
		</media:content>
	</item>
		<item>
		<title>Optimistic Locking and Versioning in Hibernate</title>
		<link>http://turgaykivrak.wordpress.com/2009/05/16/72/</link>
		<comments>http://turgaykivrak.wordpress.com/2009/05/16/72/#comments</comments>
		<pubDate>Sat, 16 May 2009 21:12:23 +0000</pubDate>
		<dc:creator>turgaykivrak</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Hibernate]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Spring]]></category>

		<guid isPermaLink="false">http://turgaykivrak.wordpress.com/2009/05/16/72/</guid>
		<description><![CDATA[What is optimistic locking? Optimistic locking is a method used to prevent simultaneously access problem on the same entity for change, which does not lock on the database level, in order to maintain the correct data. For example, if two user wants to update same entity in different transactions, when first one saves and then [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=turgaykivrak.wordpress.com&amp;blog=3859710&amp;post=72&amp;subd=turgaykivrak&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>What is optimistic locking?</strong></p>
<p>Optimistic locking  is a method used to prevent simultaneously access problem on the same entity for change, which does not lock on the database level, in order to maintain the correct data. </p>
<p>For example, if two user wants to update same entity in different transactions, when first one saves and then second one saves without getting updates from the first user&#8217;s change, who will be the winner? </p>
<p>Most of the web applications, like ours, has such cases: Two users retrieve and modify a data on the page, then first user saves the data a transcation and then second user modifies and saves the data in an another transacion. Here are 3 alternatives:<br />
1. Last commit wins : Both updates are performed, the second user overwrites without seeing the first user changes and without any error message<br />
2. First commit wins : (Optimistic Locking) The update is performed, but second user gets error message, requiring restart of the processes on the first users changes. </p>
<p>3. Merge conflicting update : The second user are prompted to merge changes.</p>
<p><strong><strong>Automatic Versioning</strong></strong></p>
<p>Hibernate provides automatic versioning for options 2 and 3, using a version field managed by hibernate.</p>
<p><strong>Versioning with integer version</strong><br />
<code><br />
public class MyClass {<br />
  ...<br />
  private int version;<br />
  ...<br />
}<br />
</code></p>
<p><code><br />
&lt;class name="MyClass"&gt;<br />
    &lt;id ...&gt;<br />
    &lt;version name="version" column="VERSION" access="field"&gt;<br />
    ...<br />
&lt;/class&gt;<br />
</code></p>
<p><strong>Versioning with timestamp</strong><br />
<code><br />
public class MyClass {<br />
  ...<br />
  private int lastModifyDataTime;<br />
  ...<br />
}<br />
</code></p>
<p><code><br />
&lt;class name="MyClass"&gt;<br />
    &lt;id ...&gt;<br />
    &lt;timestamp name="lastModifyDataTime" column="LAST_MODIFIY_DATE_TIME"  access="field"&gt;<br />
    ...<br />
&lt;/class&gt;<br />
</code>  </p>
<p>Automatic versioning is handled by hibernate, you don&#8217;t need to update versions/timestamps.<br />
Considering the example mentioned above, when second user saves, hibernate finds this user is working on the stale data and throws <strong>StaleObjectException</strong>.</p>
<p>You can catch this exception, and rethrow your own exception. By the way, if you&#8217;re using Hibernate with Spring, this exeception is wrapped with <strong>HibernateOptimisticLockingFailureException</strong>.</p>
<p><em>One more point, you should be aware of that hibernate ignores the versioning when getting object and updating fields and then version are in the same session</em>.</p>
<br />Posted in Design, Hibernate, Java, Spring  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/turgaykivrak.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/turgaykivrak.wordpress.com/72/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/turgaykivrak.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/turgaykivrak.wordpress.com/72/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/turgaykivrak.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/turgaykivrak.wordpress.com/72/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/turgaykivrak.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/turgaykivrak.wordpress.com/72/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/turgaykivrak.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/turgaykivrak.wordpress.com/72/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/turgaykivrak.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/turgaykivrak.wordpress.com/72/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/turgaykivrak.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/turgaykivrak.wordpress.com/72/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=turgaykivrak.wordpress.com&amp;blog=3859710&amp;post=72&amp;subd=turgaykivrak&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://turgaykivrak.wordpress.com/2009/05/16/72/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">turgaykivrak</media:title>
		</media:content>
	</item>
		<item>
		<title>User access to another schema in Oracle: Alternative to public synonyms</title>
		<link>http://turgaykivrak.wordpress.com/2009/03/26/user-access-to-another-schema-alternative-to-public-synonyms/</link>
		<comments>http://turgaykivrak.wordpress.com/2009/03/26/user-access-to-another-schema-alternative-to-public-synonyms/#comments</comments>
		<pubDate>Wed, 25 Mar 2009 23:29:36 +0000</pubDate>
		<dc:creator>turgaykivrak</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://turgaykivrak.wordpress.com/?p=53</guid>
		<description><![CDATA[Consider that there are 2 users in your database having their own schemas, but second user having less permission is required to work on the first schema. Possible solutions : 1 . To  create public/private synonyms 2. Use schema name in the queries. 3. Modify user session to point the first schema. Create a trigger [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=turgaykivrak.wordpress.com&amp;blog=3859710&amp;post=53&amp;subd=turgaykivrak&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Consider that there are 2 users in your database having their own schemas, but second user having less permission is required to work on the first schema. Possible solutions :</p>
<p>1 . To  create public/private synonyms</p>
<p>2. Use schema name in the queries.</p>
<p>3. Modify user session to point the first schema. Create a trigger on login.</p>
<pre>
CREATE OR REPLACE TRIGGER &amp;app_user..APP_USER_LOGON AFTER LOGON ON &amp;app_user..SCHEMA DECLARE

BEGIN

            EXECUTE IMMEDIATE 'ALTER SESSION SET CURRENT_SCHEMA = '|| UPPER('&amp;owner_user');

   EXCEPTION

     WHEN OTHERS THEN raise_application_error(-20001, 'Error: ' || SQLERRM );

END ;
</pre>
<br />Posted in Database  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/turgaykivrak.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/turgaykivrak.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/turgaykivrak.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/turgaykivrak.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/turgaykivrak.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/turgaykivrak.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/turgaykivrak.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/turgaykivrak.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/turgaykivrak.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/turgaykivrak.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/turgaykivrak.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/turgaykivrak.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/turgaykivrak.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/turgaykivrak.wordpress.com/53/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=turgaykivrak.wordpress.com&amp;blog=3859710&amp;post=53&amp;subd=turgaykivrak&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://turgaykivrak.wordpress.com/2009/03/26/user-access-to-another-schema-alternative-to-public-synonyms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">turgaykivrak</media:title>
		</media:content>
	</item>
		<item>
		<title>Spring Security: Authenticate user on LDAP without manager/admin user</title>
		<link>http://turgaykivrak.wordpress.com/2009/03/26/spring-security-authenticate-user-on-ldap-without-manageradmin-user/</link>
		<comments>http://turgaykivrak.wordpress.com/2009/03/26/spring-security-authenticate-user-on-ldap-without-manageradmin-user/#comments</comments>
		<pubDate>Wed, 25 Mar 2009 23:26:45 +0000</pubDate>
		<dc:creator>turgaykivrak</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Spring]]></category>

		<guid isPermaLink="false">http://turgaykivrak.wordpress.com/?p=57</guid>
		<description><![CDATA[In my previou post on spring security with LDAP, I had used a manager/admin user to authenticate a user. You can use the following code to authenticate the user directly, without manager/admin user: &#60;ldap-server id="ldapServer" url="ldap://ldapserver:port"/&#62; &#60;beans:bean id="bindAuthenticator" class="org.springframework.security.providers.ldap.authenticator.BindAuthenticator"&#62; &#60;beans:constructor-arg ref="ldapServer" /&#62; &#60;beans:property name="userDnPatterns"&#62; &#60;beans:list&#62; &#60;beans:value&#62;CN={0},ou=Users,dc=example,dc=com&#60;/beans:value&#62; &#60;/beans:list&#62; &#60;/beans:property&#62; &#60;/beans:bean&#62; Posted in Java, Spring<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=turgaykivrak.wordpress.com&amp;blog=3859710&amp;post=57&amp;subd=turgaykivrak&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In my previou<a href="http://turgaykivrak.wordpress.com/2009/03/12/spring-security-use-ldap-for-authentication-and-database-for-authorities/"> post</a> on spring security with LDAP, I had used a manager/admin user to authenticate a user.</p>
<p>You can use the following code to authenticate the user directly, without manager/admin user:</p>
<pre>
&lt;ldap-server id="ldapServer" url="ldap://ldapserver:port"/&gt;

  &lt;beans:bean id="bindAuthenticator" class="org.springframework.security.providers.ldap.authenticator.BindAuthenticator"&gt;
    &lt;beans:constructor-arg ref="ldapServer" /&gt;
    &lt;beans:property name="userDnPatterns"&gt;
      &lt;beans:list&gt;
        &lt;beans:value&gt;CN={0},ou=Users,dc=example,dc=com&lt;/beans:value&gt;
      &lt;/beans:list&gt;
    &lt;/beans:property&gt;
  &lt;/beans:bean&gt;
</pre>
<br />Posted in Java, Spring  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/turgaykivrak.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/turgaykivrak.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/turgaykivrak.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/turgaykivrak.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/turgaykivrak.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/turgaykivrak.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/turgaykivrak.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/turgaykivrak.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/turgaykivrak.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/turgaykivrak.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/turgaykivrak.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/turgaykivrak.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/turgaykivrak.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/turgaykivrak.wordpress.com/57/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=turgaykivrak.wordpress.com&amp;blog=3859710&amp;post=57&amp;subd=turgaykivrak&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://turgaykivrak.wordpress.com/2009/03/26/spring-security-authenticate-user-on-ldap-without-manageradmin-user/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">turgaykivrak</media:title>
		</media:content>
	</item>
		<item>
		<title>Spring Security : Use Ldap for authentication, and database for authorities</title>
		<link>http://turgaykivrak.wordpress.com/2009/03/12/spring-security-use-ldap-for-authentication-and-database-for-authorities/</link>
		<comments>http://turgaykivrak.wordpress.com/2009/03/12/spring-security-use-ldap-for-authentication-and-database-for-authorities/#comments</comments>
		<pubDate>Thu, 12 Mar 2009 22:15:35 +0000</pubDate>
		<dc:creator>turgaykivrak</dc:creator>
				<category><![CDATA[1]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Spring]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://turgaykivrak.wordpress.com/?p=45</guid>
		<description><![CDATA[If you need to use Ldap for authentication and database /repository for authorization with spring security, here is a sample: LDAP authenticator configuration &#60;ldap-server id="appLdapServer" url="ldap://ldapserver:port/dc=example,dc=com" manager-dn="uid=admin,ou=system" manager-password="your-pwd" /&#62; &#60;beans:bean id="companyLdapAuthProvider" class="org.springframework.security.providers.ldap.LdapAuthenticationProvider"&#62; &#60;custom-authentication-provider /&#62; &#60;beans:constructor-arg&#62; &#60;beans:bean class="org.springframework.security.providers.ldap.authenticator.BindAuthenticator"&#62; &#60;beans:constructor-arg ref="appLdapServer"/&#62; &#60;beans:property name="userDnPatterns"&#62; &#60;beans:list&#62;&#60;beans:value&#62;uid={0},ou=Users&#60;/beans:value&#62;&#60;/beans:list&#62; &#60;/beans:property&#62; &#60;/beans:bean&#62; &#60;/beans:constructor-arg&#62; &#60;beans:constructor-arg&#62; &#60;beans:bean class="com.mycompany.web.security.MyAuthoritiesPopulator"&#62; &#60;beans:constructor-arg ref="myUserServiceBean"/&#62; &#60;/beans:bean&#62; &#60;/beans:constructor-arg&#62; &#60;/beans:bean&#62; Authorities populator: [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=turgaykivrak.wordpress.com&amp;blog=3859710&amp;post=45&amp;subd=turgaykivrak&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you need to use Ldap for authentication and database /repository for authorization with spring security, here is a sample:</p>
<p>LDAP authenticator configuration</p>
<pre>&lt;ldap-server id="appLdapServer" url="ldap://ldapserver:port/dc=example,dc=com" manager-dn="uid=admin,ou=system" manager-password="your-pwd" /&gt;

&lt;beans:bean id="companyLdapAuthProvider" class="org.springframework.security.providers.ldap.LdapAuthenticationProvider"&gt;
  &lt;custom-authentication-provider /&gt;
  &lt;beans:constructor-arg&gt;
    &lt;beans:bean class="org.springframework.security.providers.ldap.authenticator.BindAuthenticator"&gt;
      &lt;beans:constructor-arg ref="appLdapServer"/&gt;
      &lt;beans:property name="userDnPatterns"&gt;
        &lt;beans:list&gt;&lt;beans:value&gt;uid={0},ou=Users&lt;/beans:value&gt;&lt;/beans:list&gt;
      &lt;/beans:property&gt;
    &lt;/beans:bean&gt;
  &lt;/beans:constructor-arg&gt;
  &lt;beans:constructor-arg&gt;
    &lt;beans:bean class="com.mycompany.web.security.MyAuthoritiesPopulator"&gt;
      &lt;beans:constructor-arg ref="myUserServiceBean"/&gt;
    &lt;/beans:bean&gt;
  &lt;/beans:constructor-arg&gt;
&lt;/beans:bean&gt;</pre>
<p>Authorities populator:</p>
<pre>public class MyAuthoritiesPopulator implements LdapAuthoritiesPopulator {

	private MyUserService userService;

    public MyAuthoritiesPopulator(MyUserService userService){
       this.userService = userService;
    }

	@Override
	public GrantedAuthority[] getGrantedAuthorities(DirContextOperations userData, String username) {
		Set userPerms = new HashSet();

        //get users permissions from service
		Set permissions = userService.getPermissions(username);

		for (MyPermission perm : permissions) {
				userPerms.add(new GrantedAuthorityImpl(perm.getName()));
		}
		return userPerms.toArray(new GrantedAuthority[userPerms.size()] );
	}
}</pre>
<br />Posted in 1, Java, Spring  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/turgaykivrak.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/turgaykivrak.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/turgaykivrak.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/turgaykivrak.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/turgaykivrak.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/turgaykivrak.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/turgaykivrak.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/turgaykivrak.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/turgaykivrak.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/turgaykivrak.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/turgaykivrak.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/turgaykivrak.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/turgaykivrak.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/turgaykivrak.wordpress.com/45/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=turgaykivrak.wordpress.com&amp;blog=3859710&amp;post=45&amp;subd=turgaykivrak&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://turgaykivrak.wordpress.com/2009/03/12/spring-security-use-ldap-for-authentication-and-database-for-authorities/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">turgaykivrak</media:title>
		</media:content>
	</item>
	</channel>
</rss>
