<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Eddie Awad’s Blog - Latest Comments in The Case of Better Readable Code</title><link>http://awads.disqus.com/</link><description>News, views, tips and tricks on Oracle and other fun stuff</description><atom:link href="https://awads.disqus.com/the_case_of_better_readable_code/latest.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Sun, 01 Apr 2007 20:29:26 -0000</lastBuildDate><item><title>Re: The Case of Better Readable Code</title><link>http://awads.net/wp/2007/03/11/the-case-of-better-readable-code/#comment-3659052</link><description>&lt;p&gt;The point I'm getting here is that you can never expect everyone to like the same coding format that you like and vice versa. This makes the need to &lt;em&gt;enforce&lt;/em&gt; code styling and formatting standards (among team members) even stronger.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Eddie Awad</dc:creator><pubDate>Sun, 01 Apr 2007 20:29:26 -0000</pubDate></item><item><title>Re: The Case of Better Readable Code</title><link>http://awads.net/wp/2007/03/11/the-case-of-better-readable-code/#comment-3659051</link><description>&lt;p&gt;I'm with David on this.&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;With SQL, if it is not in quotes, I write it lower case.  The exceptions are when I pass the code through a formatter.&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;If I happen to be writing PL/SQL that is to be of any consequence, I may name my variable with init cap on each word, with the initial character in lower case.&lt;br&gt;eg.  thisIsMyVariableName&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;If it is some really serious PL/SQL (more than a 100 lines or so  ) the variables will probably be prefixed with character to indicate the data type.&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;eg. dThisIsADateVariable&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">jared</dc:creator><pubDate>Mon, 26 Mar 2007 19:35:06 -0000</pubDate></item><item><title>Re: The Case of Better Readable Code</title><link>http://awads.net/wp/2007/03/11/the-case-of-better-readable-code/#comment-3659050</link><description>&lt;p&gt;I'm with Eddie: "Select * From" is to my particular brain cluttered, twee and unreadable. I would sooner see all-lowercase, or else (as I do) routinely go through PL/SQL Developer's .kwf files adding words like COLLECT and NTILE so they show up properly.&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;Although I do use code formatters, my problem with them is that the default settings do criminally insane things like right-aligning SQL keywords, and they can't seem to do fairly obvious things like starting a new line for a subquery.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">William Robertson</dc:creator><pubDate>Thu, 15 Mar 2007 20:18:25 -0000</pubDate></item><item><title>Re: The Case of Better Readable Code</title><link>http://awads.net/wp/2007/03/11/the-case-of-better-readable-code/#comment-3659049</link><description>&lt;p&gt;Personally, and this is very much IMHO, I don't get the reserved word thing. The list changes with each release and with each product (SQL, SQL*Plus, PL/SQL) and if one is supposed to recognise them well enough to capitalise them then the capitalisation ought to be regarded as redundant.&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;IMHO&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David Aldridge</dc:creator><pubDate>Wed, 14 Mar 2007 14:05:59 -0000</pubDate></item><item><title>Re: The Case of Better Readable Code</title><link>http://awads.net/wp/2007/03/11/the-case-of-better-readable-code/#comment-3659048</link><description>&lt;blockquote&gt;&lt;br&gt;&lt;p&gt;because the human brain is better as interpreting when you give more visual clues to the words&lt;/p&gt;&lt;br&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;Exactly. Another example:&lt;/p&gt;&lt;p&gt;&lt;br&gt;&amp;lt;ol&amp;gt;&lt;br&gt;&amp;lt;li&amp;gt;select employee_id from employees&amp;lt;/li&amp;gt;&lt;br&gt;&amp;lt;li&amp;gt;Select Employee_Id From Employees&amp;lt;/li&amp;gt;&lt;br&gt;&amp;lt;li&amp;gt;SELECT employee_id FROM employees&amp;lt;/li&amp;gt;&lt;br&gt;&amp;lt;/ol&amp;gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;I believe that number 3 is the easiest to read. There is a visual clue that SELECT and FROM are  reserved words.&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;br&gt;&lt;p&gt;both tools are from Quest&lt;/p&gt;&lt;br&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;Right. I'm not surprised either that they use the same formatter.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Eddie Awad</dc:creator><pubDate>Wed, 14 Mar 2007 13:49:31 -0000</pubDate></item><item><title>Re: The Case of Better Readable Code</title><link>http://awads.net/wp/2007/03/11/the-case-of-better-readable-code/#comment-3659047</link><description>&lt;p&gt;That's a good argument for automated code formatting, Dave.  I can reformat your code to look the way that I find most readable.  Eddie - I use the code formatter that comes with TOAD - looks like it is the same one you use with SQL Navigator - interesting, but not surprising - both tools are from Quest.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">John Flack</dc:creator><pubDate>Wed, 14 Mar 2007 12:45:57 -0000</pubDate></item><item><title>Re: The Case of Better Readable Code</title><link>http://awads.net/wp/2007/03/11/the-case-of-better-readable-code/#comment-3659046</link><description>&lt;p&gt;I'm a fan of init caps - there's a reason why directions signs on freeways/motorways don't use all lower case or (worse still) upper case letters, and it's because the human brain is better as interpreting when you give more visual clues to the words.&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;eg. from easiest to read to hardest ...&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;Exec DBMS_Stats.Gather_System_Stats&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;exec dbms_stats.gather_system_stats&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;EXEC DBMS_STATS.GATHER_SYSTEM_STATS&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;Mind you, it drives other people crazy, but that's just another advantage for me :)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David Aldridge</dc:creator><pubDate>Wed, 14 Mar 2007 11:07:47 -0000</pubDate></item></channel></rss>