• 0 Posts
  • 39 Comments
Joined 2 years ago
cake
Cake day: June 13th, 2023

help-circle
  • marlowe221@lemmy.worldtoLinux@lemmy.mlImmutable Distro Opinions
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    7 days ago

    Hmmm, interesting. I like brew, for sure. And devcontainers worked ok for me when I was working on something by myself.

    But as soon as I started working on a side project with a friend, who uses Ubuntu and was not trying to develop inside a container, things got more complicated and I decided to just use brew instead. I’m sure I could have figured it out, but we are both working full time and have families and are just doing this for fun. I didn’t want to hold us up!

    Our little project’s back end runs in a docker compose with a Postgres instance. It’s no problem to run it like that for testing.

    Maybe a re-read of the documentation for devcontainers would help…


  • Personally, I have found the developer experience on Bluefin-dx (the only one I’ve tried…) to be…. mixed.

    VSCode + Devcontainers, which are the recommended path, are pretty fiddly. I have spent as much time trying to get them to behave themselves as I have actually writing code.

    Personally, I’ve resorted to using Homebrew to install dev tools. The CLI tools it installs are sandboxed to the user’s home directory and they have everything.

    It’s not containers - I deploy stuff in containers all the time. But, at least right now, the tooling to actually develop inside containers is kind of awkward. Or at least that’s been my experience so far.

    I think the ublue project is fantastic and I really like what they are doing. But most of the world of developer tooling just isn’t there yet. Everything you can think of has instructions on how to get it going in Ubuntu in a traditional installation. We just aren’t there yet with things like Devcontainers.










  • I think that, in many cases, “what” and “why” are very similar to each other or are closely related.

    I’ve had an experience like this on more than one occasion - I come into an established code base for the first time. I’m working on a new feature/refactor/bug fix. I am reading through a function that is relevant to me, scratching my head a bit, and thinking “I think I see what this function is doing, but why did they do it such a screwy way?” Often there are no comments to give me any clues.

    In the past, I have foolishly changed the code, thinking that I knew better… But what often happens is that I soon discover why my predecessor did something that looked so weird to me. They weren’t stupid - there was a reason for it! And then I end up putting it back…

    Point being, in a situation like that the “what” and the “why” are going to have a lot of overlap. So, personally, I try to write comments that highlight assumptions that won’t be obvious from reading the code, external constraints that matter but don’t actually show up in the code, and so on.

    I am far from perfect at it and I probably don’t write enough comments. But when I do, I try to write comments that will be reminders to myself, or fill in gaps in context for some hypothetical new person. I try to avoid comments that literally explain the code unless it’s particularly (and unavoidably) complex.



  • “Why” comments make more sense as application complexity grows.

    You also have to consider interaction of the code with other external systems - sometimes external APIs force you to write code in ways you might not otherwise and it’s good to leave a trail for others on your team (and your future self…) about what was going on there.







  • I generally agree with the idea that code should be as simple as it can be to accomplish the goal of the code… I just haven’t been convinced that Clean Code is the way to get there, necessarily. The book does contain some good advice , to be sure, but I wouldn’t call it universal by any means.

    I also think TDD is a very optimistic strategy that just doesn’t match up with reality terribly often.

    Actually, I think that’s what confuses me the most about all of Uncle Bob’s books. I’ve read a couple of them and thought, “All this sounds great but real world development just doesn’t seem to work that way.” Like, all of his advice is for best case scenarios that I certainly haven’t encountered in my career.

    I say confusing, because surely he’s been in the profession long enough to have seen the disconnect between what he’s preaching and real life, right???