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

help-circle
  • I definitely have a hangup on students I teach saying something along the lines of “I don’t know how to get started on this, I asked GPT and…”. To be clear: We’re talking about higher-level university courses here, where GPT is, from my experience, unreliable at best and useless or misleading at worst. It makes me want to yell “What do you think?!?” I’ve been teaching at a University for some years, and there’s a huge shift in the past couple years regarding how willing students are to smack their head repeatedly against a problem until they figure it out. It seems like their first instinct when they don’t know something is to ask an LLM, and if that doesn’t work, to give up.

    I honestly want shake a physical book at them (and sometimes do), and try to help them understand that actually looking up what they need in a reliable resource is an option. (Note: I’m not in the US, you get second hand course books for like 40 USD here that are absolutely great, to the point that I have a bunch myself that I use to look stuff up in my research).

    Of course, the above doesn’t apply to all students, but there’s definitely been a major shift in the past couple years.


  • I can actually imagine that evolutionary pressure could favour being able to kill yourself from sleep deprivation. Our ability to deny ourselves sleep is of course a result of evolutionary pressure, where people that were able to keep going for days on end without sleep to survive a crisis outcompeted those that collapsed from sleep deprivation and passed out.

    If we extrapolate to even worse crises, I can imagine that those who were able to keep going while carrying or protecting their kids or family until they died could have an edge over those that passed out from sleep deprivation, and died due to whatever they were staying awake to survive from. In short, that there are situations where it can be advantageous (from an evolutionary perspective) to be able to push yourself to the point of death, while ensuring that your kids survive.

    I have no research to back this up, but I can imagine that humans could have evolved the capability to kill ourselves from sleep deprivation.

    Another possibility (that’s kind-of mentioned by others here) is that once you go past a certain point of sleep deprivation, the parts of your brain responsible for making you sleep essentially stop working properly. If we assume that historically, it was extremely rare that people got to that point, there would be very low evolutionary pressure to fix that issue (i.e. make us pass out before dying). In that case, this could be one of the many situations where we have an attribute not because it’s advantageous, but because it’s not disadvantageous enough to be selected away by evolution.



  • There’s a reasonable probability that I’ll be heavily downvoted for this, but it’s my two cents, so here I go. For clarity, I’ll in the following use “male” and “female” to refer to biological groups identified by their reproductive organs (by far most people can clearly be identified as one or the other), and “man” and “women” to refer to groups of people that identify as such.

    Sex (the action) is pretty fundamentally tied to your reproductive organs. As such, I think it makes most sense to define “straight” vs. “bi” vs. “gay” in terms of sex (the attribute). I would say that a male that is exclusively attracted to females is “straight”, while a male that is exclusively attracted to women “bi with a strong preference for women”, and that a male that is exclusively attracted to males is “gay”.

    My reasoning here is twofold: First, a male that is attracted to women can have a range for how “female presenting” the woman has to be before they are interested. Some will only consider women that have gone through surgery and full hormonal therapy attractive, while others will find women without any surgery or hormone therapy attractive. This brings up the second point: A lot of sexuality becomes a lot easier to talk about (and de-stigmatize) if we accept that sexuality is a continuous spectrum. If we accept that, it makes sense to me to use one word for each extreme, and a more fluid language for the bulk of the spectrum. I know plenty of bi people that have more or less strong preferences towards one side of the spectrum, and some that are completely agnostic. I think a lot of stigma can be removed if we’re more open to people being “just slightly bi”, while we can keep the language clear by reserving “straight” and “gay” for the two extremes.

    Finally, if we use “straight” to refer to e.g. males that are exclusively attracted to women, we open an unnecessary can of worms regarding males that are attracted to people who identify as women, but don’t present as female. In short: Sex (act) is fundamentally tied to sex (attribute), so it makes sense to me to define sexuality in terms of sex, rather than gender.



  • Who dictates what’s stupid? Where does the sanity end and crazy name start?

    Sanity ends when the name has an objectively high likelihood of causing the child harm, or otherwise severely hindering them in life. For example, naming your child “Hitler”, or “<insert slur of choice>” is objectively likely to be harmful to them. Likewise, naming them “Helicopter” or “Rollercoaster” is very likely to set them back in life through childhood bullying.

    Who dictates this? In all countries I’m aware of that have laws around this: A government body of some kind.


  • Plenty of countries have this. Examples of forbidden names are “Hitler”, “Asshole”, “<Insert demeaning word here>”, and “Quisling” (name of a Nazi collaborator, commonly used as a synonym for “traitor” in daily speech).

    The point is that “stupid” is defined as a name that is objectively likely to severely negatively impact the child. It’s not based on “I think X sounds stupid” but on whether “X” carries significant cultural baggage like being the name of a famous Nazi, a slur of some kind, etc.



  • I really do agree on all your points, so at the end of the day I think a lot comes down to use-case and personal preference.

    My primary use cases for Python are prototyping and as a frontend/scripting tool for software written in C/C++/Fortran. In those scenarios, spending significant time on type hinting and unittests defeats the purpose of using Python (blazing fast development).

    I’ve written/worked on only one larger code base in pure Python, and my personal opinion became that I heavily prefer strictly typed languages once the code base exceeds a certain size. It just feels so much smoother to work with when I have actual guarantees that are enforced by the language.

    With that said, we were a bunch of people that are used to using Python for prototyping that developed this larger library, and it would probably have gone a lot better if we actually enforced use of proper type hinting from the start (which we were not used to).


  • Type hints are usually great, as long as they’re kept up to date and the IDE interprets them correctly. Recently I’ve had some problems with PyCharm acting up and insisting that matplotlib doesn’t accept numpy arrays, leading me to just disable the type checker altogether.

    All in all, I’m a bit divided on type hints, because I’m unsure whether I think the (huge) value added from correct type hints outweighs the frustration I’ve experienced from incorrect type hints. Per now I’m leaning towards “type hints are good, as long as you never blindly trust them and only treat them as a coarse indicator of what some dev thought at some point.”


  • Then I absolutely understand you :)

    How common it is 100 % depends on the code base and what practices are preferred. In Python code bases where I have a word in decisions, all Boolean checks should be x is True or x is False if x should be a Boolean. In that sense, if I read if x or if not x, it’s an indicator that x does not need to be a Boolean.

    In that sense, I could say that my preference is to flip it (in Python): Explicitly indicate/check for a Boolean if you expect/need a Boolean, otherwise use a “truethiness” check.




  • Exactly as you said yourself: Checking falsieness does not guarantee that the object has a length. There is considerable overlap between the two, and if it turns out that this check is a performance bottleneck (which I have a hard time imagining) it can be appropriate to check for falsieness instead of zero length. But in that case, don’t be surprised if you suddenly get an obscure bug because of some custom object not behaving the way you assumed it would.

    I guess my primary point is that we should be checking for what we actually care about, because that makes intent clear and reduces the chance for obscure bugs.



  • I write a lot of Python. I hate it when people use “X is more pythonic” as some kind of argument for what is a better solution to a problem. I also have a hang up with people acting like python has any form of type safety, instead of just embracing duck typing.This lands us at the following:

    The article states that “you can check a list for emptiness in two ways: if not mylist or if len(mylist) == 0”. Already here, a fundamental mistake has been made: You don’t know (and shouldn’t care) whether mylist is a list. These two checks are not different ways of doing the same thing, but two different checks altogether. The first checks whether the object is “falsey” and the second checks whether the object has a well defined length that is zero. These are two completely different checks, which often (but far from always) overlap. Embrace the duck type- type safe python is a myth.





  • That’s an interesting take, to me it’s always been either porn or not porn, and the idea of “porn but censored so I fill in the gaps myself” hasn’t ever had any appeal. I don’t know if this is related to what I’ve been more exposed to (probably is), but anytime I come across porn that shows everything except a tiny pixelated part (as in, only pixelating part of the junk) kind of funny.