Johz's recent activity

  1. Comment on Almost half of EU’s busiest flight routes are ‘hard or impossible’ to book on trains in ~transport

    Johz
    Link Parent
    The explanation I've found most convincing is chronic underfunding of projects to expand and maintain existing services, and a lack of will to build new infrastructure. Essentially, the numbers of...

    The explanation I've found most convincing is chronic underfunding of projects to expand and maintain existing services, and a lack of will to build new infrastructure. Essentially, the numbers of passengers have grown steadily over time, but they're all still being transported on the same tracks. These tracks then need to be maintained more often because there's more traffic going down them, but at the same time because there's more traffic, there's less time to stop and do that maintenance. Trains are being scheduled at essentially maximum capacity, which means if something goes wrong the entire network runs into issues because every train is dependent on every other train running on time, there's no redundancy at all. And the sorts of new services that could alleviate these issues are costly and struggle against environmental, political, and NIMBY-based opposition.

    Essentially the same issues that are currently affecting most wealthy European nations, it's just in Germany they're particularly visible in the rail network right now.

    17 votes
  2. Comment on Ilhan Omar says she isn’t a multimillionaire, blames accounting error in ~society

    Johz
    Link Parent
    I don't think there's anyone surprised by that, though. Like, I didn't know this at all but if you'd asked me if he was profiteering from his presidency I'd have said "yes, obviously, I'm sure...

    I don't think there's anyone surprised by that, though. Like, I didn't know this at all but if you'd asked me if he was profiteering from his presidency I'd have said "yes, obviously, I'm sure he's raking it in". But if you'd asked me if there were Democrats doing the same thing, I might have been able to tell you that I vaguely remember something about Elizabeth Warren, and that's about it. This is news to me. (In fairness, I'm from the UK and I live in Germany, I don't spend a lot of time thinking about the US.)

    The other side of this is that a generally left-wing forum like this is going to be more interested in news about generally left-wing politicians, because that's the news that affects them.

    4 votes
  3. Comment on Vibe coding is just the return of Excel/Access, with more danger in ~comp

    Johz
    Link Parent
    The library you use shouldn't include its own daylight savings information, that should typically come from the operating system (or browser). There are some situations where that isn't possible,...

    The library you use shouldn't include its own daylight savings information, that should typically come from the operating system (or browser). There are some situations where that isn't possible, but in those cases you should be able to pull in the data from the latest tzdb directly.

    But yeah, the state of datetime APIs have typically been pretty dire. Moment has a nice API and is certainly better than the built-in Date class, but there's no way of representing just a date or time there, and makes it difficult to distinguish between datetimes without timezone information and datetimes in the local timezone. Some other languages are slightly better - in Python, for example, at least there are multiple classes for dates, times, and datetimes - but it can be quite hit-and-miss.

    4 votes
  4. Comment on Vibe coding is just the return of Excel/Access, with more danger in ~comp

    Johz
    Link Parent
    It's mostly fairly solved at this point, although not all languages and ecosystem have all of the correct components, and old data and systems need to be supported which makes things harder. But...
    • Exemplary

    It's mostly fairly solved at this point, although not all languages and ecosystem have all of the correct components, and old data and systems need to be supported which makes things harder. But generally:

    • Use dates if you just need dates, use times if you just need times. These things don't need timezones, do you're sorted here.
    • If the thing you're working with is a fixed point in time, typically an event that has happened in the past that can't ever change, store it in UTC, and consistently use UTC throughout the app. Then at the last moment, render it in the user's timezone or whichever timezone is relevant.
    • If the user is configuring an event that will happen in the future, save the configuration and a materialised UTC timestamp. The timestamp is for you internally, and should be re-creates if the configuration ever changes, plus every time the tzdb gets updated. The configuration is the source of truth. The configuration is all of the options the use could input: date, time, timezone, duration (start+duration is more likely to stay accurate than start+end). Default to the user's local timezone, allow them to configure it if needed.
    • If you need to do arithmetic with datetimes, figure out whether the user expects an answer in absolute time or in wall-clock time. Typically, consider what should happen during a DST transition: if I have a span of one day during the transition, should that span last 24hrs exactly, or should it last 23hrs or 25hrs depending on the transition? Different applications will have different answers here, there's no single correct solution.
      • If it's always 24hrs exactly, you want UTC everywhere again, this is the easy case.
      • If it depends on the transition, then you want wall-clock times, i.e. "what time would a calendar+clock hanging on the wall show?". This is probably the hardest case to handle, but there's lots of good support for it. Now consider:
        • Do I need to know what the actual timezone is? If not (typically the case if you're confident you'll never need to deal with times that happen during a transition, and there's only one timezone involved in each set of calculations), you might be able use the local/naive datetime, i.e. the one where no timezones are attached.
        • Otherwise, store the timezone alongside each date. The ISO date standard conveniently has a format for this. Importantly, you should sure the timezone, not (just) the offset!
      • Either way, make sure you're always using the correct units and never converting unnecessarily. E.g. if you're using days, never convert 1 day = 24 hours. Use a duration type that can distinguish these two units.
    • If different users can have different timezones, try and get the timezone from an external source of truth, e.g. the operating system or the browser. If that isn't possible or the user should be able to configure their timezone, ask the user for their location not their offset (e.g. show "Europe/Berlin" as an option, not "+01"). Although for convenience, it's probably good to show what the offset currently is in each location, and allow them to search by an offset abbreviation (e.g. "CET" should show a list of timezones that use +01 in the winter).

    For JavaScript, always use Temporal (via polyfill if necessary) to manage dates and times. Other languages will have their own library. The minimum necessary setup is that all of the above cases are represented by their own types - you should always have separate date, time, and datetime classes, the datetime class should be broken up into "UTC", "local", "named timezone" classes, etc.

    With all of the above, datetimes are mostly manageable, but the challenge will always be other applications or data sources that don't play by the rules properly and how to handle those.

    9 votes
  5. Comment on Vibe coding is just the return of Excel/Access, with more danger in ~comp

    Johz
    Link Parent
    I used to take this approach, until I worked with a colleague who comments way too much and realised that actually "too much" was a way better failure more than "too little" when trying to figure...

    I used to take this approach, until I worked with a colleague who comments way too much and realised that actually "too much" was a way better failure more than "too little" when trying to figure out what was going on with code I hadn't touched in a year. Like, I'm still fairly conservative with my comments, but it's definitely not a "last resort" sort of thing.

    I'm still trying to articulate when comments make sense to me, but I wrote about one part of this on my blog a while back, and the gist was that if I need to communicate something to you that isn't obvious from the code alone, I've typically got two options: naming (i.e. variables, functions, types) or comments. But names are really hard to get right. You don't want to have too long a name (it gets unwieldy fast), but if it's too simple or generic a name, the reader may not understand the full meaning or purpose of that variable or function. It's also harder to sum up complex ideas in a good name - sometimes there really is exactly the right name for something, but often there isn't, or you can't think of it at least, so you end up with a name that's not wrong, but it's also not quite clear by itself.

    On the other hand, the benefit of a comment is that you can explain all your reasoning with no limit but your patience typing and your reader's patience reading. You can definitely have comments that are too long, but it's harder to achieve that than it is to find a bad name. You can also explain why an algorithm was chosen (usually hard to capture in a name) or summarise what an algorithm does in words rather than code (usually clearer as prose than as a name).

    The disadvantage is that you don't necessarily have the comment at every call-site or reference site, although tooling can mitigate this somewhat. But the advantage is that you can be much more precise and communicate much more clearly in a comment than you ever could in a name. And while it's often even cheaper expressing your idea directly in code, sometimes that code isn't obvious or misses some nuance or something like that.

    So I'd suggest the better approach is almost the opposite to yours: comment first, then figure out if there's a simpler way of expressing the comment (a concise but clear name, a better way of writing the code, etc).

    8 votes
  6. Comment on The center has a bias in ~tech

    Johz
    Link Parent
    Copyright as a concept is generally fairly well defined. Copyright for software is not. The GPL exploits this ambiguity, and basically makes a bunch of claims about what is and isn't copyright...

    Copyright as a concept is generally fairly well defined. Copyright for software is not. The GPL exploits this ambiguity, and basically makes a bunch of claims about what is and isn't copyright infringement, regardless of what the actual law says. For a while this worked out okay, but as copyright for software is slowly being cleaned up, many of those claims aren't actually true any more.

    For example, the GPL claims that a derivative work includes any work that links the original work. (The GPL also makes this more complicated by exclusively using language that only makes sense in the context of C, but the FSF certainly intend this clause to cover any case of a library being used by another program.) This is the whole virality concept: if you use a GPL work, you now need to comply with GPL for all of your code as well as the original code. This is probably the most famous feature of the GPL specifically.

    Except it turns out this is completely unenforceable in the EU, because that's not considered a derivative work in the EU. The GPL doesn't get to decide what a derivative work is, copyright law does. And Directive EC 2009/24 recitals 10 & 15 specifically state that you can freely call or reference other code without creating a derivative work.

    Generally, cases where the GPL has been successfully contested in the EU have either happened before this directive came into force, or have been more general tests of the qualities of an open source license (i.e. the referenced library itself is still copyrighted and under GPL, even if no derived work is created in the rest of the code).

    (Also note that the situation in the US is unclear, but it looks like courts are slowly leaning towards a similar approach to the EU (see e.g. Google vs Oracle) and I wouldn't be surprised to see similar legislation appear over there.)

    You're also missing the point of EULAs. They exist because they are enforceable. They often contain unenforceable clauses, sure, but the basic concept of "to access this item, you need to agree to these terms of use" is very well enshrined in law. The problem with EULAs for end-user software is that they represent a significant power imbalance where consumers are pitted against corporations, but for open source licenses which are more typically used in a B2B setup, that isn't the case. And with something like a license agreement, you get to decide when the license applies because you define that as part of the license. So you could have had much more rigourous consumer protections via an EULA-style license agreement than you can ever have by abusing copyright protection, but the FSF for some reason decided it was more fun to be clever than to try and solve a real problem. And now we're stuck with a concept of open source that is slowly making itself less and less relevant over time.

    Not that I'm bitter about this or anything.

    4 votes
  7. Comment on The center has a bias in ~tech

    Johz
    Link Parent
    Honestly, the more I've understood of how the GPL works, the dumber it has seemed. It essentially hinges on copyright law. This is stupid. Copyright law varies wildly between different countries...

    Honestly, the more I've understood of how the GPL works, the dumber it has seemed.

    It essentially hinges on copyright law. This is stupid. Copyright law varies wildly between different countries and many of its ramifications aren't clear within a single jurisdiction. For example, is using a piece of third party software in your own software a copyright violation? The FSF (who write the GPL) say yes. The EU says no. There is no clear answer from the US, IIRC. The whole copyright thing is fraught with ambiguity and open source licenses are stuck in the middle of that.

    But there is an easier option' EULAs. These do have a clearer legal backing, and you can be much more explicit about what you put in them. You can say, for example, that changes to source code must be released back to the original licensor if passed on to an end user. You can clarify much more precisely what you want to allow. The LLM situation would be much easier to resolve because you could explicitly forbid LLM ingestion in your license (as opposed to right now where it looks like training an LLM generally counts as fair use and therefore there's nothing a copyright-based license can do about it).

    There's a different version of history where the FSF weren't quite so smug and didn't try to be so clever about their solution, and I'm not saying that version of history would have been better (I don't know what all the ramifications would be), but I do think free software would have had a much stronger legal basis in some of these discussions.

    1 vote
  8. Comment on Dual national Londoner stranded in Spain by new border rule in ~travel

    Johz
    Link Parent
    She assumed that too, as I understand it, but the new rules state that this isn't allowed. Because she is a British citizen, she must present evidence of her British citizenship to enter the UK....

    She assumed that too, as I understand it, but the new rules state that this isn't allowed. Because she is a British citizen, she must present evidence of her British citizenship to enter the UK. If she has no evidence of that, she cannot enter. The only valid documents she can present are a passport (that it's not clear she's entitled to), or the £600 digital document mentioned in the article.

    4 votes
  9. Comment on Dual national Londoner stranded in Spain by new border rule in ~travel

    Johz
    Link Parent
    As a counterpoint, as the father of a baby with British dual citizenship, this is genuinely the first I, or any of my British family have heard of this rule, so I don't think it's been...

    As a counterpoint, as the father of a baby with British dual citizenship, this is genuinely the first I, or any of my British family have heard of this rule, so I don't think it's been communicated so clearly. Indeed, we've apparently visited and left the UK since this rule came into force without using a British passport.

    If you live outside of the UK, it's often easier to travel on your non-British passport (this is what we've found with my kid at least) because it's easier to get hold of and you don't need additional documentation when arriving back home. Whenever we visit the UK, we are essentially visiting as tourists, so it seems reasonable to me that as long as you fulfil at least one criteria (in this case EU national visiting the UK for a short stay) there shouldn't be much of a problem.

    The other side is that nearly £600 is an insane amount of money for a digital document that is essentially a document stating a fact that is already true, especially given that a physical passport is significantly cheaper.

    I guess I'm just really fed up of my government consistently making it harder for me to get to or stay in the UK, and consistently making it easier to stay here in Europe. Some of it is these sorts of travel regulations (my wife's ETA, for example), while some of it is the increasingly ridiculous visa requirements (we will probably never be able to move back to the UK now unless my wife changes careers or regulations change). And that's not including the lack of motivation to move in the first place - I've been over the last week telling people about my parental leave plans, and the responses and stories from my UK-based family and friends has been just depressing in terms of how little they've been able to take.

    14 votes
  10. Comment on From $250 million megadeal to empty offices: the unraveling of Bad Robot in ~movies

    Johz
    Link Parent
    Yeah, Andor is definitely something that's with watching by itself, but because it's slower-paced, I found I needed to force myself to take the time to watch it properly.

    Yeah, Andor is definitely something that's with watching by itself, but because it's slower-paced, I found I needed to force myself to take the time to watch it properly.

    6 votes
  11. Comment on From $250 million megadeal to empty offices: the unraveling of Bad Robot in ~movies

    Johz
    Link Parent
    I don't even think you need to get to the third arc. Maybe it's worth pushing through the first three episodes, but I don't think it's the sort of show that starts off shaky but finds its feet....

    I don't even think you need to get to the third arc. Maybe it's worth pushing through the first three episodes, but I don't think it's the sort of show that starts off shaky but finds its feet. What you get in episode one is what you get all the way through.

    7 votes
  12. Comment on From $250 million megadeal to empty offices: the unraveling of Bad Robot in ~movies

    Johz
    Link Parent
    If you've not enjoyed the first couple of episodes, season two probably won't be much better. It's all the same slow burn character drama, and I think it's slightly better in the first season...

    If you've not enjoyed the first couple of episodes, season two probably won't be much better. It's all the same slow burn character drama, and I think it's slightly better in the first season where the overarching narrative arc is tied to a single character, whereas in the second season it feels like there's more going on at once and some of the characters feel a bit underwritten.

    I really like it, I will always recommend it, but I can understand why people would see it as a slog.

    5 votes
  13. Comment on Tom Scott: England — Official teaser for Nebula in ~travel

    Johz
    Link Parent
    I know what you mean, I think I wouldn't quite take it as far as you, but I get similar feelings. I think a lot of it is the incongruity between him and the platform. He models himself a lot on...
    • Exemplary

    I know what you mean, I think I wouldn't quite take it as far as you, but I get similar feelings. I think a lot of it is the incongruity between him and the platform. He models himself a lot on old school BBC presenters, where they might be affable and informal, but they'll never be personal. He's very carefully sealed off his professional and personal lives so that they don't interact at all. When you see behind the scenes, it still feels like he's "on", in his media persona, just a media persona that occasionally makes mistakes.

    Meanwhile, the general culture of the YouTube platform is to be ever more personal. If you compare Tom Scott with people like Steve Mould or Matt Parker, they're still a similar brand of infotainment, but they regularly bring up their wives or kids or pets, even if they don't show them. Or you've got someone like Alec Watson who also maintains a deliberately artificial television look (with a studio, teleprompter, etc) but at the same time regularly talks about his family or aspects of his personal life. They're still all constructing personas for the camera, but they're deliberately infused with a bit of personal life, as befits the medium.

    For me it becomes particularly noticeable when he does collaborations with other YouTubers (like the Jet Lag one, I imagine, although for a while he had a second channel dedicated to these sorts of videos). His style isn't bad (personally I don't mind it for his own videos, and I'm quite happy not to know about his personal life), but it's very incongruous with the platform he's on. So when he shows up in someone else's video, there's this weird disconnect that can come across as a kind of superiority act - it's like he sees himself almost as the presenter in the other YouTubers' shows, like an old BBC journalist being put in a new experience, reporting on it, and then leaving afterwards.

    To be clear, I don't think that's how he really sees himself, I'm sure he's a lovely guy, but I think because of his chosen persona and the disconnect with the default level of intimacy that has become standard in YouTube, he can come across in this way. That said, I think a lot of his earlier stuff feels more personal, and the Technical Difficulties episodes are great, in part because I think he reverts back a little bit more to just chilling with his university friends. But I also get the feeling that that's not what he wants to be doing any more, at least not exclusively.

    42 votes
  14. Comment on Dan Simmons, author of the Hyperion Cantos, dies aged 77 in ~books

    Johz
    Link Parent
    I've given this opinion here before, but I firmly believe that the best reading experience is reading the original Hyperion, and then stopping there. It's a great standalone book, and if it didn't...

    I've given this opinion here before, but I firmly believe that the best reading experience is reading the original Hyperion, and then stopping there. It's a great standalone book, and if it didn't have any sequels, people would just describe it as having an open or ambiguous ending.

    The latter books attempt to clarify that ending in different ways, but end up making the themes of the series more bloated and less interesting. The original book is a tight exploration of stagnation and renewal in a hyper-consumerist society. It doesn't really need much expansion, because it explores its theme deftly from several different angles.

    Just read Hyperion, it's the single best book in the series, and one of the best sci-fi books around, and it's perfectly sufficient by itself.

    4 votes
  15. Comment on What's a culture shock that you experienced? in ~talk

    Johz
    Link Parent
    This is common in the UK as well. I remember being told off by my parents regularly for using "he" or "she" about someone in the room - they'd say something like "and who's 'she', the cat's...

    This is common in the UK as well. I remember being told off by my parents regularly for using "he" or "she" about someone in the room - they'd say something like "and who's 'she', the cat's mother?".

    Although I think it was already dying out as a cultural norm by the time we were kids, and wasn't very strictly enforced. I can't imagine many people follow the rule today - I'm sure I don't!

    15 votes
  16. Comment on What are some stories of progressivism gone wrong in implementation? in ~society

    Johz
    Link Parent
    Possibly, although I'm sceptical. My impression here is that most people buying SUVs have plenty of choice of other cars, but want larger ones because they feel safer — you're higher up on the...

    Possibly, although I'm sceptical. My impression here is that most people buying SUVs have plenty of choice of other cars, but want larger ones because they feel safer — you're higher up on the road, you're more protected, and if you've got children in the back, it feels like the car will have more structural integrity to protect them.

    2 votes
  17. Comment on What are some stories of progressivism gone wrong in implementation? in ~society

    Johz
    Link Parent
    Ah, I see the confusion, I'm talking about the increase in size in cars sold to the European market, not European brands per se. Like I (and you) said, cars sold in Europe are typically not the...

    Ah, I see the confusion, I'm talking about the increase in size in cars sold to the European market, not European brands per se. Like I (and you) said, cars sold in Europe are typically not the same models sold in the US, which means that they should not have the same regulatory pressures. Despite this, the trends are similar on both sides of the Atlantic.

    5 votes
  18. Comment on What are some stories of progressivism gone wrong in implementation? in ~society

    Johz
    Link Parent
    But European cars have also grown over the years, and as I understand it do not have the same regulatory pressure towards larger vehicles. And European cars tend to be made for the European...

    But European cars have also grown over the years, and as I understand it do not have the same regulatory pressure towards larger vehicles. And European cars tend to be made for the European market, so I wouldn't imagine the American market pressures would affect the European ones so much.

    Small cars still exist (perhaps that is a difference) but the rise of SUVs and unnecessarily large cars in urban/suburban areas is still pronounced, just like in the US.

    4 votes
  19. Comment on US strikes Venezuela and says its leader, Nicolas Maduro, has been captured and flown out of the country in ~society

    Johz
    Link Parent
    It's worth distinguishing between the implicit and explicit policies of the Nazi regime. Implicitly, Hitler seems to have been talking about eradication from very early on — it is a logical...

    It's worth distinguishing between the implicit and explicit policies of the Nazi regime. Implicitly, Hitler seems to have been talking about eradication from very early on — it is a logical conclusion from the rhetoric in Mein Kampf and similar early writings on Judaism from the '20s, and there are quotes from Hitler's followers that seem to suggest that they were privately hopeful of something like a full genocide of the Jewish people. Later, in 1939, he threatens the eradication of Jews entirely if a new world war breaks out.

    That said, these were all more implicit threats of (and hopes for) extermination, rather than any actual policy, which did only really start coming into force in 1941. And it doesn't look like the later policies were built on any concrete plans beforehand, but rather were a new strategy at that time. In terms of explicit policy, it seems the goal was more to make Jewish life in Germany so hostile that the Jews would voluntarily leave. It was only later that forced deportation (such as the Madagascar plan), and then mass murder were considered as viable options.

    So perhaps a better statement would be: eradication was a Nazi belief and talking point from very early on, albeit not an official goal until the war started in earnest. Still this is very different from the Japanese internment camps in the US which were not connected to an existing policy of racial hatred, and where there was no real impetus towards eradication at all.

    6 votes
  20. Comment on US strikes Venezuela and says its leader, Nicolas Maduro, has been captured and flown out of the country in ~society

    Johz
    Link Parent
    There were clear differences at the start, though. The Nazis wanted to eradicate the Jews entirely from day one. They did not start with the same processes they ended with, but they started with...

    There were clear differences at the start, though. The Nazis wanted to eradicate the Jews entirely from day one. They did not start with the same processes they ended with, but they started with the same goal, and were explicit about that goal. The Jews were the primary enemy and scapegoat of Nazi propaganda, and they devoted a lot of resources to attempting to demonstrate this and embed it in people's minds.

    In contrast, the American approach was primarily about controlling the population. You are completely right to call this out as a form of genocide, but there is almost no scenario where the Americans would have started up the same industrialised murder machinery. The goals from the outset were completely different. As a result, so were the methods. There is plenty of racist anti-Japanese propaganda from this time, but you'll notice that is largely about denigrating the Japanese and promoting American ways — the Japanese are weak and stupid, and we're the strong, manly heroes. This is in stark contrast to German propaganda about Jews, which included these elements, but also consistently portrayed Jews as the greatest enemy of the Germans — the great, all-powerful bankers and merchants who controlled everything and had fingers in all the pies. The closest American propaganda gets to this is stuff like Dr Seuss's "fifth column" cartoon, but primarily the Americans saw the Japanese as a foreign power, rather than the same kind of insidious menace that the Germans presented the Jews as.

    To be clear, I'm not trying to defend the US here. Americans at the time did have real issues with racism and antisemitism, and you're right to call out the eugenics movement as something that popular amongst the American elite and intellectual classes around that time. The Japanese internment camps were absolutely a form of genocide, were driven by racism and ignorance, and were an atrocity that is dangerously close to being repeated in the US right now.

    But there are still huge differences between that and the Nazi goal of eradicating the Jews entirely, and there is a danger when we compare these sorts of things too lightly of underplaying the Holocaust and the atrocities surrounding it.

    10 votes