Mike Driscoll: PyDev of the Week: Meredydd Luff

This week we welcome Meredydd Luff (@meredydd) as our PyDev of the Week! Meredydd is the co-founder of Anvil and a core developer for the Skulpt package. You can learn more about Meredydd on his website. Let’s take a few moments to get to know him better!

Can you tell us a little about yourself (hobbies, education, etc):

I’ve loved programming since I was first introduced to BASIC at the age of 7. I come from Cambridge (the old one in the UK, not the relatively-new one near Boston), and I studied here too. I actually started out as a biologist, but then switched to computer science for my PhD.

I think programming is the closest thing to magic we have, and I love watching and helping people get their hands on this power. My PhD research was about building usable parallel programming systems, and now I work on Anvil, a tool to make web programming faster and easier for everyone (with Python!).

When I’m not programming, I fly light aeroplanes, which I guess is what happens when your inner six-year-old makes your life decisions. I used to dance competitively (including a few years on England’s top Latin formation team), but it turns out international competitions and startups don’t play well together, so the startup won.

Why did you start using Python?

I’d dabbled in Python a bit, but I only really started using it in earnest when we started creating Anvil. We wanted to make web development easier, by replacing the mess of five(!) different programming languages with one language and a sensible visual designer. Python was the obvious choice – it’s accessible, it’s predictable, and it has a huge and powerful ecosystem.

What other programming languages do you know and which is your favorite?

I’m a big fan of Clojure. It’s sort of the diametrical opposite of Python. Python is simple, concrete and predictable – it’s really a programming language designed for people. By contrast, Lisps like Clojure turn the abstraction up to 11, and make the person program like the compiler thinks.

I also have to tip my hat to C – if I’m using C, I must be having an adventure close to the hardware 🙂

What projects are you working on now?

These days I spend all my time on Anvil, a platform for building full-stack web apps with nothing but Python. There’s a drag-and-drop designer for your UIs, we run your client-side Python in the browser, and your server-side Python runs in our own serverless environment. We even have a Python-native database you can use.

So, whereas previously you’d need to learn HTML+CSS+JS+Python+SQL (plus all the frameworks, AWS, etc), now anyone who can write Python can build and deploy a web application with Anvil.

Which Python libraries are your favorite (core or 3rd party)?

It’s tough, but I’d have to choose Skulpt, the Python-to-Javascript compiler. We’d used before in an educational context, but we use it really heavily in Anvil. Obviously Skulpt is how we run client-side Python in the browser, but we use it in other ways too – for example, we use Skulpt’s parser to drive our Python code completion! (I talked briefly about how our Python autocompleter works at PyCon UK.)

I’m one of the core maintainers these days – I’m currently working on a tear-down-and-rebuild of the front end, which is great fun for compiler nerds. If you want to join in, please drop us a line on GitHub!

Where did the idea behind Skulpt come from?

I can’t claim credit for Skulpt’s existence – the project was started by Scott Graham, and these days there’s a whole team of us. The original impetus was around education: When you’re first learning to code, setting up a Python environment is a big hassle, and so having a playground “just there” in the browser is a massive win. I suppose Anvil is one step further – we put a full-strength application development and deployment platform “just there” in your browser.

Can you tell us the story behind Anvil?

My cofounder Ian and I both learned to program using Visual Basic and similar tools. The 90s were a sort of golden age for that: Anyone who could use one (fairly simple) programming language could build apps that looked and worked like everything else on their desktop.

These days, everything is on the web, but the barrier to entry is huge: you need to learn all these languages and frameworks, plus Linux system administration, just to build your first app. It’s exhausting – and it cuts off so much opportunity for people like data scientists or electronic engineers, who have a job to do and don’t have time to learn all that stuff. Eventually, Ian and I got fed up of moaning about the situation, and decided to build something to fix it!

Anvil’s goal is to make web programming usable by everyone, but still powerful enough for seasoned professionals. We cut out the incidental complexity, but we keep the powerful programming language and the huge ecosystem.

Is there anything else you’d like to say?

Oh, yes – Use autocomplete!

Thanks for doing the interview, Meredydd!

The post PyDev of the Week: Meredydd Luff appeared first on The Mouse Vs. The Python.

Planet Python

Mike Driscoll: PyDev of the Week: Valentin Haenel

This week we welcome Valentin Haenel (@esc___) as our PyDev of the Week! Valentin is a core developer of Numba and several other packages that you can see either on his website or on Github. He has also given several talks at various conferences in Europe. Let’s spend some time getting to know Valentin better!

Can you tell us a little about yourself (hobbies, education, etc):

I went to the University of Edinburgh to get a bachelor in computer science and to the Bernstein Center in Berlin to get a master in computational neuroscience. I tend to favour more traditional computer science topics these days such as compression algorithms and compilers. In my spare time, I spend time with my lovely wife Gloria, fly quad-line sports kites and ride longboards through Berlin. I’ve been doing Python and open-source on Github for about 10 years.

Why did you start using Python?

I first started using Python as part of my Masters program. Python was—and still is—quite popular in computational neuroscience, both for doing machine learning on sensor data such as EEG and fMRI and also for simulating neural models and networks of neurons. I had been using Java before and it took some getting used to the dynamic (duck) typing style. As part of the academic work I came in touch with the early scientific stack, which at the time consisted mostly of Numpy, Scipy, Matplotlib and the command-line IPython shell. Some of my earliest Python work from that time still survives. A project I did to simulate spiking neurons using a specific type of model:

https://github.com/esc/molif — this was my first github repo ever.

Also from that time is the first of my packages to make it into Debian, a Python interface to a specific type of hardware photometer. In fact, I just checked on this Ubuntu machine (Mar 2019), the package is still available:

$   apt search pyoptical   Sorting... Done   Full Text Search... Done   python-pyoptical/bionic,bionic 0.4-1.1 all     python interface to the CRS 'OptiCAL' photometer     :)

What other programming languages do you know and which is your favorite?

I know a little C, shell, go and Java, but Python is by far my favorite though. A friend of mine is working on a secret programming language project called ‘@’, which aims to be… well… runtime only — very intriguing.

What projects are you working on now?

I am now working on Numba for Anaconda Inc. Besides that, I am also working on Blosc (http://blosc.org/) including python-blosc and Bloscpack. In addition, there are a few smaller, but somewhat popular, projects that I run by myself, namely wiki2beamer, git-big-picture, conda-zsh-complation and yadoma. Most recently, I have been getting more interested in time tracking and stared using and contributing to Færeld.

Which Python libraries are your favorite (core or 3rd party)?

I have always had an interest in crafting command line interfaces. I have looked into many libraries for this task such as getopt, optparse, argparse, bup/options.py, miniparser, opster, blargs, plac, begins and click (have I forgot any?!). However, the one library that I keep coming back to and the one that I recommend over all others is docopt: http://docopt.org/ . There is something to be said about designing your command line interface as a program synopsis and then getting a fully fledged parser from just that. For me personally, this is the fastest and most natural, intuitive and convenient way to construct a command line argument parser. If you are not aware of it yet, you should definitely go and check it out!

How you get involved with Numba?

I saw an opening for a software engineering position at Anaconda Inc. doing mostly open source work on Numba. Working low-level and on a compiler is right down my alley and was something I had been wanting to do for a very long time. I applied, they made me an offer, the rest is history.

Can you explain why you would use Numba versus PyPy or Cython?

Cython is a superset of Python, it has additional syntax that allows for static typing which will then compile the code to run at C-speed, a.k.a to “cythonize” the code. That code can no longer run as regular Python code. Numba is much less invasive than this but has a similar goal. It provides the `@jit` decorator which allows Numba to perform Just In Time (JIT) type inference and compilation using the LLVM compiler infrastructure under the hood. Importantly, it does this on the Python bytecode, does not require any types to be annotated and the code can continue to run as regular Python (once you comment out the `@jit` decorator.) This has the advantage, that you can ship portable numeric code as pure Python with only Numba as a dependency which will significantly reduce your packaging and distribution overhead. Both Cython and Numba have been used in the scientific space traditionally. This is because they interact well with the existing ecosystem, the native libraries (where Cython can even interface with C++ which Numba can not) and are designed to be strongly aware of Numpy. So those are the ones you would use when working in that space: for example machine learning and broadly speaking any scientific algorithms and simulations. PyPy on the other hand has traditionally not had good support for the whole scientific stack. It is a bit better nowadays (early 2019) as both Numpy and Pandas can be compiled and a lot of work has gone into
making c-extensions work in PyPy.

Anyway, the primary goal of PyPy focuses on moving beyond CPython (the C implementation of the Python interpreter) as a base for a Python programs and it is slowly but surely getting there.

So, in conclusion: PyPy is the future of the Python language in general but it is not quite ready for data-intensive applications. If you want to have as much computational efficiency as possible today, then both Numba and Cython are good choices. Numba is very easy to try out—just decorate your bottlenecks—and has been known to accelerate code by one or two orders of magnitude.

What advice do you have for new people who want to start helping an open source project?

Go find yourself an itch; find a project in whatever your favorite language that you find personally useful and improve it. Then, contribute your changes back. Chances are, if it is useful for you, it will be useful for other people. Also, because it is useful to you personally, you are likely to continue contributing to it because you end up having a vested interest in it. And so obviously, personal utilities are a great category to go looking for such tools. Find something that is useful for you on a day-to-day basis and contribute to that. Also, don’t be afraid to put your code out there in the open and don’t let yourself be discouraged if your contributions are rejected, you are just at the beginning of your journey, so keep going. Good luck!

Is there anything else you’d like to say?

A big thank you goes out to all the open source/free software developers and contributors out there. I am very proud to be a part of this fantastic and inspirational community.

Thanks for doing the interview, Valentin!

The post PyDev of the Week: Valentin Haenel appeared first on The Mouse Vs. The Python.

Planet Python

Mike Driscoll: PyDev of the Week: Sean McManus

This week we welcome Sean McManus (@musicandwords) as our PyDev of the Week! Sean is the author of several books, including Mission Python: Code a Space Adventure Game!, which was reviewed on this site in March. There are free chapters from his book available here. You can learn more about Sean on his website. Let’s take some time to get to know him better!

Can you tell us a little about yourself (hobbies, education, etc):

I’m a writer specialising in technology. In recent years I’ve written several books to get children and young adults into coding. The launch of the Raspberry Pi and initiatives such as Code Club have helped to make coding much more accessible to young people than it was for many years.

As a kid, I loved programming my Amstrad CPC computer and in many ways it started me on my career path. I had listings and articles published in the leading magazines of the day, and my first book was about Amstrad programming. Today, I can still remember how much I loved programming as a kid, and I hope that my books bring some of that excitement to today’s budding coders.

As well as writing books and articles, I help some of the world’s leading technology companies with their copywriting requirements.

Outside of writing, I enjoy photography and making music. I have recorded an album of electronic music I plan to release online later this year, and I am a member of a singing group which is a great way to unwind.

How did you end up writing a book about games programming in Python?

It seems like there are lots of Python books that include small examples to show you how a particular feature works. That’s great, because it’s much easier to learn when the code is pared down to the essentials. However, that does leave many readers wondering what to do next, and how you bridge the gap between short programs of a couple of pages and more substantial projects. It’s one thing to know how a list works, for example, but how do you use that to create a map for a 3D game? How do you build on the basics to create something that does more than just demonstrate the language?

With Mission Python, the idea was to show a worked example of a game that goes beyond the basics. It’s a graphical adventure game, so there are lots of opportunities to learn about data structures (rooms, objects, interactions) and lots of customisation opportunities that you wouldn’t get with a simple arcade game. The game is set on a Martian space station where the air is leaking and you have to get to safety. It involves finding objects and solving puzzles, and uses a forced perspective like some of the early Zelda games. I was particularly pleased with a comment from one reviewer saying that it felt like the game came before the book, rather than the other way around as is often the case with educational books: I was keen for the game to be as “real” as possible, within the constraints of the slightly retro game format and what can be reasonably documented within the scope of a book.

Which Python libraries are your favorite (core or 3rd party)?

The game in Mission Python uses the Pygame Zero library, so I’ve been spending a lot of time working with that and consider it my current favourite library.

Pygame Zero modernises Pygame with some education-friendly features, and simplified syntax for getting some images moving. It helps to make the journey from Scratch to Python smoother in the classroom by introducing Actors, which are like sprites. It also simplifies some of the basics of Pygame, such as screen refreshes. There are lots of cool things Pygame Zero can do that were outside the scope of Mission Python, so perhaps I’ll code something else with it in the future.

What lessons did you learn in writing a book?

I’ve written or co-written several books now, including Raspberry Pi For Dummies, Scratch Programming in Easy Steps and Cool Scratch Projects in Easy Steps. Writing books teaches you to be organised with your time and with your ideas: it’s an intense period of work in a short space of time, often covering a wide range of topics, so planning is essential. I track everything in spreadsheets, to take the weight off my brain!

One of my tips is to set aside thinking time as much as possible. If you’re really stumped when debugging, I’ve found it’s often better to switch to doing something else, to buy some thinking time in the background without stalling the project totally. People often have “aha!” moments in the shower or when they are otherwise relaxed, so if tinkering with the code isn’t working, it’s a good idea to let it rest for a bit.

Thinking time is important for creativity too: I set aside an evening to design the main game puzzles. I went to a late session in the space gallery at the Science Museum in London, where I spent the evening drawing up puzzles and locations, surrounded by real rockets and astronaut suits. I later added new puzzles and ideas while developing the game, but it helped to have a good vision from the outset.

The books have obviously taught me a lot about the programming languages I’ve been working with, as I’ve looked into new features and resources that I need. Writing a book, I have to take a pragmatic view and sometimes I prefer to use a solution that is easier for someone to understand or one that is more widely compatible over one that might be the fastest or most idiomatic.

What has the response been to Mission Python?

Mission Python was a big project, writing both the game and the accompanying book, so it’s wonderful that it is out there now in the world. I’ve been getting some lovely feedback. A young reader wrote to tell me they hadn’t programmed before and this book introduced them to Python programming, which is a wonderful thing to have played a part in. Adults have been enjoying the book too, some of whom knew Python but hadn’t done any game development before, as well as some who are new to Python entirely. Hobbyist coders who love programming are finding it’s an enjoyable project, and it’s been wonderful to see tweets and reviews from people who are reading the book. It’s a huge help with getting the word out and is greatly appreciated. The game engine can be used to create new games entirely, so I’m looking forward to seeing what readers build with it.

What projects are you working on now?

My main project right now is updating my website, which involves a lot of code wrangling, albeit not Python. My website celebrated its 20th birthday last year, so there’s some quite old code in there that I’m weeding out as I work to make the site more responsive and mobile-friendly.

I’m still tinkering with the game from Mission Python, both for enjoyment and to provide additional resources for readers. For example, NASA released some real sounds recorded on Mars so that seemed like too good an opportunity to miss. I’ve written some code so that those sounds play when you’re on the surface of Mars in the game. I have a short routine I’ll be publishing soon to hide objects on the space station, once my new website design launches, which brings a new puzzle element to the game.

I’ll be spending more time with Scratch again this year too, as I update my Scratch books for Scratch 3.0.

I’m looking forward to getting my teeth into another big Python project as soon as I have the time to dedicate to it. I consider myself on a journey with Python, and am keen to further develop my skills.

Is there anything else you’d like to say?

Anyone is welcome to download the Mission Python game here. There’s a free sample of the book there too, which includes the instructions for playing the game, and there’s a map too for if you get stuck!

Thank you for inviting me to feature on your blog, Mike!

Thanks for doing the interview, Sean!

The post PyDev of the Week: Sean McManus appeared first on The Mouse Vs. The Python.

Planet Python

Mike Driscoll: PyDev of the Week: Tania Allard

This week we welcome Tania Allard (@ixek) as our PyDev of the Week! Tania is a developer advocate at Microsoft. She is also a speaker at multiple conferences. If you’d like to learn more about her, you should check out her blog. She also has some of her projects up on Github for you to peruse. Let’s take a few moments to get to know Tania!

Can you tell us a little about yourself (hobbies, education, etc):

I am originally from Mexico but have lived in the USA and in the UK for the last 8 years.

I have a bachelor’s in Mechatronic engineering and have also always been fascinated by technology and I can class myself as a lifelong learner. As such I got a PhD from the University of Manchester in Data science applied to Materials science, during which I discovered and fell in love with Python. Since completing my PhD I have worked as a research software engineer, research engineer, data engineer, and more recently could advocate.

Apart from tech I love Olympic weightlifting, so I spend quite a good amount of time in the gym every week and I am already looking forward for this year’s competition season!

I also love craft beer and recently joined the women in beer scene in Manchester, UK where I live.

Why did you start using Python?

As I said before I did a PhD in Materials Science, but instead of focusing on the experimental side of things my work was focused on modelling materials for tissue replacement. Most of the people in my discipline were using MATLAB for such purposes (as did I at the beginning) but eventually I realized I needed something more flexible. I was also soon driven into the ‘open science’ movement and decided I should create not only all my analyses but also my thesis plots and research papers outputs using an open source programming language to encourage reproducibility and accessibility.
It was until I starts using Python that I discovered the open source community and never looked back.

What other programming languages do you know and which is your favorite?

Coming from a scientific computing background I know MATLAB, FORTRAN (spoiler alert I do think modern FORTRAN is really good), C/C++, R, Julia, and Assembly. More recently I have been diving into functional programming via Scala and also into Go.

What projects are you working on now?

I recently joined the developer advocate team at Microsoft, so I am focusing on understanding the community barriers and needs when it comes to cloud computing.
In the Python ecosystem I am trying to work more closely with the Jupyter community to help drive better accessibility and community initiatives.

Something I am really excited about is the organisation of the mentored sprints for underrepresented folks in the Python community during PyCon.

Finally, I am working on a project focused on understanding the relationship between corruption and gender inequality in Latin American countries such as Mexico and Colombia. I truly believe that we can make a positive societal impact through technology, so this project is something I really care about.

What non-Python open source projects do you enjoy using?

As an R user I really like the Drake project as it has provided important tools towards reproducible scientific workflows (which is also a thing I deeply care about). I also have been enjoying working with projects like Docker, Kubernetes and Terraform over the last couple of years.

How did you get into speaking at Python events?

Since I come from a research background, I was already familiar with talks, poster presentations, conferences and the such, but I never thought I could speak at Python events. Then I joined a local scientific Python group and was eventually asked to speak about my PhD work. I was terrified back then, but after giving my talk and realising that people actually cared about the topic and were super supportive I decided I would like to share my knowledge with others.

Do you have any advice for others who would like to start giving talks?

If you are wondering whether you have something interesting to say I can guarantee you do!

Local user groups/meetups are great places to get started at within a relaxed environment. Folks are usually very supportive and eager to see what is going on in the community.

Is there anything else you’d like to say?

Thanks for the interview Mike. Hope to see loads of folks around in PyCon and if you’re there come say hi!

Thanks for doing the interview, Tania!

Planet Python

Mike Driscoll: PyDev of the Week: Neil Muller

This week we welcome Neil Muller as our PyDev of the Week! Neil is an organizer for Cape Town Python User Group and PyCon ZA. He also speaks at conferences! You can learn more about his open source projects over on Github. Let’s take a few moments to get to know Neil better!

Can you tell us a little about yourself (hobbies, education, etc):

I’m an Applied Mathematician with interests in image processing and numerical computation, currently living and working in the Cape Town area, South Africa. I followed an interest in facial recognition into a PhD from the University of Stellenbosch, and that led to working on a variety of image processing and numerical modelling problems at iThemba LABS.

These days I split my working time between iThemba LABS and Praelexis, a machine learning company (mainly using Python) in Stellenbosch.

In my spare time, I am obsessed with board and card games, especially Vampire: The Eternal Struggle.

Why did you start using Python?

I first used Python in 1997 to solve a simple text processing problem while working on my Masters thesis. I liked the language, but I was still mainly a Matlab user at the time and so I didn’t really touch Python again until around 2004, when several of my friends and colleagues started getting really interested in the language and encouraged me to revisit it. I rapidly fell in love with the large standard library and the developing scientific computing stack. By 2005, it had replaced Matlab as my go-to tool for experimenting with problems.

What other programming languages do you know and which is your favorite?

Other than Python, I do a fair amount of work with C and C++, and also do a bit of JavaScript and shell scripting. In the past, I’ve worked extensively with Matlab, done some PHP and a bit of Fortran.

Python is my favourite language. The saying “Python Fits Your Brain” is true for me – I like the syntax and expressiveness of the language, and find it a very powerful tool for modelling and understanding whatever problem I’m trying to solve. While it’s not always part of the final solution to a given problem, it’s almost always part of getting there.

What projects are you working on now?

Currently, OSS projects I’m working on:

  • wafer, a Django web app for managing conferences, used by PyCon ZA and Debconf.
  • Sutekh, a card inventory management program for Vampire: the Eternal Struggle based on Python and PyGtk.

I’m also one of the main organisers of the Cape Town Python User Group, am involved with organising PyCon ZA and help maintain a few python packages in Debian.

Which Python libraries are your favorite (core or 3rd party)?

NumPy has been tremendously useful to me.

I have a considerable fondness for SQLObject.

I’m also a huge fan of Sphinx and the readthedocs infrastructure that grown up around that.

How did you get into giving talks at Python conferences?

I started speaking about Python as part of helping the Cape Town Python User Group develop. One of the great things about Python, because to the wide variety of projects people are doing in Python, there’s always something new to talk about. As PyCon ZA got going, it was a natural transition to start offering talks there.

Do you have any advice for prospective speakers?

Mostly my advice is don’t be afraid to submit that talk idea. Almost everyone I speak to undervalues how interesting the stuff they know well is. You’ll be amazed at how many people haven’t heard of the thing you think everyone already knows. Even if you don’t feel up to speaking at a conference, give talks to your local user group or other relevant meetups. Speaking about stuff is cool, and more people should do it.

Is there anything else you’d like to say?

I encourage everyone working with Python to take part in PyWeek at least once. I’ve learnt a great deal about Python from the entries I’ve participated in, it’s a great community and it’s incredible to see what talented and determined people can produce in a week.

Thanks for doing the interview, Neil!

Planet Python