﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Ayende @ Rahien</title><link>http://ayende.com</link><description>Ayende @ Rahien</description><copyright>Copyright (C) Ayende Rahien  2004 - 2021 (c) 2026</copyright><ttl>60</ttl><item><title>Rian Schmits commented on Tales from a code review gone wrong</title><description>I have been struggling with implementing Equals/GetHashCode, especially when lazy-loaded properties are part of an object's identity. Because then every time Equals or GetHashCode gets called those properties get lazy-loaded. I have posted a question about this on stackoverflow, but haven't yet received an answer that satisfies me 100%.
  
[http://stackoverflow.com/q/5002670/104750](http://stackoverflow.com/q/5002670/104750)</description><link>http://ayende.com/4772/tales-from-a-code-review-gone-wrong#comment9</link><guid>http://ayende.com/4772/tales-from-a-code-review-gone-wrong#comment9</guid><pubDate>Sat, 26 Feb 2011 15:42:45 GMT</pubDate></item><item><title>Rob Levine commented on Tales from a code review gone wrong</title><description>Provided .Equals is implemented by calling down to the base, then this is fine :-D
</description><link>http://ayende.com/4772/tales-from-a-code-review-gone-wrong#comment8</link><guid>http://ayende.com/4772/tales-from-a-code-review-gone-wrong#comment8</guid><pubDate>Fri, 25 Feb 2011 10:01:31 GMT</pubDate></item><item><title>Alex Simkin commented on Tales from a code review gone wrong</title><description>@Juan Lopes
  
  
You are right,  S#arp Architecture's BaseObject class implements general purpose GetHashCode.
  
  
[sharp-architecture.googlecode.com/.../BaseObjec...](http://sharp-architecture.googlecode.com/svn/trunk/src/SharpArch/SharpArch.Core/DomainModel/BaseObject.cs)</description><link>http://ayende.com/4772/tales-from-a-code-review-gone-wrong#comment7</link><guid>http://ayende.com/4772/tales-from-a-code-review-gone-wrong#comment7</guid><pubDate>Thu, 24 Feb 2011 22:09:39 GMT</pubDate></item><item><title>amiralles commented on Tales from a code review gone wrong</title><description>A really good one ;-)
</description><link>http://ayende.com/4772/tales-from-a-code-review-gone-wrong#comment6</link><guid>http://ayende.com/4772/tales-from-a-code-review-gone-wrong#comment6</guid><pubDate>Thu, 24 Feb 2011 22:01:24 GMT</pubDate></item><item><title>Piet commented on Tales from a code review gone wrong</title><description>So is the documentation wrong or the implementer?
</description><link>http://ayende.com/4772/tales-from-a-code-review-gone-wrong#comment5</link><guid>http://ayende.com/4772/tales-from-a-code-review-gone-wrong#comment5</guid><pubDate>Thu, 24 Feb 2011 18:09:38 GMT</pubDate></item><item><title>Juan Lopes commented on Tales from a code review gone wrong</title><description>Even if the base class (e.g. BaseEntity) has a valid logic for calculating GetHashCode based on all identifier properties, NHibernate will complain if the inherited class doesn't implement it. If you're using composite ids, you're oblitaded to do so.
  
  
That being said, this code may not be so wrong.
</description><link>http://ayende.com/4772/tales-from-a-code-review-gone-wrong#comment4</link><guid>http://ayende.com/4772/tales-from-a-code-review-gone-wrong#comment4</guid><pubDate>Thu, 24 Feb 2011 16:49:38 GMT</pubDate></item><item><title>Patrick Smacchia commented on Tales from a code review gone wrong</title><description>R# would have catch it automatically, and would have shown this code grayed in the VS code editor wnd
</description><link>http://ayende.com/4772/tales-from-a-code-review-gone-wrong#comment3</link><guid>http://ayende.com/4772/tales-from-a-code-review-gone-wrong#comment3</guid><pubDate>Thu, 24 Feb 2011 15:08:32 GMT</pubDate></item><item><title>jdn commented on Tales from a code review gone wrong</title><description>Yeah, it's missing the number 397 in it.
</description><link>http://ayende.com/4772/tales-from-a-code-review-gone-wrong#comment2</link><guid>http://ayende.com/4772/tales-from-a-code-review-gone-wrong#comment2</guid><pubDate>Thu, 24 Feb 2011 14:26:17 GMT</pubDate></item><item><title>Dave Mertens commented on Tales from a code review gone wrong</title><description>This one is a classic. It's also a showcase why code c.q. peer reviews are so important. You catch 'errors' you won't catch with a unit test..
</description><link>http://ayende.com/4772/tales-from-a-code-review-gone-wrong#comment1</link><guid>http://ayende.com/4772/tales-from-a-code-review-gone-wrong#comment1</guid><pubDate>Thu, 24 Feb 2011 10:19:34 GMT</pubDate></item></channel></rss>