John Papanastasiou
Computer Programmer and Software Consultant
Python Specialist
Agile Software Development Advocate
About
Computer programmer and software consultant with over 20 years of software development experience, specialising in Python development on UNIX based systems.
I work for my own company Kinygos Ltd where we have designed and built server-based systems across a wide range of industries from gaming to retail to finance to media.
I have also built a game Gonga for iOS and Android devices.
I am a strong advocate for agile processes and behaviour driven software development.
"Commercial Tech would not have its solid foundations without your application of thought leadership, experience and know-how."
Ollie Kemp, Product Owner, Sainsbury's Tech
"I loved your pragmatism and attitude to just getting stuff done and then improving."
Jenny Lee-Barber, Commercial Planning Lead, Sainsbury's Supermarkets
Play Gonga
I'm a London born Cypriot, and card games were a big part of upbringing. One of my favourites is Gonga, a traditional game based on Gin/Rummy and a few years ago I decided to build a version I could play on my phone. As a programmer I'm always starting side projects and typically getting 90% of the code written before real life gets in the way and the 90-90 rule kicks in. This project was different, I finished it and you can find out more about the game and download it at playgonga.com
So what was my plan? Well, it was pretty loose at that stage. My priority was to keep the project interesting for as long as possible and that meant getting into programming first. My plan was to write a prototype for the game engine, then decide on a technology stack for the application.
As a Python programmer it was natural to write the prototype in Python. I created a class to represent a playing card and a class to handle the actual game logic. At this stage, I was writing unit tests to help build the classes, and the Python interactive shell to emulate a program using them. This is one of the reasons I love Python. The instant feedback that comes from launching the interpreter and entering code directly is truly gratifying.
Some may ask why I was writing unit tests for a prototype, but this is how I write code. In the long run, it takes me less time this way. I find the code is easier to reason about, and by applying other design principles such as no side effects, immutability, encapsulation, etc, I end up with better, more robust code which I am confident about.
This was great fun. I soon had a Python script with some functions to help me set up a new game between myself and an artificial computer player in the interpreter. I had it dealing the cards and "playing" against me. I didn't yet have any intelligence in the computer player, but it was still rewarding playing a game all the way through. I was now in a position to think about a technology stack for the app.
Mobile App Development
I haven't always programmed in Python. I began my career as a C/C++ programmer, and have since also written JavaScript professionally. So my options for technology stack were not quite as limited as I expected.
After some discussion with a personal friend who is a professional app developer, I dismissed the idea of learning the native languages for iOS and Android (at the time, Swift and Java respectively). My main reason at the time was I didn't want to manage and maintain two codebases. I simply could not justify the additional effort.
So I had a look at React Native, which was still relatively new but had some exciting benefits. The biggest win for me is the same code can be run on iOS and Android seamlessly. On the downside, I hadn't done any serious development with React. Following a tutorial does not make you an expert, and I was concerned that I may not find the support I would need.
As a Python programmer, I had to look at Kivy. Kivy is a cross-platform Python library for app development. My original concerns were the widget designs which looked like they came from the 90s. However, it turns out Kivy is highly customisable and it is possible to build native looking apps with it. Note that the website and sample apps have evolved since I first looked, so the 90s feel isn't quite so obvious.
I decided to build a prototype with Kivy. I already had the shape of a game state object, so all I needed initially was to render this on screen in something that looked acceptable. This gave me a good insight into a lot of aspects of Kivy, from widget layout to custom widgets, and introduced me to the community. All in all, I struggled to find anything negative to say at that point, so decided to stick with it.