Programming mini-rants thread



  • Post little annoyances that you need to get off your chest, whether about websites, applications, operating systems, programming, programmers, whatever, as long as it is about computers and their misuse

    My inaugural rant is: why don't RDBMS designers and users actually understand relational database theory? Specifically, why don't they get

    • That tables are just a representation of a relvar, not the relvar itself and *certainly not the relation a relvar instantiates,
    • that attributes are an unordered set of domains within a relation's tuple,
    • that the order in which the relvars is added to the relation does not constitute an implicit index,
    • that a candidate key is any guaranteed-unique combination of relation attributes,
    • that no subset of relation attributes not guaranteed to be unique should be allowed to be used as a key or index,
    • that a relation defines a uniquely-constrained domain, such that two relations in the same table with the same primitive implementation are not of the same type in terms of strong typing,
    • that Relational domains are not fixed, concrete types, but purely-abstract sets that could be any collection of values that fit the set constraint (which could damn well be 'valid phone numbers in a given area code that are actually assigned at the time it is added', 'every integer except 1, 17, and 23', 'PNGs depicting portraits of the US Presidents', or even 'valid phone numbers in a given area code that are actually assigned at the time this view was generated', and the system should have a way for the DBA to define those constraints in a meaningful manner that can be applied automatically) , and nothing else,
    • that non-key values within a relvar should not affect the relational database's relational constraints in any way, and
    • that treating NULL as either truthy or falsey is a bad idea?

    It is as if the SQL team were working from a copy of Codd's book imported from Bizzaro World, and everyone else since then has just nodded and said, "sounds great!"


  • Winner of the 2016 Presidential Election

    @ScholRLEA said in Programming mini-rants thread:

    that treating NULL as either truthy or falsey is a bad idea

    Name and shame.



  • @ScholRLEA said in Programming mini-rants thread:

    that treating NULL as either truthy or falsey is a bad idea?

    It's obviously meant to represent FILE_NOT_FOUND



  • @asdf said in Programming mini-rants thread:

    @ScholRLEA said in Programming mini-rants thread:

    that treating NULL as either truthy or falsey is a bad idea

    Name and shame.

    Ah... oh, crap. I think I fucked up with that one, because while I have this recollection of seeing it somewhere (early versions of Sqlite, perhaps?) I can't pin down where, and now I am not sure if that is an accurate memory or not. In any case, it is more of a language (query and/or host) issue, unless the implementors really fucked up because it could screw up the joins in some cases if they did.

    Chalk it up to shoulder aliens, I guess.


  • Discourse touched me in a no-no place

    @ScholRLEA said in Programming mini-rants thread:

    That tables are just a representation of a relvar, not the relvar itself and *certainly not the relation a relvar instantiates,

    1. Tables are a way to generate a relation through providing the instances of the tuples that satisfy the relation. Tables themselves need a unique identifier per row in order to allow the table to be managed (otherwise it isn't necessarily possible to identify a particular row). That's not to say that you should pay attention to it when constructing queries that use the relation that the table induces.

    2. Anyone relying on an order they didn't ask for (whether explicitly or by configured default) is an idiot.

    3. You can INDEX ALL THE THINGS COLUMNS! but it gets expensive. In practice, you don't.

    4. I'm guessing you find ORMs annoying. That's perfectly OK. ;)



  • @ScholRLEA said in Programming mini-rants thread:

    That tables are just a representation of a relvar, not the relvar itself and *certainly not the relation a relvar instantiates

    I don't think I understand that at all.


  • Winner of the 2016 Presidential Election

    @dkf said in Programming mini-rants thread:

    I'm guessing you find ORMs annoying. That's perfectly OK.

    Some ORMs are worse than others. I still like working with SQLAlchemy



  • More like the programming medium-size rants thread.



  • @ScholRLEA said in Programming mini-rants thread:

    PNGs depicting portraits of the US Presidents

    Can you express this constraint in a formal way, please? :wink:


  • Winner of the 2016 Presidential Election

    Overly permissive programming languages. If I'm passing a string into a method that wants a Date, just dno't compile. I don't want a runtime error weeks after deployment because the string and locale settings didn't match, I want to be alerted so I can explicitly handle the places where strings go in


  • Discourse touched me in a no-no place

    @anonymous234 said in Programming mini-rants thread:

    @ScholRLEA said in Programming mini-rants thread:

    PNGs depicting portraits of the US Presidents

    Can you express this constraint in a formal way, please? :wink:

    They're kind of green and also have pictures of numbers and $ symbols. Will that do?



  • @dkf can you send me the samples to analyze them?



  • @dkf Ah, clever, making use of the the built-in identification systems they have.


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.