home.social

#scottprogramming — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #scottprogramming, aggregated by home.social.

fetched live
  1. I’ve been doing a bit of Bash shell script writing today and oh wow the amount of quotation marks I am needing to use to add full support for spaces in inputs is wild.

    I guess I’ve gotten used to #Powershell where that isn’t necessary for the most part.

    #ScottProgramming #BourneShell

  2. I’ve been doing a bit of Bash shell script writing today and oh wow the amount of quotation marks I am needing to use to add full support for spaces in inputs is wild.

    I guess I’ve gotten used to #Powershell where that isn’t necessary for the most part.

    #ScottProgramming #BourneShell

  3. I'm spending the day refactoring a big data analytics job that runs monthly that was written by an associate a couple years ago.

    The report is highly used, which is great, but the code is... not great.

    1/x

    #ScottProgramming #ScottComputerProgramming

  4. I'm spending the day refactoring a big data analytics job that runs monthly that was written by an associate a couple years ago.

    The report is highly used, which is great, but the code is... not great.

    1/x

    #ScottProgramming #ScottComputerProgramming

  5. I sometimes write scripts in Windows #PowerShell because it's a programming tool that is widely available in my environment without requiring any additional installs. I find the syntax to be clunky, but it's capable.

    As I've noted before, I'm required to use Copilot at work, so I use it for tasks like this to burn tokens and earn work termination deferment points.

    1/x

    #MicrosoftCopilot #MicrosoftAnnoyances #ScottComputerProgramming #ScottProgramming

  6. I sometimes write scripts in Windows #PowerShell because it's a programming tool that is widely available in my environment without requiring any additional installs. I find the syntax to be clunky, but it's capable.

    As I've noted before, I'm required to use Copilot at work, so I use it for tasks like this to burn tokens and earn work termination deferment points.

    1/x

    #MicrosoftCopilot #MicrosoftAnnoyances #ScottComputerProgramming #ScottProgramming

  7. Me, just now: ugh, why doesn't this stupid IDE just suggest the syntax correction instead of making me remember it and figure it out.

    !!!

    Oof, I've already started becoming lazy using the (company-manded) chat LLM to help diagnose errors. I don't see how a new programmer is ever going to develop the skills and patience to debug a major problem.

    #PromptAssistedDeskilling #Deskilling #ScottProgramming

  8. Me, just now: ugh, why doesn't this stupid IDE just suggest the syntax correction instead of making me remember it and figure it out.

    !!!

    Oof, I've already started becoming lazy using the (company-manded) chat LLM to help diagnose errors. I don't see how a new programmer is ever going to develop the skills and patience to debug a major problem.

    #PromptAssistedDeskilling #Deskilling #ScottProgramming

  9. A lot of the analytical work I do really adapts well to #Jupyter Notebooks. It's very helpful to organize the code into logical chunks, one chunk per cell.

    However, now I want to re-run the entire workbook, changing only one parameter.

    Is there an easy way to do that without merging all the cells together?

    ETA: My notebook has a parameter section at the top, but now I want to re-run for a range of values that would be a pain to do manually.

    #JupyterNotebook #ScottProgramming

  10. A lot of the analytical work I do really adapts well to #Jupyter Notebooks. It's very helpful to organize the code into logical chunks, one chunk per cell.

    However, now I want to re-run the entire workbook, changing only one parameter.

    Is there an easy way to do that without merging all the cells together?

    ETA: My notebook has a parameter section at the top, but now I want to re-run for a range of values that would be a pain to do manually.

    #JupyterNotebook #ScottProgramming

  11. @vathpela @joshbressers In the spirit of being constructive:

    I've looked at Rust a bit. I've coded professionally in both C and C++, and I can see a bit of why C and C++ people might not like Rust.

    If someone can add memory safety to C in a way that otherwise is extremely minimal in how the new code looks, great. I'm not an expert in developing programming languages, but I can see how that might be challenging given a few C things like the language is not type strict.

    #ScottProgramming

  12. @vathpela @joshbressers In the spirit of being constructive:

    I've looked at Rust a bit. I've coded professionally in both C and C++, and I can see a bit of why C and C++ people might not like Rust.

    If someone can add memory safety to C in a way that otherwise is extremely minimal in how the new code looks, great. I'm not an expert in developing programming languages, but I can see how that might be challenging given a few C things like the language is not type strict.

    #ScottProgramming

  13. I got into an argument with #Microsoft #Copilot today.

    I asked for PowerShell code to trim the first N digits from every filename in a directory. Testing showed it actually removed 2·N characters. When I reported the bug, Copilot insisted that was impossible and said I must have run it twice.

    I knew the cause and the fix, but I treated it as a learning exercise to see what it would take to get Copilot to correct itself.

    1/4

    #ScottComputing #ScottProgramming #OfficeWorkerGripes

  14. I got into an argument with #Microsoft #Copilot today.

    I asked for PowerShell code to trim the first N digits from every filename in a directory. Testing showed it actually removed 2·N characters. When I reported the bug, Copilot insisted that was impossible and said I must have run it twice.

    I knew the cause and the fix, but I treated it as a learning exercise to see what it would take to get Copilot to correct itself.

    1/4

    #ScottComputing #ScottProgramming #OfficeWorkerGripes

  15. In #Python, you could write sensible and transparent code, like this:

    if (curNode):
    curNode = curNode.next

    But if you prefer something that is functionally identical, but harder to read, try this:

    curNode and (curNode := curNode.next)

    Follow me for more great tips on how to make life hell for the next person working with your code (which could be you).

    #ScottProgramming

  16. In #Python, you could write sensible and transparent code, like this:

    if (curNode):
    curNode = curNode.next

    But if you prefer something that is functionally identical, but harder to read, try this:

    curNode and (curNode := curNode.next)

    Follow me for more great tips on how to make life hell for the next person working with your code (which could be you).

    #ScottProgramming

  17. I heard from a colleague that a system was just identified with a y2k bug.

    Wait, how is that possible?!

    A system was using 2 digits to store and transmit the year. To resolve the initial y2k problem, the system employed the date window technique, where that window ended with 2025.

    en.wikipedia.org/wiki/Date_win

    1/2

    #OfficeWorkerGripes #ScottProgramming

  18. I heard from a colleague that a system was just identified with a y2k bug.

    Wait, how is that possible?!

    A system was using 2 digits to store and transmit the year. To resolve the initial y2k problem, the system employed the date window technique, where that window ended with 2025.

    en.wikipedia.org/wiki/Date_win

    1/2

    #OfficeWorkerGripes #ScottProgramming

  19. In 15 years, when half of the worlds critical software is LLM-infested, indecipherable vibe-coded spaghetti, and there aren’t enough traditionally-trained software engineers to hire because the entry-level pipeline was strangled in 2025, and people my generation have all retired, well…

    Well just remember I said this would happen.

    #VibeCoding #ChatGPT #ScottProgramming #ScottThoughts #ScottEconomics #Year2025

  20. In 15 years, when half of the worlds critical software is LLM-infested, indecipherable vibe-coded spaghetti, and there aren’t enough traditionally-trained software engineers to hire because the entry-level pipeline was strangled in 2025, and people my generation have all retired, well…

    Well just remember I said this would happen.

    #VibeCoding #ChatGPT #ScottProgramming #ScottThoughts #ScottEconomics #Year2025

  21. With a job change, I've spent the last 2 years learning Hadoop and Python. For reasons™, they are replacing the Hadoop component with something else. Ugh. At my career stage, I'm a little annoyed to have spent time and energy learning something that likely won't have any long-term benefit to me. I'll roll with it, though, because I have no other choice.

    #OfficeWorkerGripes #ScottProgramming

  22. With a job change, I've spent the last 2 years learning Hadoop and Python. For reasons™, they are replacing the Hadoop component with something else. Ugh. At my career stage, I'm a little annoyed to have spent time and energy learning something that likely won't have any long-term benefit to me. I'll roll with it, though, because I have no other choice.

    #OfficeWorkerGripes #ScottProgramming

  23. Microsoft in 1995: we’ve added support for spaces in file and directory names.

    Me in 2024: I’d better use underscores instead of spaces just in case some application doesn’t handle spaces in file paths correctly.

    #ScottProgramming #ScottWindows #ScottHumor

  24. Microsoft in 1995: we’ve added support for spaces in file and directory names.

    Me in 2024: I’d better use underscores instead of spaces just in case some application doesn’t handle spaces in file paths correctly.

    #ScottProgramming #ScottWindows #ScottHumor

  25. A co-worker using Python is having issues trying to load a dataset. The error is it can't allocate 40+ Gigabytes RAM.

    In #SAS programming, this is mostly not an issue because SAS is generally oriented to data sets on disk. It loads a chunk at a time, performs operations, and progressively writing results to disk. Thus, SAS has no hesitation working with data sets much larger than available RAM. A strategy that worked in the 1970s and the 2020s.

    #ScottComputing #ScottProgramming #SASProgramming

  26. A co-worker using Python is having issues trying to load a dataset. The error is it can't allocate 40+ Gigabytes RAM.

    In #SAS programming, this is mostly not an issue because SAS is generally oriented to data sets on disk. It loads a chunk at a time, performs operations, and progressively writing results to disk. Thus, SAS has no hesitation working with data sets much larger than available RAM. A strategy that worked in the 1970s and the 2020s.

    #ScottComputing #ScottProgramming #SASProgramming

  27. Crazy idea I just had: a backronym generator program. You type in the acronym letters, and it selects random words to fit. Pick any words you want to keep and redraw the rest.

    An improved version would allow picking a theme from a list. Words that fit the theme are given a higher weighting (thus selected more often).

    The ultimate version would use AI to allow you to freely enter text that will be used to guide the generator.

    #ScottThoughts #ScottIdeas #ScottProgramming

  28. Crazy idea I just had: a backronym generator program. You type in the acronym letters, and it selects random words to fit. Pick any words you want to keep and redraw the rest.

    An improved version would allow picking a theme from a list. Words that fit the theme are given a higher weighting (thus selected more often).

    The ultimate version would use AI to allow you to freely enter text that will be used to guide the generator.

    #ScottThoughts #ScottIdeas #ScottProgramming

  29. Encountered a situation today where the test plan was weak (IMHO) due to underlying assumption that everything is OK, and we just need to confirm that expectation.

    Assume there are 2 defects, one related to the change and one unrelated. Would your test plan find any problems? If someone claims these 2 defects exist, how do you prove there isn't one?

    If your test plan can't cover both of these questions, then your test plan is weak (IMHO).

    #ScottProgramming #ScottDataProcessing #TestPlan

  30. Encountered a situation today where the test plan was weak (IMHO) due to underlying assumption that everything is OK, and we just need to confirm that expectation.

    Assume there are 2 defects, one related to the change and one unrelated. Would your test plan find any problems? If someone claims these 2 defects exist, how do you prove there isn't one?

    If your test plan can't cover both of these questions, then your test plan is weak (IMHO).

    #ScottProgramming #ScottDataProcessing #TestPlan

  31. I did find some proposed solutions that involve reversing a generator function and ... bleh. They may be a little more efficient, but none pleased my eye as much as just reversing the range function, like this:

    MyString = "Hello"
    for index in range (len(MyString)-1, -1, -1):
    print (index, MyString[index])

    #Python #Python3 #ScottProgramming

  32. I did find some proposed solutions that involve reversing a generator function and ... bleh. They may be a little more efficient, but none pleased my eye as much as just reversing the range function, like this:

    MyString = "Hello"
    for index in range (len(MyString)-1, -1, -1):
    print (index, MyString[index])

    #Python #Python3 #ScottProgramming

  33. It's really a bummer that #Python enumerate doesn't have an option to tell it to go backwards.

    Also, it took me way too long to figure out that code like this doesn't do what I wanted it to do. (The index doesn't match the location in MyString.)

    MyString = "Hello"
    for index , Char in enumerate (MyString[::-1]):
    print (index, Char)

    0 o
    1 l
    2 l
    3 e
    4 H

    #ScottProgramming #Python3

  34. It's really a bummer that #Python enumerate doesn't have an option to tell it to go backwards.

    Also, it took me way too long to figure out that code like this doesn't do what I wanted it to do. (The index doesn't match the location in MyString.)

    MyString = "Hello"
    for index , Char in enumerate (MyString[::-1]):
    print (index, Char)

    0 o
    1 l
    2 l
    3 e
    4 H

    #ScottProgramming #Python3