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

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

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.

https://en.wikipedia.org/wiki/Date_windowing

1/2

#OfficeWorkerGripes #ScottProgramming

Date windowing - Wikipedia

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

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

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

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

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

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

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