Saturday, 13 July 2013

PyConAU 2013

Thankfully I managed to get back to PyConAU this year, and again it was an absolutely fantastic conference. The organising committee really have done an amazing job. If you're looking for a detailed break-down of highlights from the conference, I recommend you check out Graeme Cross's post on his blog Curious Venn. One thing that surprised (and pleased) me was a profound sense of social responsibility that many people in the Python community are feeling.

This year I spoke on Managing scientific simulations with Python with RQ (Redis Queue). The talk was recorded, and you can find it (and the rest of the PyConAU talks) at PyVideo, or on the PyConAU YouTube channel

If you're interested in Redis-Queue, I recommend you have a look at the website and github repository.

Sunday, 6 January 2013

Generating n-dimensional graphs

The python networkx package has great support for a whole range of graphs that appear in common situations. One thing that pops up occasionally is the need for slightly more sophisticated lattices (grid graphs) than what are available.

For example, when you're modelling a discrete approximation to position and heading in two dimensions - position should not wrap, but the heading should.

So this is my code to generate an n-dimensional grid graph, which allows each dimension to be periodic independently.

Sunday, 19 August 2012

PyConAU 2012 - Day 2

The keynote speaker for the morning with Kenneth Reitz, who is well known in the Python community as being the author of the Requests package, and for being an advocate and example for spending effort in producing succinct and clean APIs. This talk was a huge highlight of the conference, and (once the videos are up), the kind of content you'd want to show to junior developers to encourage them to be Python developers, adopting all the ideals of the Zen of Python. I certainly left this one feeling (a tiny bit) guilty that I don't think about this as much as I should.

Kenneth was also pushing the idea that all developers in the community should consider contributing to, which is aimed to show developers, new and existing alike what the current best practices are, and in some cases the one obvious way to do things. This point resonated with a number of attendees, and I believe that there could well be a collaborative project coming up working on content for explaining how to mirror cheeseshop/PyPI.

The talk on funcargs (and pytest) by Brianna Laugher was excellent, I definitely need to watch the video, and have a think about whether any of the concepts described should be incorporated into the test code I maintain. I'm very happy with nose, but test generators sound quite attractive.

Russell Keith-Magee gave an impromptu talk after a late change in the program on Django core, and the things you can do to maximise your chances of getting your changes added. This talk was pretty far out from what I'd normally go to. My work doesn't involve webapps, so I don't use Django, and don't know if I'll ever need to, so I'm sure I missed a lot of the subtleties. However, it did give me a little bit of an idea what the difference between django-contrib and django-core are, and it's always good to have a feel for the major groups in a community. There was also a reference to a great document on API maturity.

Rhydwyn Mcguire (another MPUG regular) gave a great overview of the current state of RPy, a bridge between the R statistical language and Python. I'm sure the information on developing new code using R-studio will come in handy, as will the list of "features" to be wary of in integrating the two languages. Personally, I think that R looks horrible compared to the pandas library.

Alex Sharp from OrionVM gave the last talk that I saw all of before rushing out to the airport. He spoke about what it takes to make cloud computing work. I've seen a few cloud presentations before, and this one was the first that I've seen the presenter talk about probability distributions, statistics, bloom filters and the types of tricks that you need to process truly massive data sets in practice. Being someone who loves code and math, this one was right up my alley.

Oh, and my talk was in there somewhere....

Saturday, 18 August 2012

PyConAU 2012 - Day 1

The easy first day of the conference, at least from my perspective =) is over. It was really great to see a good range of content, and in particular science content, that obviously appeal to a broad audience.

Mark Ramm (now from Canonical) was the keynote speaker for the first session of the morning. I've had the chance to listen to Mark previously, but this talk was particularly good. His main message was "don't waste your life", and to do that by focusing on things where you can really make a difference. For him, that meant trying to find a way to prevent project failures by minimising technical and marketing risk. His suggestion was to focus the work you do by testing and measuring, rather than guessing or blindly asking people questions (market research). The questions and discussion that followed the talk on how to design good experiments were also excellent.

The first session of the morning for me was given by Tennessee Leeuwenburg, one of the regular team from Melbourne Python Users Group (MPUG), on "Visualising Architecture". The talk focused on giving developers practical ways of learning and writing libraries and to understand and improve existing projects. This included using tricks like associating components with locations in the project file system and making good use of visualisations to communicate and justify the decisions you want to make.

After lunch I went to Ed Schofield's talk on "What's new in Python for Science and Engineering", which was one of the talks that I was most looking forward too. Ed covered a huge number of topics, but there were a few really new things I need to look into in the near future. This included:

  • New (for me) libraries for CUDA and parallelisation Theano and copperhead
  • The talks for SciPy2012 are now online.
  • The ipython web notebook now has resizable figures!
  • There were also a few new interesting Cython things to look at in the future 

The final talk of the day that I went to "An Unexpected Day" given by Aaron Iles was amazing. I respect the huge amount of work that must have gone into the preparation for the talk, which ended up being presented as one part drama and two parts programming presentation. The talk focused on how to make best use of python and ctypes, when they were the only available option for solving a problem. The only thing I'm disappointed about is that the talk didn't get recorded.

PyConAU 2012 - Day 0

PyCon Australia has started for 2012! The venue for the conference is beautiful, looking out over the water in Hobart, with an amazing view of all the boats. After registration it was time to grab swag bags, and get ready for CodeWars, the first event of the conference.

The very monty-python like conference t-shirt
CodeWars is a team programming challenge. The first few questions revolved around some tricky use of decoding hidden messages using python modules. The final task of the night was open ended, with the result decided by audience applause. This was a great way to catch up with old friends, meet some new people, and settle into PyCon

Tuesday, 14 August 2012

Python Powered Computational Geometry at PyConAU

I'll be speaking with a colleague at PyConAU 2012 this weekend. We'll be giving a 30 minute talk on Python Powered Computational Geometry. The emphasis will be on how the right python tools can help you rapidly prototype solutions, visualise results, and generally get stuff done efficiently, without worrying too much about implementation details.

The full talk description as published is as follow:

Computational Geometry is the study of geometry with the support of appropriate algorithms, and influences a broad range of fields of science, engineering and mathematics including: Computation Fluid Dynamics (CFD), Finite Element Modelling (FEM), Computer Aided Design / Modelling (CAD/CAM), Robotics, Computer Graphics and Collision Detection.

While it is possible to quickly implement naive versions of computational geometry algorithms in any language, such algorithms can be expensive and time consuming to write, debug and maintain. The advent of a number of tools, including new bindings for the Computational Geometry Algorithms Library (CGAL) and the ipython notebook make Python an ideal tool for experimentation with fast and numerically robust algorithms.

The presentation will include demonstrations of a number of common two- and three-dimensional computational geometry algorithms:
  • Triangulations
  • Mesh refinement
  • Intersection testing
  • Alpha shapes
  • Convex hulls
  • Constructive Solid Geometry
  • Minkowski Sums

Saturday, 23 June 2012

A Centenary of Turing

One hundred years ago today, June the 23rd, 1912, Alan Turing was born. He is arguably one of the most significant mathematicians born in the 20th century. If you're interested in Turing, I strongly recommend Andrew Hodges biography - Alan Turing: The Enigma

Amongst his many contributions to mathematics, science and cryptography, perhaps the most significant from my perspective relates to the 1936 paper "On Computable Numbers, with an Application to the Entscheidungsproblem", in which he introduced what is now known as a Turing Machine, the theoretical underpinning of the modern computer. A great summary of the concepts in that work is available in Charles Petzold's book The Annotated Turing: A Guided Tour Through Alan Turing's Historic Paper on Computability and the Turing Machine

For me, Turing stands as a reminder of many things:

His work demonstrates the greatness of modern science - in particular how important independent thinking and hard work are, as well as demonstrating how cross-pollination of ideas from math, science and engineering are capable of bringing about remarkable, and in some cases world-changing ideas.

I believe that Turing was, in part, inspired to greatness by his peers, from school and beyond, as well as obviously leaving behind a legacy that has inspired so many. I've been blessed with mentors of my own, both in work and in life. This year, I've taken on the responsibility for mentoring someone, and am sharply reminded how important this role can be.

Turing's story ended in tragedy - he was persecuted by the British authorities of the time for indecency (homosexuality), which ended up with him being punished with chemical castrated. His death two years later was (very strongly) suspected to have been suicide, caused by consumption of a cyanide laced apple. For me, this highlights the need to remain vigilant for unjust prejudices, both around me, and in my own thinking.

Happy birthday Turing, you remain an inspiration