• 0 Posts
  • 2.13K Comments
Joined 1 year ago
cake
Cake day: June 20th, 2023

help-circle
  • If it’s part of the Requirements that the frontend should handle “No results found” differently from “Not authorized”, even if that’s just by showing an icon, then ach list of stuff which might or not be authorized should have a flag signalling that.

    (This is simply data analysis - if certain information is supposed to be shown to the user it should come from somewhere and hence the frontend must get it from somewhere, and the frontend code trying to “deduce it” from data it gets is generally prone to the kind of problem you just got because unless explicitly agreed and documented, sooner or later some deduction done by one team is not going to match what the other team is doing. Generally it’s safer just to explicitly pass that info in a field for that purpose to avoid frontend-backend integration issues).

    Authorization logic is almost always a responsibility of the backend (for various reasons, including proper security practices) and for the frontend it’s generally irrelevant why it’s authorized or not, unless you have to somehow display per-list the reason for a it being authorized or not, which would be a strange UI design IMHO - generally there’s but a flag in the main part of the UI and a separate page/screen with detailed authorization information - if the user really wants to dig down into the “why” - which would be using different API call just to fill in that page/screen.

    So if indeed it is required that the frontend knows if an empty result is due to “Not Authorized” rather than “No results found” (a not uncommon design, though generally a good UI design practice is to simply not even give the user access to listing things the user is not authorized to see rather than let the user chose them and then telling them they’re not authorized to do it, as the latter design is more frustrating for users) that info should be an explicit entry in what comes from the backend.

    The JSON is indeed different in both cases, but if handled correctly it shouldn’t matter.

    That said, IMHO, if all those 3 fields in your example should be present, the backend should be putting a list on all 3 fields even if for some the list is empty, rather than a null in some - it doesn’t matter what the JSON is since even at the Java backend level, a List variable with a “null” is not the same as a List variable with a List of length 0 - null vs empty list is quite a common source of mistakes even within the code of just the one tier, though worse if it ends up in API data.

    Who is wrong or right ultimately depends on the API design having marked those fields as mandatory or optional.


  • That sounds like an error in the specification of the client-server API or an erroneous implementation on the server side for the last version: nothing should be signaled via presence or absence of fields when using JSON exactly because, as I described in my last post, the standard with JSON is that stuff that is not present should be ignore (i.e. it has no meaning at all) for backwards compatibility, which breaks if all of the sudden presence or absence are treated as having meaning.

    Frankly that there isn’t a specific field signalling authorized/not-authorized leads me to believe that whomever has designed that API isn’t exactly experienced at that level of software design: authorization information should be explicit, not implicit, otherwise you end up with people checking for not-in-spec side effects like you did exactly for that reason (i.e. “is the no data being returned because of user not authorized or because there was indeed no data to retunr?”), which is prone to break since not being properly part of the spec means any of the teams working on it might interpret things differently and/or change them at any moment.



  • If I remember it correctly, per the JSON definition when a key is present but not expected it should be ignored.

    The reason for that is to maintain compatibility between versions: it should be possible to add more entries to the data and yet old versions of the software that consumes that data should still continue to operate if all the data they’re designed to handle is still there and still in the correct format.

    Sure, that’s not a problem in the blessed world of web-based frontends where the user browser just pulls the client code from the server so frontend and backend are always in synch, but is a problem for all other kinds of frontend out there where the life-cycle of the client application and the server one are different - good luck getting all your users to update their mobile apps or whatever whenever you want to add functionality (and hence data in client-server comms) to that system.

    (Comms API compatibility is actually one of the big problems in client-server systems development)

    So it sounds like an issue with the way your JavaScript library handles JSON or your own implementation not handling per-spec the presence of data which you don’t use.

    Granted, if the server side dev only makes stuff for your frontend, then he or she needs not be an asshole about it and can be more accomodating. If however that data also has to serve other clients, then I’m afraid you’re the one in the wrong since you’re demanding that the backwards compatibility from the JSON spec itself is not used by anybody else - which as I pointed out is a massive problem when you can’t guarantee that all client apps get updated as soon as the server gets updated - because you couldn’t be arsed to do your implementation correctly.


  • Around here, Portugal, were every Summer the temperature exceeds 40 C for at least some days in August, we have outside rollup shades on every window, so one of the tricks is to keep the shades down and and the windows closed during the hottest and sunniest parts of the day, at the very least the afternoon.

    Then at night you open the windows and let the cooler night air in (even better if you do it early morning, around sunrise, which is the coolest time of the day).

    Note that this doesn’t work well with curtains or internal shades, because with those any conversion of light into heat when the light heats the shades/curtains (as they’re not mirrors and don’t reflect all light back) happens inside the house and thus that heat gets trapped indoors.


  • I’m sorry but unwaveringly supporting a nation ruled by ethno-Fascists when they’re committing Genocide because of the ethnicity of the majority and the leaders there is the same old extreme racism as in the old days and passing laws to punish anybody who criticizes that ethno-Fascist nation is the same authoritarianism in defense of Fascists claiming to represent an ethnicity as in the old days.

    If the mindset that was the foundation of Nazism had changed in Germany we would neither be seeing such an extreme version of supporting a regime that claimes to be supporting some people because of their ethnicity (even against the will of many of those very people, who again and again point out that Israel and the dominant ideology there does not represent them), nor would be we be seeing the use of the Law to force everybody else to either go along with it or shut up.

    A Germany where the power elites had learned the Humanitarian take of “never again” (i.e. “never again shall this be done to anybody”) rather kept the racism going and hence using a racist version of it (i.e. “never again shall Germans do this to Jews”), would not be doing this, not even close.

    What’s going on in Germany is not merely “crushing guilt of what happened in WWII”, it’s the racism and authoritarianism coming out of hiding with the excuse that “It’s for the Jews rather than for the Arian Race, so it’s alright”.




  • Aceticon@lemmy.worldtoPolitical Memes@lemmy.worldOh Joe...
    link
    fedilink
    arrow-up
    6
    arrow-down
    3
    ·
    edit-2
    4 days ago

    That’s the rational take and I’m sure plenty of people will vote Biden following that rationale.

    The top poster’s “pestilence is a good thing” (i.e. Biden is a “good guy”) statement on the other hand is insanelly tribalist and pure fantasy.

    Being a Lesser Evil by comparison with an extremelly Evil option is not at all the same as being Good.


  • Aceticon@lemmy.worldtoPolitical Memes@lemmy.worldOh Joe...
    link
    fedilink
    arrow-up
    10
    arrow-down
    8
    ·
    edit-2
    4 days ago

    Lots of talk, no action: that’s bullshit Political Propaganda 101 when a politician in power wants to do something which most of his voters are strongly against.

    His Administration’s actions are exactly the opposite, from the weapons shipments to Israel going around Congress that included 2000lb bombs to UN Vetos and saying that the ICJ shouldn’t even be evaluating the case against Israel for Genocide (clearly this Administration fears a veredict of “guilty”, which means they do believe Israel is likely comitting what amounts to Genocide under International Law).

    The non-sociopath path for America would’ve be “Perfect Neutrality” (no action at all), yet Biden choses actual military and diplomatic support, including condemning anti-Genocide demonstrators as “anti-semitic” and condoning the use of police violence against them all the while in this specific subject lying just as shamelessly as Trump.



  • Also a lot of the late Soviet Union military technology came from Ukraine, plus their military were also trained in the same kind of school of thought as Russia and still know it.

    So it makes sense that, when push came to shove, the Ukranians would fast come up with asymetric war solutions against Russia, that Russia wouldn’t be as fast in effectivelly countering them and Ukraine would be quicker at developing new or adjusted solutions once Russia found a counter (or, more generally, that Ukraine would remain ahead of Russian in the cycle were each side develops a counter to the other side’s counters).

    Had Russia’s initial blietzkrieg attack worked, it would’ve been a different story, but at this stage it makes sense that Ukraine has the technological edge, not just in the weaponry it gets from the West but also in their own weapons development, especially now that it has much better AA to protect the installations far away from the frontlines working on weapons tech.



  • Aceticon@lemmy.worldtoPolitical Memes@lemmy.worldOh Joe...
    link
    fedilink
    arrow-up
    4
    arrow-down
    1
    ·
    edit-2
    4 days ago

    I’ve noticed that the loudest the politicians in a country rant about how great a Democracy that country has, the less of a Democracy it is.

    In Europe, for example, you get British Politicians going on an one about how the country has the “Oldest Democracy in The World” (this in a country with a King who a few years ago - well, his mother - was found to actually have some power over what legislation gets passed, an unlected second chamber with members who inherit their seat from their parents and First Past The Post for Parliament) all the while in The Netherlands (who, IMHO, have probably the most Democratic system in the World, including Proportional Vote, though with a powerless King) politians pretty much never rant about the quality of their Democracy.

    At least in the West, the most loud and relentless proclaimers of how great their Democracy is by a large margin are American politicians.


  • The American voting system is not Proportional Vote and instead is massivelly Mathematically rigged with (for Congress) huge single representative electoral circles which in some cases have borders designed exactly to make it near impossible to defeat incumbents (aka Gerrymandering), with (for the Senate) even larger electoral circles (literally, each state) with 2 representatives, and something somewhat similar for Presidential elections (though worse since ultimatelly it all adds up to a single representative electoral circle with 300 million voters for a position with lots of power, unlike most European countries - with some notable exceptions like France - which either don’t have a President or have one which is mainly symbolic and has little power).

    Further, the very nature of the system will, beyond the Mathematical rigging, push the people who would otherwise go for a 3rd party to instead go for the “useful vote” (i.e. chose an electable candidate instead of the one they want) - it’s not by chance that the heaviest argument of the Biden campaign was “vote Biden to defeat Trump”.

    Since new parties take various electoral cycles to grow, it’s pretty impossible for them to do so because it’s Mathematically near impossible for them to even establish a foothold that shows its earlier supporters they do have a chance to one day influence what laws are made in the US and how the country is ruled, so new parties invariable lose steam after the first or second election they go through.

    You can see something similar to this in the UK, were for example the Green Party gets 1 million votes out of 40 million (2.5% of votes) but only 1 member of parliament out of 300 (0.33%), and remember this is with lots of people chosing electable candidates from other parties, so the Green Party natural vote would likely be larger in a different system

    This stands in marked contrast with, for example, The Netherlands, were vote is Proportional and there are 15 parties in their Parliament (Tweede Kamer).


  • Aceticon@lemmy.worldtoPolitical Memes@lemmy.worldOh Joe...
    link
    fedilink
    arrow-up
    8
    arrow-down
    15
    ·
    edit-2
    4 days ago

    Please don’t become the thing you likely abhor (Trumpists and alike) by reacting in a knee jerk fashing to things that “insult” your tribalist morals with a variant of the Fascist take “If you’re not with us, you’re against us”.

    It’s perfectly rational and reasonable to think that Biden is not a “guy with good intentions” whilst also thinking that Trump is no better, whilst it’s irrational and unreasonable to think that just because one doesn’t like Person A, one must like Person B.

    By any human being standards anybody who supports somebody mass murdering children with weapons is a shit person, hence Biden is a shit person. That doesn’t mean Trump is any less shit.

    Even by American President Moral standards (which, sadly are way lower than Normal Person Moral standars, when they should be higher), activelly supporting with weapons a nation committing Genocide is pretty bad, though far from novel.


  • Aceticon@lemmy.worldtoPolitical Memes@lemmy.worldOh Joe...
    link
    fedilink
    arrow-up
    5
    arrow-down
    8
    ·
    edit-2
    4 days ago

    The point being that trying to pass that specific sandwish as “gourmet” doesn’t make this less of a contest of shit-sandwish vs double-shit-sandwish.

    The take of top poster of this thread - that Biden is an “old man with good intentions” - is quite a different and far more tribalist and propagandistic take than your “the one that’s a bit less enthusiastic genocide supporter”.

    Your take is perfectly reasonable, whilst the original take is, as the previous poster pointed out, complete total bollocks for anybody but a complete total sociopath (who would be ok with mass murder) or ultra-tribalist numpty (who is ok with whatever their tribe’s leader supports, no matter how inhumane).


  • Aceticon@lemmy.worldtoPolitical Memes@lemmy.worldOh Joe...
    link
    fedilink
    arrow-up
    23
    arrow-down
    42
    ·
    edit-2
    4 days ago

    A guy that supports a Genocidal ethno-Fascist regime doesn’t have “good intentions”, not even by the lousy standard of the subset of politicians that climb their way into the position of “leader of a major country” - normal human beings don’t give guns to people purposefully murdering tens of thousands of children, starving 2 million people and targetting journalists and medical personnel.

    “Not quite as extremelly bad intentions as the other guy” would be a more correct take.

    Trying to spin this as a “good guy vs bad guy” is quite a tribalist take on a plague vs pestilence contest.


  • Clearly the profound racism never disappeared, otherwise the German power elites wouldn’t “unwaveringly support” a nation because of the ethnicity of the majority of its people and its leaders: the more visible artifacts of ancient germanic symbols, goose stepping and the brown shirts might be gone but the thinking that some people are more worthy than others purelly because of their ethnicity is still just as strong.

    Additionally, that the German authorities are now going so far as shown in this and other news in support of the ethno-Fascists of a specific ethnicity, also indicates that the authoritarian tendencies too are alive and well in the mindset of the German power elites.

    It looks a lot like the foundations of Nazism are alive, well and returning to prominence, with a different symbology and façade, but still the same view of humans as ethnics and the same authoritarian forceful imposition of a race-based view of the worth of human beings on others.

    It’s actually quite scary to watch from the outside as Germany goes back to overtly using force to suppress dissent on its power elite’s racial supremacist views for the benefit of an extreme form of ethno-Fascism, even if this time around it’s not the Arian Race that’s being “supported”.