[-] atheken@programming.dev 3 points 9 months ago* (last edited 9 months ago)

Writing fast unit tests will require some refactoring that could end up being pretty extensive.

For example, you mentioned “cloud storage” - if this is not already behind an interface one ticket could be to define an interface for accessing “cloud storage” and make it so that it can be mocked for most tests and the concrete implementation can be tested directly to confirm the integration works. Try to hone down that interface so that it’s as few methods as possible, only allow the parameters you’re actually using to be exposed and used in the interface. You can add more later if it’s absolutely necessary.

Do this for anything that does I/O and/or is CPU intensive.

So, to do tickets, I’d basically say, one per refactoring.

Going forward, writing “unit tests” should not be separate tickets, it should be factored into the estimates for the original stories, and nothing should go out without appropriate tests. The operational burden will decrease over time.

QA should have their own unit for how they want to test the application. Usually this is a suite per section of the app. If your app has an API, that is probably going to have a nice logical breakdown of the different areas that could each have their own ticket for adding QA-level test suites. The tests that developers write should only be additive and reduce the workload of QA. What you want to be sure of is that change sets are getting reviewed and through the entire pipeline without getting logjammed in any stage. Ideally, individual PRs are getting started and deployed in less than a week.

If you’re interested in more techniques, check out the book “Working effectively with legacy code.” It has a lot of patterns for adding tests to existing codebases.

[-] atheken@programming.dev 3 points 10 months ago

I don’t know if it’s “most people,” but I agree, there is no excuse for frameworks producing sloppy output - that being said, XHTML is a bit more chatty than HTML(5), so there is some minor benefit to not using the less verbose standard.

[-] atheken@programming.dev 3 points 1 year ago* (last edited 1 year ago)

🙈🙉🙊

I know, but I didn’t want to scare the children.

I also chose to pretend it’s just little gnomes moving the bytes around. Less magic.

[-] atheken@programming.dev 2 points 1 year ago

You are treating this as a binary/zero-sum game. Will we get to 100% use of tabs (or spaces)? No. Will we get a "perfect" viewer made and then adopted by all visually-impaired people? No. Making people aware that a fairly mundane choice has a negative impact on others might change their behavior, or at least challenge it.

Change like this is incremental, so just having the conversation, and asking you to consider that making a small change to your config might help some people down stream is something. Asking you to bring this point to the next conversation about tabs vs. spaces, is helpful.

I’m saying that spaces are slightly better than tabs if you don’t have any relevant disabilities

This is my fundamental issue with your original statements, and this thread: It's a subjective choice that you think is slightly better than removing a barrier/major annoyance for an entire group of people that may want or need to interact with your code. It's closing the door on possibility for a minor personal preference.

[-] atheken@programming.dev 2 points 1 year ago

Yeah, -p can help with that. I’m not much for “commit grooming” - as long as a branch merges to main cleanly and passes tests, I don’t care about an “ugly” commit history.

[-] atheken@programming.dev 2 points 1 year ago

I’m not sure if you’re being funny, but of course committing the output of your program isn’t what I was saying.

[-] atheken@programming.dev 2 points 1 year ago* (last edited 1 year ago)

There are other reasons to use it. A major one is doing a “code review” of changes before committing, or even deciding to drop a chunk of code from a commit entirely (like a debug statement that no longer is necessary.)

I’m all about frequent commits (and right-sized commits), but the functionality can still be beneficial even in those scenarios.

I also don’t care if I have a broken commit. This turns up very quickly, and there is zero expectation that feature branches are always in a working/stable state. The expectation is that pending work gets off the local machine on a regular interval.

[-] atheken@programming.dev 3 points 1 year ago* (last edited 1 year ago)

I use git on the CLI exclusively. I almost never rebase, but otherwise get by with about 5-10 commands. One that will totally change your experience is git add -p

I also have my diff/mergetool configured to use kaleidoscope, but still do everything else in the CLI.

[-] atheken@programming.dev 2 points 1 year ago* (last edited 1 year ago)

I read The Phoenix Project recently, and had a PTSD episode from all of the hallmarks of dysfunction that I’ve experienced in my career. Good book, but probably needs a trigger warning.

[-] atheken@programming.dev 2 points 1 year ago

I use dev containers on Mac, it’s not just about launching services that you need to test your code, it’s about specifying the entire build toolchain to get a deterministic dev environment in an isolated way.

You don’t need to manage the docker containers at all, vscode handles their lifecycle.

You can specify different extensions/configurations per project, so if you bounce between several languages, you’re only using the extensions/configs for a given project.

It also allows for a mostly seamless debugger experience with the browser when you launch a process.

The nice thing is that it sits off to the side, you can use your docker-compose as you normally would, but if you want to provide a full working dev environment for contributors, basically all they need is docker and vscode installed and they can get started.

The devcontainer spec is based on open standards, so it probably will end up in other editors, because it solves a huge problem for teams. The only thing that I think will come close is Nix, but I think it’s limited in scope in some important ways for this use case.

[-] atheken@programming.dev 3 points 1 year ago

I have no idea what you mean when you say you found an error in the design that says it was an INSERT instead of a SELECT.

If you are relying on a design doc with SQL in it, that’s a massive waste of time.

How many tables are in the schema? Have you reviewed them? Are there any naming conventions being followed, or is everything inconsistently named? Are there specific cases where tables are not normalized properly that you can ask specific questions about why they are that way? If the person that designed the schema is making “trivial” mistakes, there’s no reason to expect that stuff that doesn’t make sense to you will be something they intentionally did.

I guess what I’m saying is, you need to do some due diligence and survey the schema and write down some specific questions and that may lead to writing a UML or other doc to identify errors, but it doesn’t sound like you’ve done that.

[-] atheken@programming.dev 2 points 1 year ago

I understand the predicament you are in, but I don’t know that you’ll get very far with your current approach.

The actual artifact you need from your collaboration is the list of API endpoints and the structure of what the request and response payload will look like for each one. This doesn’t need to be UML, it can literally be a text doc.

By asking for something highly structured that the other people may not know how to make, or do not have the tools to make, you’re putting them in a position where they have to acknowledge that they don’t know how to do something, or causing them to do work that they don’t value. Once you’ve had success on a team and developed trust/respect, you can push for adding process/tooling, but if you’re new to a team, you really have to work with what you’ve got.

Either of you could write a simple doc outlining the API and then collaborate on that (it’s also much easier to actually comment/collaborate on than a diagram, anyway).

view more: ‹ prev next ›

atheken

joined 1 year ago