• 1 Post
  • 24 Comments
Joined 2 years ago
cake
Cake day: June 12th, 2023

help-circle
  • I’ve gotten used to this. The posts where I write several paragraphs and go kinda in-depth on a topic, and even do some research in the background on to make sure I don’t talk complete nonsese routinely get no upvotes at all. The ones that rise to the top are snippy one-liner remarks that get a cheap laugh out of people, but honestly don’t add anything of substance to the discussion.





  • Imagine the following:

    You actually can stop the time by snapping you fingers, but it stops time for the entire universe, including yourself, with the exception of one single observer on some unimportant planet in the Andromeda galaxy. After 100 years from the POV of that observer, time resumes again.

    Would you even be able to tell?




  • waigl@lemmy.worldtomemes@lemmy.worldSmugly
    link
    fedilink
    English
    arrow-up
    11
    ·
    6 months ago

    After googling around for a bit, and then switching to duckduckgo instead (Google becomes aggressively unhelpful as soon as you have words like “ejaculated” in your query. Duckduckgo does the same thing, just not quite so much.), it seems the book in question might be “The tenant of Wildfell Hall” by Emily Brontë.





  • waigl@lemmy.worldtoProgrammer Humor@programming.devUniversity Students
    link
    fedilink
    English
    arrow-up
    73
    ·
    edit-2
    7 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.


  • 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.







  • waigl@lemmy.worldtoMemes@lemmy.mlInvest in hwat?
    link
    fedilink
    English
    arrow-up
    21
    ·
    10 months 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…