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!

  • 0 Posts
  • 34 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
    ·
    8 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?





  • I’d be very interested in learning more about how Canada manages “software engineer.” Because whatever is being done certainly doesn’t seem to include mandating where regulated professionals must be employed or punishing failures.

    Saskatchewan’s electronic health records system (eHealth) has had a couple of egregious failures that it shouldn’t have taken a “software engineer” to prevent.

    Several 911 services became unavailable during an outage that happened to also disrupt point of sale payment systems nationwide.

    Both of the relevant companies are telecommunications companies (Telus and Rogers, respectively), where one would expect “software engineering” to be conducted by “software engineers” regardless of regulation.

    A quick search for breaches in critical personal information will show that Canada is performing about as well as the US. Which is to say, abysmally.


  • I’ve got just 2 now. Codium and Blackbox.ai. Not because they’re the best, but because I’m a cheapskate hobbyist and they’re free :)

    I’m only just starting to play with AI tooling, so I don’t have an opinion on which is better, but something about the way Blackbox worked within VSCode means I went through the hassle of getting it installed to vscodium when I switched.

    I suspect that Codium might be better at oddball stuff, though, like OpenSCAD. Blackbox seems to just make bad guesses while trying to regurgitate code I’ve already written. Codium seems to have at least a primitive idea of what’s going on with OpenSCAD. But Blackbox does a great job of cleaning up my comments and even generating decent comments for uncommented code.

    FWIW, Codium actually labels OpenSCAD as “experimental”, but I don’t know if that’s just boilerplate for something it’s never been trained on or whether there is some training data in its system.

    Blackbox is a pain to work with in other ways, though. It was like pulling teeth to get an account and I still can’t find anything on their pricing–or any documentation, for that matter–despite language suggesting that there are different tiers and a chat UI that offers different settings (like web browsing mode and fun mode). And the Blackbox name isn’t doing it any favours, given that “black box” is a generic term in the AI community and others. It’s own chat doesn’t seem to know that a question about the service might be about the service instead of the generic term.




  • Reviews have to be balanced to circumstance. There is a big difference between putting out the sales brochure and the notice on the bulletin board. Likewise in coding a cryptographic framework for general consumption and that little script to create personal slideshows based on how you've tagged your photos.

    As a general rule, wider distributions, public distributions, and long-lived distributions need more ambitious reviews. If the distribution is wide, public, and permanent, then everything needs very detailed scrutiny.

    I have found some success in starting with and occasionally revisiting review goals. This helps create and maintain some consistency in a process that is scaled to the task at hand.




  • In that spirit, I will call attention to your first sentence, specifically the comma. In my opinion, that can be improved. One of three other constructions would be more appropriate:

    • I am really happy when people are quite strict in code reviews. It makes me feel safer and I get to learn more.
    • I am really happy when people are quite strict in code reviews, because it makes me feel safer and I get to learn more.
    • I am really happy when people are quite strict in code reviews; it makes me feel safer and I get to learn more.

    The first of my suggested changes is favoured by those who follow the school of thought that argues that written sentences should be kept short and uncomplicated to make processing easier for those less fluent. To me, it sounds choppy or that you've omitted someone asking "Why?" after the first sentence.

    Personally, I prefer the middle one, because it is the full expression of a complete state of mind. You have a feeling and a reason for that feeling. There is a sense in which they are inseparable, so not splitting them up seems like a good idea. The "because" explicitly links the feeling and reason.

    The semicolon construction was favoured by my grade school teachers in the 1960s, but, as with the first suggestion, it just feels choppy. I tend to overuse semicolons, so I try to go back and either replace them with periods or restructure the sentences to eliminate them. In this particular case, I think the semicolon is preferable to both comma and period, but still inferior to the "because" construction.

    I've clearly spent too much time hashing stuff out in writers' groups. :)