Code completion isn’t magic; it just feels that way (Ep. 464)
Code completion is part of every programmer’s working environment, but to plenty of people, it still feels like magic. On this episode, Meredydd Lyff, founder and CEO of Anvil, joins the home team to discuss code completion: what it is and how it works, from first principles to best practices. Plus: Is 90% of biology attributable to magic gremlins?
Episode notes:
Anvil is an open-source web framework for building full-stack applications entirely in Python.
Ready to dig deeper into code completion? Check out Meredydd’s talk at PyCon 2022 (he even built a code completion engine live on stage).
ICYMI: Listen to our previous episode with Meredydd about countering the complexity of web programming: Full-stack web programming with nothing but Python.
Connect with Meredydd on LinkedIn or Twitter.
The Lifeboat badge shoutout is back. Today’s badge goes to user Tomasz Nurkiewicz for their answer to Best performance for string-to-Boolean conversion.
Tags: anvil, code completion, python, the stack overflow podcast
3 Comments
These are all stupid problems created by us, the “knowledgeable developers”. We have a huge bikeshedding problem in software today. The tools we are using inevitably end up with syntax that’s annoying to use with our “best practices”, so we invent the 347th way to say, “I want this piece of code to execute that piece of code”. How many “REST API”s have been built that don’t follow REST conventions at all, simply because we taught people that REST was a “best practice” (in 2000)? So we jammed 18 layers of indirection (more “best practices”, of course), so that our frontend could communicate “in the proper way” with our backend (that does nothing but serve this particular frontend… but maybe someday, it will!). The result is that at least 90% of code in apps alive today is unnecessary BS.
If software can write the code for us, it means that the **code itself is an unnecessary abstraction**. We need language/framework agnostic ways to represent the same “if you need to do this, pass this, and get back that” standards. The transit layer is miles deeper than the abstraction this actually requires.
When I contracted at Yahoo! in Atlanta in 2007 my manager noticed that I was using an editor that provided code completion for Javascript which he’d never seen before. The editor: Komodo (Komodo Edit I believe, whatever the free version was)
Wait until the AI based code completion inserts some closed source code fragment into your stuff and the next sound you hear are the lawyers knocking on the door…