Embedding scripts directly from 3rd party CDN! What could go wrong?


  • Banned

    @Carnage said in Embedding scripts directly from 3rd party CDN! What could go wrong?:

    @Gąska said in Embedding scripts directly from 3rd party CDN! What could go wrong?:

    @Zenith said in Embedding scripts directly from 3rd party CDN! What could go wrong?:

    @Gąska said in Embedding scripts directly from 3rd party CDN! What could go wrong?:

    subclassing is the only design pattern that lets you do that without the original developer being clairvoyant and knowing exactly every single future use case everybody would ever have

    They don't have to be clairvoyant exactly. They just can't be lazy and hardcode everything.

    There is a very thin line between "hardcoded too much" and "made things so configurable that even the simplest things require ungodly amounts of boilerplate". Seen both many times, in all kinds of libraries for all kinds of purposes - and I almost never see the golden middle where everything that needs to be configurable is configurable and things that don't have to aren't.

    Everyone will need different things to be configurable, so almost everything would need to be configurable to cover what everyone wants. Give everything opinionated defaults, and let people that want to fiddle the bits deal with the reams of boilerplate when going off the reservation.

    This sounds good in theory but falls flat on its face in practice because very often the defaults are dependent on one another and you have to change a whole bunch of them at once.

    The nice thing about subclassing is that you can override the hardcoding itself, so even if the original dev was lazy, you can still configure it the way you want in many cases. The only potential obstacle is overuse of final methods.

    This will make everything a lot more complex, and there will be a minefield of bugs when doing odd stuff, because software. But the golden middle of just the right stuff configurable is a mirage and can't happen if it's going to be used by more than a single project.

    Hence my comment about clairvoyance.



  • @Gąska said in Embedding scripts directly from 3rd party CDN! What could go wrong?:

    @Carnage said in Embedding scripts directly from 3rd party CDN! What could go wrong?:

    @Gąska said in Embedding scripts directly from 3rd party CDN! What could go wrong?:

    @Zenith said in Embedding scripts directly from 3rd party CDN! What could go wrong?:

    @Gąska said in Embedding scripts directly from 3rd party CDN! What could go wrong?:

    subclassing is the only design pattern that lets you do that without the original developer being clairvoyant and knowing exactly every single future use case everybody would ever have

    They don't have to be clairvoyant exactly. They just can't be lazy and hardcode everything.

    There is a very thin line between "hardcoded too much" and "made things so configurable that even the simplest things require ungodly amounts of boilerplate". Seen both many times, in all kinds of libraries for all kinds of purposes - and I almost never see the golden middle where everything that needs to be configurable is configurable and things that don't have to aren't.

    Everyone will need different things to be configurable, so almost everything would need to be configurable to cover what everyone wants. Give everything opinionated defaults, and let people that want to fiddle the bits deal with the reams of boilerplate when going off the reservation.

    This sounds good in theory but falls flat on its face in practice because very often the defaults are dependent on one another and you have to change a whole bunch of them at once.

    The nice thing about subclassing is that you can override the hardcoding itself, so even if the original dev was lazy, you can still configure it the way you want in many cases. The only potential obstacle is overuse of final methods.

    This will make everything a lot more complex, and there will be a minefield of bugs when doing odd stuff, because software. But the golden middle of just the right stuff configurable is a mirage and can't happen if it's going to be used by more than a single project.

    Hence my comment about clairvoyance.

    The subclassing runs into the same issue with clairvoyance though, but at least you have more power to do it wrong until shit works like you want.
    I think we still lack the proper language to express user interface design in a good way. I have no fucking clue how it should be done, but the way it's done today is just wrong.
    I wouldn't be surprised to find out that someone figured out how to do it in a nice way in the sixties, but it never caught on.


  • Notification Spam Recipient

    @Carnage said in Embedding scripts directly from 3rd party CDN! What could go wrong?:

    but it never caught on

    Narrator: it started with a tag that meant nothing and so could be moulded into anything....


    Filed under: div hell



  • @Carnage @Gąska Sometimes these conversations make me wonder if I really do live on a different Earth from other programmers/developers.

    I wish more controls were designed like Microsoft's ListBox/ComboBox classes. You can make some damned cool stuff with those as the base class. The two biggest shortcomings with either are that the lists are just Objects and there aren't separate before/after events for changing those lists.


Log in to reply