• 3 Posts
  • 35 Comments
Joined 3 months ago
cake
Cake day: August 16th, 2024

help-circle


  • houseofleft@slrpnk.nettoBuy it for Life@slrpnk.netFinding a BifL smartphone
    link
    fedilink
    English
    arrow-up
    11
    arrow-down
    1
    ·
    12 days ago

    I have a Fairphone 4 and would definitely give them the biggest recommendation I could.

    Any part can be replaced with a screwdriver which is an order of magnitude better than I’ve seen with other brands. I dropped and broke my phone screen and although I had to buy a new screen, after that I had a phone working as if it was brand new.

    I also got mortar into my usb charging socket and was able to replace the charging socket.

    You might be able to tell that I’m not the best at looking after things, I’m working on this but in the meantime, fairphone have saved me at least two situations where I’d normally need to buy a new phone. Can’t recommend them enough.



  • Thanks for such a detailed response! I’m planning on mainly using it for smallish trips, say heading into my local town. I’ve recently move to being just outside walking distance but it’s very short distance to drive for.

    I also live around a lot of woods and it’d be good to be able to ride on a dirt path now and then.

    From what I can see a ‘hybrid’ sounds like it’d be a good fit?




  • By the power invested in me by, well, nobody whatsoever, can I just take a minute to say, let’s all cool down a little in the comments!

    There’s a lot of arguing against:

    • The idea that acknowledging the tragic reality of climate change makes you defeatist
    • The idea that because we have had some great advantages in green tech we can sit back and let climate change fix itself

    I don’t see anyone making those arguments here though! Just lots of people concerned about climate change with different skews of how positive/negative we should feel.

    Personally, I swing between powerful optimism and waking in terror at 3:00am for the future we’re hurtling towards. I’m sure other people are the same, so let’s just be friendly to the fact that other people are in different vibes to us.

    There are some people working together very well right now to dismantle the climate, so let’s all remember that when we’re talking with each other.

    Peace and love!



  • Yes, for sure!! I hope my call for policitcal action didn’t come across as “don’t do anything and wait for politicians to sort it out!”.

    I was trying to get at the need for collective discussion and action, over the idea of a climate change fix that’s based on people’s feeling superior for their individual actions, especially because without political change, a lot of even the individual changes we need to make (more heatpumps, EVs over ICEs, etc) are only accessible to those with sufficient wealth.




  • I have advice that you didn’t ask for at all!

    SQL’s declarative ordering annoys me too. In most languages you order things based on when you want them to happen, SQL doesn’t work like that- you need to order query dyntax based on where that bit goes according to the rules of SQL. It’s meant to aid readability, some people like it a lot,but for me it’s just a bunch of extra rules to remember.

    Anyway, for nested expressions, I think CTEs make stuff a lot easier, and SQL query optimisers mean you probably shouldn’t have to worry about performance.

    I.e. instead of:

    SELECT
      one.col_a,
      two.col_b
    FROM one
    LEFT JOIN
        (SELECT * FROM somewhere WHERE something) as two
        ON one.x = two.x
    

    you can do this:

    WITH two as (
         SELECT * FROM somewhere
         WHERE something
    )
    
    SELECT
      one.col_a,
      two.col_b
    FROM one
    LEFT JOIN two
    ON one.x = two.x
    

    Especially when things are a little gnarly with lots of nested CTEs, this style makes stuff a tonne easier to reason with.




  • houseofleft@slrpnk.nettoLinux@lemmy.mlIs there a programming specific distro?
    link
    fedilink
    English
    arrow-up
    14
    arrow-down
    1
    ·
    1 month ago

    Short answer is no, I think because what tools you need for programming change so much based on the development you’re doing. C++ developers need compiler toolchain stuff that Javascript developers would never need to look at and vice versa.

    Curveball answer is that modern extensible IDEs with the power of language servers and plugins have kind of become this. I’d massively recommend properly getting into one of the following and learning how to configure new languages and plugins:

    • VScode
    • Neovim
    • Emacs
    • Helix

    (Sure I’ve probably missed some great options, feel free to flame me on why notepad++ should be OPs first choice)





  • It’s not easier to do getters or setters but especially in python there’s a big culture of just not having getters or setters and accessing object variables directly. Which makes code bases smaller.

    Same with the types (although most languages for instance doesn’t consider None a valid value for an int type) Javascript has sooo many dynamic options, but I don’t see people checking much.

    I think it boils down to, java has a lot of ceremony, which is designed to improve stability. I think this makes code bases more complex, and gives it the reputation it has.



  • houseofleft@slrpnk.nettoProgrammer Humor@programming.devLanguages
    link
    fedilink
    English
    arrow-up
    9
    arrow-down
    1
    ·
    2 months ago

    I think a lot of it is “ceremony”, so it’s pretty common in java to:

    • create a get method for every object variable
    • create a set method for every object variable

    Then add on top that you have the increased code of type annotations PLUS the increased code of having to check if a value is null all the time because all types are nullable.

    None of that is hugely complicated compared to sone of the concepts in say Rust, but it does lead to a codebase with a lot more lines of code than you’d see in other similar languages.