• 0 Posts
  • 20 Comments
Joined 1 year ago
cake
Cake day: August 4th, 2023

help-circle

  • All junior devs should read OCs comment and really think about this.

    The issue is whether is_number() is performing a semantic language matter or checking whether the text input can be converted by the program to a number type.

    The former case - the semantic language test - is useful for chat based interactions, analysis of text (and ancient text - I love the cuneiform btw) and similar. In this mode, some applications don’t even have to be able to convert the text into eg binary (a ‘gazillion’ of something is quantifying it, but vaguely)

    The latter case (validating input) is useful where the input is controlled and users are supposed to enter numbers using a limited part of a standard keyboard. Clay tablets and triangular sticks are strictly excluded from this interface.

    Another example might be is_address(). Which of these are addresses? ‘10 Downing Street, London’, ‘193.168.1.1’, ‘Gettysberg’, ‘Sir/Madam’.

    To me this highlights that code is a lot less reusable between different projects/apps than it at first appears.



  • I don’t think that the anti-oop collective is attacking polymorphism or overloading - both are important in functional programming. And let’s add encapsulation and implementation hiding to this list.

    The argument is that OOP makes the wrong abstractions. Inheritance (as OOP models it) is quite rare on business entities. The other major example cited is that an algorithm written in the OOP style ends up distributing its code across the different classes, and therefore

    1. It is difficult to understand: the developer has to open two, three or more different classes to view the whole algorithm
    2. It is inefficient: because the algorithm is distributed over many classes and instances, as the algorithm runs, there are a lot of unnecessary calls (eg one method on one instance has to iterate over many instances of its children, and each child has to iterate over its children) and data has to pass through these function calls.

    Instead of this, the functional programmer says, you should write the algorithm as a function (or several functions) in one place, so it’s the function that walks the object structure. The navigation is done using tools like apply or map rather than a loop in a method on the parent instance.

    A key insight in this approach is that the way an algorithm walks the data structure is the responsibility of the algorithm rather than a responsibility that is shared across many classes and subclasses.

    In general, I think this is a valid point - when you are writing algorithms over the whole dataset. OOP does have some counterpoints encapsulating behaviour on just that object for example validating the object’s private members, or data processing for that object and its immediate children or peers.



  • modeler@lemmy.worldtoScience Memes@mander.xyzCalculus made easy
    link
    fedilink
    English
    arrow-up
    17
    ·
    edit-2
    5 months ago

    I must not use jargon.

    Jargon is the mind-killer.

    Jargon is the little-death that brings total confusion. I will face the jargon. I will permit it to pass over me and through me. And when it has gone past I will turn the inner eye to see its path. Where the jargon has gone there will be clarity. Only sense will remain.




  • Their arguments included the size of the web page, and the time to display the first content, both of which were significantly better in Nue when compared to Tailwind.

    By all means argue on what is important (because what is important for your projects may be significantly different from mine), but there were many points that the author was highlighting, not just the separation of concerns. And for my projects, all these concerns are important.



  • modeler@lemmy.worldtoScience Memes@mander.xyzputs hair on your chest
    link
    fedilink
    English
    arrow-up
    42
    arrow-down
    1
    ·
    7 months ago

    Exactly!

    While the continents might look like they fit together, and the rock types and ages and fossils match at key points all down the coasts from Canada/Scotland all the way down to South America and South Africa, how on earth (sorry) would you explain how the continents are thousands of miles apart?

    One theory posited the earth spinning so fast centrifugal forces ripped ehat would become the moon out of the Pacific, sucking Eurasia and America into the void.

    That’s a Randall Monroe WhatIf if ever I saw one. Think of the energy involved! All life on earth would be extinct.

    So these theories were laughed out of scientific court. Until Vine and Matthew’s seminal paper on magnetic stripes being mirrored over the mid ocean ridge showed there had to be something forcing the plates apart.


  • That is a very good question and may help trace where the monologue ‘sounds’ in the brain. It would also be interesting if this were done on sign-language speakers.

    The mental pathway from reading to idea to utterance goes through several portions of the brain:

    • Visual processing of the text
    • Text to phoneme to possible rehearsal of the muscles saying the word (which could be the source of internal monologue, at least while reading)
    • Idea/concept of the individual word
    • Grammatical analysis of the sentence
    • The mental model of the complete thought.

    One interesting thing that suggests it would work was where the author stated i) it was better for verbs than nouns and ii) it would often pick a similar, related word rather than the actual one being read.

    This suggests that (at least part of) what is being detected is the semantic idea rather than the phoneme encoding or the muscle rehearsal portions of the brain.







  • Maths and reality are different. Very different. Reality can be explored empirically while maths is logic not empirical. We can never say we are 100% sure about the rules/laws we have discovered about our reality, but we can say for sure that a maths theorem is true or false.

    Maths is a set of self-consistent tools that can be used to predict what happens in reality. The mathematical description of reality is an estimate, contains countless assumptions and inaccuracies about where things are and what properties they have. In fact in quantum physics, we literally can’t know momentum and location at the same time.

    Maths can describe (or I should say, approximate) realities that don’t exist.

    Because maths and reality are different domains, we can know different things about them using different approaches.