Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!news2.euro.net!multikabel.net!newsfeed20.multikabel.net!post40.multikabel.net!cache100.multikabel.net!not-for-mail From: "Skybuck Flying" Newsgroups: alt.comp.lang.borland-delphi,comp.lang.c,comp.lang.java.programmer References: In-Reply-To: Subject: Re: Oracle/Google demonstrate human beings cannot write 10 lines of code without making a mistake ;) Date: Fri, 18 May 2012 00:47:06 +0200 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Newsreader: Microsoft Windows Live Mail 15.4.3538.513 X-MimeOLE: Produced By Microsoft MimeOLE V15.4.3538.513 Message-ID: X-Complaints-To: abuse@ziggo.nl Organization: Ziggo Lines: 43 NNTP-Posting-Host: 84.25.172.195 (84.25.172.195) NNTP-Posting-Date: Fri, 18 May 2012 00:46:57 +0200 X-Trace: b4a1f4fb57fe1f1bc096609428 Xref: csiph.com comp.lang.c:20954 comp.lang.java.programmer:14604 The chess comparision makes sense in the following way: A good chess player will reason about dependent moves which can also be considered branches like a computer program. For each possible move there are other possible moves which can be done, just like if else statements and case statements. However it goes further, all parts of a computer program like indexes, values, constants influence each other. Therefore code is one dependent mess, the more dependencies the more likely that something will break or become buggy if something is changed. Therefore for a programmer to reason about a possible change to a single line of code it's necessary to think how this single change could impact all other dependencies just like a chess player must reason about dependencies of it's moves. (The same applies to debugging a program, reasoning about potential bugs, potential wrong lines of code). Doing the moves in the wrong order in chess might lead to "being checked" or even "stalemate" which can be considered in error in the reasoning or a bug ;) :) Think of the C program as being compiled to assembler instructions, each assembler instruction being a "chess move" or each branch as being a "chess move", also indexes/values/registers as being "a chess move". Think of the indexes as being the squares on the chess board. This will quickly lead to the conclusion that the number of moves in a computer program could surpass a chess game. It's quite amazing how complex an only 10 instruction program can be if allowed to copy itself, mutate itself, modify itself etc ;) (corewar hint here ;) :)) Bye, Skybuck.