Monday, March 27, 2023
HomePythonPyDev of the Week: Thomas Passin

PyDev of the Week: Thomas Passin

This week we welcome Thomas Passin as our PyDev of the Week! Thomas is the mastermind behind the GF4 Graphics Calculator software. Thomas additionally helps out with the Leo Editor.

Let’s take a number of moments to get to know Thomas higher!

Are you able to inform us a bit about your self (hobbies, training, and many others):

I’m retired from common work, and my present non-programming hobbies are climbing mountain trails, baking bread, and studying. I used to be critical about images for a few decade, however that has light out. I additionally used to play the classical guitar, however with a sure variety of years on me, I’ve misplaced that final little bit of advantageous motor management wanted to make it fulfilling.

I went to MIT for undergraduate work, then Masters’ degree work in physics on the College of Chicago. I’m self-taught in programming. Till 2006, I wrote software program to assist me in my work, to not create merchandise per se. In 2006 I used to be requested to choose up and replace an present mission – a java mission. It turned out it couldn’t actually be up to date and I ended up re-implementing it with new algorithms and knowledge sources.

That mission was a system to run below Tomcat, so it needed to be in java. Nevertheless, I wrote virtually all the pieces besides the precise servlet interfaces in Jython. The computing, output formatting, database entry – all in Jython. What a blessing to have the ability to use Jython as an alternative of doing all the pieces in java! One of many attention-grabbing issues concerning the mission is the way it calls from java into Jython courses, and from Jython code into java.

I’ve been updating and sustaining that system ever since, even after I retired.

In any other case, I spent a few years working necessities, Techniques Engineering, and Enterprise Structure. They helped me to worth good group and ease in software program. I additionally discovered that there are at all times necessities, even when they haven’t been written down and even when the mission is a small private one.

Why did you begin utilizing Python?

I can’t keep in mind anymore how I got here to start out utilizing Python. It was round 1998, about the identical time I began working with XML. Earlier than then, the language I had used essentially the most was Turbo Pascal, which I preferred lots. I had truly written a DOS graphics mode home windows supervisor utilizing Turbo Pascal, again in 1989 – 1990. It had movable and overlapping home windows, drop-down menus whose gadgets may very well be disabled, easy dialog bins, mouse dealing with, a lot of the fundamentals. I wrote quite a lot of applications utilizing that framework.

Once I encountered Python, apparently my mind had some actual affinity for the way in which it labored. It was really easy to know and write (initially) easy applications for! It shortly grew to become my program of selection, though I later needed to do a number of initiatives with java and C#. In contrast, c/c++ appear to be at odds with the way in which my thoughts works, and they’re at all times struggles for me. There’s an excessive amount of boilerplate that will get in the way in which of understanding.

What different programming languages have you learnt and which is your favourite?

My first actual publicity to programming was in 1972 with a DEC PDP-8I. I had been requested to design and construct a bit of {hardware} that may have quite a lot of parallel channels, initially 16 however expandable to 64. I carried out it principally with collection 7400 TTL logic circuits. However I wanted to check it. I knew it could finally be interfaced to a PDP-10. I had entry to a PDP-8I, which had some similarities to the ten.

I discovered sufficient PDP-8I assembler to jot down code to check and train my system. Then I found that FOCAL, DEC’s reply to BASIC, had slots for 3 (unimplemented) instructions and I used these slots for instructions that we might use to train and management my system with FOCAL, which was lots simpler than any various.

Within the mid-Nineteen Eighties we wanted to make use of a waveform digitizer (there have been no high-performance digital interactive oscilloscopes then; this was mainly a single-shot oscilloscope with no show). We had a high-end CPM pc – a 8-bit Z80 processor with all 64k of RAM – however at the very least it had a set of graphics primitives in-built. Our division pc guru had determined that FORTH can be an excellent language for controlling the system and getting that knowledge out. I’d be the one to make use of the system, so I had an curiosity.

Our part-time programmer (not the guru) couldn’t get the controller working (an built-in circuit) and I obtained since I had interfaced my very own system the earlier decade. Lengthy story quick, we obtained it working, and we discovered how to attract a graph of the digitized knowledge. This was important, in any other case, you couldn’t know in case you captured your transient knowledge or not. I went on to jot down an intensive program in FORTH to work with the info that ended up being the ancestor of my GF4 Graphics Calculator (see beneath for extra).

I’ve written one thing in at the very least these languages: assembler (Z80, x86, and PDP-8I), FORTH, FOCAL, BASIC, Turbo Pascal, C#, VB for .NET, a little bit of FORTRAN, java, javascript, and naturally Python/Jython. I’ve additionally labored extensively with XML, XSLT, and HTML, a bit AWK, and use some SQL.

My favourite language, far and away, is Python. Javascript is all proper – it will get a nasty rap from many individuals, however I discover it cheap to work with. You don’t want to make use of all its options, in any case, simply the extra Pythonic ones. If I had a necessity for a lot quicker applications I’d severely contemplate Julia – whose syntax and REPL have been influenced by Python.

What initiatives are you engaged on now?

I work by myself GF4 Graphics Calculator (extra beneath), I nonetheless preserve and develop the Tomcat servlet software I discussed earlier, and I’m pretty actively concerned with the Leo Editor.


Leo is a massively succesful piece of software program, the brainchild of Edward Okay. Ream (“ekr”), who was featured on this collection a number of years again.

I received’t get into a lot about what Leo is since ekr talked about it within the linked submit, besides to say that it’s exhausting to explain! That’s as a result of it’s so programmable and versatile. It’s a programming editor and IDE – particularly suited to Python programming – and a great atmosphere for writing all types of documentation, particularly Sphinx documentation.

What many individuals don’t understand, even some skilled Leo customers, is that Leo is usually a framework for all types of great non-IDE purposes (written in Python) as a result of it’s so scriptable and offers so many providers. For instance, I’ve written a browser bookmark supervisor that runs in Leo. I exploit it most every single day.

Leo is considerably like EMACS in its extensibility, fairly completely different in its organizing ideas, and makes use of Python as an alternative of LISP.

Anyway, I exploit Leo on a regular basis – I’m composing these interview replies utilizing it – and I’ve contributed quite a lot of small enhancements to its internals, like highlighting of the present line, for instance. I’ve additionally contributed a number of plugins.

Leo’s web page URL has modified since ekr’s 2018 interview. Discover it at


I’ll say extra concerning the GF4 mission beneath. Once I’m programming, if I’m not engaged on Leo I’ll most likely be working with GF4, both the programming finish or doing knowledge evaluation with it. It too is written in Python. I handle the code base and the documentation with Leo.

What’s the origin story of the GF4 Graphics Calculator?

As I discussed earlier, GF4 grew out of earlier work, a FORTH program for a CP/M machine that captured and displayed transient waveforms from a waveform digitizer. As I began to make use of it within the lab, I discovered I wished to do extra mathematical processing with the info – overlaid waveforms to match, averaging, including and subtracting, differentiation and integration of waveforms, and so forth. So I saved including performance.

I used to be very accustomed to Hewlett-Packard’s “reverse polish notation” (RPN) hand calculators, and FORTH is in fact additionally a stack-based language. So it appeared pure to make use of an RPN-style interface. In these days, you typed instructions on a one-line command line, and the plots have been displayed in the remainder of the display. The waveforms have been 512 dots throughout the display, with the info being 8-bit integers. The FORTH program known as on the built-in graphics bundle of the pc. The waveforms have been handled very like numbers in an RPN calculator with a stack of depth two.

I didn’t identify this system in these days, however it could have been GF0.

Some years later I used to be once more working extensively with 2-D plots, though from quite a lot of sources. By that point we had PCs and Turbo Pascal. I re-implemented the performance with Turbo Pascal. Later, when Turbo Pascal got here out with a greater set of graphics primitives and added object orientation – I feel it was model 5.5 – and I had written my DOS graphics mode home windows supervisor – I re-implemented it once more. This model had extra superior math routines, together with LOWESS smoothing and Quick Fourier Transforms. I used to be very pleased with that model, though accessing all of the instructions by way of drop-down menus was not fairly optimum. And naturally, DOS graphics at the moment had solely a decision of 320 X 200 pixels and 16 colours. This model was GF2. It had some specialised capabilities to assist with among the work I used to be doing at the moment. GF2 was my first actual foray into object-oriented programming, and it had a companion program GSTAT that shared a lot of the code base. GSTAT had extra statistical capabilities, however with out the work-specific performance.

Later once more, Turbo Pascal morphed into Delphi and in addition offered Home windows programming functionality. I ported GF2/GSTAT to Delphi/Home windows. In fact, the occasion loop, menu building code, display portray, and many others. have been very completely different, however I used to be capable of preserve the group and a lot of the precise code unchanged. This was GF3. It labored properly sufficient however I by no means actually preferred it. This is able to have been across the 12 months 2000.

Lastly, a number of years in the past I made a decision to re-implement this system once more, this time in Python/Tk. I used Matplotlib for a lot of the plotting-specific code that for earlier variations I had written myself, and Numpy and Scipy for lots of the math routines that I had additionally written for earlier variations. As soon as once more the group of code modules was practically unchanged, though I discovered some sneaky methods to interrupt up among the modules into smaller items. This model is what I name GF4.

Now that this system is written in Python, it’s a lot simpler to experiment with and add functionality. There’s a change to the mechanics of the person interface, which is now primarily based on a facet window that incorporates command buttons, reasonably like a hand calculator keyboard. This works a lot better than the outdated drop-down menus. This system is extra of a pleasure to work with than ever earlier than.

The code’s group is fairly good, and Python being really easy to work with it was practically trivial so as to add plugins and an prolonged assist system to this system.

GF4 is on GitHub as an open-source mission at

Which Python libraries are your favourite (core or third get together)?

It’s exhausting to use the time period “favourite”, however I exploit MatplotLib and Numpy extensively in GF4. GF4’s GUI is completed with Tk, though I can’t say I’m terribly keen on it. Leo’s GUI is dealt with with PyQt. PyQt may be exhausting to learn to use – because it’s so large and sophisticated – however its builders have tried exhausting to have consistency throughout its courses and strategies. This can be a good factor. If I have been to start out GF4 over once more, I’d think about using PyQt for the GUI.

What are the highest three issues you’ve gotten discovered thus far whereas engaged on GF4 Graphics Calculator?

1. An excellent metaphor helps a terrific cope with an excellent person interface. Attempt exhausting to maintain interactions with this system constant. The Graphics Calculator modified massively over time when it comes to language, implementation, and person interface, however the underlying metaphor of an RPN calculator for graphs has stood the check of time – over 35 years by now.

2. Transforming and refactoring helps to maintain a program’s basis robust and adaptable.

3. Group is extra necessary than code particulars most often.

Is there the rest you’d wish to say?

Largely a name for simplicity and good group so far as attainable. My motto is “Begin easy as a result of it’s solely going to get extra difficult.”

All the time keep in mind Brian Kernighan’s well-known quote:

“Debugging is twice as exhausting as writing the code within the first place. Due to this fact, in case you write the code as cleverly as attainable, you’re, by definition, not sensible sufficient to debug it.”

Thanks for doing the interview, Thomas!



Please enter your comment!
Please enter your name here

Most Popular

Recent Comments