1. 12
  1.  

  2. 17

    I’m going to sound grumpy, but I really dislike cookie-cutter templates like this. They’re packed with stuff you don’t need, come with assumptions that won’t work for you, create a vast bike-shedding surface (120 chars per line, are you kidding me?) and I predict half-life[1] of any such particular solution to be about a year.

    But mostly it’s the copy-paste culture. Tools have defaults for a reason. If you feel the need to have a config value different from the default one, you must have a good reason to do it. Because every changed default is a maintenance burden. The only way to achieve this is to start from a blank page and actually know why you’re doing… everything.

    [1]: By half-life I mean the amount of time after which half of the lines in all those configs will become obsolete.

    1. 4

      I had a hard time figuring out ideal project structure, with Python however, it’s pretty simple

      1. ├── blueprint  # Our source code - name of the application/module
      

      Not trying to nitpick, I just found it kind of funny that the very first line is debatable and not so simple :) Many people find it safer to use some indirection and put the sources under src/ directory, because of the implicit current working directory in PYTHONPATH.

      I can see that there is also an issue in your repo, so you’re aware of it (it’s even referencing the same article).

      1. 3

        Also blueprint has special meaning in Flask, so if this is a python project and people might have used that, I find it a little confusing.

      2. 4

        Flagged this as broken link, I can’t read the article because:

        To keep reading this story, create a free account.

        1. 2

          I’m assuming this is a complaint about meduim… I’m surprised I didn’t see it, as I think I’ve read a number of stories there and haven’t done anything special to clear cookies or similar lately. I used to see similar notices there all the time.

          I wonder if privacy badger is preventing it somehow.

          1. 1

            I can usually read Medium stories as well. Maybe some difference between my Wipr setup on macOS and uBlock on Linux.

            Regardless, it’s probably not very useful to posts stories that are unreadable unless you create an account and/or need a specific blocking setup.

            1. 2

              Regardless, it’s probably not very useful to posts stories that are unreadable unless you create an account and/or need a specific blocking setup.

              I strongly agree. I just wonder why it appeared OK for OP and for me. Because I’d have totally posted this if I just ran across it. I’d also like to figure out how to configure my blocking setup to remind me that something will not share nicely before I share it.

        2. 3

          There’s a lot here that I like. Very nice! (And thanks for posting it!)

          I don’t have time to go do it for this article right now, but on the off chance someone who’s here reading does have time, a cookiecutter template would be an awesome companion to any article like this. I think it’d be really easy to convert the sample repo + configure shell script, too.

          Here are a few samples of cookiecutters, in case anyone is inspired to do one for this:

          1. 1

            I’d expand this with two additions and a minor fix:

            • use poetry to do dependency management and handle virtual environments

              This allows you to freeze dependencies with a lock file, and it simplifies the virtualenv flow a lot. This could be a way faster solution than using a docker container during development. Poetry also allows you to specify development-only dependencies like pytest and Coverage

            • use pdoc3 to automatically generate documentation. Could be made available as two make targets:

              • html - Generates the documentation and writes it to disk. This could also be run with github actions
              • live - Runs a local server which automatically refreshes the documentation in your browser while you work
            • Make the targets in the Makefile into .PHONY targets

            1. 15

              As the original author of pdoc, please reconsider using pdoc3, which is a hostile fork with subtle swastikas embedded in their homepage.

              1. 3

                Wow. That’s awful. I’m sorry they did that to you.

                1. 1

                  Wow, that’s messed up. That guy’s avatar is a swastika too. His stupid answer about it being a ‘misunderstanding’ is so typical of that kind of edge lord type, he’s clearly an asshole. Is there a way to report Github accounts?

                  1. 1

                    There is a link to block or report a user from that user’s profile page on Github. Regarding this particular user however the icon when viewed in larger sizes seems to be a detail of a pattern (repeated in miniature) so that there’s probably enough interpretive wiggle room for either GH or the user to argue it’s not “actually” a swastika.

                    1. 2

                      Yeah, but combine that with BurntSushi’s issue, and you start seeing an obvious pattern (pun not intended) of behavior.

                  2. 1

                    Wow, that sucks dude. I simply assumed the fork happened due to inactivity of pdoc. Attempting to remove pdoc from the python wiki, the change of license, his response to #87 clearly shows you he is not acting in good faith.

                    My initial reaction to the use of the swastika was to think of it in the original religious context. His defense of it seemed kinda respectful even (#193, #64). I asked my family about it and they immediately called bullshit. This led me to discover his response to #87, the fact that #1675 ever happened, and the fact that he most likely is from Slovenia and therefore most likely not a hindu nor buddhist himself. I now no longer believe his use of the swastika is defendable at all.

                    1. 4

                      Yes. These are exactly the kind of tactics used by these people. If you’re curious, you can learn more by reading their playbook: https://m.huffpost.com/us/entry/us_5a2ece19e4b0ce3b344492f2

                    2. 0

                      I understand some of the complaints, I understand the whole relicensing and stealing the project must suck for you and I’m sorry for that, absolutely not defending that part. But I think the whole swastika thing has been blown out of proportion. Don’t get me wrong, it’s a symbol that right now, at least in the west, carries a negative connotation, and you’re completely in your right to want to avoid being associated with it, but it’s a really old symbol1 used for a very long time with a completely different meaning and still used with than meaning in asia. I think it’s unfair to criticise that part.

                      1. 5

                        I know the history. I stand by my criticism. I think it’s pretty plain that this person is acting in bad faith.

                        1. 0

                          Yes I agree that he is probably acting in bad faith. But I don’t think the swastikas are part of the bad faith. Wanted to make sure to give some context for the swastika symbol as the other subthread was talking about reporting him specifically because he has a swastika as his profile picture and focusing on that.

                          1. 5

                            But I don’t think the swastikas are part of the bad faith.

                            I do. The very fact that we are debating this is exactly the point. If this person were genuine, it would be crystal clear.

                            1. 1

                              To add one more data point, the project website’s footer has the swastikas too, and let’s just say I do not think the choice of juxtaposed quote is coincidental.

                              Fucking sucks to have your project hijacked by the worst kind of people imaginable, my condolences :(

                              1. 0

                                Ew. (I agree they are, and also offer condolences.) I’m feeling a little bit thick as regards the quote, though. What’s wrong with it? Was Yourdon some kind of nazi-adjacent scumbag?

                                1. 4

                                  AFAIK nothing wrong with Yourdon, and I imagine the quote was innocent enough in its original context and time. It’s just that here in 2020 (as an American, but I imagine this is true for lots of European readers as well) I associate certain connotations with the word “undocumented,” i.e. undocumented immigrants.

                                  It fits into this guy’s general pattern of lamely attempted plausible deniability, but particularly given everything else, appropriating a quote that just happens to call an “undocumented” thing “despicable” right next to those swastikas sets off major alarm bells for me.

                                  1. 2

                                    That seems entirely likely. My brain just didn’t draw that line. Thanks for explaining.