Offside Rule Quiz using Python’s turtle. I scored 10 out of 10. No need for VAR if I’m the referee, then?!

Article coming soon*

small print:
*soon is a relative term


There are so many fascinating insights in this article by Lambert Meertens about design principles and decisions in Python’s precursor languages, B and ABC.

Here’s one of them which says so much about Python and about “language wars” some still have today.

Context: It’s early 80s, talking about deciding to only allow integers as array indices, despite the fact it violated one of their design principles, with Guido van Rossum joining the ABC team at around this time:

“This design decision had been driven by fear: we had been concerned that aiming too high would make our language unimplementable on the small personal computers that were starting to appear on the market. But Dewar, in particular, convinced me that this meant we were designing for the past, not the future.”

And this observation should be seen in the context of another consideration that the designers of B and ABC had, which was common with another high-level language they were exposed to at the time. Here’s the quote:

“The design of SETL was predicated on the philosophy that, as computers became faster and faster, human time would be more valuable than computer time “and that the efficiency of the tool set SETL provided should not be measured in terms of speed of computation, but in their conceptual power.”

Some still have the debate nowadays about whether computer time or programmer time are more precious. Although this still depends on the case, more and more applications are programmer-time limited today.

But in the past, most (all?) applications were computer-time limited. Way back in the very early days it could take several hours to get the result of a program execution–no wonder languages at the time prioritised computation speed over development speed.

But things have moved on. Python took off because it came at a time when the switch over between computer-time limited applications and programmer-time limited ones was happening as computers became faster.

Yes, we still need the languages that prioritise computer-time today – there are still applications that need them, but the shift has happened and languages such as Python which prioritise the programmers’ time over the computer’s time will get more and more relevant (they already are, of course)

Article in Inference

@SignalsAndSorcery The static v. dynamic typing debate is one that will go on forever. There’s a place for both, I feel, depending on the use case…

When does talking about sound like Philosophy 101?

Teaching None in (or similar in other languages) is one of them

stuff = None

I can be heard saying the following when teaching (not quite, but dramatising a bit for effect!)

stuff is not empty. But we want it to be empty. But we need to put something in. So we put Python’s way of representing nothing. But None is still an object. So it’s still something. But it’s something that represents nothingness. Is that all clear?!”

It’s a bit like when you’re told to listen to silence in a meditation exercise?!

Latest @pythonbytes episode is out with your #python news, just in time for your holiday travel:

#311: Catching Memory Leaks with ... pytest?

By @brianokken and @mkennedy + special guest @murilocunha

@miko A great starting point usually is trying to automate a task you do often that’s a bit repetitive (read: boring). You’ll be motivated knowing how much time it will save you in the long run

@miko are you new to programming, though, or is it just that you want to use your skill and not sure how?

— Code Wars: Episode IV – The Language Wars —

Which is better? Java or Python or Javascript or C++ or Rust or Julia or …

You often see the language wars being waged on many fronts – books, online tutorials, and of course here on social media

Each language has its pros & cons, strengths & weaknesses

The reason there isn’t one language to rule them all (I’m mixing my fictional references!) is because all have or had a place

The language that’s best for one purpose may not be the ideal for another

Where do I stand on this?

Although you only ever see me post about Python, and all my current work is in Python, you may (or may not) be surprised to know that I won’t participate in this feud

Yes, I think Python is a brilliant language – and lots has been written elsewhere about this

But the “language A is better than language B” argument or the “language Z is rubbish” line doesn’t lead to anything fruitful. Ever!

So these childish debates are not for me, sorry!

Think of the programming language as a tool to achieve your objective. What matters is achieving your objective and not which tools you use

Of course, some tools are more suited for certain objectives…

On the other hand, if you know how to use one particular tool very well and want to use it for most of your tasks, there’s nothing too wrong about that, either!

Coming Soon: Code Wars Episode V

As I’ve been re-watching the Star Wars trilogy of trilogies (kids are now interested, so I’m doing it for them!), I thought of creating a Code Wars series – where are the battles relating to programming fought?

So, we start with Episode IV, of course. Here it comes…

I’m still surprised at how many hits this article gets every day, so let me reshare it here in case it’s of interest to anyone.

It’s rather niche, but it’s a fun tutorial to follow even if it’s not really your field:

Recreating any image from sines and cosines

@danielfeldroy For example, although I don’t post the exact same content, I don’t see the same trend - way more people interact on Twitter than here to my posts - but I’ve only started tweeting in Apr this year, so all my followers (I had 308 in April) are from the last 6 months or so…

Hey #introduction, I am a software developer and coach.

I love building practical tools that make other people's lives easier.

And I am passionate about helping people build their Python, developer and mindset skills to succeed in their tech careers.

I do this via Pybites, which I co-founded back in 2016 with Julian Sequeira (hope he joins me here soon haha ...)

@danielfeldroy But you need to take into account that 100% of your Mastodon followers are recent whereas I suspect most of the Twitter followers are not “recent” and will include dormant accounts

@folkerschamel @bacon I’d second that thought. Unless you have specific needs to use a specific language, Python is a great language to learn coding through. It’s got both depth and breadth

@f @jefframes It’s not Scratch’s fault, but it’s an unintended consequence that its overuse may be causing more harm than good, for some children, at least

@f @jefframes Often, the problem with Scratch is that it’s overused and children get bored of it - and that age they may think Scratch = Coding so they think they’re bored of coding…

Teaching #Python and interested in adding physical computing? Or using the BBC #microbit in class and wanting to explore text-based coding? I'm co-hosting two more webinars this month on the new micro:bit Python Editor.
It's designed to overcome barriers to learning with a simulator, reference section with code snippets you can drag and drop into your code, auto-complete, indentation highlighting and more.
Webinar details here:

Do you know the offside rule? Sure? To have some fun, I’m writing a quiz using Python’s turtle

This is what it looks like so far (and no, I’m not bothering with fancy graphics – life’s too short)

In this video:

  • you can see direction in which team is attacking from the arrows
  • each snapshot shows when player with the ball kicks the ball forward
  • program (hopefully) detects whether it’s offside or not
  • there are 15 (random) scenarios in this video

Still to do:

  • deal with when forward player is in own half (no offside)
  • deal with when forward player is the one with the ball (no offside)
  • turn into a quiz
  • write article for The Python Coding Book blog about it to document the code - there are some interesting aspects I’m using in the code that hopefully some will find useful.

Show more
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.