• 12 Posts
  • 410 Comments
Joined 3 years ago
cake
Cake day: August 15th, 2023

help-circle


  • If you’re looking for declarations, some languages use const, let or var followed by the name of said variable. That’s a little easier to find than having a type name at the start, so I don’t think what you’re saying gives the other approach an advantage. The indentation is also more consistent with these keywords, which helps.

    I realise some languages (like Python) don’t use these sorts of keywords during declaration. For those languages it could indeed be a disadvantage.


  • As other users have said, we aren’t compilers.

    Types are important for type safety, so you don’t access properties that don’t exist, can use polymorphism etc. However, having worked in both duck-typing and hard typing languages, I believe the most important part of a type is it’s name.

    Classes are are arbitrary constructs we create to help us understand and manage code. They are inherently organisational structures.

    That may sound like an argument FOR putting the name of the class first. “If I know it’s a ConnectionCredentialsQuery, I don’t need to know it’s name, the use-case is evident!” Classes often get reused though, like a CartesianPoint. You may create several instances of them. Which of the name and type below are more indicative of use?

    CartesianPoint PlayerPosition; 
    

    Types are, to some extent, implementation detail. The name tells you what the variable is for, which is more important.

    Another point: You will always need to name variables well, because after declaration, whenever you see a variable, you will only see its name. You want to be able to fully understand what you are looking at without having to mouse over or go back to the declaration of a variable.

    Additionally, many typed languages will allow you to use a syntax to altogether avoid declaring the type of a variable if derived from somewhere else.

    var result = a + b;
    
    var customer = new Customer();
    

    Given that the type can be inferred, and therefore specifying it explicitly is optional, why make it the first thing you see? That means you need to move your eye back and forth when looking for the names of things. Which of these two are better for legibility:

    var result = a + b;
    CartesianCoordinate playerPosition;
    
    const result = a + b;
    let playerPosition: CartesianCoordinate; 
    

    Finally, you say that types are more important because they are important to the compiler, but compilers don’t care about the order of these definitions. Compilers exist to allow us to write easier to read code. They exist to convert high level languages to low level byte code. They exist to enable more readable code.

    Thank you for coming to my TED talk.








  • This seems to be his view:

    In the kernel community we do open source because it results in better technology, not because of religious reasons.

    He doesn’t seem to subscribe to the idea that everything you use MUST be open source, as some more radical open source advocates do, but instead that more software SHOULD be open source.

    I would definitely prefer if AI was open source and self-hosted (or at least E2EE if cloud hosted). Sometimes though the best tool for the job as things stand is closed source.

    Aa for the legally dubious output, while AI can exactly replicate training data, it rarely does nowadays. It’s usually an amalgam of stuff.


  • I realize that some people really dislike AI, but this is an area where I’m willing to absolutely put my foot down as the top-level maintainer. Linux is not one of those anti-AI projects, and if somebody has issues with that, they can do the open-source thing and fork it. Or just walk away. AI is a tool, just like other tools we use. And it’s clearly a useful one.

    I think broadly speaking what he says is reasonable. If you don’t want to use AI, then don’t, but I think it can be used somewhat responsibly.

    I have all sorts of issues with AI tooling:

    • the centralization of power
    • the load it adds on maintainers because of the amount of slop bad developers (and non-devs) produce with it
    • the environmental impacts of using larger models
    • the data centers causing health risks
    • the impact on the PC industry
    • the degeneration of skills and knowledge.

    That said, it’s a tool, and can be used to amplify good work too.






  • The Telegraph is outright terrible. The only more right wing paper is probably GB News.

    I’d focus on using left or center-left publications like The Guardian and The Independent.

    There are some further left publications such as Novara Media and The Canary (they’re better on some issues where others are too cowardly, like Gaza or trans rights). Though I’m not sure how accurate they are on everything.

    On some issues the BBC is fine too, just not Israel and trans rights.

    My point being, we are stopping pretty low if we reach for the Telegraph.




  • That’s true, but spaghetti code was always faster to write than good code before as well. I will agree that the speed gap probably has grown though. That’s why tools like AI need discipline.

    If managers and engineers don’t understand that their code will turn into garbage and the business will get reputational harm and lose customers / get sued / have more tech debt to fix and they’ll eventually learn their lesson. In the meantime it’s going to be a painful process where upper management see extra speed, expand their scope or downsize their staff, then learn that they have crumbling foundations and need to adjust. This has publically happened a few times already. Things will stabilize in time.