• 2 Posts
  • 689 Comments
Joined 2 years ago
cake
Cake day: June 17th, 2023

help-circle


  • SpaceCowboy@lemmy.catoProgrammer Humor@programming.devfunctions
    link
    fedilink
    arrow-up
    1
    arrow-down
    3
    ·
    16 hours ago

    A constant inside a function is not constant to the computer. It’s only constant within the scope of the function. So it’s not constant to the computer since every time the function is called the “constant” will have a different value.

    Do you even know what a real constant is?

    You maybe need to rethink some things.


  • SpaceCowboy@lemmy.catoProgrammer Humor@programming.devfunctions
    link
    fedilink
    arrow-up
    1
    arrow-down
    2
    ·
    16 hours ago

    I’m questioning why things are being done in the way they’re being done and you’re saying I’m being close minded? Also spewing out some more jargon like that’s going to impress me?

    And LOL at “it will feel natural after you get used to it.” I don’t think you understand the concept about something feeling natural. Like I say I just make stuff const because someone put some bullshit in the linter. Enforcing dumb rules in a linter is the opposite of keeping an open mind, it forcing preferences on people.

    I think I’ve confirmed it’s just FE religious dogma. Just keep on repeating whatever Theo says and people will think you know what you’re talking about.


  • SpaceCowboy@lemmy.catoProgrammer Humor@programming.devfunctions
    link
    fedilink
    arrow-up
    1
    arrow-down
    3
    ·
    18 hours ago

    Stylistically, you’re changing the array when you add something to it. Javascript is a janky language in the best of times, but FE devs like to artificially introduce additional unnecessary complexities on top of the jank.

    const is simpler. why would I declare an array as let if I’m not reassigning?

    Why would you declare a const that’s going to have different data every time to function is called?

    Now I’m thinking it’s a form of gatekeeping. Just an excuse for FE devs to throw out terms like “immutable” to make it sound like they know what they’re taking about. Y’all need to constantly sound like you know what you’re talking about when dealing with users, pretending weird stylistic choices have real technical reasons for them. But the BE devs know what you’re saying is complete bullshit LOL.


  • Pushing something onto an array isn’t changing the array? It’s not changing the reference to the array, but from a style standpoint it doesn’t make sense.

    And if you’re declaring a const within the scope of a function, it’s still allocating memory when it enters the scope and disposing it when it leaves the scope, same as a variable. There’s no performance benefit to do this.

    Something like const CONSTANT_VALUE = “This never changes” has a performance benefit and is actually how other languages use constants. The value will always be the same, the compiler understands this and can optimize accordingly. If you’re declaring an iterator or the result of calling a webservice to be const it’ll be a different value every time it runs that code, so it’s not something a compiler can optimize. In style terms, it’s a value that’s different every time you get to that line of code, so why would you want to call it constant?

    You’re comment indicates the FE dev obsession with always using const stems from a misunderstanding of how computers work. But of course many religious beliefs originate from a misunderstanding of the world. Whatever man, I just make it a const to make the linter happy, because it’s dumb FE bullshit LOL.


  • Yeah for whatever reason, FE devs want to make everything a const. It’s like a religious belief or something, it’s really kinda weird.

    const fun = () => { const something = “whatever” const array = []; array.push(someting)

    for (const thing of array) { if (thing === ‘whatever’) blah(thing) } }

    Semicolons? Optional. Which quotes you should use? Whatever you feel like! But you must declare things as a const wherever possible! Even if it’s an array that you’re going to be changing, declare it as a const because you should know that you can push things into a const array, and since it’s possible to declare it as a const, you must declare it as a const.

    Why is this? Nobody knows, but it’s important to FE devs that you use const.


  • Yeah and some clocks have a second hand and some don’t sometimes clocks use roman numerals sometimes they’re arabic numerals, and that’s if it can understand based on context if someone saying just “clock” in the data the scraped is referring to a digital clock or an analog clock.

    In general LLMs don’t understand logic, though I suspect they have given some of them ability to run some code validation logic (that’s not actually AI) when you tell it to generate code in some languages. I say this because I’ve had it produce some code that could compile, but it seemingly put some example code into a function and had some other example code that needed to call that function with another parameter so it just created a third function that accepts the additional parameter and calls the first function (throwing away that parameter). It compiles but doesn’t have any understanding of how stupid that is on a logical level. So it seems like it’s just trying stuff until it’s capable of compiling without there being any understanding of how anything works.


  • Eh, I was around in that time. Netscape communicator was bloated as fuck and people used IE not only because it was pre-installed, but also because it didn’t take ~20 seconds to start up which is what using Netscape Communicator was like.

    After a long time Mozilla finally got to 1.0 and it was basically as bloated as Netscape Communicator. It wasn’t until Phoenix Firebird Firefox project that pulled out a browser (and they later pulled out the email client and other things from that monolith) that IE had real competition.

    But don’t you think a well managed Netscape could have recognized the problem with Communicator and did the same thing as happened with Firefox, just a decade earlier? Netscape kinda just did nothing after the AOL takeover and there really wasn’t a real answer for IE until Firefox. Yeah we all know IE sucks, but Netscape Communicator was worse than IE if you didn’t want a browser that took more than 20 seconds to start up and use up all your memory just in case you might want to use an HTML editor.

    Sure MS stopped improving IE and over time it became the outdated garbage we know it as today, but before that it was Netscape that wasn’t improving their product with similar results.

    With technology, people tend to do revisionist history by preferring the better story without regards to the actual quality of the tech. But the reality was IE was actually better than Netscape Communicator (says a lot about how bad Communicator was) just like VHS was actually better than Betamax. Just doesn’t make as good a story when it’s about people using a tech that was better instead of the story being about people using inferior tech because of shenanigans.



  • Defense production is the key to all of these scenarios. Russia is off the board for about a decade, and most likely they’d go after Ukraine again in a decade, and if not Ukraine it would be the Baltics. If you have defense production we can produce more weapons and munitions before they lose any conflict in Europe.

    With China they’re bottled up inside a line of islands… Philippines, Taiwan, Japan. They can’t get to Canada unless they can take Taiwan first. Again, with defense production we can supply Taiwan with what they need to repel an invasion.

    Everyone looks at army size but seemingly forgets to look at a map. Army size doesn’t matter if you can’t get that army across an ocean. So it’s all about navy, and Russia isn’t all that good at navies, never has been. China is building a large navy, but they don’t have a lot of experience, and amphibious assaults are ridiculously difficult, and it’s not likely they would succeed in taking Taiwan. China is building Aircraft carriers (which they don’t need for Taiwan since it’s within range of airfields in mainland China) but they aren’t building a lot of dedicated landing ships (though it’s supposed the could appropriate civilian RORO ships), so it seems they’re doing the typical authoritarian military that’s designed for intimidation more than actually being effective. But in any case we should be more concerned with defending Taiwan than direct conflict with China, because that has to happen first… and even that looks unlikely to anyone that hasn’t been influenced by Lockheed Martin’s propaganda.

    But the bottom line is no one is going to attack the Western Hemisphere without permission from the US. So really the only real threat is the US or a US proxy. To prevent that we don’t need to straight up win, we need to first make a war too expensive for the US to attempt. Secondly if they do make the foolish decision to invade Canada, we need to have the capability of killing a few thousand American soldiers over the course of an occupation and they will become war weary and leave.

    So we need strong alliances in terms of defense production so we’ll supply other countries if they’re attacked and they will supply us if we’re attacked.

    Submarines are great for both an invasion of Taiwan and for making a US invasion of Canada expensive. Not that we could destroy the US navy with a few submarines, but having the capability of taking out a few ships and hitting some targets on the US coast makes an invasion expensive for them. Sure they could eventually track them all down, but they are going to take some damage before they do.

    The Gripen is actually a great option too. They’re relatively low maintenance (it’s a fighter jet so still pretty high maintenance, but way less than the F-35) and they’re designed for a conflict where they’d need to potentially use regular roads as airstrips. Again it’s not about destroying the US Air Force, but just inflicting some expensive damage.

    The goal would be to have a Pentagon assessment of the cost of a war with Canada to have the highest dollar amount as possible, since that’s all that matters to the psychopaths in power down there right now.


  • Any fighter jet requires a lot of maintenance, and the F35 requires more than most.

    If they US cut us off from getting parts for the planes it wouldn’t take too long before they wouldn’t be flying anymore.

    And yeah the biggest concern for me is a country that’s potential adversary being able to shut down our air force when they want. I’d say it’s not likely they’d do this to attack us militarily, but I could definitely see a them doing this to put pressure on us in a trade negotiation. They did temporarily cut off Ukraine from supply in the middle of a war to pressure them, that’s a line that should never be crossed, and they crossed it. So yeah they’d be willing ground our airf orce to strong arm us someday.

    So using American planes makes the RCAF a potential liability in negotiations in the future. The military should be a strength in geopolitics, not a liability.

    The Swedish offer shouldn’t just be about jobs, though that’s a nice bonus. If we’re building the parts for the planes here in Canada then no one can cut us off and ground our planes.



  • Why is Ukraine still using jets?

    Drones require a radio signal to work. Radio signals can be jammed. You can get around this by having the drone on a wire, but obviously the range of the drone will be limited by the length of the wire.

    An aircraft with a human pilot can still do it’s mission even if radio signals are being jammed.

    Also I can imagine someday they might combine the technologies. Human piloted jet carries drones close enough that it can hit the target while being connected to the jet by a wire so it can be controlled by the human pilot in the jet in an area where signals are being jammed. Of course the enemy will want to counter that… by sending a human piloted jet to take out your human piloted jet.

    You could of course build more sophisticated drones that can operate autonomously. But remember they they may not be able to connect to a server farm to because of jamming. So you’d have to put a lot more stuff on the drone itself and before long it’s no longer a cheap $400 drone, it’s price tag goes up until you’re basically spending almost as much per drone as we do on missiles.

    Military tech is all about inventing new thing, invent thing to counter that, invent thing to counter the counter to your new tech. In wartime procurement you just need the thing that works right now. With peacetime procurement you want to get things that keep your options open and not be too dependent on a tech that might be countered in a few years. So you get both jets and drones because maybe the jets will be obsolete, but it’s just as likely drones will be obsolete if the time comes to use them.


  • Microsoft hurt Netscape, but it was AOL that killed it. At the height of the dotcom bubble, Wall street handed AOL more money than they knew what to do with so AOL bought Netscape. Of course they didn’t have any idea what to do with it (they still kept putting IE on the discs they mailed out to people even when they owned Netscape) and it eventually withered away and died.

    The people that ran Netscape correctly predicted it would go this way, but it was a ridiculous amount of money AOL was offering. Luckily they made releasing the code as open source as part of the deal.




  • I watched the first season and it made me lose IQ points. Do you like a show with lots of references to things that you know while it acts like there’s some suspense over what this new magical metal they discovered is, the identity of this wizard that’s hanging around with some hobbits, etc? That’s Rings of Power.

    It’s the most boring origins story of everything from the movies while they seem to expect people to have their minds blown by the reveals like “OMG! that’s mithril! Wow! that’s Gandalf!” They were too busy trying to make very obvious things out to be big reveals it got in the way of there being interesting characters or a good story. The place where a lot of story takes place becomes a volcano land in single a day just so they can make a big reveal that it’s Mordor… it’s that ridiculous.


  • Imagine not voting for the black lady because she has to prove herself worthy while a criminal senile pedophile can go on insane demented rants for a year and win by default.

    There’s a lot of cope happening in America, and everyone is pointing fingers, but the fact is 2/3 of the electorate either voted for fascism or didn’t bother to vote against it.

    But go ahead and blame everyone and everything other than the fact that American culture is fundamentally rotten and most people either want fascism or at least don’t care about whether it happens.