Canadian software engineer living in Europe.

  • 8 Posts
  • 199 Comments
Joined 2 years ago
cake
Cake day: June 7th, 2023

help-circle




  • As someone else said here, programmers are not a monolith. However, I’ve seen it multiple times on the job and in social media where programmers are using these tools to write code voluntarily. The code produced is often garbage, and I have to reject it at review time, but there are a lot of programmers using these things willingly.




  • How can anyone hate someone so much, when she never did anything to them?

    Imagine that your life is terrible. You’re poor, desperate, maybe ill too. You live with your parents who are also poor and desperate, and the lot of you self medicate with copious amounts of alcohol.

    You’re miserable, and not terribly bright. Then one day, your primary media sources and even the governing political party starts parroting the same lie that the reason your life if shit is because trans people and immigrants exist. No one with a similarly large platform is telling you the truth.

    Now consider how many millions of purple have been abandoned by the state in this country. How many poor and desperate people we’ve made in the last 10 years and the incentive the owning class has in laying the blame for that at the feet of anyone but themselves.

    Hate is learnt, and the teachers are holding all the money & power.



  • I don’t think there’s an official “way”, but here’s mine (which I love):

    On start-up I open all the apps I usually use, one per designated workspace:

    1. Slack/Teams/Mattermost, whatever my work requires.
    2. Thunderbird
    3. Kitty
    4. PyCharm/RustRover, whatever the job requires
    5. Firefox

    Workspaces 6-9 are left empty, ready for whatever app I need in the moment, but only ever one app per workspace.

    With this setup, I’ve mapped Ctrl+Fx to each workspace, so Ctrl+F4 takes me to PyCharm where I write the code, and Ctrl+F5 followed by another F5 takes me to Firefox and reloads the page. Ctrl+F3 is always the terminal, etc., so you quickly start building these shortcuts to mean Fwhatever is $APP_NAME.

    I almost never use the mouse, unless what I’m doing is necessarily mouse-driven: browsing or drawing charts etc. Everything else is keyboard-driven.






  • [Liz Kendall] said the cuts were about “ensuring the welfare state survives” and that the government would always seek to protect those with the greatest need.

    This bullshit has got to die, and shame on the Guardian for uncritically publishing it. The choice isn’t between cutting welfare or watching it die. It’s between taxing the rich or not.

    The problem here is that they’ve already made that choice and are pretending that now we only have two choices, both of which amount to “screw the poor”. There are massive amounts of wealth in this country and it’s all going into the pockets of the rich and into bombs.

    So let’s do away with this “we have to cut or lose everything” lie already.

    FFS this country needs a socialist party.


  • I have a few interesting ones.

    Download a video:

    alias yt="yt-dlp -o '%(title)s-%(id)s.%(ext)s' "
    

    Execute the previous command as root:

    alias please='sudo $(fc -n -l -1)'
    

    Delete all the Docker things. I do this surprisingly often:

    alias docker-nuke="docker system prune --all --volumes --force"
    

    This is a handy one for detecting a hard link

    function is-hardlink {
      count=$(stat -c %h -- "${1}")
      if [ "${count}" -gt 1 ]; then
        echo "Yes.  There are ${count} links to this file."
      else
        echo "Nope.  This file is unique."
      fi
    }
    

    I run this one pretty much every day. Regardless of the distro I’m using, it Updates All The Things:

    function up {
      if [[ $(command -v yay) ]]; then
        yay -Syu --noconfirm
        yay -Yc --noconfirm
      elif [[ $(command -v apt) ]]; then
        sudo apt update
        sudo apt upgrade -y
        sudo apt autoremove -y
      fi
      flatpak update --assumeyes
      flatpak remove --unused --assumeyes
    }
    

    I maintain an aliases file in GitLab with all the stuff I have in my environment if anyone is curious.


    • Pros: Cheaper to install as you don’t have to rip up the whole road, capable of cornering at around 15kph. Low initial cost.
    • Cons: Battery powered, with a 70km range, with a max capacity of 60 people. Driven by humans.

    This does not sound like something anyone needs and it appears to be designed to share the road with private vehicles (hence the focus on speed and cornering) which means it will get stuck in traffic.

    When you’re paying humans to drive something, the benefit comes not in how fast it corners but in how many people can be transported at once. Even if it’s a straight line at 20kph, it’s still better to have big LRTs hauling upwards of 2000 people, stopping at intersections to let them switch to another LRT going in another direction.

    The one benefit I can see here is the low cost of installing these tracks, it could be used to trial a route served by a tram (negating the cornering feature), but even then, a bus has near zero infrastructure requirements and can move more people than this for the same price.



  • I have much the same:

    • Files on the network with NFS
    • Kodi on an old laptop under the TV so we can watch said files.
    • Syncthing on our phones and laptops to pull films from there onto that file server.

    The only difference is that I’m using a Synology 'cause I have 15TB and don’t know how to do RAID myself, let alone how to do it with an old laptop. I can’t really recommend a Synology though. It’s got too many useless add-ons and simple tools like rsync never work properly with it.