Fully retired now and one of the things I’d like to do is get back into hobby programming through the exploration of new and new-to-me programming languages. Who knows, I might even write something useful someday!

  • 1 Post
  • 151 Comments
Joined 1 year ago
cake
Cake day: July 4th, 2023

help-circle
  • They are just the biggest asshole in the room.

    So one day the different body parts were arguing over who should be in charge.

    The eyes said they should be in charge, because they were the primary source of information about the world.

    The stomach said it should be in charge because digestion was the source of energy.

    The brain said it should be in charge because it was in charge of information processing and decision-making.

    The rectum said nothing, just closed up shop.

    Before long, the vision was blurry, the stomach was queasy, and the brain was foggy.

    Assholes have been in charge ever since.






  • Why not? The last decade before semi-retirement I had all the different ways to get in touch with me restricted to my phone. My work computer had no email client, no messengers, nothing. I even helped lead the charge to eliminate desk phones.

    That little display may have been the single greatest priductivity booster ever. It stayed on a shelf across the room on do not disturb. The only people allowed past the DnD were my wife and my son. If there really was a work emergency, a manager or coworker knew where to find me to tap me on the shoulder.











  • Canada used to recommend 1 car-length for every 10 miles per hour. Along with metrification, that was changed to 2 seconds, but it’s been set at 3 seconds for a long time.

    I’ve yet to drive in traffic where even 1.5 seconds is manageable. More space than that and some slips into the gap, even if that leaves something like a loaded tractor-trailer hanging a second off their rear bumper.


  • Edit: Bear with me while I sort out the difference between my display and the resulting code block. Ok, close enough.

    Ok, thanks. I would instead (and prefer to ) do something like this:

    function test(&obj, &obj2, &a) {
    $obj---->doSomething()
    ---->--->doSomethingElse()
    
    $obj2--->doSomething()
    ---->--->doSomethingElse()
    
    $a-->--->doSomething()
    ---->--->doSomethingElse()
    }
    

    In this case, the “>” are showing the tab stops and the “-” the resulting white space. Note how all the calls are lined up. (My preferred alignment style, not necessarily anyone else’s.)

    Yet another edit: I see that I missed addressing alignment on other than tab boundaries. To me, that’s just sinful! 😀


  • The way you explain it sounds like how tabs works in MS Word ( or other word processors ).

    That is exactly how they work, and after 40 years, I still struggle with the whole “tab as a shortcut for spaces” thing. It’s not that I started with word processors, either, just that as soon I started working with them, everything got so much easier for me.

    There are some code-specific things that keep me from just going back to a word processor, but I think our code editors are missing some useful features that are found in word processors.


  • If I correctly understand what you are saying, you are describing “relative” tabbing, where /t moves a constant distance from the current position. I prefer “stopped” tabs where /t moves to the next tab stop. If my /t doesn’t create the spacing/alignment I’m after, I just tab to the next position.

    Thus, I would set mine with the first tab position (for indenting) at 1.5 cm and subsequent tab stops at 3, 4, 5, … cm. That way I’d get perfect alignment with both fixed and proportional fonts.

    I’d also set line-wrap or line-continuation to use a hanging indent based on the start position of the line being wrapped or continued.

    I’d also set a boundary between code and comments so that lines always wrapped before the boundary and using the comment character at the end of a line would jump to the other side of the boundary with optional leaders (the characters, usually periods that connect the end/beginning of a gap). In an ideal world, I would be able to “hide code”, pulling all the inline comments into a “hanging indent” structure with their “parent” comments.

    Yes, before the advent of IDE editors and all the fancy intellisense stuff, I used word-processing software for coding. 😀


  • jadero@programming.devtoProgrammer Humor@programming.devwait what
    link
    fedilink
    arrow-up
    11
    arrow-down
    1
    ·
    10 months ago

    Why not tabs for both indentation and alignment? (Actually, I see indentation as just a specific use of alignment.) Word processors have been doing it for decades (and typewriters for over a century!). Surely we can convince our code processors to use user-definable, fixed position tabs instead of relative position “tab = x spaces”.

    Keeping the [TAB] character in the file then allows everyone the layout they like.

    Or has working solo for 40 years fried my brain?