Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #104957 > unrolled thread

WP-A: A New URL Shortener

Started byVinicius Mesel <me@vmesel.com>
First post2016-03-15 16:56 -0300
Last post2016-03-17 12:47 +0000
Articles 7 on this page of 27 — 9 participants

Back to article view | Back to comp.lang.python


Contents

  WP-A: A New URL Shortener Vinicius Mesel <me@vmesel.com> - 2016-03-15 16:56 -0300
    Re: WP-A: A New URL Shortener Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-03-15 23:53 +0100
      Re: WP-A: A New URL Shortener Erik <python@lucidity.plus.com> - 2016-03-15 23:11 +0000
      Re: WP-A: A New URL Shortener Chris Angelico <rosuav@gmail.com> - 2016-03-16 10:16 +1100
        Re: WP-A: A New URL Shortener Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-03-16 00:38 +0100
          Re: WP-A: A New URL Shortener Chris Angelico <rosuav@gmail.com> - 2016-03-16 10:55 +1100
            Re: WP-A: A New URL Shortener Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-03-16 01:36 +0100
          Re: WP-A: A New URL Shortener Gene Heskett <gheskett@wdtv.com> - 2016-03-15 22:34 -0400
            Re: WP-A: A New URL Shortener Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-03-16 03:46 +0100
              Re: WP-A: A New URL Shortener Gene Heskett <gheskett@wdtv.com> - 2016-03-15 23:34 -0400
          Re: WP-A: A New URL Shortener Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2016-03-16 17:51 +1100
        Re: WP-A: A New URL Shortener Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-03-16 17:27 +1300
          Re: WP-A: A New URL Shortener Chris Angelico <rosuav@gmail.com> - 2016-03-16 16:43 +1100
            Re: WP-A: A New URL Shortener Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-03-17 19:27 +0100
              Re: WP-A: A New URL Shortener Rick Johnson <rantingrickjohnson@gmail.com> - 2016-03-17 13:40 -0700
                Re: WP-A: A New URL Shortener Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-03-17 22:15 +0100
                  Re: WP-A: A New URL Shortener Rick Johnson <rantingrickjohnson@gmail.com> - 2016-03-17 21:49 -0700
                    Re: WP-A: A New URL Shortener Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-03-19 14:03 +0100
      Re: WP-A: A New URL Shortener Rick Johnson <rantingrickjohnson@gmail.com> - 2016-03-15 16:19 -0700
        Re: WP-A: A New URL Shortener Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-03-16 01:22 +0100
          Re: WP-A: A New URL Shortener Rick Johnson <rantingrickjohnson@gmail.com> - 2016-03-15 20:40 -0700
      Re: WP-A: A New URL Shortener Erik <python@lucidity.plus.com> - 2016-03-15 23:40 +0000
      Re: WP-A: A New URL Shortener Chris Angelico <rosuav@gmail.com> - 2016-03-16 10:48 +1100
      Re: WP-A: A New URL Shortener Erik <python@lucidity.plus.com> - 2016-03-16 00:31 +0000
      Re: WP-A: A New URL Shortener Chris Angelico <rosuav@gmail.com> - 2016-03-16 11:34 +1100
      Re: WP-A: A New URL Shortener Chris Angelico <rosuav@gmail.com> - 2016-03-17 23:08 +1100
        Re: WP-A: A New URL Shortener Dan Sommers <dan@tombstonezero.net> - 2016-03-17 12:47 +0000

Page 2 of 2 — ← Prev page 1 [2]


#104985

FromRick Johnson <rantingrickjohnson@gmail.com>
Date2016-03-15 20:40 -0700
Message-ID<df56fd93-3408-4d7e-a22b-c2a6533fd3a8@googlegroups.com>
In reply to#104972
On Tuesday, March 15, 2016 at 7:23:12 PM UTC-5, Thomas 'PointedEars' Lahn wrote:

(Note: i had to rearrange your paragraph to accommodate a more
intuitive response. I apologize for this, but i'm confident
i was able to maintain your original intent)

> You are giving bad advice to a junior developer, advising
> them to *waste* *their* *youth* developing for the recycle
> bin. Because what if it does not work out in the end?

But what if it does "work out"? There is only one way to
find out, yes?

> It can no doubt be educational to play with programming.
> But if actually the *entire* world says it [...] is a bad
> idea, then it probably is. Unfortunately, there is [...]
> the common misconception of the misunderstood genius, and
> that a real genius would sink so low as to do things just
> in order to prove everybody wrong. But to do so is not
> genial, it is outright stupid.

I completely disagree.

Even if the fruits of your labor end up in the recycle bin,
so what! There is always a valuable lesson to be learned
from every project, even if that lesson is: " Hmm, this was
a very bad idea, i should have considered the consequences
of this vector path more carefully".

But in many cases, one cannot foresee the failure, and must
travel *DEEP* into the investigatory process before the
failure becomes apparent. And just because one cannot solve
a specific problem, one would be foolish to conclude that
the problem has no attainable solution. One should simply
conclude, that they lack the intelligence to solve the
problem.

The worst attitude you can adopt is that of the pessimist,
who is defeated by his own "fear of failure" before he even
begins. None of us are Omniscient, therefore, we must realize
that in order to achieve any level of intelligence *GREATER*
than what we currently posses, we must be unafraid to reach
beyond our intellectual limits and into the "scary dark
corners" of the "unknown".

Yes, failure is highly likely in these "dark areas", and we
could be bitten by a spider lurking in the shadows, but
until we systematically map these unfamiliar areas, even if
necessary, with *BRUTE FORCE TRIAL AND ERROR*, we will never
attain a greater level of intelligence.

And perhaps some people don't want to venture "outside their
comfy little box". That's fine. But their defeatism will
never discourage me from actively expanding my "intellectual
horizons". Boxes are confining, intellectual or otherwise,
and i was born to be free!

The best method of achieving intellectual greatness, is to
take on projects/challenges that are well outside your
comfort zone. Don't worry, if you have a properly
functioning brain, then you already possess the *ONLY* tool
you will ever need to accomplish the mission.

The main reason i hang out here, answering questions, is not
so much to help others, but to learn. Learning is my primary
goal, and helping is my secondary. I have found that simply
"reading the archives" is not enough, because it is not
*READING* that motivates me to learn, no, it is the
potential of failure that motivates me put-in the extra
effort to ensure that my advice is good advice. And sure,
i've failed quite a few times, but do those failures bother
me? NO WAY! Because each time i failed, i made sure to
investigate and discover *WHY* i failed. I learned, and i
became more intelligent each time.

The same "motivational force" can be utilized when we post
our source code publicly. Every one of us, has source code
hiding in our repos that we would be ashamed to show
publicly (yes, don't lie!). Perhaps the code is not using
proper Pythonic style convention, perhaps it is missing
documentation strings, or perhaps, it is just some really
horrific algorithms that we have been too lazy to re-write.
Posting the code presents us with a high probability that
someone may find these "warts", and expose them. For that
reason, we will be motivated to repair these warts before
making them public.

So my point is: Don't be fearful of publicly posting your
code, or participating in online help groups, or, more
generally, stepping outside of your "intellectual comfort
zone" by taking on a challenging project. Because if you're
not failing on a regular basis , then that should be
*GLARING* indication that you're not pushing your boundaries
far enough.

"FAILURE IS A NATURAL BYPRODUCT OF THE LEARNING PROCESS" -- rr

> Want a more prominent example?  Linus Torvalds wrote a
> kernel for an operating system because, although it
> started his fascination for operating systems, MINIX did
> not suffice for *him*; only later he announced *on Usenet*
> (comp.os.minix) what would become the Linux kernel, and
> look what arose from that.  Because the people he
> announced it to thought, "Hey, that could be really
> *useful*!".

I too have dreamed of writing an OS, if for nothing more,
than to prove to myself i can do it. Because i know i can. A
few years back, i started hacking at the Python2.x source,
attempting to mold it into my own little version of Python,
but i had to abandon that project, after i discovered that
my design is incompatible with the basic nature of Python.
So now i've set a new, even bolder goal, to write my own
language from scratch. Yes, it will be much more difficult
task, but the unlimited freedom of a new build will make it
all worthwhile. And just think of all the wonderful
knowledge just waiting to be discovered during that process.

[toc] | [prev] | [next] | [standalone]


#104966

FromErik <python@lucidity.plus.com>
Date2016-03-15 23:40 +0000
Message-ID<mailman.172.1458085236.12893.python-list@python.org>
In reply to#104960
Hi Chris,

On 15/03/16 23:16, Chris Angelico wrote:
> So URL shorteners are invaluable tools.

Perhaps, and in the specific - transient - use-cases you describe that's 
fine. The problem I have with them is that they are a level of 
indirection controlled by a third party. If the source (let's say this 
list) has a message containing a link to something on the target which 
is still available via a "shortened" URL, then if the shortening service 
goes offline, the link is dead. Even though the target is still there.

People complain about the use of pastebin in this list for showing code 
fragments. It's the same thing - one URL shortening (indirection) 
service goes offline and a ton of links are suddenly silenced. It's like 
a disturbance in the force ;)

FWIW, I also have an issue with services that convert your ASCII text 
into unicode such that the resulting glyphs are still things a human 
reader will understand as substitutes for the original text but which 
can't be easily searched/grepped.

All for saving a byte or two.

> However, I'm not sure what
> this one is that others aren't.

Vinicius didn't say his code was anything different.

He said he _WANTED_ to do something different _BUT_ realised ideas are 
hard to come by, _SO_ he developed some URL-shortening software and then 
shared it.

I see it as a learning exercise on his part, and that's great.

E.

[toc] | [prev] | [next] | [standalone]


#104968

FromChris Angelico <rosuav@gmail.com>
Date2016-03-16 10:48 +1100
Message-ID<mailman.173.1458086021.12893.python-list@python.org>
In reply to#104960
On Wed, Mar 16, 2016 at 10:40 AM, Erik <python@lucidity.plus.com> wrote:
> Hi Chris,
>
> On 15/03/16 23:16, Chris Angelico wrote:
>>
>> So URL shorteners are invaluable tools.
>
>
> Perhaps, and in the specific - transient - use-cases you describe that's
> fine. The problem I have with them is that they are a level of indirection
> controlled by a third party. If the source (let's say this list) has a
> message containing a link to something on the target which is still
> available via a "shortened" URL, then if the shortening service goes
> offline, the link is dead. Even though the target is still there.
>
> People complain about the use of pastebin in this list for showing code
> fragments. It's the same thing - one URL shortening (indirection) service
> goes offline and a ton of links are suddenly silenced. It's like a
> disturbance in the force ;)

I agree, it's a risk. Any indirection adds that. So the benefit has to
be weighed against this inherent cost.

> FWIW, I also have an issue with services that convert your ASCII text into
> unicode such that the resulting glyphs are still things a human reader will
> understand as substitutes for the original text but which can't be easily
> searched/grepped.

Oh, I totally agree. Your text should be your text.

>> However, I'm not sure what
>> this one is that others aren't.
>
>
> Vinicius didn't say his code was anything different.
>
> He said he _WANTED_ to do something different _BUT_ realised ideas are hard
> to come by, _SO_ he developed some URL-shortening software and then shared
> it.

Yeah, but there's usually _something_ different :)

> I see it as a learning exercise on his part, and that's great.

Absolutely. As such, it's excellent. I often like to make a small
change when I reimplement, though - something that I thought was
ill-designed in the original, or maybe just a simple thing of
integration somewhere (eg a little text editor embedded in a larger
program).

ChrisA

[toc] | [prev] | [next] | [standalone]


#104973

FromErik <python@lucidity.plus.com>
Date2016-03-16 00:31 +0000
Message-ID<mailman.176.1458088267.12893.python-list@python.org>
In reply to#104960
Hi Chris,

On 15/03/16 23:48, Chris Angelico wrote:
> I agree, it's a risk. Any indirection adds that. So the benefit has to
> be weighed against this inherent cost.

True, so it's not URL shorteners that I disagree with on principle, it's 
the _inappropriate_ use of URL shorteners ;) If one uses them on fora 
such as this which could be expected to exist for some considerable time 
then it's an issue. Elsewhere, then yes, the linking service may not 
last as long as the shortening service ...

>  I often like to make a small
> change when I reimplement, though - something that I thought was
> ill-designed in the original,

OK, so maybe the idea for Vinicius (if he's still reading) to pursue is 
that it should be something that can be used as the basis for a URL 
shortening "service" that is distributed and can NOT go away (think 
DNS). That is what some people don't like about the URL shorteners, so 
maybe that's an itch that he might want to scratch.

I've no idea if other such projects already exist, it just occurred to 
me when responding.

E.

[toc] | [prev] | [next] | [standalone]


#104974

FromChris Angelico <rosuav@gmail.com>
Date2016-03-16 11:34 +1100
Message-ID<mailman.177.1458088471.12893.python-list@python.org>
In reply to#104960
On Wed, Mar 16, 2016 at 11:31 AM, Erik <python@lucidity.plus.com> wrote:
>
>>  I often like to make a small
>> change when I reimplement, though - something that I thought was
>> ill-designed in the original,
>
>
> OK, so maybe the idea for Vinicius (if he's still reading) to pursue is that
> it should be something that can be used as the basis for a URL shortening
> "service" that is distributed and can NOT go away (think DNS). That is what
> some people don't like about the URL shorteners, so maybe that's an itch
> that he might want to scratch.
>
> I've no idea if other such projects already exist, it just occurred to me
> when responding.

Now THAT is an interesting idea. I don't know how it would be handled,
though; since there has to be additional information that isn't in the
URL, and has to *not* be on any server that can go down, it basically
has to be a distributed thing somehow. So you'd need to look into how
things like Bitcoin work. It'd be pretty cool if it could work!

ChrisA

[toc] | [prev] | [next] | [standalone]


#105088

FromChris Angelico <rosuav@gmail.com>
Date2016-03-17 23:08 +1100
Message-ID<mailman.270.1458216512.12893.python-list@python.org>
In reply to#104960
(Bouncing back to the list)

On Thu, Mar 17, 2016 at 10:32 PM, Vinicius <me@vmesel.com> wrote:
> Sorry for my bad English guys.

Your English is fine. Don't stress about it. :)

>> Em 15 de mar de 2016, às 9:34 PM, Chris Angelico <rosuav@gmail.com> escreveu:
>>
>>> On Wed, Mar 16, 2016 at 11:31 AM, Erik <python@lucidity.plus.com> wrote:
>>>
>>>> I often like to make a small
>>>> change when I reimplement, though - something that I thought was
>>>> ill-designed in the original,
>>>
>>>
>>> OK, so maybe the idea for Vinicius (if he's still reading) to pursue is that
>>> it should be something that can be used as the basis for a URL shortening
>>> "service" that is distributed and can NOT go away (think DNS). That is what
>>> some people don't like about the URL shorteners, so maybe that's an itch
>>> that he might want to scratch.
>
> So I really don't see what you were trying to say with this paragraph, the part of "that is distributed and can NOT go away". You think that the project could be distributed with a range of people and get them all syncronized?
>

The problems with URL shorteners are:

1) They are centralized, and thus vulnerable to outages

2) They might be taken down completely, particularly if they're losing
money for someone

So you would need to come up with a system that's distributed (such
that one computer's inaccessibility doesn't bring everything down) and
permanent (keep on circulating that information!). It could be a
rather fun problem to tackle.

ChrisA

[toc] | [prev] | [next] | [standalone]


#105091

FromDan Sommers <dan@tombstonezero.net>
Date2016-03-17 12:47 +0000
Message-ID<nce914$n3b$1@dont-email.me>
In reply to#105088
On Thu, 17 Mar 2016 23:08:24 +1100, Chris Angelico wrote:

> So you would need to come up with a system that's distributed (such
> that one computer's inaccessibility doesn't bring everything down) and
> permanent (keep on circulating that information!). It could be a
> rather fun problem to tackle.

If I want NNTP and long retention times, I know where to find them!  :-)

[toc] | [prev] | [standalone]


Page 2 of 2 — ← Prev page 1 [2]

Back to top | Article view | comp.lang.python


csiph-web