Monday 23 July 2018

Writing a Python Program: Tools

Real Developers use vi at the command line and have memorised the every single Python library. Actually, Read Developers probably don't use Python. This is for the rest of us. There’s no question of anyone knowing all the Python libraries by heart, let alone by muscle memory. It’s impossible for any one mere mortal to know the Excel VBA object model and all the constants. That’s why VBA has Intellisense, which Microsoft patented, forcing everyone else to provide a slightly cut back version called ‘auto-complete’. PyCharm has autocomplete, but not the full-fledged Intellisense. Auto-complete doesn’t walk you through all the parameters for a function, nor offer values when the number of options is less than about five. Microsoft spent all that money developing Intellisense because they knew if would pay back in productivity and user loyalty. The minimalist Python IDE is IDLE, which doesn’t have a visual form editor. To find the typos in your code, you have to run the program and then deal with the messages from the python debugger. That’s what makes it minimalist. PyCharm Community Edition has a neat feature where it puts red line in the right of the code screen against the lines it thinks are wrong in some way, thus sparing you doing debugging runs to find the bits where you forgot to put ‘:’ at the end of a ‘def’. This helps, but if the interpreter spots something else wrong while your code is running, you have to correct it and start over. This is when one realises that the VBA editor / debugger is a thing of utter wonder. Being able to do on-the-fly code correction while debugging is like having a superpower. No other IDE provides it. A search for the reason brought up a comment from someone on the original VBA project to the effect that the trick was keeping track of all the threads and re-aligning them when the user had re-coded and started from some earlier point in the program that they halted. That is nowhere near as easy to do as it is to say. While it doesn’t take much time to stop, edit, and re-run code from the start, as PyCharm and all the others force us to do, compared with the Microsoft Way, it just feels clunky. To me. I'm going to try Visual Studio Code from Microsoft next time I do something. The demo looks interesting. Anything to get on-the-fly debugging again. But then Real Developers don't need to debug. (PS: It's too hot for me to keep up my usual schedule. Normal service will be resumed when this hot spell breaks.)

Monday 16 July 2018

June 2018 Diary

June was a good month. I had a week off from work, in the week before the weather turned really hot.

I did lots of gardening - always in the morning when it was cool. I now have a neat front hedge and a nice clean garden shed. The lawn has given up growing in this heat.

The big thing was buying three toys. A Bose Colour bluetooth speaker to replace the Roberts radio by my bedside. Now I can stream from all the music on my NAS via my iPhone. Falling asleep to some Gregorian Chant makes a welcome change from Chill on DAB. Second toy was a replacement laptop for my ageing Samsung. It’s an Acer Aspire with an Intel 8X chip, a 1TB HDD and a 1080p screen with wireless AC, and it was just over £500. I ordered that from Amazon and it arrived in July. Third toy was the Sonos Beam soundbar I saw in the Sonos shop in Covent Garden. It was on pre-order, and that’s coming in July as well. I’ve been thinking about all that stuff for a while, and getting all that sorted out was a good feeling.

I read Len Deighton’s Bomber, Micahel Jago’s The Man Who Was George Smiley, Sabine Hossenfelder’s Lost In Math, Eric Ambler’s The Mask of Dimitrious, Andre Breton’s Nadja and Laurnet Binet’s The 7th Function of Language. Bomber really is something else, at times approaching a new kind of hyper-realist literature.

I saw Jeune Femme, Zama, and L’Amant Double at the Curzon Bloomsbury; and Hereditary at the Curzon Soho. I’ve now used all my four free tickets that come with Curzon memberships, and good value that makes it as well. I got through S5 of House as well.

I had supper with my mate in Richmond, and supper with Sis at Gymkhana. Gymkhana is way too expensive for what it is, which is not even, I think, superior Indian food. It’s not a lot better than you’ll get from your local takeaway. I also had supper at Tapas Brindisa (okay) and lunch at Polpo (good) in Soho, the Fish Market at Liverpool St (good), and lunch at Vinotecha (disappointing).

I started on the Great CD Ripping project. Using iTunes, which no less an authority than Hans Beekhuyzen says is fit-for-purpose. Classical CD’s and artwork? Only a handful had it, the rest has to downloaded from Amazon or Google.