29 Matching Annotations
  1. Apr 2024
    1. it is a really good idea to check the status before doing an add .

      maybefore, but check mainly AFTER indexing new files !

  2. Aug 2023
    1. I think the problem with after_destroy is that it is triggered before the database commits. This means the change may not yet be seen by other processes querying the database; it also means the change could be rolled back, and never actually commited. Since shrine deletes the attachment in this hook, that would mean it might delete the attachment prematurely, or even delete the attachment when the record never ends up destroyed in the database at all (in case of rollback), which would be bad. For shrine's logic to work as expected here, it really does need to be triggered only after the DB commit in which the model destroy is committed.
  3. Nov 2022
    1. It is handy to manually generate the diagram from times to times using the previously created command: npm run db:diagram:generate. Though, getting the diagram to update itself on its own automatically without a developer interaction would ensure that it the diagram is never obsolete. There are several ways of doing this.You could use a pre-commit git hook or even better simply configure your CI/CD pipeline(s) to run the npm script whenever something gets merged into the main branch 🙂
  4. Feb 2022
    1. Can't annotate the comments for some reason, so I am copying the below:

      The Jerk talked about getting hit by a bus, etc. I said who cares about code if a guy’s in hospital or there’s a war, we’ve got better things to worry about than a few days of lost code.

      I feel the pain. I do. I understand. I get scared. I want to check in early and often, but source control isn’t your personal unlimited undo. When I look at history I don’t want to see rubbish. I want to see snapshots of working code.

      Don’t hold back, and don’t go dark, but use your f’ing head. It’s far better to locally integrate multiple times per day and merge back after a few days because guess what, no surprises.

  5. Jul 2021
    1. The goal of this tutorial is to describe Python development ecosystem.

      tl;dr:

      INSTALLATION:

      1. Install Python through pyenv (don't use python.org)
      2. Install dependencies with Poetry (miniconda3 is also fine for some cases)

      TESTING:

      1. Write tests with pytest (default testing framework for Poetry)
      2. Check test coverage with pytest-cov plugin
      3. Use pre-commit for automatic checks before git commiting (for example, for automatic code refactoring)

      REFACTORING:

      1. Lint your code with flake8 to easily find bugs (it is not as strict as pylint)
      2. Format your code with Black so that it looks the same in every project (is consistent)
      3. Sort imports with isort (so that they are nicely organised: standard library, third party, local)
  6. Jun 2021
  7. Mar 2021
  8. Dec 2020
  9. Nov 2020
  10. Oct 2020
  11. Sep 2020
  12. Jul 2020
  13. Jun 2020
  14. May 2020
    1. I encourage people to write good commit messages, with a good description that explains what it does.
    2. Personally I enjoy writing commit messages
    3. It seems weird to me that we are trying to enforce commit messages when they are not really visible or used in the GitLab workflow at all. This is what you see most of the time when interacting with the commit list. I've taken time to compose a nice descriptive body and it is hidden by default:
    4. which might or might not be useful depending on what is the content of the commit.
    5. One way of encouraging users to create good commit message would be to have a better integration with the content of commit message in GitLab itself,
    6. This also ties in the "Single Source Of Truth", where even if I craft descriptive commit messages I will probably have to describe what I did in the MR comments anyways, so that feels like duplicate work.
    7. I never understood why we enforce The commit body must not contain more than 72 characters per line.
    8. It is considerably harder to write proper sentences when you have to insert an enter every now and then just to follow the rule.
    9. These two are in my opinion the most problematic — the basically go against each other. Typically, I try to work in increments over a feature and commit when I reach whatever techinical milestone I want to "checkpoint" at. It can also be out of the need to expose some idea or architecture and push it.
    10. With single-commit MRs I often can copy the commit message directly into the MR description, which is convenient.
  15. Apr 2020
    1. While these particular indictments refer to credit card data, the laws do also reference authentication features. Two of the key points here are knowingly and with intent to defraud.
    2. I could have released this data anonymously like everyone else does but why should I have to? I clearly have no criminal intent here. It is beyond all reason that any researcher, student, or journalist have to be afraid of law enforcement agencies that are supposed to be protecting us instead of trying to find ways to use the laws against us.
    3. For now the laws are on my side because there has to be intent to commit or facilitate a crime
  16. Nov 2019
    1. You should not only say what you did, but also why you did it. It’s even more useful if you explain why you did this over any other options.