Professional software engineer, musician, gamer, stoic, democratic socialist

  • 3 Posts
  • 130 Comments
Joined 2 years ago
cake
Cake day: July 2nd, 2023

help-circle






  • Linux is broad and deep so it would help if you gave some examples of tasks you are failing to do.

    Edit: I guess I can give some fundamental topics for your search, but I don’t have many resources at the ready.

    For starters, many topics will apply to all of Unix, not just Linux. So make sure you understand the difference, and learn about the Unix philosophy.

    Also, I think the most useful piece of documentation is the Arch Wiki. I’d always check here first. The table of contents should give you a good idea of the scope of information.

    1. Filesystems. In Unix, everything is a “file”. Explore the directory layout. Maybe learn about the FHS (filesystem hierarchy standard) and XDG. Learn how file permissions and ownership work. Learn about disk encryption with LUKS. Learn about GPT partitioning and EFI boot partitions. If you want to manage a filesystem spanning many storage devices, I highly recommend looking into ZFS. You might also want to set up some kind of file service like NFS or something with a web client like copyparty or dufs. Try out the dust and duf tools for checking space usage.
    2. Networking. I don’t know how deep you need to go here, but Linux networking is highly customizable. I think most distros use systemd’s built-in DHCP client in systemd-networkd. Have a look at nftables if you want to mess with firewalls. Wireguard for VPN. Learn to use the ip tool.
    3. Remote Access. Especially for a desktop, it’s very useful to set up an SSH service on your PC so you can access it remotely from e.g. a laptop. You can even SSH over the public Internet using a VPN.
    4. Monitoring. Install BTop to get a quick overview of system activity and resource utilization. I also like the procs tool as an alternative to ps.
    5. Shells. As part of your Bash journey, I’d also check out shells like fish, zsh, and nushell.
    6. Package Management. I’m not very familiar with Bazzite’s package manager. It’s an immutable distro, so that will make a difference. Read the bazzite docs for this I guess. You’ll probably need to learn about flatpaks. I’d recommend checking out Nix if you want to try something different. I also quite enjoyed Arch’s pacman if you’re willing to try a new distro like CachyOS or EndeavourOS.
    7. Dotfile management. I recommend learning some basic Git or Jujutsu (jj) and managing your configuration files in a git repository. You can also do this with Nix via Home Manager.
    8. Desktop Environment. I don’t know which variant of Bazzite you chose, but it’s probably a complete DE out of the box. Just know that you can customize your DE quite a bit. I personally enjoy tiling window managers; you might want to check those out.










  • I agree with the article’s ideas, but certain things about the execution bother me.

    1. calculate_order_total_for_customer. I’d just call it calculate_order_total. It’s clear than any order will have a customer, it’s in the type signature.
    2. is_user_eligible_for_discount. I’d call it user_is_eligible_for_discount. Because inevitably that function is getting called in an if statement, and you’d rather it read closer to proper English: if user_is_eligible_for_discount: ....
    3. “Designing for Tomorrow”. I agree that dependency injection is a valuable technique, but it’s not always strictly necessary and they seem to say you might as well always do it just in case. That’s counter to YAGNI. Make sure you have an immediate use case, or let future you do it if you end up needing it. It’s not hard to refactor something to inject a dependency.

  • As for actual coding, I use ChatGPT sometimes to write SDK glue boilerplate or learn about API semantics. For this kind of stuff it can be much more productive than scanning API docs trying to piece together how to write something simple. Like for example, writing a function to check if an S3 bucket is publicly accessible. That would have taken me a lot longer without ChatGPT.

    In short: it basically replaced google and stack overflow in my workflow, at least as my first information source. I still have to fall back to a real search engine sometimes.

    I do not give LLMs access to my source code tree.

    Sometimes I’ll use it for ideas on how to write specific SQL queries, but I’ve found you have to be extremely careful with this use case because ChatGPT hallucinates some pretty bad SQL sometimes.