• 2 Posts
  • 75 Comments
Joined 2 years ago
cake
Cake day: June 18th, 2023

help-circle



  • To back you up: In Norway (and quite a few other countries I assume), job training and/or education are typically included in a prison sentence as a way to re-integrate inmates into society. Norway also happens to have one of the lowest repeat offender rates in the world.

    Of course, this has to be voluntary on the inmates part, and they have to be paid some compensation for the work they do. I believe a part of the system involves inmates being placed for job training in some company that’s willing to employ them, but the government pays their salary, because the employing company is expected to spend resources training them. This also incentivises the company to hire them once they finish doing time, as they’ve now been trained in the job.

    Inmates that are regarded as too dangerous to be outside the prison can typically get jobs within the walls. In Norways highest-security prison, there’s a Gardening businesses, where inmates grow all kinds of flowers, and inmates run a shop where people from outside can buy them. It’s regarded as a huge success in helping the inmates prepare for an ordinary job.



  • I wholeheartedly agree: In my job, I develop mathematical models which are implemented in Fortran/C/C++, but all the models have a Python interface. In practice, we use Python as a “front end”. That is: when running the models to generate plots or tables, or whatever, that is done through Python, because plotting and file handling is quick and easy in Python.

    I also do quite a bit of prototyping in Python, where I quickly want to throw something together to check if the general concept works.

    We had one model that was actually implemented in Python, and it took less than a year before it was re-implemented in C++, because nobody other than the original dev could really use it or maintain it. It became painfully clear how much of a burden python can be once you have a code base over a certain size.


  • I have next to no experience with TypeScript, but want to make a case in defence of Python: Python does not pretend to have any kind of type safety, and more or less actively encourages duck typing.

    Now, you can like or dislike duck typing, but for the kind of quick and dirty scripting or proof of concept prototyping that I think Python excels at, duck typing can help you get the job done much more efficiently.

    In my opinion, it’s much more frustrating to work with a language that pretends to be type safe while not being so.

    Because of this, I regularly turn off the type checking on my python linter, because it’s throwing warnings about “invalid types”, due to incomplete or outdated docs, when I know for a fact that the function in question works with whatever type I’m giving it. There is really no such thing as an “invalid type” in Python, because it’s a language that does not intend to be type-safe.



  • Exactly this… I’ve been called out before for saying that someone (who was french) “looked french”, with the implication that it was racist of me to imply that people from different countries typically have subtly different features.

    Of course, you can’t always tell where someone is from based on how they look, act, or speak, but pretending that there aren’t certain phenotypes that are more common some places than others is just ignoring what we can observe. It’s not always easy to pinpoint exactly what it is, but people generally have an idea of what a “typical southern/western/eastern/northern european”, looks like (or any other area of the world for that matter), and often that intuition will be correct. This is not racism, it’s simply the fact that after seeing a bunch of people from some country or region, you build a pattern for what phenotypes are typical in that region. Racism is when you decide to assign more worth to some phenotype or ethnicity than another, which is a whole different thing.

    Basically, recognising that people are in fact different is not racism. Determining someones worth or quality of character based on differences in phenotype is.


  • That depends on what level you’re working at: If you hire a company to do electrical work as a part of your construction project, you’ll typically rely on that company to provide paperwork confirming that everything is in order. As your company does not have the qualifications to do the certification (hence why you are hiring a subcontractor), you cannot be expected to cross-check the work.

    If the building catches fire due to an electrical failure, it’s the subcontractor that signed off on the paper whose held liable, not the company that delivered the end-product.

    Similarly, if I buy a product and receive a certificate that it holds some standard, I’m permitted to assume the certificate is valid and re-sell the product, unless there’s some express reason I should have understood that something is wrong.


  • To be fair, if the lead is added by a middle man selling to the company, then the company isn’t making any more money.

    I can definitely see a situation where that’s the case. It would be comparable to buying something off someone, you look at it and it looks like everything is in order, after you sell it on it turns out the stuff was stolen.

    I’m not 100% sure, but I don’t think you can be held accountable in such a situation unless it’s proven that you either knew or should have known that you were selling stolen goods.





  • Fair enough, git clean does exist. However, if the button saying “discard all changes” is really a button that runs git clean, that’s just a plain terrible design choice. git clean is “delete all untracked files”, which is specifically not discarding changes, because there can be no changes to discard on an untracked file. Even talking about “changes” to an untracked file in VC context makes little sense, because the VC system doesn’t know anything about any changes to the file, only whether it exists or not.

    That’s not even mentioning the fact that the option to “git clean” shows up as one of the easily accessible options in relation to a staging process. Especially if you’re coming from the git CLI, you’re likely to associate “discard changes” with “git restore”.



  • Got will not delete untracked files though, which is what happened here. If you want to discard changes to a file with git, you first have to commit the file to the index at some point, which means there’s only ever so much damage an erroneous “git restore” or “git reset” can do. Specifically, neither of them will delete all the files in an existing project where VC has just been added.


  • If you have set up your staging area for a commit you may want to discard (unstage) changes from the staging area, as opposed to discarding changes in the working directory.

    Of course, the difference between the two is obvious if you’re using git CLI, but I can easily see someone using a GUI (and that maybe isn’t too familiar with git) misunderstanding “discard” as “unstage”.

    Either way, what happened here indicates that all the files were somehow added to the VC, without having been committed first, or something like that, because git will not let you discard a file that is untracked, because that wouldn’t make any sense. The fact that the GUI let this person delete a bunch of files without first committing them to the index is what makes this a terrible design choice, and also what makes the use of the word “discard” misleading.


  • I use gitkraken for two primary purposes:

    1. Having a visual representation of my project history.

    2. resolving merge conflicts

    Of these, the first is really the only thing I really want a GUI for. I’ll just have it open on my side-screen if I’m managing some more or less messy branch structure or quickly want an overview of what has been done on which branches, where common ancestors are, etc. All the actual doing of things is done from the CLI, because it’s just better for that.