• 0 Posts
  • 68 Comments
Joined 2 years ago
cake
Cake day: June 12th, 2023

help-circle




  • waigl@lemmy.worldtoProgrammer Humor@programming.devUniversity Students
    link
    fedilink
    English
    arrow-up
    73
    ·
    edit-2
    9 months ago

    Writing good comments is an art form, and beginner programmers often struggle with it. They know comments mostly from their text books, where the comments explain what is happening to someone who doesn’t yet know programming, and nobody has told them yet that that is not at all a useful commenting style outside of education. So that’s how they use them. It usually ends up making the code harder to read, not easier.

    Later on, programmers will need to learn a few rules about comments, like:

    • Assume that whoever reads your code knows the programming language, the platform and the problem domain at least in general terms. You are not writing a teaching aid, you are writing presumably useful software.
    • Don’t comment the obvious. (Aside from documentation comments for function/method/class signatures)
    • Don’t comment what a line is doing. Instead, write your code, especially names for variables, constants, classes, functions, methods and so on, so that they produce talking code that needs no comments. Reserve the “what” style comments for where that just isn’t possible.
    • Do comment the why. Tell the reader about your intentions and about big-picture issues. If an if-statement is hard to parse, write a corresponding if clause in plain English on top of it.
    • In some cases, comment the “why not”, to keep maintenance programmers from falling in the same trap you already found.




  • waigl@lemmy.worldtoComic Strips@lemmy.worldXXX
    link
    fedilink
    English
    arrow-up
    6
    arrow-down
    6
    ·
    edit-2
    1 year ago

    Corporations holding residential real estate are a growing part of the problem, but still a small one. The vast majority of single famliy homes are still owned by either their residents or small time, non-incorporated landlords.

    Never mind increasing the supply of housing would drive down prices and remove pressure regardless of who owns the existing stock.


  • waigl@lemmy.worldtoComic Strips@lemmy.worldXXX
    link
    fedilink
    English
    arrow-up
    29
    arrow-down
    18
    ·
    1 year ago

    Okay, this bullshit. It’s not shareholders who would be negatively affected by this, and it’s not shareholders who are actively working against doing something about the problem. Shareholders are just an easy acceptable target to point your fingers at, whether it makes sense or not.

    What needs to be done to tackle the homelessness problem (not the only thing, but probably the most important one) is to zone much, much more land inside or directly next to cities for affordable mid-rise multi-family homes. Guess who is opposed to that and has the power to do something about it? Existing property owners. Specifically owners of detached single family homes. Because doing that would negatively affect their property values. Personally, I think that shouldn’t matter, because what good is living in home that is worth absurd amounts of money on paper going to do you if society is falling apart because of it? But home owners are always massively concerned about their property values and will torpedo anything that might threaten it. Of course, pointing your fingers at home owners is much dicier than pointing them at shareholders, because even in a bubble like this one, you are bound to point at some people here who will feel personally attacked by that…

    “Shareholders”, on the other hand, aside from those that are also home owners at the same time, don’t really have much reason to care one way or another about effective projects to reduce homelessness.


  • Floating Point Unit. The thing that does mathematical operations on floating point numbers. It used come separately from the CPU as an add-on chip, but around the 486 era, manufacturers started integrating it on the same die as the CPU. Of course, as these things go, from the system programmers point of view, there is still no difference between an add-on FPU and an integrated one.

    The one pictured here is an add-on FPU for an Intel 80386 CPU.









    1. WebEx hat Sicherheitslücken, die im Öffentlichen agierende Security Researcher nicht gefunden haben, weil das closed source ist und man da legal nicht so einfach rankommt, während im dunklen agierende Zeitgenossen, die sich um legal versus illegal nicht kümmern, schon seit 10 Jahren auswendig wissen, wo genau man einen Stapelüberlauf provozieren kann,und welche Rücksprungadresse man da reinschmuggeln muss, damit das Ding macht, was man will…
    2. WebEx hat absichtliche Sicherheitslücken, die Cisco vom Amerikanischen Staat aufobtruiert wurden, und die dann entweder durch Spionagegeschichten oder Eigenrecherche auch den Russen bekannt wurden.

    Gut, in diesem konkreten Fall ist die Erklärung natürlich noch viel einfacher: Ein Konferenzteilnehmer hat über eine altmodische, unverschlüsselte Telefonleitung aus Singapur teilgenommen, und die abzuhören, war noch nie ein Problem.


  • waigl@lemmy.worldtoMemes@lemmy.mlInvest in hwat?
    link
    fedilink
    English
    arrow-up
    21
    ·
    1 year ago

    Top Left – More or less the default position, sensible enough, if a bit naive. Nothing wrong with this.

    Top Right – Having knowledge is a good thing, and so is making decisions based on sound risk-benefit analysis.

    Bottom Right – Well, at least it’s an informed decision. Just don’t try to pass off the risk on someone else if it backfires.

    Bottom Left – Oooouuuuh, you don’t want to be in this quadrant, trust me…