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


Groups > pl.comp.programming > #33992

Re: Embedded HTTP Server

From heby <heby@poczta.onet.pl>
Newsgroups pl.comp.programming
Subject Re: Embedded HTTP Server
Date 2020-06-09 00:22 +0200
Organization A noiseless patient Spider
Message-ID <rbmdn3$43s$1@dont-email.me> (permalink)
References (2 earlier) <7cd03711-5fee-4322-b02a-c803fcf43b31o@googlegroups.com> <a0edbb57-72ba-48f1-bf82-7060d1cec401o@googlegroups.com> <d95ffe9d-570f-455c-bb22-0831b8c0a0dfo@googlegroups.com> <rbm3nv$jf$1@dont-email.me> <8aa9011f-5e8a-4ed1-8fbb-47a260945fb8o@googlegroups.com>

Show all headers | View raw


On 08/06/2020 23:44, Maciej Sobczak wrote:
>> Na tym że pierwsa jest wykrywana przez trywialny assert.
> Który nie wykrywa niczego innego.

Ale to co wykrywa jest przydatne.

>> Nie użycie go
>> świadczy o bardzo kiepskiej jakości kodzie
> Według jakich kryteriów?

Programowania defensywnego na inpucie.

>> ponieważ bibiloteka nawet
>> *takiej* oczywistości nie weryfikuje
> Od kiedy to biblioteki HTTP służą do weryfikacji programów?

W każdym inpucie powinna być weryfikacja, ponieważ *ułatwia* to 
debugowanie klientowi.

W każdym innym miejscu powinna być weryfikacja, bo ułatwia to 
refaktoring *autorowi*.

>> a powinna weryfikować jak nawięcej
> Według jakiego procesu produkcji oprogramowania?

Dojrzałego.

>> Z praktyki wynika że nullowe pointery są znacznie wiekszym problemem niż
>> niewłaściwe pointery, bo te drugie często załatwia się kontrolą typów.
> Nie, bo wszystkie akcje GET mają ten sam typ.

No w tym wypadku nie. W sytuacji ogólnej tak.

> register_get_html("action1", action1);
> register_get_html("action2", action2);
> register_get_html("action3", action2);
> Jest bug. Co więcej, zdecydowanie łatwiej jest go zrobić, niż napisać NULL.

To dlatego że masz ascii-art programming. I rozumiem że nie da się tego 
zrobić łatwo i bezpiecznie. Dość specyficzny przypadek gdzie kontrola 
typów nie zadziała. Nie da się mieć wszystkiego, ale to nie znaczy że 
nie można mieć choć troche.

>> Szczególnie kiedy biblitekę używasz po raz pierwszy i spodziewasz się
>> choć odrobiny wsparcia po jej stronie.
> Wsparcie jest w tym, że API jest minimalne i nie narzuca się z niepotrzebnymi abstrakcjami.

Assert to nie abstrakcja. To ... nic.

>> Nie wykluczam że w projaktach hobbystycznych jest jakiś margines
>> projektów gdzie faktycznie psu na budę te testy. Skoro taki masz target...
> Targetem są świadomi inżynierowie, którzy nie oczekują od biblioteki HTTP, że im zrobi weryfikację poprawności programu...

Chyba takich jest relatywnie mało. Sądzepo ilości assertów w poważnych 
biblitekach.

Back to pl.comp.programming | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Embedded HTTP Server Maciej Sobczak <see.my.homepage@gmail.com> - 2020-06-05 13:57 -0700
  Re: Embedded HTTP Server Wojciech Muła <wojtek.mula@gmail.com> - 2020-06-06 03:44 -0700
    Re: Embedded HTTP Server Maciej Sobczak <see.my.homepage@gmail.com> - 2020-06-06 11:34 -0700
      Re: Embedded HTTP Server Wojciech Muła <wojtek.mula@gmail.com> - 2020-06-08 02:39 -0700
        Re: Embedded HTTP Server Maciej Sobczak <see.my.homepage@gmail.com> - 2020-06-08 11:33 -0700
  Re: Embedded HTTP Server heby <heby@poczta.onet.pl> - 2020-06-06 14:34 +0200
    Re: Embedded HTTP Server Maciej Sobczak <see.my.homepage@gmail.com> - 2020-06-06 11:42 -0700
      Re: Embedded HTTP Server heby <heby@poczta.onet.pl> - 2020-06-06 22:22 +0200
        Re: Embedded HTTP Server Maciej Sobczak <see.my.homepage@gmail.com> - 2020-06-06 15:02 -0700
          Re: Embedded HTTP Server heby <heby@poczta.onet.pl> - 2020-06-07 00:36 +0200
            Re: Embedded HTTP Server Maciej Sobczak <see.my.homepage@gmail.com> - 2020-06-07 12:46 -0700
              Re: Embedded HTTP Server heby <heby@poczta.onet.pl> - 2020-06-07 23:21 +0200
                Re: Embedded HTTP Server Maciej Sobczak <see.my.homepage@gmail.com> - 2020-06-08 00:49 -0700
                Re: Embedded HTTP Server heby <heby@poczta.onet.pl> - 2020-06-08 11:52 +0200
                Re: Embedded HTTP Server Maciej Sobczak <see.my.homepage@gmail.com> - 2020-06-08 13:43 -0700
                Re: Embedded HTTP Server heby <heby@poczta.onet.pl> - 2020-06-08 23:24 +0200
                Re: Embedded HTTP Server Maciej Sobczak <see.my.homepage@gmail.com> - 2020-06-08 14:52 -0700
                Re: Embedded HTTP Server heby <heby@poczta.onet.pl> - 2020-06-09 00:08 +0200
                Re: Embedded HTTP Server Maciej Sobczak <see.my.homepage@gmail.com> - 2020-06-09 13:23 -0700
                Re: Embedded HTTP Server heby <heby@poczta.onet.pl> - 2020-06-09 22:47 +0200
                Re: Embedded HTTP Server Maciej Sobczak <see.my.homepage@gmail.com> - 2020-06-09 14:14 -0700
                Re: Embedded HTTP Server heby <heby@poczta.onet.pl> - 2020-06-09 23:32 +0200
                Re: Embedded HTTP Server Maciej Sobczak <see.my.homepage@gmail.com> - 2020-06-10 11:57 -0700
                Re: Embedded HTTP Server heby <heby@poczta.onet.pl> - 2020-06-10 22:52 +0200
                Re: Embedded HTTP Server Tomasz Kaczanowski <kaczus@poczta.onet.pl> - 2020-06-10 07:50 +0200
                Re: Embedded HTTP Server heby <heby@poczta.onet.pl> - 2020-06-10 08:09 +0200
                Re: Embedded HTTP Server Mateusz Viste <mateusz@xyz.invalid> - 2020-06-08 10:32 +0200
  Re: Embedded HTTP Server Wojciech Muła <wojtek.mula@gmail.com> - 2020-06-06 10:10 -0700
    Re: Embedded HTTP Server Maciej Sobczak <see.my.homepage@gmail.com> - 2020-06-06 12:00 -0700
      Re: Embedded HTTP Server Wojciech Muła <wojtek.mula@gmail.com> - 2020-06-08 03:25 -0700
        Re: Embedded HTTP Server Maciej Sobczak <see.my.homepage@gmail.com> - 2020-06-08 12:20 -0700
          Re: Embedded HTTP Server heby <heby@poczta.onet.pl> - 2020-06-08 21:32 +0200
            Re: Embedded HTTP Server Maciej Sobczak <see.my.homepage@gmail.com> - 2020-06-08 14:44 -0700
              Re: Embedded HTTP Server heby <heby@poczta.onet.pl> - 2020-06-09 00:22 +0200
                Re: Embedded HTTP Server Maciej Sobczak <see.my.homepage@gmail.com> - 2020-06-09 13:43 -0700
                Re: Embedded HTTP Server heby <heby@poczta.onet.pl> - 2020-06-09 23:15 +0200
                Re: Embedded HTTP Server Maciej Sobczak <see.my.homepage@gmail.com> - 2020-06-10 12:13 -0700
                Re: Embedded HTTP Server heby <heby@poczta.onet.pl> - 2020-06-10 22:54 +0200
                Re: Embedded HTTP Server Maciej Sobczak <see.my.homepage@gmail.com> - 2020-06-10 13:35 -0700
                Re: Embedded HTTP Server heby <heby@poczta.onet.pl> - 2020-06-10 22:55 +0200
          Re: Embedded HTTP Server Wojciech Muła <wojtek.mula@gmail.com> - 2020-06-23 00:33 -0700
            Re: Embedded HTTP Server Maciej Sobczak <see.my.homepage@gmail.com> - 2020-06-23 14:13 -0700

csiph-web