<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2993277325529061015</id><updated>2012-01-29T20:37:49.782-05:00</updated><category term='Project Management'/><category term='Requirements Analysis'/><category term='Specifications'/><category term='Software Development'/><title type='text'>Procedural Ninjutsu (and other ramblings)</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://codeninjas.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2993277325529061015/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://codeninjas.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Killer Code Ninja</name><uri>http://www.blogger.com/profile/17583126575310243083</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>2</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2993277325529061015.post-5488515069505954850</id><published>2010-05-27T23:59:00.003-04:00</published><updated>2010-05-28T00:13:22.426-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Specifications'/><category scheme='http://www.blogger.com/atom/ns#' term='Software Development'/><category scheme='http://www.blogger.com/atom/ns#' term='Project Management'/><category scheme='http://www.blogger.com/atom/ns#' term='Requirements Analysis'/><title type='text'>Collaborative Debates</title><content type='html'>Today at work, our boss decided to have the developers play out a mock debate in order to bring about a requirements discussion.  I suppose it was intended to be a fun, quirky, roundabout way to get the whole team involved in requirements analysis, since it's been a common pain point for our current project.  I would contend that the pain point is in having requirements delivered to us rather than properly discussed in our team, but that is beside the point.&lt;br /&gt;&lt;br /&gt;We divided into teams and each took a side in a debate regarding whether to use an open source framework's ACL system or one we had recently developed in-house.  The in-house system was developed because our framework's version didn't fully meet what we believed to be the requirements imposed on us.  In the end, each side was challenged to present a case for their side, irrespective of their opinion on the matter.  Some fuss was had, but the exercise commenced, and our cases presented.&lt;br /&gt;&lt;br /&gt;In the end, the event devolved into a back-and-forth session with our CEO (small company) regarding the company's actual needs concerning what was before considered a minute detail of a far more massive project.&lt;br /&gt;&lt;br /&gt;My takeaway was that while a lot of time was wasted, I think it illuminated the fact that it's quite easy to make assumptions about seemingly trivial details that are completely wrong, and by now we've wasted quite a bit of time learning that lesson.&lt;br /&gt;&lt;br /&gt;Unfortunately, we're slated to do the same with our DAL/ORM layer, arguing two solutions which are nearly identical save some syntactical sugar.  I fail to see what good can come of that, but I can hope, for now.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2993277325529061015-5488515069505954850?l=codeninjas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeninjas.blogspot.com/feeds/5488515069505954850/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2993277325529061015&amp;postID=5488515069505954850' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2993277325529061015/posts/default/5488515069505954850'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2993277325529061015/posts/default/5488515069505954850'/><link rel='alternate' type='text/html' href='http://codeninjas.blogspot.com/2010/05/collaborative-debates.html' title='Collaborative Debates'/><author><name>Killer Code Ninja</name><uri>http://www.blogger.com/profile/17583126575310243083</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2993277325529061015.post-8174182478738742875</id><published>2007-06-18T17:40:00.000-04:00</published><updated>2007-06-18T17:55:04.468-04:00</updated><title type='text'>Comments</title><content type='html'>When you comment your code, what, exactly, are you documenting?  It's a question that I think a lot of developers should ask themselves.  What kind of information would be valuable for CluelessNewbie_01 as he peruses your code?&lt;br /&gt;&lt;br /&gt;My approach, though I don't always adhere to this, has lately been to explain &lt;span style="font-style: italic;"&gt;why&lt;/span&gt; the code is doing something, rather than &lt;span style="font-style: italic;"&gt;what&lt;/span&gt;.  I feel that if I feel the need to explain &lt;span style="font-style: italic;"&gt;what&lt;/span&gt;, then I should probably start renaming symbols and refactor in order to make the code easier to understand.&lt;br /&gt;&lt;br /&gt;Take for example the following PHP code:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;protected function formatHumanReadableXML(DOMElement $delRoot = null){&lt;br /&gt;  if (!isset($delRoot)){&lt;br /&gt;      $delRoot = $this-&gt;ddcOwner-&gt;documentElement;&lt;br /&gt;      // Remove the whitespace&lt;br /&gt;      $this-&gt;removeWhitespace();&lt;br /&gt;  }&lt;br /&gt;  // Copy the children into an array&lt;br /&gt;  $arChildren = array();&lt;br /&gt;  foreach($delRoot-&gt;childNodes as $dndChild)&lt;br /&gt;      $arChildren[] = $dndChild;&lt;br /&gt;  .&lt;br /&gt;  .&lt;br /&gt;  .&lt;br /&gt;  .&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now, were those comments very helpful?  No?  You could tell what was going on by just reading the code, couldn't you?  I've changed the code to be more helpful in the comments:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;protected function formatHumanReadableXML(DOMElement $delRoot = null){&lt;br /&gt;  if (!isset($delRoot)){&lt;br /&gt;      $delRoot = $this-&gt;ddcOwner-&gt;documentElement;&lt;br /&gt;      /* Remove the whitespace, because this brings the document&lt;br /&gt;             to a common starting point, containing no whitespace, so&lt;br /&gt;              we can add tabs and breaks at our leisure*/&lt;br /&gt;      $this-&gt;removeWhitespace();&lt;br /&gt;  }&lt;br /&gt;  /* Copy the children into an array before looping over them, since&lt;br /&gt;   we may be appending children to this element (thereby changing&lt;br /&gt;  the childNodes list) */&lt;br /&gt;  $arChildren = array();&lt;br /&gt;  foreach($delRoot-&gt;childNodes as $dndChild)&lt;br /&gt;      $arChildren[] = $dndChild;&lt;br /&gt;  .&lt;br /&gt;  .&lt;br /&gt;  .&lt;br /&gt;  .&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Now can you see what the point of that code is?  A world of difference, I think.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2993277325529061015-8174182478738742875?l=codeninjas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeninjas.blogspot.com/feeds/8174182478738742875/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2993277325529061015&amp;postID=8174182478738742875' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2993277325529061015/posts/default/8174182478738742875'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2993277325529061015/posts/default/8174182478738742875'/><link rel='alternate' type='text/html' href='http://codeninjas.blogspot.com/2007/06/comments.html' title='Comments'/><author><name>Killer Code Ninja</name><uri>http://www.blogger.com/profile/17583126575310243083</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry></feed>
