[COTDC] 3 - HTTPClient

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
23 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: [COTDC] 3 - HTTPClient

Sven Van Caekenberghe

On 07 Feb 2011, at 20:23, Dmitri Zagidulin wrote:

> Actually, can somebody explain the troll-mode comment? Why is the
> HTTPClient an example of how not to write code? Should we not be using
> this package in production? What does the comment about  "hacker with
> telnet"-protocol mean?

Well have a look at, for example,

HTTPSocket class>>#httpGetDocument:args:accept:request:

or

HTTPSocket class>>#httpPostDocument:args:accept:request:

Apart from the fact that, externally, the interface is at the same time too big and too small, this is just an enormeous procedural piece of code, without any object oriented structuring at all, let alone reusability. Furthermore, although it works more or less, it is incomplete and bloated at the same time. Nobody dares to touch it.

But please, go have a look yourself ;-)

Sven


Reply | Threaded
Open this post in threaded view
|

Re: [SPAM] Re: [COTDC] 3 - HTTPClient

Dale Henrichs
In reply to this post by Stéphane Ducasse
Haha,

Perhaps there should also be a rating for class comments ... G, PG, R,
NSFW...

Dale

On 02/07/2011 12:07 PM, Stéphane Ducasse wrote:

> this is more HTTPSocket
> I'm sure that philippe will love to answer :)
>
> Stef
>
>
> On Feb 7, 2011, at 8:23 PM, Dmitri Zagidulin wrote:
>
>> Actually, can somebody explain the troll-mode comment? Why is the
>> HTTPClient an example of how not to write code? Should we not be using
>> this package in production? What does the comment about  "hacker with
>> telnet"-protocol mean?
>>
>> On Mon, Feb 7, 2011 at 2:12 PM, Luc Fabresse<[hidden email]>  wrote:
>>>
>>>
>>> 2011/2/7 laurent laffont<[hidden email]>
>>>>
>>>> FYI I put results
>>>> here: http://code.google.com/p/pharo/wiki/CommentOfTheDayContest
>>>
>>> Thanks Laurent.
>>> It is a really great because it document the system and I learn a lot at the
>>> same time ;-)
>>> #Luc
>>>
>>>>
>>>> Laurent
>>>>
>>>> On Mon, Feb 7, 2011 at 4:33 PM, Stéphane Ducasse
>>>> <[hidden email]>  wrote:
>>>>>
>>>>> :)
>>>>> We should just merge the two :)
>>>>>
>>>>>
>>>>>>>> <trollmode>
>>>>>>>> I'm a good example of how not to write code. Turn around, walk away,
>>>>>>>> fast. I'm fully of bugs.
>>>>>>>>
>>>>>>>> Somebody at some point thought that HTTP is a simple "hacker with
>>>>>>>> telnet"-protocol. It's not.
>>>>>>>> </trollmode>
>>>>>>>
>>>>>>> That's actually HTTPSocket, not HTTPClient.
>>>>>>
>>>>>> Although it is a negative comment, it is the truth.
>>>>>>
>>>>>> Still, adding some comments and lowering the pain for others is still a
>>>>>> good idea.
>>>>>>
>>>>>> Sven
>>>>>
>>>>>
>>>>
>>>
>>>
>>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: [SPAM] Re: [COTDC] 3 - HTTPClient

laurent laffont

On Mon, Feb 7, 2011 at 9:52 PM, Dale Henrichs <[hidden email]> wrote:
Haha,

Perhaps there should also be a rating for class comments ... G, PG, R, NSFW...


We can vote on 1st March to deliver the "Best Comment Of The Month" Award :)

Laurent

 

Dale


On 02/07/2011 12:07 PM, Stéphane Ducasse wrote:
this is more HTTPSocket
I'm sure that philippe will love to answer :)

Stef


On Feb 7, 2011, at 8:23 PM, Dmitri Zagidulin wrote:

Actually, can somebody explain the troll-mode comment? Why is the
HTTPClient an example of how not to write code? Should we not be using
this package in production? What does the comment about  "hacker with
telnet"-protocol mean?

On Mon, Feb 7, 2011 at 2:12 PM, Luc Fabresse<[hidden email]>  wrote:


2011/2/7 laurent laffont<[hidden email]>

FYI I put results
here: http://code.google.com/p/pharo/wiki/CommentOfTheDayContest

Thanks Laurent.
It is a really great because it document the system and I learn a lot at the
same time ;-)
#Luc


Laurent

On Mon, Feb 7, 2011 at 4:33 PM, Stéphane Ducasse
<[hidden email]>  wrote:

:)
We should just merge the two :)


<trollmode>
I'm a good example of how not to write code. Turn around, walk away,
fast. I'm fully of bugs.

Somebody at some point thought that HTTP is a simple "hacker with
telnet"-protocol. It's not.
</trollmode>

That's actually HTTPSocket, not HTTPClient.

Although it is a negative comment, it is the truth.

Still, adding some comments and lowering the pain for others is still a
good idea.

Sven











12