🇨🇦 tunetardis

  • 0 Posts
  • 19 Comments
Joined 2 years ago
cake
Cake day: June 11th, 2023

help-circle
  • I’m not a web dev but was chatting with a friend who is, lamenting web 2.0 for pretty much the same reasons as OP. He’s like “2.0?!? Where have you been? It’s all about web3 and blockchains.” Now where was that comfortable old rock I had been hiding under again?

    When the www was in its infancy, I thought there needed to be a standardized way to classify content. Something Dewey Decimal System-ish I suppose? But it would need to be easy for casual content providers to use, since the only way it could work would be in at a grass roots, decentralized level where each provider would be responsible for classifying their own content.

    Perhaps there could be tools like expert systems that would ask you a number of questions about your data and then link it up appropriately. It could usher in a golden age of library science!

    But then everyone went fuck that. Search engines.


  • EVs are generally heavier, meaning more tire wear, so I’m skeptical that the reduction is all that meaningful.

    Yeah this was my first thought as well. In the balance, I have no doubt that EVs are better for the environment than ICEVs, but when we’re nitpicking about particulates coming out of wear and tear, the weight issue has got to play into that.

    In North America, people tend to drive automobiles that are way bigger than they need to be. I have read that this is in part due to auto dealers enjoying larger margins on big vehicles and encouraging this on their clientele. But EVs are different. Bigger means more batteries means more expensive to manufacture. So the sweet spot in terms of profit margins may be something smaller? But whether this will translate into fewer SUVs and pickups on the road I don’t know.

    Wish car manufacturers never bought up the streetcars and trolleys, they effectively killed public transit in the US pretty early on.

    At least it seems light rail is having a moment. I grew up in Toronto where they never did give up on streetcars, though there was a close call (in the 80s I think it was) when the auto lobby tried to have them removed. Fortunately, the mayor at the time was a huge fan. And now it seems the street cars have been upgraded to 3-car light rail.

    And LRTs seem to be popping up all over the US too. Do you know the way to San Jose? It’s light rail. That system’s been around forever, but I was surprised on my last visit to Phoenix to see an LRT whiz by. That’s about as car-centric a city as I could possibly imagine.









  • Thanks, it makes me feel relieved to hear I’m not the only one finding it a little overwhelming! Previously, I had been using chatgpt and the like where I would be hunting for the answer to a particularly esoteric programming question. I’ve had a fair amount of success with that, though occasionally I would catch it in the act of contradicting itself, so I’ve learned you have to follow up on it a bit.


  • I turned on copilot in VSCode for the first time this week. The results so far have been less than stellar. It’s batting about .100 in terms of completing code the way I intended. Now, people tell me it needs to learn your ways, so I’m going to give it a chance. But one thing it has done is replaced the normal auto-completion which showed you what sort of arguments a function takes with something that is sometimes dead wrong. Like the code will not even compile with the suggested args.

    It also has a knack for making me forget what I was trying to do. It will show me something like the left side picture with a nice rail stretching off into the distance when I had intended it to turn, and then I can’t remember whether I wanted to go left or right? I guess it’s just something you need to adjust to. Like you need to have a thought fairly firmly in your mind before you begin typing so that you can react to the AI code in a reasonable way? It may occasionally be better than what you have it mind, but you need to keep the original idea in your head for comparison purposes. I’m not good at that yet.







  • That’s the point, when programming with immutable structures you always pass the mutability onto the enclosing structure.

    I guess the point I was trying to make here was if the data type is already mutable, there is no point in sticking it in a list just so you can replace a reference with an identifier. You’re just adding an extra level of indirection. But sure yeah, if the type is inherently immutable, you have to do something.

    A list is an antipattern here IMO. Just wrap it in some dedicated object (see e.g. Java’s StringBuilder).

    Interesting. I’m not aware of anything like StringBuilder in the standard library for either Python or JavaScript. Looks like it wraps a list of characters and tries to behave as string-like as possible? You could presumably write your own class like that or download an implementation from someplace.

    I guess in most cases in my own code, where I need a mutable string is usually as part of a larger data structure which is the thing that gets passed around by reference, so it’s easy enough to replace a field within that.

    For building up a string, I would tend to use an io.StringIO in Python with file-writing calls, but those aren’t meant for sharing. What you don’t want to do is use the += operator a lot on strings. That gets expensive unless strings are mutable (like they are in say C++'s std::string).