<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Object Mentor Blog: Tag coding</title>
    <link>http://blog.objectmentor.com/articles/tag/coding</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description></description>
    <item>
      <title>On Being Stupid</title>
      <description>&lt;blockquote&gt;
This was posted originally to a mailing list, but is reproduced here essentially unchanged by request of a friend. 
&lt;/blockquote&gt;

	&lt;p&gt;I frequently see code (written by others) that is completely
double-spaced, heavily commented, loaded with many abbreviated or meaningless variable names, and hundreds of lines long.
In order to read the function and understand what it&amp;#8217;s doing, poor Tim
must wear out a mouse, skip comments, and track the variables on
paper.  A &amp;#8220;smarter&amp;#8221; programmer could just load it into his head, I
suppose, but not the simpleton who writes this email.&lt;/p&gt;


	&lt;p&gt;I&amp;#8217;m not smart enough to just read it from top to bottom and
understand it. Sadly, when I read through and understand what in the
heck the thxIniFvt variable is doing, I will forget it by the time I
figure out the purpose(es) of pszVbt.  I can spend all day, or even a
few days to figure out a method, and that&amp;#8217;s an admission of
feeble-mindedness to be sure.  I guess I&amp;#8217;m not up to the level of some
of the rapid hackers. That&amp;#8217;s a limitation I face most days.&lt;/p&gt;


	&lt;p&gt;I find that I can sometimes understand a method like that only  if I just delete all the blank lines and comments first, then reformat to break lines, then inline all methods with seven or more parameters, and then start renaming variables, extracting explanatory variables, and
extracting explanatory methods. I may have to break the method into
classes even.   I guess I&amp;#8217;m not one of the smart kids.&lt;/p&gt;


	&lt;p&gt;I used to be one of the smart kids.  I once built a module so complex and fragile that nobody but me could figure out what to do with it.  It was all tables and indicators, and stunningly clever.  I am so ashamed that I wrote it. It was such a mistake that they eventually disabled it rather than field it in such a state. That was years ago, but so memorable to me. Other programmers said it was like the inside of a swiss watch, all
delicate and perfectly balanced, and scary to mess with unless you first knew exactly what each part was doing, and why.&lt;/p&gt;


	&lt;p&gt;I would like to be faster than I am both mentally and in the sense
of quickly producing code. I&amp;#8217;d like to be a little less intimidated at
the start of a project. .But I would not want those things if it meant
building crap that people who are not appreciably more talented than
myself would trip over every day.  Instead, I sometimes wish I could
teach the really fast, smart kids how to dumb down the code for the
rest of us morons to read.&lt;/p&gt;


	&lt;p&gt;The funny thing is that dumbing code to my level doesn&amp;#8217;t make it
harder for the smart kids to use it, and sometimes allows a compiler
to do a better job with it.  I guess stupid isn&amp;#8217;t so stupid after all.&lt;/p&gt;</description>
      <pubDate>Mon, 10 Sep 2007 10:16:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:0b06c5f0-9426-40f9-add4-95c9b20a56ac</guid>
      <author>Tim Ottinger</author>
      <link>http://blog.objectmentor.com/articles/2007/09/10/on-being-stupid</link>
      <category>Tim's Tepid Torrent</category>
      <category>naming</category>
      <category>dumb</category>
      <category>moron</category>
      <category>clever</category>
      <category>refactoring</category>
      <category>comments</category>
      <category>coding</category>
      <category>Fast</category>
      <category>whitespace</category>
      <category>dumbing</category>
      <category>down</category>
      <category>code</category>
    </item>
  </channel>
</rss>
