Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Chris Angelico Newsgroups: comp.lang.python Subject: Re: WP-A: A New URL Shortener Date: Wed, 16 Mar 2016 10:16:28 +1100 Lines: 63 Message-ID: References: <17785955.P1rOlOtRcj@PointedEars.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: news.uni-berlin.de /KgOfMhwqpTyKclOmlxc1wDIcGTt2YKnxrQxUn8AwtoQ== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.029 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; '16,': 0.03; 'cc:addr :python-list': 0.09; '*is*': 0.09; 'aliases': 0.09; 'compression': 0.09; 'domains,': 0.09; 'through,': 0.09; 'url:github': 0.09; 'python': 0.10; 'exception': 0.13; 'wed,': 0.15; '(but': 0.15; "hasn't": 0.15; '(either': 0.16; '(http)': 0.16; '*you*': 0.16; '2016': 0.16; '[2].': 0.16; 'arbitrarily': 0.16; 'count.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'length,': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'shorten': 0.16; 'subject:URL': 0.16; 'wrote:': 0.16; 'contribute': 0.16; 'bytes': 0.18; 'version.': 0.18; 'programmer': 0.18; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'ones.': 0.22; 'am,': 0.23; 'ease': 0.23; 'somewhere': 0.24; 'header:In-Reply- To:1': 0.24; 'discussion': 0.24; 'rest': 0.26; 'coding': 0.27; 'message-id:@mail.gmail.com': 0.27; 'then.': 0.27; "skip:' 10": 0.28; 'long.': 0.29; 'project:': 0.29; "i'm": 0.30; 'server.': 0.30; 'code': 0.30; 'becomes': 0.30; 'at:': 0.31; "can't": 0.32; 'software,': 0.32; 'related': 0.32; 'source': 0.33; 'common': 0.33; 'instead,': 0.33; 'shorter': 0.33; 'server': 0.34; 'received:google.com': 0.35; 'ones': 0.35; 'text': 0.35; 'path': 0.35; 'replace': 0.35; 'stable': 0.35; 'quite': 0.35; 'something': 0.35; 'community': 0.36; 'but': 0.36; 'too': 0.36; 'should': 0.36; 'project': 0.36; 'there': 0.36; 'received:209.85': 0.36; 'possible': 0.36; 'urls': 0.36; 'subject:: ': 0.37; 'really': 0.37; 'received:209.85.213': 0.37; 'thought': 0.37; 'wanted': 0.37; 'version': 0.38; 'received:209': 0.38; 'someone': 0.38; 'data': 0.39; 'sure': 0.39; 'subject:-': 0.39; 'where': 0.40; 'still': 0.40; 'space': 0.40; 'some': 0.40; 'software': 0.40; 'your': 0.60; 'share': 0.61; 'clients': 0.61; 'please,': 0.63; 'thomas': 0.63; 'places': 0.64; 'url:co': 0.65; 'capable': 0.65; 'limit': 0.65; 'mar': 0.65; 'today': 0.65; 'soon': 0.65; "they're": 0.66; 'virtually': 0.66; 'decided': 0.66; 'cards': 0.67; 'media': 0.67; 'business': 0.69; 'duty': 0.72; '*no': 0.84; 'chrisa': 0.84; 'compression,': 0.84; 'disturbing': 0.84; "else's": 0.84; 'find.': 0.84; 'hand.': 0.84; 'inexpensive.': 0.84; 'thoughtful': 0.84; 'working,': 0.84; 'to:none': 0.91; 'canonical': 0.91; 'different.': 0.91; 'urls,': 0.91 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:cc :content-transfer-encoding; bh=cj1A1FrrSPJH84/BPoUrQcba8VUnWc0ciiiXvvtEPVQ=; b=Ctzw5HVUSS8E8uTNGNscf4FKIHx+V96gqy/aBd7MXayAf89o11Vnw3UfCIiwzEJiHa XceCQ3qvj7NUjP9mLf7wMyohawb52QNDtzJAFhpWEChsLwFnmfLTl7ArwnicSQaQoMZy uPOl0EAqaMnTZhPxut2cbn3+eWkODAqQkRwFbTN/sC4GpwGuSDQvMtcSGkyyQg1tlcAX +oRY3QH02XWjP4TIwIPBhLi/R+a34u3VE7n2FELuQ46FDUTOrzH8WCCqtx1xtfpPkXmX OXRMG4Ms+qryWduVe8TdsNJqRbvn+DP+qwy17Ofd6gB76gVrLcW2scxlKcuIelcsBGUD sXpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:cc:content-transfer-encoding; bh=cj1A1FrrSPJH84/BPoUrQcba8VUnWc0ciiiXvvtEPVQ=; b=Jkvmt54eo+XfZYFXlA+IUsM33EGSga5u32XBlkiSlZbMVGLjLa+rm81VWp5Jxr+BUG YKzz9CvBh4IN8wiZbV5FbriZJmgk0g+2cHoH+9pgNo6MSi0sZaj7bSqPKztfNS6zObDB FVpazu3wzb040XC98n/Ia3beI/70oksqYTDVYaONUDZCMlPXNi0uG21tnyCD/PxiWcK/ QWWKVciHwOpijbt0k88X8kS78Ps7bmNMxX2yEZSX7ld/UeXvIMZiUWzVo+1/V93fZ0oP iBLOoVpxCpsBA2Ng5MhC16rS388ZLFM/NOo7Vo5VctHL6Wo41oKRWE0e8Ygf8OPTFEey fkSg== X-Gm-Message-State: AD7BkJKJN4F1DlCHWpNPumvOG0+uyMJEf/Bx5Ft5LFlYZTCyI9Djj7t4wCrusFhuMckz2uP2XMzpgNFdmDSmEA== X-Received: by 10.50.43.226 with SMTP id z2mr1389787igl.94.1458083788581; Tue, 15 Mar 2016 16:16:28 -0700 (PDT) In-Reply-To: <17785955.P1rOlOtRcj@PointedEars.de> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:104963 On Wed, Mar 16, 2016 at 9:53 AM, Thomas 'PointedEars' Lahn wrote: > Vinicius Mesel wrote: > >> I'm a 16 year old Python Programmer that wanted to do something differen= t. >> But, like we know, ideas are quite difficult to find. >> So I decided to develop a URL Shortener to help the Python community out >> and share my coding knowledge, and today the project was launched with i= ts >> first stable version. So if you want to see the software working, go che= ck >> it out at: http://wp-a.co/ Or if you want to see the source code to >> contribute and help the project: https://github.com/vmesel/WP-A.CO > > I find it particularly disturbing that in wpa.py:processaURL() your softw= are > apparently stores the original URIs in an SQL database; in the case of yo= ur > proof-of-concept, in *your* database. So *you* are listening in the midd= le > then. I cannot be sure because I have not thought this through, but with > aliases for common second-level domains, and with text compression, it > should be possible to do this without a database. How? If you shorten URLs, you have to be able to reconstruct the long ones. Compression can't do that to arbitrary lengths. Somewhere there needs to be the rest of the information. > And with the exception of Twitter-ish sites that place a limit on message > length, there really is *no need* for shorter URIs nowadays. (HTTP) clie= nts > and servers are capable of processing really long ones [1]; electronic > communications media and related software, too [2]. And data storage spa= ce > as well as data transmission has become exceptionally inexpensive. A few > less bytes there do not count. There are many places where there are limits (hard or soft) on message lengths. Some of us still use MUDs and 80-character line limits. Business cards or other printed media need to be transcribed by hand. Dictation of URLs becomes virtually impossible when they're arbitrarily long. > Instead, there *is* a need for *concise*, *semantic* URIs that Web (servi= ce) > users can *easily* *remember*. It is the duty of the original Web > authors=E2=88=95developers to make sure that there are, and I think that = no kind of > automation is going to ease or replace thoughtful path design anytime soo= n > (but please, prove me wrong): Sure...... if you control the destination server. What if you're engaging in scholarly discussion about someone else's content? You can't change the canonical URLs, and you can't simply copy their content to your own server (either for licensing reasons or to guarantee that the official version hasn't been tampered with). So URL shorteners are invaluable tools. However, I'm not sure what this one is that others aren't. ChrisA