• 1 Post
  • 530 Comments
Joined 2 years ago
cake
Cake day: July 3rd, 2023

help-circle












  • Product owners say, "We want to change the site so users see a list of all the other users on their team with access to this project "

    Okay. Do some thinking. Going to need the backend to return that information to the front end. Decide what URL that should be under (api/v1/projects/users, maybe?).

    Now we make the backend actually do that. Create a new file for this endpoint. Update the routes file so that url points to this file. Write the handler class.

    Does this endpoint take any particular input? We know who the caller is for free from the framework. We only want to return info about one project or all projects? Make that decision. Update URL if needed.

    Write the code to get the other users on the projects in question. Maybe that’s SQL, but might also be ORM (code from a framework that generates SQL based on objects). Decide what information we actually need. Package that up and send it back. The specifics depend on language and framework.

    Write automated tests for this. Make sure it works for

    • 401 not logged in
    • 403 asking about a project I don’t have permission for
    • 404 asking about a user with no projects, or a project that doesn’t exist
    • someone with 1 project
    • someone with 2 projects
    • someone with 10000 projects
    • also consider what happens for 0, 1, 2, 10000 users on the project.

    Realize this needs to paginate. Go back and change the handler code to do that.

    Realize due to some quirk of how permissions work, someone can be on the project twice. Talk with the team about if we should just decide that here, or try to fix the root problem. Probably the former.

    Add deduplication code, then, and test cases.

    Open this up for code review.

    Start the front end work.

    Make a dummy page first and update your API calling code to know about this new route, assuming you don’t have that auto magically set up somehow. Make sure it calls it and gets a response.

    Realize that staff users technically have access to every project in the system. Ask product if that’s how they want that to behave. If no, figure out what you all want that to do instead.

    Do a bunch of react work to make the page pretty, put the response in the right UI elements with links to the right place. Realize the response you’re sending back makes building the links annoying because you didn’t send some part of it, so you’d need to make another request to the backend for every link. That sucks. Update the backend to include the user’s team-id that is for some stupid reason still in the URL. Comment on code review.

    And now I’m tired of writing.

    Edit: I hit submit before I was done. Finished now. Edit: fix typo






  • Sidebar defaults are bad. There’s no home directory. How do you get to your home directory? Cmd+shift+H, but can you get there without that special shortcut? You can’t see the file system’s structure in Finder. The GUI doesn’t have a way to go “up” in the directory structure. I don’t think you can do it in the GUI alone.

    It won’t let you see stuff in like \tmp\ without a fight, too. I don’t know how to open stuff in places like that without cd’ing to the location in the terminal, and doing open . in the desired directory.

    The list view is the least bad, but it gets unwieldy if your directories are deeply nested. It’s also bad if you started in the middle of the tree and want to go up. Gallery and column view are really bad for anything non trivial.

    I often want to see the entire file path, and it really doesn’t want to cooperate. If I do find the file I’m looking for, and want the full path, it doesn’t want to give it. I don’t even know if there is a way to get it. Other than like cmd+clicking -> “new iterm2 tab here” -> pwd, which is not really that helpful of Finder.

    Contrast with windows’ default explorer. It’s not perfect and I think windows11 made it worse, but still. Open it up, there’s the “my pc”, click through to my user directory, music, some album, then i can click the top thing and get the path. I can also see the whole tree on the left.

    Whatever I was using in Mint was similar to windows’ Explorer. Had no complaints about it.


  • People are kind of stupid and lazy, and if there’s no immediate benefit for doing something or punishment for skipping it, they’ll do whatever’s easiest. We’re all like this to some degree, in some contexts or other.

    It is a little funny to me that some people just don’t have professional standards. I would make a good faith effort to respond completely to a work email because that’s the job. But I don’t think that’s it for a lot of people.

    There’s a lot of ADHD and friends in the world, and a lot of it is untreated. They’re not skipping questions out of malice. They’re probably trying their best. Still failing, but trying. That counts for something.

    A lot of people also don’t read well. They won’t likely show up on a texty medium like this, but they’re out there. It may be uncomfortable and embarrassing for them to try to read your email, especially if the level of diction is high and the vocabulary extensive. Most people are emotionally kind of fragile, and won’t put up with that shame for very long. I think that’s why a lot of people want to hop on a call or have a meeting when it could’ve just been an email. They can talk fine, but communicating in written words is harder.