<?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: See? IE is Spaghetti Code</title>
	<atom:link href="http://mrpogson.com/2012/09/19/see-ie-is-spaghetti-code/feed/" rel="self" type="application/rss+xml" />
	<link>http://mrpogson.com/2012/09/19/see-ie-is-spaghetti-code/</link>
	<description>One man. Closing, all the windows.</description>
	<lastBuildDate>Sun, 19 May 2013 01:03:01 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
	<item>
		<title>By: oiaohm</title>
		<link>http://mrpogson.com/2012/09/19/see-ie-is-spaghetti-code/#comment-97583</link>
		<dc:creator>oiaohm</dc:creator>
		<pubDate>Mon, 24 Sep 2012 05:01:34 +0000</pubDate>
		<guid isPermaLink="false">http://mrpogson.com/?p=14372#comment-97583</guid>
		<description><![CDATA[--As programs we with that was the case.--
great word swap.
As programmers we wish that was the case.]]></description>
		<content:encoded><![CDATA[<p>&#8211;As programs we with that was the case.&#8211;<br />
great word swap.<br />
As programmers we wish that was the case.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: oiaohm</title>
		<link>http://mrpogson.com/2012/09/19/see-ie-is-spaghetti-code/#comment-97582</link>
		<dc:creator>oiaohm</dc:creator>
		<pubDate>Mon, 24 Sep 2012 04:55:29 +0000</pubDate>
		<guid isPermaLink="false">http://mrpogson.com/?p=14372#comment-97582</guid>
		<description><![CDATA[Modern day error handing can create a OOP modern form of speghetti where you get a error message but due to all the places the error handling is connected you have no clue where in the code base the error comes from.  Speghetti with meatballs.

Again this is flow insanity.  Exceptions can break out of smooth flow threw program.  Threads also can break out of smooth flow control.  Speghetti is mostly a result of poor code quality management and coders taking short cuts here and there and they stacking up.

Like I will create a universal catch all exception handler and forget to include the useful information like where in by code base something went wrong.  This can be a very small but highly inconvenient section of Spaghetti code.  Rest might be sane design but if you exception handling is spaghetti you are fairly much up the creek.]]></description>
		<content:encoded><![CDATA[<p>Modern day error handing can create a OOP modern form of speghetti where you get a error message but due to all the places the error handling is connected you have no clue where in the code base the error comes from.  Speghetti with meatballs.</p>
<p>Again this is flow insanity.  Exceptions can break out of smooth flow threw program.  Threads also can break out of smooth flow control.  Speghetti is mostly a result of poor code quality management and coders taking short cuts here and there and they stacking up.</p>
<p>Like I will create a universal catch all exception handler and forget to include the useful information like where in by code base something went wrong.  This can be a very small but highly inconvenient section of Spaghetti code.  Rest might be sane design but if you exception handling is spaghetti you are fairly much up the creek.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: oiaohm</title>
		<link>http://mrpogson.com/2012/09/19/see-ie-is-spaghetti-code/#comment-97581</link>
		<dc:creator>oiaohm</dc:creator>
		<pubDate>Mon, 24 Sep 2012 04:47:07 +0000</pubDate>
		<guid isPermaLink="false">http://mrpogson.com/?p=14372#comment-97581</guid>
		<description><![CDATA[TM Repository really what I wrote is the bare min spaghetti.  There is only 2 noodles mixed up there.  The more noodles you add doing the same kinds of things over lapping with each other then you speghetti really displays itself.

The goto and label construct exist in C and many other languages.  Still used in fact in the Linux kernel are part of error handling.  But correctly.  Correctly is beneficial to performance.

The link you have referred to has Spaghetti with meatballs code and traditional spaghetti code in the same define.

This is why I type traditional spaghetti code and Speghetti with meatballs code.

--In later languages, especially scripting languages, the use of include files or statements could often result in Spaghetti Code.--
This Speghetti with meatballs code in most cases.  OOP control structures used poorly.

Yes there is a generic spaghetti code term that does not really mean much.

Most of the Spaghetti code issues when you look closely is poor code usage and poor quality code options selected.

Business layers mixed with each other does not have to happen for the code to be Speghetti.  Speghetti style makes the code harder to read simpler to cause a memory leak or object leak or other nasty memory leak.

TM Repository there is a subset of Speghetti called rat&#039;s nest this is the one with out layers with the spaghetti going in all directions bar lose with no sanity control.

--business layers with data layers and presentation layers.-- This is rat&#039;s nest code.  Code that is rat&#039;s nest is o my god this might be simpler to start over.

You can have Speghetti code with clean separation between layers.  It is still Spaghetti code.  Just Spaghetti breaking control struts of the language all over the place so is liking playing with a live hand bomb.  Make one alteration and all hell can break lose.

Rat&#039;s nest is the worst end of the Spaghetti scale.   My examples are at the shallow end of the spaghetti scale.

Spaghetti code integrated into Lasagna code does exist.  Its not in the class of rats nest spaghetti code but is pretty down right bad.

Just because you have a Lasagna looking code base does not mean layers in it are not full blown Spaghetti code.  This is why the idea of mixing of layers is wrong.  Key trait of Speghetti is breaking the control structs and the lack of smooth flow of the code.

Execution should smoothly flow down the program. Spaghetti does not show this trait as it gets worse.  My simple examples only slightly break the flow I don&#039;t have many gotos coming in from all over the place to the same label from above and bellow as you find in bad Spaghetti.

Really you can have a program that is really lost.

Yes a program Lasagna, Ravioli, traditional spaghetti, Spaghetti with meat balls and rats nest code.  None of these types is 100 percent prevent being mixed up.

So one layer of the Lasagna might be traditional spaghetti mess.  Another layer might be a Stack of Ravioli with instead good code inside Spaghetti code.  Another layer might be a pure rats nest with no clear logic at all.  Then you can find that the a rats nest has created links between the Laguna layers.  Yes the rats nest code is called that because just like rats infesting houses that look find you can find rats nests infesting code bases that from a quick look seam to be sane Lasagna or Ravioli.

A program like this is result of code quality standards not being enforced.

TM Repository you are thinking mutually exclusive between the types.  As programs we with that was the case.   The problem is without checking the complete code base a section of spaghetti or over done Ravioli or over done Lasagne could go in the code base for a long time.  This is why automated tools throw up errors about coder style.

TM Repository really you don&#039;t understand the terms here.]]></description>
		<content:encoded><![CDATA[<p>TM Repository really what I wrote is the bare min spaghetti.  There is only 2 noodles mixed up there.  The more noodles you add doing the same kinds of things over lapping with each other then you speghetti really displays itself.</p>
<p>The goto and label construct exist in C and many other languages.  Still used in fact in the Linux kernel are part of error handling.  But correctly.  Correctly is beneficial to performance.</p>
<p>The link you have referred to has Spaghetti with meatballs code and traditional spaghetti code in the same define.</p>
<p>This is why I type traditional spaghetti code and Speghetti with meatballs code.</p>
<p>&#8211;In later languages, especially scripting languages, the use of include files or statements could often result in Spaghetti Code.&#8211;<br />
This Speghetti with meatballs code in most cases.  OOP control structures used poorly.</p>
<p>Yes there is a generic spaghetti code term that does not really mean much.</p>
<p>Most of the Spaghetti code issues when you look closely is poor code usage and poor quality code options selected.</p>
<p>Business layers mixed with each other does not have to happen for the code to be Speghetti.  Speghetti style makes the code harder to read simpler to cause a memory leak or object leak or other nasty memory leak.</p>
<p>TM Repository there is a subset of Speghetti called rat&#8217;s nest this is the one with out layers with the spaghetti going in all directions bar lose with no sanity control.</p>
<p>&#8211;business layers with data layers and presentation layers.&#8211; This is rat&#8217;s nest code.  Code that is rat&#8217;s nest is o my god this might be simpler to start over.</p>
<p>You can have Speghetti code with clean separation between layers.  It is still Spaghetti code.  Just Spaghetti breaking control struts of the language all over the place so is liking playing with a live hand bomb.  Make one alteration and all hell can break lose.</p>
<p>Rat&#8217;s nest is the worst end of the Spaghetti scale.   My examples are at the shallow end of the spaghetti scale.</p>
<p>Spaghetti code integrated into Lasagna code does exist.  Its not in the class of rats nest spaghetti code but is pretty down right bad.</p>
<p>Just because you have a Lasagna looking code base does not mean layers in it are not full blown Spaghetti code.  This is why the idea of mixing of layers is wrong.  Key trait of Speghetti is breaking the control structs and the lack of smooth flow of the code.</p>
<p>Execution should smoothly flow down the program. Spaghetti does not show this trait as it gets worse.  My simple examples only slightly break the flow I don&#8217;t have many gotos coming in from all over the place to the same label from above and bellow as you find in bad Spaghetti.</p>
<p>Really you can have a program that is really lost.</p>
<p>Yes a program Lasagna, Ravioli, traditional spaghetti, Spaghetti with meat balls and rats nest code.  None of these types is 100 percent prevent being mixed up.</p>
<p>So one layer of the Lasagna might be traditional spaghetti mess.  Another layer might be a Stack of Ravioli with instead good code inside Spaghetti code.  Another layer might be a pure rats nest with no clear logic at all.  Then you can find that the a rats nest has created links between the Laguna layers.  Yes the rats nest code is called that because just like rats infesting houses that look find you can find rats nests infesting code bases that from a quick look seam to be sane Lasagna or Ravioli.</p>
<p>A program like this is result of code quality standards not being enforced.</p>
<p>TM Repository you are thinking mutually exclusive between the types.  As programs we with that was the case.   The problem is without checking the complete code base a section of spaghetti or over done Ravioli or over done Lasagne could go in the code base for a long time.  This is why automated tools throw up errors about coder style.</p>
<p>TM Repository really you don&#8217;t understand the terms here.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: TM Repository</title>
		<link>http://mrpogson.com/2012/09/19/see-ie-is-spaghetti-code/#comment-97562</link>
		<dc:creator>TM Repository</dc:creator>
		<pubDate>Mon, 24 Sep 2012 02:57:10 +0000</pubDate>
		<guid isPermaLink="false">http://mrpogson.com/?p=14372#comment-97562</guid>
		<description><![CDATA[Your examples aren&#039;t spaghetti code, they&#039;re just poorly written. The GOTO construct doesn&#039;t exist in anything but Assembly anymore. Even then, proper unit testing can wrangle even your worst examples.

Once again, &lt;a href=&quot;http://deviq.com/spaghetti-code&quot; rel=&quot;nofollow&quot;&gt;spaghetti code&lt;/a&gt; is when you mix business layers with data layers and presentation layers. Each &quot;noodle&quot; is a different layer that&#039;s interwoven. Get it?

The opposite of spaghetti code is &quot;lasagna code&quot; where data, logic and presentation layers are all separated. That&#039;s what Model, View, Controller (MVC) is.  Get it yet?]]></description>
		<content:encoded><![CDATA[<p>Your examples aren&#8217;t spaghetti code, they&#8217;re just poorly written. The GOTO construct doesn&#8217;t exist in anything but Assembly anymore. Even then, proper unit testing can wrangle even your worst examples.</p>
<p>Once again, <a href="http://deviq.com/spaghetti-code" rel="nofollow">spaghetti code</a> is when you mix business layers with data layers and presentation layers. Each &#8220;noodle&#8221; is a different layer that&#8217;s interwoven. Get it?</p>
<p>The opposite of spaghetti code is &#8220;lasagna code&#8221; where data, logic and presentation layers are all separated. That&#8217;s what Model, View, Controller (MVC) is.  Get it yet?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: oiaohm</title>
		<link>http://mrpogson.com/2012/09/19/see-ie-is-spaghetti-code/#comment-97561</link>
		<dc:creator>oiaohm</dc:creator>
		<pubDate>Mon, 24 Sep 2012 02:50:30 +0000</pubDate>
		<guid isPermaLink="false">http://mrpogson.com/?p=14372#comment-97561</guid>
		<description><![CDATA[That Exploit Guy my example is the bare min of spaghetti code in C and C++.

--Don’t worry – all I want is a sippet of C/C++ code. Nothing more.--
You asked for C and C++.  Asm my example is not spaghetti there are not hidden control structures being broken.

C is a structured programming language.  Its designed for structured style code.  Using goto on C can turn into speghetti insanely quickly.  Most cases insanity.  The question is if the spaghetti is harmful or beneficial.

My example was 1 step away from harmful same with the wikipedia goto example.  Only thing saving it is no memory declares in the if.  Because both are breaking control structures.  Close to disaster not disaster yet.

This is why speghetti code such a maintenance nightmare.  Code that looks close to the same one can be a memory leak and one can be perfectly safe.  Worse only a memory leak when built with particular complier options.]]></description>
		<content:encoded><![CDATA[<p>That Exploit Guy my example is the bare min of spaghetti code in C and C++.</p>
<p>&#8211;Don’t worry – all I want is a sippet of C/C++ code. Nothing more.&#8211;<br />
You asked for C and C++.  Asm my example is not spaghetti there are not hidden control structures being broken.</p>
<p>C is a structured programming language.  Its designed for structured style code.  Using goto on C can turn into speghetti insanely quickly.  Most cases insanity.  The question is if the spaghetti is harmful or beneficial.</p>
<p>My example was 1 step away from harmful same with the wikipedia goto example.  Only thing saving it is no memory declares in the if.  Because both are breaking control structures.  Close to disaster not disaster yet.</p>
<p>This is why speghetti code such a maintenance nightmare.  Code that looks close to the same one can be a memory leak and one can be perfectly safe.  Worse only a memory leak when built with particular complier options.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: oiaohm</title>
		<link>http://mrpogson.com/2012/09/19/see-ie-is-spaghetti-code/#comment-97558</link>
		<dc:creator>oiaohm</dc:creator>
		<pubDate>Mon, 24 Sep 2012 02:15:56 +0000</pubDate>
		<guid isPermaLink="false">http://mrpogson.com/?p=14372#comment-97558</guid>
		<description><![CDATA[That Exploit Guy traditional spaghetti code starts off without control structures.

So to make it look 100 you could do like my if (c&lt;10) goto start; twice.

The if is truely a break.

if (c&lt;10) { 
   goto start;
}
Comes clear when you do the C code old school long hand.  The {} are control structure broken in the first example.  Modern day compliers you don&#039;t have to type the brackets because the compiler basically inserts them for you.

if (c&lt;10) {
   int x=10;
   printf(&quot;%i\n&quot;,x); 
   goto start;
}
This brings a interesting question what happens now.

Depending on the complier you could have a memory leak.  Why int x never made it to the free point at } this is because the control structures are broken by the goto.

This is why the goto can become a source of a disaster.  I will just add some code to the if statement with a goto and the broken control structure.
if (c&lt;10) {
   int x=10;
   printf(&quot;%i\n&quot;,x); 
}
if (c&lt;10) goto start;
This here is what you have todo to be sure not to leak memory.  You must not break brackets(invisible or not) with goto that you declare memory that you cannot directly free before the goto in due to the broken control structure possibly causing the free not to happen. 

for (int c = 1; c 10) {
  goto end:
}
goto start;
end:


This is heading to messy spaghetti and is dirty.

The reality is without the if a never end goto loop done a particular way.

start:
goto start:

With no escape option speghetti since it does not break brackets that are control control structures.  Not a good thing todo to end up in a never ending loop.  Its the if statement where you break the control structures for the first time when you use goto.  Its only going down hill from there if you are not careful.

That Exploit Guy you have forgotten these {} are control structures written or not.

The start of speghetti looks harmless.  As the code expands the evil can appear.

There are times when using goto to break the control structs is valid.  There are reasons why the goto has to be going forwards in the code.  Even doing that you can cause memory leaks if you are not careful.

The fact that every if () goto  breaks control structures a warning.  Wikipedia example is a pure break.  My example sorts the men out from the boys on exam.  Does this program contain any broken control structures you would have answers no when the answer is yes 1 the if () goto combination.

spaghetti code starts with the possible valid uses and you add a few invalid like mine where a do while, for,while should have been used .  The progressively the code base becomes a disaster zone as more and more control structures are broken without valid reason.

Traditional speghetti code comes from the over use of speghetti code and people like That Exploit Guy that does not have a clue what the control structures in C are and when they are breaking them.]]></description>
		<content:encoded><![CDATA[<p>That Exploit Guy traditional spaghetti code starts off without control structures.</p>
<p>So to make it look 100 you could do like my if (c&lt;10) goto start; twice.</p>
<p>The if is truely a break.</p>
<p>if (c&lt;10) {<br />
   goto start;<br />
}<br />
Comes clear when you do the C code old school long hand.  The {} are control structure broken in the first example.  Modern day compliers you don&#039;t have to type the brackets because the compiler basically inserts them for you.</p>
<p>if (c&lt;10) {<br />
   int x=10;<br />
   printf(&quot;%i\n&quot;,x);<br />
   goto start;<br />
}<br />
This brings a interesting question what happens now.</p>
<p>Depending on the complier you could have a memory leak.  Why int x never made it to the free point at } this is because the control structures are broken by the goto.</p>
<p>This is why the goto can become a source of a disaster.  I will just add some code to the if statement with a goto and the broken control structure.<br />
if (c&lt;10) {<br />
   int x=10;<br />
   printf(&quot;%i\n&quot;,x);<br />
}<br />
if (c&lt;10) goto start;<br />
This here is what you have todo to be sure not to leak memory.  You must not break brackets(invisible or not) with goto that you declare memory that you cannot directly free before the goto in due to the broken control structure possibly causing the free not to happen. </p>
<p>for (int c = 1; c 10) {<br />
  goto end:<br />
}<br />
goto start;<br />
end:</p>
<p>This is heading to messy spaghetti and is dirty.</p>
<p>The reality is without the if a never end goto loop done a particular way.</p>
<p>start:<br />
goto start:</p>
<p>With no escape option speghetti since it does not break brackets that are control control structures.  Not a good thing todo to end up in a never ending loop.  Its the if statement where you break the control structures for the first time when you use goto.  Its only going down hill from there if you are not careful.</p>
<p>That Exploit Guy you have forgotten these {} are control structures written or not.</p>
<p>The start of speghetti looks harmless.  As the code expands the evil can appear.</p>
<p>There are times when using goto to break the control structs is valid.  There are reasons why the goto has to be going forwards in the code.  Even doing that you can cause memory leaks if you are not careful.</p>
<p>The fact that every if () goto  breaks control structures a warning.  Wikipedia example is a pure break.  My example sorts the men out from the boys on exam.  Does this program contain any broken control structures you would have answers no when the answer is yes 1 the if () goto combination.</p>
<p>spaghetti code starts with the possible valid uses and you add a few invalid like mine where a do while, for,while should have been used .  The progressively the code base becomes a disaster zone as more and more control structures are broken without valid reason.</p>
<p>Traditional speghetti code comes from the over use of speghetti code and people like That Exploit Guy that does not have a clue what the control structures in C are and when they are breaking them.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: That Exploit Guy</title>
		<link>http://mrpogson.com/2012/09/19/see-ie-is-spaghetti-code/#comment-97454</link>
		<dc:creator>That Exploit Guy</dc:creator>
		<pubDate>Sun, 23 Sep 2012 11:11:52 +0000</pubDate>
		<guid isPermaLink="false">http://mrpogson.com/?p=14372#comment-97454</guid>
		<description><![CDATA[@oiaohm

&#039;Like instead of a for loop...&#039;

I don&#039;t see any &quot;structs&quot; there. Perhaps you mean &quot;structures&quot;?

Also, I don&#039;t see any &quot;spaghetti code&quot; there since the goto statement is not breaking any control structures in the code (e.g. loops, if...else). Sure, one could have used &quot;do...while&quot; instead of &quot;start... goto start&quot; or even replaced the entire piece of code with &quot;for (int c = 1; c &lt;= 10; c++) printf(&quot;hi\n&quot;);&quot;, but that&#039;s &lt;b&gt;besides&lt;/b&gt; the characteristics of &quot;spaghetti code&quot;.

Also, Edsger Dijkstra&#039;s letter to ACM (&quot;&lt;a href=&quot;www.cs.utexas.edu/~EWD/ewd02xx/EWD215.PDF&quot; rel=&quot;nofollow&quot;&gt;A Case against the GOTO Statement&lt;/a&gt;&quot;) even explicitly states that his argument was against &quot;the &lt;b&gt;unbridled&lt;/b&gt; use of the go to statement&quot; (bolded mine) rather than the mere usage of goto. 

Also, try not to rely on Wikipedia too often. It is, after all, a quite unreliable source of information.]]></description>
		<content:encoded><![CDATA[<p>@oiaohm</p>
<p>&#8216;Like instead of a for loop&#8230;&#8217;</p>
<p>I don&#8217;t see any &#8220;structs&#8221; there. Perhaps you mean &#8220;structures&#8221;?</p>
<p>Also, I don&#8217;t see any &#8220;spaghetti code&#8221; there since the goto statement is not breaking any control structures in the code (e.g. loops, if&#8230;else). Sure, one could have used &#8220;do&#8230;while&#8221; instead of &#8220;start&#8230; goto start&#8221; or even replaced the entire piece of code with &#8220;for (int c = 1; c &lt;= 10; c++) printf(&quot;hi\n&quot;);&quot;, but that&#039;s <b>besides</b> the characteristics of &#8220;spaghetti code&#8221;.</p>
<p>Also, Edsger Dijkstra&#8217;s letter to ACM (&#8220;<a href="www.cs.utexas.edu/~EWD/ewd02xx/EWD215.PDF" rel="nofollow">A Case against the GOTO Statement</a>&#8220;) even explicitly states that his argument was against &#8220;the <b>unbridled</b> use of the go to statement&#8221; (bolded mine) rather than the mere usage of goto. </p>
<p>Also, try not to rely on Wikipedia too often. It is, after all, a quite unreliable source of information.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: oiaohm</title>
		<link>http://mrpogson.com/2012/09/19/see-ie-is-spaghetti-code/#comment-97417</link>
		<dc:creator>oiaohm</dc:creator>
		<pubDate>Sun, 23 Sep 2012 04:02:33 +0000</pubDate>
		<guid isPermaLink="false">http://mrpogson.com/?p=14372#comment-97417</guid>
		<description><![CDATA[http://en.wikipedia.org/wiki/Goto  The hello wikipedia one there is very much goto abuse.

Like instead of a for loop
c=0;
start:
c++;
printf(&quot;hi\n&quot;);
if (c&lt;10) goto start;

This is the start of traditional spaghetti code.  Worse case in tradition spaghetti code done in c or c++ only main() {
} exists as a function.  No OOP of any form.  Just if goto and labels used to get around.  No for, while, switch.  Yes all the stuff of structured programming not used.

Good quality code checkers today will reject what I just did.  They allow you goto to a point latter in the program you cannot goto to a point before the goto jump. This is a rule any good quality static checkers will enforces.  Gotos most productive usage is error handling to go forwards in code to free memory struts safely.

This prevents goto triggered never ending loops.

To code tradition spaghetti code you don&#039;t have loop functions.

Good write up on the different names.  http://en.wikipedia.org/wiki/Spaghetti_code

What a lot of people call speghetti code today is what is really called Spaghetti with meatballs code since OOP features are mixed up like functions.

Traditional spaghetti code is simple to find due to over use of goto.

Spaghetti with meatballs can be horrible.  Coverity also has a habit of calling out spaghetti with meatballs code as well.

Each of these titles has a particular feature usage style to them.  This is why its possible to design automated software to find coders not doing good style for lots of them.

The spaghetti and spaghetti with meatballs problems is the simplest to design checkers to find.

dirty code finding is harder.

Ravioli code and Lasagna code are down right hard to create detection for since at times the code that looks like that can be valid.

Basically dirty is always wrong.  The speghetti code is almost always wrong.  speghetti where the gotos only go to future points in the execution is the only form of speghetti that is valid.   This is why both are simple to detect.

The example on the wikipedia a checker should throw an error for unrequired else and goto.  Checking flow logic detects lots of human errors.]]></description>
		<content:encoded><![CDATA[<p><a href="http://en.wikipedia.org/wiki/Goto" rel="nofollow">http://en.wikipedia.org/wiki/Goto</a>  The hello wikipedia one there is very much goto abuse.</p>
<p>Like instead of a for loop<br />
c=0;<br />
start:<br />
c++;<br />
printf(&#8220;hi\n&#8221;);<br />
if (c&lt;10) goto start;</p>
<p>This is the start of traditional spaghetti code.  Worse case in tradition spaghetti code done in c or c++ only main() {<br />
} exists as a function.  No OOP of any form.  Just if goto and labels used to get around.  No for, while, switch.  Yes all the stuff of structured programming not used.</p>
<p>Good quality code checkers today will reject what I just did.  They allow you goto to a point latter in the program you cannot goto to a point before the goto jump. This is a rule any good quality static checkers will enforces.  Gotos most productive usage is error handling to go forwards in code to free memory struts safely.</p>
<p>This prevents goto triggered never ending loops.</p>
<p>To code tradition spaghetti code you don&#039;t have loop functions.</p>
<p>Good write up on the different names.  <a href="http://en.wikipedia.org/wiki/Spaghetti_code" rel="nofollow">http://en.wikipedia.org/wiki/Spaghetti_code</a></p>
<p>What a lot of people call speghetti code today is what is really called Spaghetti with meatballs code since OOP features are mixed up like functions.</p>
<p>Traditional spaghetti code is simple to find due to over use of goto.</p>
<p>Spaghetti with meatballs can be horrible.  Coverity also has a habit of calling out spaghetti with meatballs code as well.</p>
<p>Each of these titles has a particular feature usage style to them.  This is why its possible to design automated software to find coders not doing good style for lots of them.</p>
<p>The spaghetti and spaghetti with meatballs problems is the simplest to design checkers to find.</p>
<p>dirty code finding is harder.</p>
<p>Ravioli code and Lasagna code are down right hard to create detection for since at times the code that looks like that can be valid.</p>
<p>Basically dirty is always wrong.  The speghetti code is almost always wrong.  speghetti where the gotos only go to future points in the execution is the only form of speghetti that is valid.   This is why both are simple to detect.</p>
<p>The example on the wikipedia a checker should throw an error for unrequired else and goto.  Checking flow logic detects lots of human errors.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: That Exploit Guy</title>
		<link>http://mrpogson.com/2012/09/19/see-ie-is-spaghetti-code/#comment-97363</link>
		<dc:creator>That Exploit Guy</dc:creator>
		<pubDate>Sat, 22 Sep 2012 15:56:40 +0000</pubDate>
		<guid isPermaLink="false">http://mrpogson.com/?p=14372#comment-97363</guid>
		<description><![CDATA[&lt;i&gt;&#039;traditional spaghetti code gotos and if as you only flow control structs. Also reusing buffers over and over again in different sections of code coverity does not particularly like either. So global buffers coverity will hate you.&#039;&lt;/i&gt;

&#039;Flow control structs&#039;? I, for one, would like to see an example of that.

Don&#039;t worry - all I want is a sippet of C/C++ code. Nothing more.]]></description>
		<content:encoded><![CDATA[<p><i>&#8216;traditional spaghetti code gotos and if as you only flow control structs. Also reusing buffers over and over again in different sections of code coverity does not particularly like either. So global buffers coverity will hate you.&#8217;</i></p>
<p>&#8216;Flow control structs&#8217;? I, for one, would like to see an example of that.</p>
<p>Don&#8217;t worry &#8211; all I want is a sippet of C/C++ code. Nothing more.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: oiaohm</title>
		<link>http://mrpogson.com/2012/09/19/see-ie-is-spaghetti-code/#comment-97284</link>
		<dc:creator>oiaohm</dc:creator>
		<pubDate>Sat, 22 Sep 2012 00:40:41 +0000</pubDate>
		<guid isPermaLink="false">http://mrpogson.com/?p=14372#comment-97284</guid>
		<description><![CDATA[Second of all, what do you mean by ‘traditional’ spaghetti code?

traditional spaghetti code gotos and if as you only flow control structs.   Also reusing buffers over and over again in different sections of code coverity does not particularly like either.  So global buffers coverity will hate you.

Coverity I know supports windows.  For Microsoft to use it they would have to pay and use it.  The current IE bug would have been dug out by it.  Its the kind of problem Coverity is designed to find.

Converity was because of spell checker.

--A Lint tool isn’t going to fix logical errors that the programmer has introduced!--

Particular programmer logic errors are detectable.  Like using a variable after its freed or should have been freed.

Depends how advanced the Lint tool is basically.  Advanced tools do checking of variable usage.

TM Repository
--Programmers aren’t psychic, though, and can only base their unit tests on past experience.--

This is why you use klee.llvm.org or coverity or others tools for automated test suite generation.  These are software they build there own program unit tests based on the flow of the program.  To make sure every code path gets executed.

Humans are fairly useless at making unit tests that properly test a program.  Humans are good at making unit tests to make sure features users want is there.

TM Repository basically you are out of date.  You are talking about using humans to make test suites that is old obsolete talking.

Automated test-suite generation with human tweaking is current day.  The current fault in IE should have been dug out with Automated test-suite generated test-suite as well.  Since that makes sure the error paths are checked.

We know programmers are not psychic this is why automated tools make large section of test suites and you also run fuzz testing.  In the case you missed something.]]></description>
		<content:encoded><![CDATA[<p>Second of all, what do you mean by ‘traditional’ spaghetti code?</p>
<p>traditional spaghetti code gotos and if as you only flow control structs.   Also reusing buffers over and over again in different sections of code coverity does not particularly like either.  So global buffers coverity will hate you.</p>
<p>Coverity I know supports windows.  For Microsoft to use it they would have to pay and use it.  The current IE bug would have been dug out by it.  Its the kind of problem Coverity is designed to find.</p>
<p>Converity was because of spell checker.</p>
<p>&#8211;A Lint tool isn’t going to fix logical errors that the programmer has introduced!&#8211;</p>
<p>Particular programmer logic errors are detectable.  Like using a variable after its freed or should have been freed.</p>
<p>Depends how advanced the Lint tool is basically.  Advanced tools do checking of variable usage.</p>
<p>TM Repository<br />
&#8211;Programmers aren’t psychic, though, and can only base their unit tests on past experience.&#8211;</p>
<p>This is why you use klee.llvm.org or coverity or others tools for automated test suite generation.  These are software they build there own program unit tests based on the flow of the program.  To make sure every code path gets executed.</p>
<p>Humans are fairly useless at making unit tests that properly test a program.  Humans are good at making unit tests to make sure features users want is there.</p>
<p>TM Repository basically you are out of date.  You are talking about using humans to make test suites that is old obsolete talking.</p>
<p>Automated test-suite generation with human tweaking is current day.  The current fault in IE should have been dug out with Automated test-suite generated test-suite as well.  Since that makes sure the error paths are checked.</p>
<p>We know programmers are not psychic this is why automated tools make large section of test suites and you also run fuzz testing.  In the case you missed something.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
