Sunday, 7 June 2020

The Art of Python (3) and the Art of the Wargamers Hobby

Where have I been? Well the lock-down for all its curses also gives opportunities to do things that otherwise you would not simply get the chance or time to do. As for this old programmer who has moved on to do seemingly fancier things with grander job titles in far off places (er, I am joking in regard to the latter), it allowed me to take a part-time, remote learning, university based, computer programming course in Python 3 over the last seven weeks.


It was a breathe of fresh air for this old programmer who had lost the love of doing it, as actual commercial software development spends more time and energy on getting the vendor's view of  the world fitting your own. This inevitably meant swallowing a bible of commercial product truth (or untruth) that did not focus on "getting the job done better" but rather adding to the profit column of a tech giant. The commercial frameworks were heavy (are heavy), hard to learn (with a multitude of courses to attend that only give part truths to the bigger picture), inevitably flaky as they were always changing - and worse IMHO wedded to your [rote-learned] knowledge of how a particular Integrated Development Environment (IDE) works. My head hurts just thinking about it and I will pause to take a sip of tea and relax, take a deep breath.

However, Python is a lightweight (and I say that as a very, very positive thing) but extremely powerful programming language used in education (to teach kids the art of programming), some commercial applications [please note it is extremely powerful in Network Programming and Data Science) but more importantly allows you to start on the real guts of programming quickly and helps you focus on generating results rather than wading through HTML(the graphical web-interface stuff that is a bugger to get working for all users) based UX (user experience). If you are inclined in any way to get into programming then I would highly recommend this as a "first principle first" programming language. I feel invigorated for doing so. You don't need a PhD in Computer Science to use it, but even if you have one you will be impressed at its beautiful simplicity and power. 

But what has this got to do with wargaming? Well another feature of the lock-down has been mt interest in the stack of "barely played" wargames I brought down from the loft. These are the Avalon Hill, SPI and Victory Games classics that are the folk-lore of the wargaming world (from Midway, Tokyo Express, Carrier, B-17 Queen of Skies to Squad Leader [I still have not made the full transition to ASL]). The combination of my newly acquired or resurrected programming skills in Python with these classics should get me through the rest of lock-down. No "first person shooter" but more your classic "Computer Assisted Instruction" in helping you actually play a wargame (through the sequence of play) - and save one to resume later in a preserved state. It may feel 1970-80's wargamimg, retro in the art of programming and one man's folly; because it is and I am more than happy with it ;)

I may even make public a GitHib repository or two available. Watch this space.

 :)  

Addendum: I should write of my brief fling with JavaScript and HTML5, the product of which was satisfying but I still felt hindered by the weight and responsibility of learning how other people did things (out of rote learning rather than understanding).

 

5 comments:

Robert (Bob) Cordery said...

Geordie,

My programming began (and pretty well ended) with BASIC, but it gave me enough of an understanding of how computer programs were put together to be able to look at the design of writing a set of wargame rules as being like writing a program. As a result, over the years I’ve tried to use as many ‘plug in, unplug’, stand-alone mechanisms in my rules that are like subroutines that can be changed with the whole structure coming apart.

I still use HTML (which is very similar to BASIC) when formatting my blog ... mainly because using Blogger adds in whole loads of unnecessary coding as you right your blog. If I were a bit younger, I might well have taken up your suggesting a try to learn PYTHON.

All the best,

Bob

Geordie an Exiled FoG said...

Young of mind is all you need Bob
When I get something I can show you I'll drop you a line
The thing I like about Python is it puts the programmer in the front seat, all this web stuff is like backseat driving through the UX (Document Object Model DOM in tech speak)

I think I will amend my original post to meantion my brief fling with Javascript and HTML, but "she" [Javascript] still wanted my programming soul - whereas Python lets me have my cake and eat it

Martin Rapier said...

Re java script, I've done Troy Hunts cyber security course. Whoever thought letting browsers execute code was a good idea should be taken out and shot.

Anyway, glad you found some time to explore the joys of Python, it is very popular with our more code minded researchers. My own personal development recently has been Certified Information Systems Auditor, so I now have the same level of knowledge as the children PWC send around to audit our systems. The network security and risk management stuff was very interesting though.

Geordie an Exiled FoG said...

That goes back to CERN Martin and TBL I think .. you could edit a web-page directly in the first version of HTML WWW .. actually with the idea to improve the page ..no concept of hackers in the Physics world then ;) other than the intrinsic urge to hack the very nature of reality itself

I can understand the link to your researchers, it certainly brings a sense of empowerment

Jonathan Freitag said...

For data analytics and math modeling, I am an old SAS man, myself. Taught myself R last year for a text mining and machine learning project at work. Have not investigated Python much.