3

It’s hard keeping your girlfriend satisfied when you’re being pressured to code with less to no bugs. I mean, doesn’t she understand that computers are stunningly stupid, and you have to explain to them every last tiny step that you want them to do, and your explanation can't have any mistakes in it. And why this is the fundamental cause of buggy and insecure software😣

Comments
  • 0
    Let me tell you that one of the biggest reasons of buggy software is a not strict enough language design. When you use a lang with the Hindley-Milner type system, it is often hard to get the program to compile in the first place. But when it does, it works most of the time. Also helps when there is no null type.
  • 2
    @finiteAutomaton I just hate puzzle languages where you don't really think about the problem anymore, but how to get anything done in that language.

    Also, type bugs aren't really relevant unless the language abuses dynamic typing and tries to second-guess what the programmer might have intended.
  • 1
    @Fast-Nop You mean you hate pure functional languages? Because there are also impure ones with imperative escape-hatches. Of course, you throw away some (often theoretical) safety for pragmatism and development speed, but there are some languages which reside right at that sweet spot between pragmatism and correctness (e.g. OCaml, F#).

    I am really not too confident in low-level languages like C++, but I reckon if there are null pointer exceptions, a safe and sound type system (with great type inference) will help.

    It's hard to describe, but a strong type system takes away some of the mental overhead while programming.
  • 1
    @finiteAutomaton Pure functional seems nice when it's about computing things, which is heavy in academia. Functional is also cool if you have computations on some thousand nodes and getting tons of state synced is just not possible with finite dev time.

    OTOH, Real-world software often is more about behaviour (think of an airbag) or all about state (think bank accounts).

    I remember a strong type system from Pascal. Fine for an educational language, but it got in the way all the time. On the other hand, I don't like the other extreme of languages like JS because you often lose track of what you are dealing with, resulting at least in hidden jojo code.

    It's just that actual type errors have never been a prominent bug source in SW I had to debug. Mostly, it's logic/design errors.

    On the other hand, I even typedef PODs if it enhances readability. Like giving a uint16_t a type if it isn't used for counting things, but rather some bit compound.
Add Comment