Path: csiph.com!usenet.pasdenom.info!news.albasani.net!feeder.erje.net!eu.feeder.erje.net!ecngs!feeder2.ecngs.de!novso.com!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.014 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'insert': 0.05; 'debug': 0.07; 'debugging': 0.07; 'debugger': 0.09; 'definition,': 0.09; 'statements': 0.09; 'things,': 0.09; 'cc:addr:python-list': 0.11; 'jan': 0.12; 'imo,': 0.16; 'respecting': 0.16; 'say.': 0.16; 'vastly': 0.16; 'subject:python': 0.16; 'ignore': 0.16; 'wrote:': 0.18; 'code.': 0.18; 'wed,': 0.18; 'trying': 0.19; 'possible,': 0.19; 'projects,': 0.19; 'seems': 0.21; '(the': 0.22; 'programming': 0.22; 'cc:addr:python.org': 0.22; 'print': 0.22; 'simpler': 0.24; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; 'related': 0.29; "doesn't": 0.30; 'message- id:@mail.gmail.com': 0.30; "i'm": 0.30; 'code': 0.31; 'alan': 0.31; 'quotes': 0.31; 'anyone': 0.31; 'probably': 0.32; 'brian': 0.33; 'bugs': 0.33; 'third': 0.33; 'maybe': 0.34; 'but': 0.35; 'received:google.com': 0.35; 'really': 0.36; 'are,': 0.36; 'much.': 0.36; 'being': 0.38; 'process,': 0.38; 'pm,': 0.38; 'track': 0.38; 'does': 0.39; 'extremely': 0.39; 'quote': 0.39; 'enough': 0.39; 'called': 0.40; 'remove': 0.60; 'skip:u 10': 0.60; 'easy': 0.60; 'matter': 0.61; 'simple': 0.61; 'first': 0.61; 'you.': 0.62; 'therefore,': 0.64; 'fire': 0.65; 'to:addr:gmail.com': 0.65; 'asynchronous': 0.84; 'bite': 0.84; 'complexity': 0.84; 'hard.': 0.84; 'mind:': 0.84; 'quote,': 0.84; 'suffer': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=uks4aKVr8wb4dg/mLw7Y8pPnhivqspn+0hiLacs/EY4=; b=RIs+YgR7QqIfZEblCqTP43ho8c48P29WFmM6R/48l2knIwO/2GnZo+0Hatg7ynOVeC 9aPKhwy5pGpk8PnrX8v8SY5rBdHrHuWMMYZVqv451sgxqe+2KImHTs5Iz/ory3VLLRh4 Kpl5aIoZNvVM+ZxU047YV7KltEMG3HsGHfK06SQFYK4dsTP+RWWRIQbd/4u1Jg64IBAS Oknj9yXNDHbE0KIc1yHrx6+MPJ/HZhl1SE/5Xu9LAXiQ62gRFaqJpwJCxj5Yr6mh7/nT 2hqK67/Otc3naXmAijpEOE1L3eWeM9PlqSngjyu8H0FrR2CYSTE7CbOyixb48Wi5hMFr /y1A== MIME-Version: 1.0 X-Received: by 10.180.205.162 with SMTP id lh2mr982973wic.57.1389239380599; Wed, 08 Jan 2014 19:49:40 -0800 (PST) In-Reply-To: References: <22d58d76-f2c2-4a1d-8049-3409ac4665d3@googlegroups.com> Date: Wed, 8 Jan 2014 19:49:40 -0800 Subject: Re: Learning python networking From: Dan Stromberg To: Chris Angelico Content-Type: text/plain; charset=ISO-8859-1 Cc: "python-list@python.org" X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 32 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1389239383 news.xs4all.nl 2919 [2001:888:2000:d::a6]:34702 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:63562 On Wed, Jan 8, 2014 at 4:07 PM, Chris Angelico wrote: > Maybe it's not the best way to do things, but it can be extremely > simple in the code. For small projects, the added complexity doesn't bite you. At least, not much. For large projects, with thousands or millions of callbacks, it can be very difficult to track down bugs in who-knows-which callback, given that they're all being called asynchronously. It's vastly simpler to fire up a debugger against a process, or insert print statements that are related to each other in time in some way. > It's > really easy once you get your head around it. IMO, it's not a matter of wrapping your head around it, but respecting complexity. Three quotes come to mind: * Make things as simple as possible, but not simpler. * Fools ignore complexity. Pragmatists suffer it. Some can avoid it. Geniuses remove it. * Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. I'm not trying to call you or anyone else a fool, but the Alan Perlis quote (the second) does give a flavor of what I'm trying to say. The third quote, from Brian Kernighan, seems to underestimate the complexity of asynchronous programming in the large - it's probably not just twice as hard.