<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: SQL is the assembly language of the modern world</title>
	<atom:link href="http://lostechies.com/chadmyers/2008/02/22/sql-is-the-assembly-language-of-the-modern-world/feed/" rel="self" type="application/rss+xml" />
	<link>http://lostechies.com/chadmyers/2008/02/22/sql-is-the-assembly-language-of-the-modern-world/</link>
	<description>Software development, testing, and techie life</description>
	<lastBuildDate>Thu, 08 Mar 2012 22:19:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
	<item>
		<title>By: Yurii Rashkovskii</title>
		<link>http://lostechies.com/chadmyers/2008/02/22/sql-is-the-assembly-language-of-the-modern-world/#comment-145</link>
		<dc:creator>Yurii Rashkovskii</dc:creator>
		<pubDate>Mon, 03 Mar 2008 06:11:42 +0000</pubDate>
		<guid isPermaLink="false">/blogs/chad_myers/archive/2008/02/21/sql-is-the-assembly-language-of-the-modern-world.aspx#comment-145</guid>
		<description>I believe that in future there is a high chance that database itself will finally become a programming language as well. It isn&#039;t something new actually. GemStone is a database and programming language.

Though I think that there is still room for such experiments and some projects could eventually become widely used (hopefully mine ;) — StrokeDB and Xi [which is on hold now])</description>
		<content:encoded><![CDATA[<p>I believe that in future there is a high chance that database itself will finally become a programming language as well. It isn&#8217;t something new actually. GemStone is a database and programming language.</p>
<p>Though I think that there is still room for such experiments and some projects could eventually become widely used (hopefully mine ;) — StrokeDB and Xi [which is on hold now])</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John &#34;Z-Bo&#34; Zabroski</title>
		<link>http://lostechies.com/chadmyers/2008/02/22/sql-is-the-assembly-language-of-the-modern-world/#comment-144</link>
		<dc:creator>John &#34;Z-Bo&#34; Zabroski</dc:creator>
		<pubDate>Thu, 28 Feb 2008 17:14:10 +0000</pubDate>
		<guid isPermaLink="false">/blogs/chad_myers/archive/2008/02/21/sql-is-the-assembly-language-of-the-modern-world.aspx#comment-144</guid>
		<description>@Chad
It is appropriate.

I just thought it nice to use a clear phrase that every engineer, not just those in the agile/unit test crowd, can understand.  Most people, even most programmers, don&#039;t know that definition of legacy code.  Everyone understands: &quot;Tell me what you do. Show me where it says that. Prove that that is what happened.&quot;

Also, unit tests are just one way to accomplish this.</description>
		<content:encoded><![CDATA[<p>@Chad<br />
It is appropriate.</p>
<p>I just thought it nice to use a clear phrase that every engineer, not just those in the agile/unit test crowd, can understand.  Most people, even most programmers, don&#8217;t know that definition of legacy code.  Everyone understands: &#8220;Tell me what you do. Show me where it says that. Prove that that is what happened.&#8221;</p>
<p>Also, unit tests are just one way to accomplish this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chad Myers</title>
		<link>http://lostechies.com/chadmyers/2008/02/22/sql-is-the-assembly-language-of-the-modern-world/#comment-143</link>
		<dc:creator>Chad Myers</dc:creator>
		<pubDate>Thu, 28 Feb 2008 12:34:00 +0000</pubDate>
		<guid isPermaLink="false">/blogs/chad_myers/archive/2008/02/21/sql-is-the-assembly-language-of-the-modern-world.aspx#comment-143</guid>
		<description>@John:  &quot;Prove that that is what happened&quot;

And is that not an entirely appropriate stance for an engineer to take w/r/t to his own designs and creations?  Is this not the basis for science?

IMHO, if you can&#039;t prove your code works repeatedly without variance, then it doesn&#039;t work or is &#039;legacy code&#039; (i.e. an unknown variable).

Since testing database code is darned near impossible, or at least extremely annoying, difficult, time consuming, and expensive, it is extremely risky to put anything other than data and schema in the DB.</description>
		<content:encoded><![CDATA[<p>@John:  &#8220;Prove that that is what happened&#8221;</p>
<p>And is that not an entirely appropriate stance for an engineer to take w/r/t to his own designs and creations?  Is this not the basis for science?</p>
<p>IMHO, if you can&#8217;t prove your code works repeatedly without variance, then it doesn&#8217;t work or is &#8216;legacy code&#8217; (i.e. an unknown variable).</p>
<p>Since testing database code is darned near impossible, or at least extremely annoying, difficult, time consuming, and expensive, it is extremely risky to put anything other than data and schema in the DB.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John &#34;Z-Bo&#34; Zabroski</title>
		<link>http://lostechies.com/chadmyers/2008/02/22/sql-is-the-assembly-language-of-the-modern-world/#comment-142</link>
		<dc:creator>John &#34;Z-Bo&#34; Zabroski</dc:creator>
		<pubDate>Thu, 28 Feb 2008 07:43:52 +0000</pubDate>
		<guid isPermaLink="false">/blogs/chad_myers/archive/2008/02/21/sql-is-the-assembly-language-of-the-modern-world.aspx#comment-142</guid>
		<description>@bogardj
@ - How do you unit test your transactions/packages/types - How do you refactor your transactions/packages/types If either of these are manual or not done, you have a legacy code system.

That is just one person&#039;s definition (Michael Feathers).  That is a lot like people who read Eric Evans&#039;s Domain-Driven Design book and think his vocabulary for DDD is the only vocabulary that works.  In a sense, his vocabulary is just a meta-model framework.

In a nutshell, your basic idea is CYA: &quot;Tell me what you do. Show me where it says that. Prove that that is what happened.&quot;</description>
		<content:encoded><![CDATA[<p>@bogardj<br />
@ &#8211; How do you unit test your transactions/packages/types &#8211; How do you refactor your transactions/packages/types If either of these are manual or not done, you have a legacy code system.</p>
<p>That is just one person&#8217;s definition (Michael Feathers).  That is a lot like people who read Eric Evans&#8217;s Domain-Driven Design book and think his vocabulary for DDD is the only vocabulary that works.  In a sense, his vocabulary is just a meta-model framework.</p>
<p>In a nutshell, your basic idea is CYA: &#8220;Tell me what you do. Show me where it says that. Prove that that is what happened.&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John &#34;Z-Bo&#34; Zabroski</title>
		<link>http://lostechies.com/chadmyers/2008/02/22/sql-is-the-assembly-language-of-the-modern-world/#comment-141</link>
		<dc:creator>John &#34;Z-Bo&#34; Zabroski</dc:creator>
		<pubDate>Thu, 28 Feb 2008 06:57:44 +0000</pubDate>
		<guid isPermaLink="false">/blogs/chad_myers/archive/2008/02/21/sql-is-the-assembly-language-of-the-modern-world.aspx#comment-141</guid>
		<description>@tom
@I learned (the hard way) that stored procs are a maintenance problem (nightmare?), so I use them sparingly, but I still believe that they the right thing for core-logic.

What do you consider &quot;core logic&quot;?  In other words, what do you use stored procedures sparingly for?

I&#039;m a little lost.  Did bogardj just get you to convert your faith and regret your &quot;stored procedures sparingly, for core logic only&quot; position?</description>
		<content:encoded><![CDATA[<p>@tom<br />
@I learned (the hard way) that stored procs are a maintenance problem (nightmare?), so I use them sparingly, but I still believe that they the right thing for core-logic.</p>
<p>What do you consider &#8220;core logic&#8221;?  In other words, what do you use stored procedures sparingly for?</p>
<p>I&#8217;m a little lost.  Did bogardj just get you to convert your faith and regret your &#8220;stored procedures sparingly, for core logic only&#8221; position?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jimmy Bogard</title>
		<link>http://lostechies.com/chadmyers/2008/02/22/sql-is-the-assembly-language-of-the-modern-world/#comment-140</link>
		<dc:creator>Jimmy Bogard</dc:creator>
		<pubDate>Sat, 23 Feb 2008 14:47:37 +0000</pubDate>
		<guid isPermaLink="false">/blogs/chad_myers/archive/2008/02/21/sql-is-the-assembly-language-of-the-modern-world.aspx#comment-140</guid>
		<description>@Thijs

To be fair, it&#039;s not my definition of legacy code, it&#039;s MIchael Feathers&#039;.

For some size perspective:  I&#039;m on a pretty small project right now, ~3 weeks long.  It has 2000 LoC, roughly half in tests and half in the application.

Although it has several types that are persisted in the database, there are 0 (zero) lines of database access code.  In fact, no project in this application references System.Data, the .NET data access assembly.

So even though my application relies on the database heavily for persistence, it doesn&#039;t have a single line of SQL!  All of our &quot;data access code&quot; is in NHibernate mapping files.  The database is just a means of persistence for us, the heart of the application lies in the domain.

Our client assumes that the data is persisted in the database, but beyond that, they could care less.  They care about the behavior of the system, not about the tables data is stored in.</description>
		<content:encoded><![CDATA[<p>@Thijs</p>
<p>To be fair, it&#8217;s not my definition of legacy code, it&#8217;s MIchael Feathers&#8217;.</p>
<p>For some size perspective:  I&#8217;m on a pretty small project right now, ~3 weeks long.  It has 2000 LoC, roughly half in tests and half in the application.</p>
<p>Although it has several types that are persisted in the database, there are 0 (zero) lines of database access code.  In fact, no project in this application references System.Data, the .NET data access assembly.</p>
<p>So even though my application relies on the database heavily for persistence, it doesn&#8217;t have a single line of SQL!  All of our &#8220;data access code&#8221; is in NHibernate mapping files.  The database is just a means of persistence for us, the heart of the application lies in the domain.</p>
<p>Our client assumes that the data is persisted in the database, but beyond that, they could care less.  They care about the behavior of the system, not about the tables data is stored in.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thijs Blaauw</title>
		<link>http://lostechies.com/chadmyers/2008/02/22/sql-is-the-assembly-language-of-the-modern-world/#comment-139</link>
		<dc:creator>Thijs Blaauw</dc:creator>
		<pubDate>Sat, 23 Feb 2008 13:17:50 +0000</pubDate>
		<guid isPermaLink="false">/blogs/chad_myers/archive/2008/02/21/sql-is-the-assembly-language-of-the-modern-world.aspx#comment-139</guid>
		<description>@bogardj

Actually, the tool I use for programming PL/SQL, PL/SQL Developer by Allround Automations,  has some assistance for simple automatic refactorings.
No, we don&#039;t do enough unit testing, so in your definition we have a legacy system. 

Maybe I work on simpler systems than you, but most of programs I make either store data in the database, or retrieve data from the database. So if I create unit tests that don&#039;t touch the database, I test only 20% of the program.

@Lars Pohlmann

We have a developer here who comes from a Sybase background. Sybase uses the same T-SQL language as SQL Server. We had a bit of a hard time stopping him writing 5000 line procedures that did lots of different things based on flag parameters. Programming that way was of course a way to avoid the namespace problem. This might also explain that developers who develop against SQL Server or Sybase, are more violently opposed to using stored procedures than developers who use Oracle.
</description>
		<content:encoded><![CDATA[<p>@bogardj</p>
<p>Actually, the tool I use for programming PL/SQL, PL/SQL Developer by Allround Automations,  has some assistance for simple automatic refactorings.<br />
No, we don&#8217;t do enough unit testing, so in your definition we have a legacy system. </p>
<p>Maybe I work on simpler systems than you, but most of programs I make either store data in the database, or retrieve data from the database. So if I create unit tests that don&#8217;t touch the database, I test only 20% of the program.</p>
<p>@Lars Pohlmann</p>
<p>We have a developer here who comes from a Sybase background. Sybase uses the same T-SQL language as SQL Server. We had a bit of a hard time stopping him writing 5000 line procedures that did lots of different things based on flag parameters. Programming that way was of course a way to avoid the namespace problem. This might also explain that developers who develop against SQL Server or Sybase, are more violently opposed to using stored procedures than developers who use Oracle.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jamie Flournoy</title>
		<link>http://lostechies.com/chadmyers/2008/02/22/sql-is-the-assembly-language-of-the-modern-world/#comment-138</link>
		<dc:creator>Jamie Flournoy</dc:creator>
		<pubDate>Fri, 22 Feb 2008 18:35:28 +0000</pubDate>
		<guid isPermaLink="false">/blogs/chad_myers/archive/2008/02/21/sql-is-the-assembly-language-of-the-modern-world.aspx#comment-138</guid>
		<description>The problem I see with SQL currently is that dynamic languages no longer allow the assumption that all instances of a class will contain private state that has the same structure. For an app written in C, SQL is very high level and mapping structs to tables makes sense. For an app written in Python, Ruby, JS, etc. where one out of 100 instances might have some extra methods and properties, where do you put those if there&#039;s no column in the DB? Hence the recent interest in document databases, which are more loosey-goosey about the column list / list of valid keys in each stored item.

On the other hand, the argument that stored procs are bad, and the argument that SQL is bad because it&#039;s hard to represent complex collections, are at odds with one another. Putting business logic in the DB is bad, yes. Going overboard with data rules can be problematic also. But let&#039;s say you want to store and query a directed graph data structure. This is non trivial in standard SQL, but extending SQL via stored procs can make the querying code trivial.

The argument boils down to &quot;I refuse to write reusable code so my code looks like spaghetti, therefore the language sucks.&quot; Keep the domain code out of your database, sure, but don&#039;t be afraid to add generic functions / procs to the database.
</description>
		<content:encoded><![CDATA[<p>The problem I see with SQL currently is that dynamic languages no longer allow the assumption that all instances of a class will contain private state that has the same structure. For an app written in C, SQL is very high level and mapping structs to tables makes sense. For an app written in Python, Ruby, JS, etc. where one out of 100 instances might have some extra methods and properties, where do you put those if there&#8217;s no column in the DB? Hence the recent interest in document databases, which are more loosey-goosey about the column list / list of valid keys in each stored item.</p>
<p>On the other hand, the argument that stored procs are bad, and the argument that SQL is bad because it&#8217;s hard to represent complex collections, are at odds with one another. Putting business logic in the DB is bad, yes. Going overboard with data rules can be problematic also. But let&#8217;s say you want to store and query a directed graph data structure. This is non trivial in standard SQL, but extending SQL via stored procs can make the querying code trivial.</p>
<p>The argument boils down to &#8220;I refuse to write reusable code so my code looks like spaghetti, therefore the language sucks.&#8221; Keep the domain code out of your database, sure, but don&#8217;t be afraid to add generic functions / procs to the database.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jimmy Bogard</title>
		<link>http://lostechies.com/chadmyers/2008/02/22/sql-is-the-assembly-language-of-the-modern-world/#comment-137</link>
		<dc:creator>Jimmy Bogard</dc:creator>
		<pubDate>Fri, 22 Feb 2008 14:52:23 +0000</pubDate>
		<guid isPermaLink="false">/blogs/chad_myers/archive/2008/02/21/sql-is-the-assembly-language-of-the-modern-world.aspx#comment-137</guid>
		<description>@Thijs

So two questions:

- How do you unit test your transactions/packages/types
- How do you refactor your transactions/packages/types

If either of these are manual or not done, you have a legacy code system.

I had a lot of these arguments with some Oracle DBAs at my last company.  Eventually it came down to how easily the logic was to test.  Since our domain behavior could be tested without ANY database up, our argument won out.  2000 unit tests against code executes in the same amount of time as 20 database tests.  That means we could move much faster than the DBAs could.

Eventually, we moved a DBA to our team (instead of in their own group, which created an us vs. them mentality).  They were then very helpful in seeing our modeling approach and making appropriate optimizations, partitioning, etc.</description>
		<content:encoded><![CDATA[<p>@Thijs</p>
<p>So two questions:</p>
<p>- How do you unit test your transactions/packages/types<br />
- How do you refactor your transactions/packages/types</p>
<p>If either of these are manual or not done, you have a legacy code system.</p>
<p>I had a lot of these arguments with some Oracle DBAs at my last company.  Eventually it came down to how easily the logic was to test.  Since our domain behavior could be tested without ANY database up, our argument won out.  2000 unit tests against code executes in the same amount of time as 20 database tests.  That means we could move much faster than the DBAs could.</p>
<p>Eventually, we moved a DBA to our team (instead of in their own group, which created an us vs. them mentality).  They were then very helpful in seeing our modeling approach and making appropriate optimizations, partitioning, etc.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chad Myers</title>
		<link>http://lostechies.com/chadmyers/2008/02/22/sql-is-the-assembly-language-of-the-modern-world/#comment-136</link>
		<dc:creator>Chad Myers</dc:creator>
		<pubDate>Fri, 22 Feb 2008 14:37:59 +0000</pubDate>
		<guid isPermaLink="false">/blogs/chad_myers/archive/2008/02/21/sql-is-the-assembly-language-of-the-modern-world.aspx#comment-136</guid>
		<description>@Everyone:

My point with the &#039;assembly language&#039; remark wasn&#039;t as much to say it&#039;s a &#039;low level language&#039;, as to say that it&#039;s an &#039;arcane language with tons of idiosyncrasies and lots of legacy cruft that makes approaching SQL as a newbie/student very difficult and riddled with complications&#039;</description>
		<content:encoded><![CDATA[<p>@Everyone:</p>
<p>My point with the &#8216;assembly language&#8217; remark wasn&#8217;t as much to say it&#8217;s a &#8216;low level language&#8217;, as to say that it&#8217;s an &#8216;arcane language with tons of idiosyncrasies and lots of legacy cruft that makes approaching SQL as a newbie/student very difficult and riddled with complications&#8217;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
