Rockstar debugger for Microsoft - me! Of all people :)

fair dinkum, no word of a lie…

I had to edit a python script supplied by Microsoft support to get it to run (successfully)… and I don’t even have python on my CV!

A shell script to grab some diagnostics for Azure OMS agent log collector (sometimes called Sentinel) - and the shell script called a python script, and the script was continually barfing cause it kept filling the disk as it wrote the diagnostics - customer has a ticket with Microsoft… it would fill the disk, then cleverly unfill during the end stage housekeeping… and I’m thinking “MY ARSE! YOU HAVE plenty of disk!”.

But it was trying to make another copy of /var/log/syslog.1 (uncompressed)…

I removed an asterisk from their python script :       execCommandAndLog('cp /var/log/syslog* {0}/omslogs'.format(outDir), False)

becomes :       execCommandAndLog('cp /var/log/syslog {0}/omslogs'.format(outDir), False)

and it finished! Only taken me nearly 24 hours to get past this (Microsoft were no help)!

So maybe I was the target audience of Steve Ballmer’s rant after all :

Combination of Python and Microsoft is like the devil and the deep blue sea.


Neither Microsoft or Python are inherently evil. You can sure misuse Python to do crazy things, but that’s because it’s flexible. I’m kind of a Python fan although self trained on it. Most of my COBOL skills are useless there.

Hi @pdecker,
With your Cobol background, was it easy or hard for you to learn Python? I am another former Cobol programmer.

I think it’s pretty easy. There are lots of free online resources. YouTube tutorials and such work, but I’m more of a book learner.

Most of what I do are single file scripts for devops purposes. I also do some of the Advent of Code and Project Euler challenges just for the fun of it.

1 Like

It is poorly structured, like most scripting languages. Your cobol is a better designed language.
There is really no alternative to python, it has taken over from perl.
I dont like the way it uses pip to manage stuff bypassing the package system.
Rust does it too (with cargo) and I dont like that either

I think COBOL and Python are pretty similar. Not in syntax, but in layout. Everyone always seems to complain about all the white space. I never knew what they were complaining about. Proper COBOL had lots of white space and indents even though you didn’t have to do it, just to make it readable. Python is super readable because of all the indentation the language requires and the lack of all the punctuation it doesn’t require, unlike C/C#/Java/JavaScript/etc. At least to me.

PIP has some gotchas for sure. Seems like distros should make sure the user can’t muck with the system Python and break things.

I agree, space is more readable than punctuation.
In R there is no rigid layout, it is all voluntary, yet everyone seems to indent it properly

1 Like

I think under Steve Ballmer they were evil, Ballmer infamously called Linux a “cancer”… that’s evil… a MUCH better company now they’ve embraced FOSS and Linux - but - some folks think that’s even more insidious, hinting their plan is to destroy FOSS and Linux from within - me? I think that’s very far fetched, and they’re only following the money…