From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-15?Q?Andreas_R=F6hler?= Newsgroups: gmane.emacs.help Subject: Re: Check for redundancy Date: Thu, 25 Jun 2015 10:52:37 +0200 Message-ID: <558BC155.4030603@easy-emacs.de> References: <558A7875.4050905@easy-emacs.de> <24a1b328-82a8-44ff-8f8d-1425ab89ab67@default> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1435222401 30420 80.91.229.3 (25 Jun 2015 08:53:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 25 Jun 2015 08:53:21 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jun 25 10:53:10 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Z82uB-00056M-M2 for geh-help-gnu-emacs@m.gmane.org; Thu, 25 Jun 2015 10:53:07 +0200 Original-Received: from localhost ([::1]:54489 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z82uA-000333-U8 for geh-help-gnu-emacs@m.gmane.org; Thu, 25 Jun 2015 04:53:06 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41465) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z82tx-00032C-VY for help-gnu-emacs@gnu.org; Thu, 25 Jun 2015 04:52:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z82tu-0006uC-K9 for help-gnu-emacs@gnu.org; Thu, 25 Jun 2015 04:52:53 -0400 Original-Received: from mout.kundenserver.de ([212.227.126.130]:50678) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z82tu-0006ts-AK for help-gnu-emacs@gnu.org; Thu, 25 Jun 2015 04:52:50 -0400 Original-Received: from [192.168.178.31] ([77.6.204.184]) by mrelayeu.kundenserver.de (mreue005) with ESMTPSA (Nemesis) id 0LhzVu-1YlPj111iE-00n7XD for ; Thu, 25 Jun 2015 10:52:49 +0200 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 In-Reply-To: X-Provags-ID: V03:K0:apMcWWgARptOx2U1kBSpGrWSjO/f9tNbd4Sk1FDyzhtOFumkEI+ kCfgQ9Td75WRrJkgX7Tu/RAFtZ3jPv6T57j5sy3dCdLElLkGHK5ash7gtNIwaXwQX417u94 51uMdISMGRsBx4tEnmyVk3x6Znai0U0Zr7W45nwAtklHiR2SbSvFeVjPK+Q3BXeJQ+wLHPr miCq9hzIFYtc/I4WL6vmg== X-UI-Out-Filterresults: notjunk:1;V01:K0:LYruWlNH4AU=:HovBZmMw3kiZv4lj7AayJu 1jcZXomO6NvfNlRrw2G/4hZO0v+TRk4kf+uHC/k4nebpuHLSx+64VQ60ylVofDrbJLoM2+5pE K4m+W8bM3XMO7Qc975W00CYFb0Ag3Dm6kWKYZJGaG85iMoQR3fmgv3LDyLCWWF92AyhjAiZ/S B1p3sOzuM25FOMA/CoxszFKP1aLQfnYO7d8j7gzvu6o3MxHbadtUInNgXe+PeHLVk8mGym6sv BQE1gnWC4EwSpvlQoWLQ3ibG+vhq071WiLMTzpVA1iWxi7MkUJ7jDOBrgd3A2diusxPtXVlyK RaI7TiOGAWOP4sfOuukgNrX8uAaqmaKEHKY8aRzF8lB366ef5CQHweI8a7Jngx66aDRYDH9rb MXTzqRYkZ8R9sDTmPS4GK2NPyZvHXlSfkiJVz2+tbvJPE2RbX/acjVa4r5g3zrhawnrs4ydIb I1g+/vMjgaQtfHGgKBqEfbVfdzVlDUvtjViBpYciemUt8r/tmdpAyfdMYzXiOBFOTSeaI/m8Y DH+grevBMK2DRTYBVRGQKQ6AhL6/8a/RLKIcbdaEUmvl2IXyuJbRJwaX+6Q19nOUE/zLfXLnv 50RMf7gAhqutmq4o/ubT7CKxcpuCb1FENpXvyI/VhV65qh7s7y3AVSaBskAqphiAIbcpPEpx1 W9ASZ2WLW1TgDP/Bpn3XnV84O3fsYrwGy2EQ6oS7ASaGaaMNu5o3lerpEezY4pJ4y01BlOpW4 0rtjxPAcrS7Z/wCpIau8NRF/PsLenNYPLvaYlyW85pBgXsmxuSBy4QOlPlw= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 212.227.126.130 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:105148 Archived-At: Am 25.06.2015 um 09:43 schrieb Stefan Nobis: > Emanuel Berg writes: > > [want to check for redundancy in code] >> Yeah, this is extremely difficult to accomplish at any >> level and to get it to be actually useful in practice >> is close to impossible. And it is not needed. > Hmmm... at least for some people it seems important enough: > > https://www.devexpress.com/Products/CodeRush/duplicate_code.xml > > CodeRush is a (commercial) plugin for Microsoft Visual Studio and it > has some redundancy detection and removing abilities built in. I only > played a little bit with it and it is indeed quite impressing and > disappointing at the same time. Nevertheless, I think at least for > junior programmers it might have some value (and for programmers in > the industry with a high time pressure; its helpful to refactor > redundancies with just a press of a button and adding some new names). > >> I dare say the AI methods will *never* be able to do this! > AI methods today are even able to identify important and influential > paintings in the history of art: > > http://www.technologyreview.com/view/538281/machine-vision-algorithm-chooses-the-most-creative-paintings-in-history/ > > Detecting patterns is one of the strong areas of machine learning and > redundancy is a pattern. I would assume that AI methods will at least > someday be quite good at it. > Avoiding redundancy is important as it saves time. Assume there is a bug in some redundant: fixing this would leave the other bug at place. But it's not about bugs only. Functions might be shaped more or less efficient in various regards. When optimizing a redundant function, second range quality will remain.