People (at lunch) at Kiwi PyCon were praising ChatGPT as a tool to help write code more efficiently, so I had another go.
I recently moved a Django project to use Whitenoise, and more specifically to have manifest files, where the version is appended to the collected file names. This all works great, except that there are a few files that users download, and instead of getting, for example, template.xlsx, they were getting template.{md5hash}.xlsx.
To be fair, it then did give the correct answer, that the download attribute of the a tag should be used. So I guess I’d give this a B- grade, for getting the solution but confusing it with a bunch of irrelevant info first.
I don’t particularly love this (although I do feel you should match the style of an existing code base and should avoid changes that don’t meet a reasonable level of value-add). I would generally leave out the else (and dedent the second return). It seemed likely that these generate the same opcodes so this is purely about readability, but it was worth checking that:
Interestingly, there is one difference out of those four variants, where instead of a second RETURN_VALUE op, there’s a JUMP_FORWARD to the single RETURN_VALUE. I assume that means that it’s slower in a way that’s so imperceptible that it’s not worth caring about, but let’s check:
>>> timeit.Timer("f(random.random())", setup="import random\ndef f(x): 'a' if x > 0.5 else 'b'").timeit(10000000)
1.4031157046556473
>>> timeit.Timer("f(random.random())", setup="import random\ndef f(x):\n if x > 0.5:\n return 'a'\n else:\n return 'b'").timeit(10000000)
1.326032117009163
I feel this does land in the expected place, where it’s about style & readability. I suppose f1() explicitly shows that it’s making a choice between two cases, but I feel that’s countered by f2() and f3() showing that the function returns a value. In general, it’s nice to have the smallest amount of indentation, so I would not choose to use f1().
Between f2() and f3(), I would generally choose the single-line approach of f3() if the line didn’t wrap (or exceed whatever the wrapping length is for the project, e.g. 100 characters). I would not do this:
def f3_alt():
return (
really_really_really_really_really_really_really_long_val
if another_very_very_very_very_long_condition
else also_quite_long_here_and_now_we_wrap
)
If you’re doing this, then there’s no benefit over the f2() style (and, as it turns out, there is a very tiny performance penalty).
Python has an implicit return None at the end of a method that doesn’t otherwise return. This means that for this specific case, where one of the values is None, there’s also the choice between f2() and f4(). In reality, f4() would be slightly better than it is here, in that it would probably have a return type (with |None) and a docstring that explains that None is a possible return value. However, I still (weakly) prefer f2() where it’s called out explicitly rather than f4() where you need to know that this is what Python does.
Kiwi PyCon had two days of scheduled talks followed by one day of lighting talks and unconference sessions, held over a Friday plus weekend in mid September in Waihōpai Invercargill. I’ve attended Kiwi PyCon once before, but ten years ago.
The talks were almost all at a beginner level, with a few reaching intermediate. I would have preferred a mix with at least a couple at a more expert level. Some were well done but even for novice level talks not all were great quality.
I thought these talks were good (details below):
Moving from unittest to pytest
A practical guide to using OpenTelemetry in Python
Using React as a template language in Flask
DuckDB: Supercharging Your Data Crunching
Sometimes this is a pipe, or close enough
You’re Doing Great! The underappreciated art of appreciation
Automating Victory: Beating browser games with accessible Python
Building Kubernetes Operators with Python and Kopf
Several lightning talks
The venue was good, and the conference was generally well organised (despite several hurdles), although had significant microphone issues. There was minimal organisation of any social activity (just a quiz night), although obviously the usual meal break socialising took place. There were strong anti-COVID meaasures in place, and a lot of work on diversity & inclusion (but not great gender/ethnic diversity of speakers). They have a good Code of Conduct, but ruined that by ignoring it.
I’m glad I attended for non-conference reasons (the surrounding travel and an induction session I tacked on), and to re-evaluate my opinion of the conference. However, I can’t recommend attending it, unless you’re very early in your Python journey, or are attending strictly for the socialising/networking aspect.
Note that for the last 14 years, Kiwi Pycon has moved around AoNZ (normally alternating between the north and south) but from 2024 will be permanently held in Wellington.
This was the second time I’ve attended Kiwi Pycon (the first was 10 years ago in Auckland), and the first time I’ve travelled for one.
I re-read my notes from attending in 2013 and my recollections of being underwhelmed seem accurate. A lot of this is that conferences in general aren’t that appealing to me (much of the value is in the social aspect and that is extremely unappealing for me, particularly attending solo), rather than anything specific to Kiwi PyCon. This is one of the reasons that I haven’t attended one since, but it’s also partly typically on dates that are personally difficult (close to my son’s birthday, right at the end of the sports season, not coinciding with school holidays or any other natural holiday point). Working more on the product side in the last few years also made it a more difficult sell, although I’m pretty sure I could have managed (or just taken personal time) if I had felt it would be worth it.
(I see that all the links in that post to the schedule are, sadly, now invalid, although the wayback machine appears to have them.)
This year, when I initially decided to attend, I wasn’t sure what I would be doing in September – I knew I would not be with N-able any more, but I didn’t know at that point that I’d have started with Canonical. There was some risk, since asking for time off just after starting a job isn’t a straightforward proposition, but the ticket was inexpensive and I held off booking accomodation and travel until after I’d accepted the offer from Canonical and discussed attending with the hiring lead and hiring manager in advance of actually starting.
(Canonical has a really great policy around travel to relevant Conferences, so even though I’m only just finishing up my second week, I didn’t need to use up my brand-new leave allotment to attend, and probably could have even claimed some of the cost (I felt that wasn’t necessary, since I made the decision to attend prior to even applying at Canonical)).
Last time, I wrote up my experience in prose; this time it’s more bullet-pointed – I’m not sure what that says about how I have changed over the last decade 😀
The conference is more polished than (what I recall of) the last time, which you’d expect being the 12th iteration (Auckland was maybe 4th or 5th?), although it was still pretty good in 2013. In my post at the time, I wrote a lot about how inaccurate I thought the “intended audience” labels were. Interestingly, those do not exist now (I’m not sure for how long). I wonder if that was because of the accuracy issues, or for other reasons. I do think a label (if accurate against some fairly agreed scale) does provide value.
(Amusingly, in 2013 I was keen on being able to attend virtually. That’s very dated now, given both the rise of streaming and making video available and then also the last few COVID years).
(Also amusingly: I applied for a position with Kraken earlier in the year, and literally never heard anything back, not even a “thanks but you’re not what we’re after”. So while they had a lot of cute swag on offer, I recommend against applying to work for them).
Friday was more lightly attended than Saturday. I assume this must be people that can’t/don’t want to arrange time off a Monday-Friday job, but can/will do a weekend. It’s interesting because I would much rather have the entire conference during the Monday-Friday period and ‘save’ my weekend (even if I was using a general leave allowance rather than conference leave). Sunday morning was the lightest of all (at least the half I was there for) – probably to be expected given that it was the unstructured part of the conference.
Single track: no need to choose which talks to attend, no awkward talks with minimal attenance, no distractions from people moving from room to room (particularly when tracks get out of timing sync)
Less Good
Waihōpai Invercargill seems like a nice place, but it’s not just far away from the rest of the world, it’s far from pretty much all of AoNZ (intestingly this is changing from 2024 – more on that below) – bad weather can happen anywhere, but this was extra noticeable at the end of the conference when many people got stuck after flights were cancelled and diverted
Single track: some talks are very basic, and it’s awkward to skip
Not a very diverse group of speakers (in terms of gender & ethnicity), with quite a lot from sponsoring organisations
Whoever was doing the AV was very impatient with the speakers and spoke condescendingly and briskly to them – some people are giving a talk for the first time or inexperienced with mics, and it doesn’t take much effort to be patient and a bit kind
Poor mic’ing
The Saturday start almost clashed with the second pool game for the All Blacks in the men’s Rugby World Cup 2023 (I left my room less than a minute after the final whistle, walked through to the main room, and arrived 2 minutes before the opening). Maybe the expectation is that the percentage of people wanting to watch a rugby game is lower at a Python conference than for the wider population, and that this wasn’t likely to be an amazing match, given the history, but this is AoNZ, and it’s the All Blacks, and it’s a World Cup game. There was a Slack ‘#rug-py-con’ channel but there was only two of us there – some sort of communal viewing and starting 30m later would have been nice (there was also a critical Warriors game on the Saturday, with kick-off was 30 minutes after the end of the day’s sessions, so I suppose shifting to be a little later would have hit that)
Bad
Good CoC, social/employment stickets, etc. But the CoC was ignored!
The CoC is a bit messy (it’s confused about what colour t-shirts people will be wearing, and I don’t believe there was a phone number offered as it says) but generally ok. However, I reached out to the CoC team via the provided email, and never received any response at all. It was a minor issue (although from an influential person) but if they ignore reports that are minor, I have to assume they ignore everything. A “thanks for your report – we don’t agree this is a CoC breach, but please discuss more if you wish” type response would have been sufficient, but complete silence is unacceptable.
There are many possible reasons:
Deliberating ignoring messages – this seems very unlikely
Ignoring this specific message because it didn’t seem important – this seems possible, and if so it’s not ok
Ignoring this specific message because of who the subject was – this seems possible, and if so it’s not ok
Getting distracted with the conference and forgetting about the safety channels – this seems most likely to me, and if so it’s maybe the least bad, but still not ok
The best action I could take would be to volunteer to help in 2024 and ensure that it was handled better. If I was considering attending then I would do this. However, since I’m not, I have to recommend that unless you are willing to do this yourself, or unless the organisers publicly address the shortcomings and how they will fix them, you don’t attend.
Value
(For reference, attending Kiwi Pycon 2013 cost me around $400 ($509 in 2013 dollars, although I had no accomodation costs since I lived locally).
My travel was a bit indirect – I took the opportunity to spend 3 days in Christchurch with my new colleague & manager Ben on my way, so flew to Christchurch, then flew to Invercargill the day before the conference (those 3 days were really great). Rather than immediately flying home, I took up a kind offer from Bernie to drive me to Queenstown (checking off another one of the scenic AoNZ drives I had on my list) and stayed a night there before flying home from Queenstown. Canonical kindly paid for my flight from Christchurch to Invercargill (approximately the delta of going directly) as well as some of my accomodation cost in Christchurch.
Flights: $650 (I actually have a lot of AirNZ credit to consume, so in some ways this was ‘free’, and also meant I didn’t take much care in selecting cheaper flights)
Accomodation: $510 (I paid for a nice room; not really necessary given how much it was used, but since I was paying rather than a company I figured I might as well)
Food: $31.50 (dinner Thursday), $24.50 (breakfast Friday), $31 (dinner Friday), $24.50 (breakfast Saturday), $33.20 (dinner Saturday), $24.50 (breakfast Sunday). Morning/afternoon tea and lunch were included with the conference ticket, although I generally skipped morning & afternoon tea (if I was being cost-conscious, I would have skipped buying breakfast and eaten the included food instead). I ate from the restaurant at the accomodation (Thursday it was too late in the evening to be trying to find something else, and Friday I was too tired to bother and the weather wasn’t great) – I’m sure I could have found much better value meals elsewhere
Airport travel: none in Invercargill (courtesy shuttle when arriving, a lift from a friend when departing); I drove to/from the Auckland Airport, roughly 80km/75min (it would take 30 minutes to drive to the closest PT, and I would have multiple transfers, so it’s not particularly viable, unfortunately) – at IRD rates this would be roughly $150; parking at Auckland Airport $107 (this is cheaper than having someone drop me off and pick me up, as well as being considerably more convenient); I was given a lift to Queenstown Airport
Ticket: $296 (early pricing, including a t-shirt – late was $330 plus ~$70 for a shirt)
In total, approximtely: $1,890 (note that this was entirely a personal expense, not paid by Canonical or anyone else)
Conference swag: t-shirt (included in early ticket purpose price); socks & a mini octopus plush, and a large octopus plush (from Octopus Energy); a “gentle steam eye mask” (Japan has such weird cool things that we don’t have!), foldable hand fan, ‘erasable’ pen, and screen & keyboard cleaning tool from Hennge; a small booklet about Te Reo & one promoting Waihōpai Invercargill & Murihiku Southland; post-its and note paper from Hype & Dexter; (cheap) pens from Google; assorted stickers; and a pack of COVID RATs & a mask (not really swag – intended to replace the ones used getting to the conference, although I ended up 5 RATs ahead and 2 masks down).
Venue
As a hotel, the venue was nice – perhaps a little dated, and not amazing, but certainly comfortable. My room had two nicely sized desks, a comfortable bed, and plenty of space. The conference room was large and looked nice, and was generally well set up. The food (both conference and food service) was average at best.
The mic’ing setup was very problematic (surprisingly poor for 2023). There were considerable issues with the signal dropping out (to a receiver that was a few meters away, so definitely should not have been the case), almost always a light echo, and several talks where it was even worse. I’m not sure how this will turn out in the videos.
Session Summaries
Opening 0907-0920
Started 7 minutes late 😦
Paired experienced (Tom) and inexperienced (Jordan?) MCs (and also throughout the conference) – good sustainability/training approach
Conference Director (Carlos) got sick 2 days before the event, so taken over by a new volunteer (who is volunteering at a conference for the first time) at that point!
spaceops is one of the conference sponsors (presumably that came with this speaking opportunity)
Nice tying of space to the (Earth) environment (and environmentalism, climate, etc)
Bit of general space history, NZ space history (William Pickering onwards through to Rocket Lab etc)
Covered what spaceops do (owned by local govt, indirectly), and so forth, tangentially related to dev (they have devs, but only offhand mentions)
Good speaker
Several oblique references to Apple 🙂
Some talk about the Warkworth satellite station (very close to where I live)
Very good introduction to space (particularly radio & space) and particularly where AoNZ and especially Southland fit into that picture
Nice ‘soft’ introduction to the conference with a talk generally interesting for people who are into science, without delving deep into technical details
Essentially an introduction to an opinionated way to handle (project-local) module/package imports
Very introductory (for example, I would expect everyone @ Canonical would already know this and/or have their own opinions on it)
Argues against using relative imports (seems counter to my experience where absolute runs into collisions with paths, like collisions)
Core is an argument that everything should be “import core.module.submodule” where ‘core’ is the top-level code folder
Grant feels that the issue that that existing documentation on this is generally outdated, unclear, or delves deeply into internals instead of giving a “how to”
Good speaker
Unfair comparison with his talk in 2013: I don’t remember the 2013 one in great detail, and my notes on it are minimal, but I believe I liked this one more
Interesting note: prior to his Python work, worked in social sciences on interesting topics like alcohol and gambling issues. All the papers seem locked away (as academic papers often are, sadly).
Moving from unittest to pytest, Tim Penhey (Stacklet) 1021-1200
Had the same realisation as I did (in the shuttle ride to the accomodation) that some of the younger people may have been born after we started using Python!
Talked about initial dislike of pytest because of the implicit magic (conftest.py, and fixture naming matching) (agreed!)
Not entirely convincing arguments about why he changed his mind – basically this came down to “the good outweighed the bad”, which I suppose is also where I have landed, but it seems like you could have most of the good without having to have all the magic. Maybe there’s some other testing framework that does that, although it seems like everyone is standardising on pytest (for these use cases, rather than others like Hypothesis, Playwright or Robot)
Nice examples from real-world (slightly simplified) code unittest->pytest
Several examples of fixtures from real-world code that they find useful (lots of composition)
Medium level, expects understanding of non-trivial code, but would all be known to anyone that knows pytest moderately well (aimed more at people familir with unittest and not familiar with pytest)
Very good speaker
Interesting note: previously worked for Canonical (on Launchpad)
Automate business processes for all your companies with Odoo, Danny Adair & Graeme Gellatly (Roofing Industries) 1333-1417
Automating business process (from a roofing material company, not a software company)
Graeme is from the business side, Danny is the tech side (he was core to the early Kiwi PyCons, started NZPUG, etc)
Considerable amount of LoB automation (seems like a huge amount for a roofing supplies company, but perhaps that’s just ignorance on my side). For example, email comes from supplier with an invoice attached, automatically extract that, match to a purchase order, raise issues if there are differences, otherwise automatically approve an pay, with no human involved
A “this is a tool we use and really love and this is why” talk
General introduction to Odoo and how it’s used
Deep dive into the way that you customise Odoo, with a system that builds classes (and figured out a MRO) on the fly. Interesting, although complex (in implementation, but simple to actually use)
Interesting talk, although not sure that it was to the right audience?
Good speakers, handled the dual speaking well
Some mic issues 😦
Interesting note (Danny): Event Director for Kiwi Pycon 2013, when I previously attended
A practical guide to using OpenTelemetry in Python, Tom Eastman (Kraken) 1423-1455
Very good introduction to OpenTelemetry (probably too basic if you know OpenTelemetry but as someone who has some experience with observability but not much with OpenTelemetry it was good, particularly since OpenTelemetry has improved a lot in recent time and is a fairly young project)
A “this is something I use and really like and this is why” talk
Very good speaker
Inferior mic’ing
Unfair comparison with his talk in 2013: both good quality, but I liked the fun aspect of the 2013 one more than the practical aspect of the 2023 one
Replacing server-side HTML with React, but page-by-page rather than as a SPA. In particular, keeping the routing done with Flask. At the same time, wanting to have strong types that are shared between the Python and Typescript code. Created tooling to automate generation of Typescript that had type definitions based on the type definitions in Python.
Then expanded this to also generate Typescript that provides types (and generally code-competion in an IDE) for API use, but without using (e.g.) OpenAPI since everything is in one local space.
It seems like using something like Vue would have been a simpler way to solve the “TypeScript/JS Framework but page by page” problem, although the coupled typing in the API would still be an improvement over that.
Interesting, assumed an ability to keep up with examples without much context, which generally worked (started out with some overly basic explanations, like “this is how decorators work”, but jumped quickly past that)
DuckDB: Supercharging Your Data Crunching, Richard Wesley (DuckDB) 1550-1624
Significant mic issues 😦
General introduction to DuckDB and where it fits in the DB space, and what the advantages it offers are
Good level (would be known to people that use DuckDB, but e.g. if you use something like Clickhouse and don’t know DuckDB this is a good intro)
Interesting note: worked for Tableau for a long time
Sometimes this is a pipe, or close enough, David Hood 1628-1657
Non-technical talk
Aimed at where he (a data journalist) sees developers needing help when moving into working with data
Important to always consider and document the context and the bias, how valuable the data is depends on what you are wanting to do with it
Can do much with very simple analysis – complicated models are really needed more when figuring out ranges
Very interesting, even though it seems like it would maybe would have been better at a different conference
Talked about examples have seen previously on Mastodon (e.g. time of day/week driving injuries/fatalities, changes in COVID incidence after changes in legal requirements)
Important to understand what you are doing with the data and the context
MIMO scheduling (multiple ground stations, multiple spacecraft, need to maximise the communication, choosing which station to talk to which craft)
He mentioned that he put together the talk the day before, and it was a little apparent. He spoke well and knew his material, but it didn’t have a lot of structure – some of it was praising GNU Radio, some was about what spaceops does, some was (overly trivial) why Python is good/bad, some was about how they’re using Python – it was like 2 good and one less good lightning talks merged into one
Good speaker
Interesting note: interned in Whangārei – maybe from there?
Saturday Conference Opening 0906-0915
No notes
Keynote 2: You’re Doing Great! The underappreciated art of appreciation. Loren Crary, Director of Resource Development of the Python Software Foundation 0917-1007
Very good speaker
Brief intro to the PSF
Brief speaker bio
Why expressing gratitude (written, spoken) matters, tips on how to get better and more regular at doing this
Really good (non-technical) talk
This is something I am also super passionate about (particularly in work, where I think it’s forgotten or overlooked more than elsewhere, and where ‘forced’ appreciation is common and not useful). Hopefully this changes how people behave
Interesting note: was asked to speak at Kiwi PyCon 2023 in late 2012, just days after starting work at the PSF!
Panel: A conversation for inclusion in tech, Samantha Nickson, Loren Crary, Kelsey Vavasour, Daisy Brenecki, Tom Eastman, and Christopher Neugebauer (replacing Carlos Cordero) 1220-1302
(I’m cis, straight, white, middle-aged, male, and work in a well-paid industry (the privilege jackpot), so that and my lack of experience on the minority side may bias this)
Held during lunch, quite lightly attended
No intro of the panelists 😦
Weird having the moderator stand while everyone else sat
Moderator too quiet
Very low energy
Loren was great, although didn’t say a lot; Kelsey was the strongest panelist; Daisy had notes, which seemed odd for a panel
No opportunity for questions from audience, which seems odd for a panel
Speaker diversity at the conference was noticeably lacking PoC, was light on women (every single session on Friday was given by someone that presented as male and ~white (I realise that there are issues with assuming gender & ethnicity) – Saturday was better, but not hugely). It would have been interesting to have introspection on that
Delivering Customer Projects in a Rapidly Evolving Python Landscape, Romi Dexter, Benoit Chabord 1331-1412
Talk from Integration Glue and Hype & Dexter (sponsors), these are the founder/co-founders of the two businesses (which are connected in some way I didn’t fully get)
Practical suggestions particularly around improving devex
Quite a practical talk for a sponsor talk
Talked about the specific tools they use (Ruff, Pyright, Black, pytest, coverage.py, Github Actions, Sentry, GCP, Clickup, Google Docs, Cookiecutter)
An introductory level talk
Good speakers
A little on the long side
Interesting note (Romi): was previously CIO for GrabOne
Interesting note (Benoit): first AoNZ role was at Yellow (Pages)
Building Kubernetes Operators with Python and Kopf, Sam Bishop (Runaway) 1422-14:50
Much more interesting level (it felt intermediate, although if you know k8s then probably more novice) and nice speed and consistency working through it
Nice slides
Exactly what the topic says (not that much else to say: exactly what was on the label)
Good speaker
Easily the best talk
Recommended packages: pendulum for datetimes (I believe I’ve seen this recommended before), deltaman for parsing human-readable time intervals, dynaconf for configuration management
Building an OAuth2 Authorisation Server with Flask and Authlib, Sam Watson (Runaway Play) 1548-1611
Walkthrough as per topic (not much else to say: exactly what was on the label)
Intro level, technical, assumes can keep up with code
Interesting note: the OAuth2 auth server described went live a ~week before the conference (and is working well so far)
Automating Victory: Beating browser games with accessible Python, Jon Gaul (Heenge) 1620-1651
Very good speaker
Project management, useful I/O libraries
Reminded me of Tom’s talk from 2013. Fun but pratical
Technical issues with live demo (screenshoting/GUI automation with projector screen secondary) but had backup videos
Close second for best talk of the conference
Basically: scripting an app by taking screenshots, using (basic) computer-vision to recognise the board, some (simple) rules to decide on moves, and then GUI automation to make the move, aiming to beat the speed run times (the game is like Minesweeper, but with levels of the dangerous squares, so much more maths, Momono Sweeper)
Interesting note: wrote a kid’s book (my guess is that it’s this one)
Basically delved into “simple is better than complex”, pointing out that often “simple” is achieved by moving complexity elsewhere, and that it’s best when complexity is managed by those who are most familiar with the domain
I skipped this. I needed a break by this point, and I didn’t believe the extra COVID risk was worth it for taking part in a quiz. I also lacked the energy to find 7 other people looking for an extra team member (it seems like the conference could have facilitated something here, even if it was just a whiteboard where you could post teams looking for people, or a Slack channel – except that most of the attendees seemed missing from Slack)
(Interestingly, this was the only organised social activity – e.g. there was no conference dinner).
Sunday Opening and Awards 0906-0927
Typical conference thanks etc – done early to accomodate people needing to get a limited number of flights out of Waihōpai Invercargill
General AoNZ Python history & update
Dropping having the conference in the location of the organiser (rotating North & South island), having it in Wellington every year instead
Changing where the conference is located going forward is an interesting choice. I’m sure there must have been much debate about this (although I’m a NZPUG member and don’t recall seeing it). I can see both advantages and disadvantages:
Advantages:
I assume some logistics are easier, particularly if you tend to stick with a single venue and so forth
The ‘average travel’ probably decreases, given that Wellington is located in the (rough) centre of the country, although this sort of calculation is tricky, because in reality it really depends how the origin is distributed
Travel is likely much simpler for international travellers, since you can potentially arrive in AoNZ in Wellington, or at worst would have one connecting flight from Auckland (and there must be many flights Auckland/Wellington every day), rather than travelling to more off-the-path locations like Waitangi or Invercargill
Disadvantages:
A drawcard (I assume for others as well) is seeing other places. This was certainly the case this year for me. I’ve been to Wellington many times (likely most people have) so there’s no appeal there, and even if you haven’t been, then you will have after attending once.
Either the organiser needs to be located in Wellington, or have members of their team in Wellington, or you have to do a lot of organising remotely – this is probably not too difficult this year, and if you’re re-using pieces (e.g. a venue) then it matters less
There are no cheap travel/accomodation years for anyone outside of Wellington (although every year is a cheap travel year for those in Wellington). Not having to pay for accomodation or flights was definitely a drawcard the first time I attended, and I imagine that it still would be if I was early in my career – maybe a lot of this is handled by companies, but it still hits students for sure
Development/boosting the local Python communities (outside of Wellington) is lost
It’ll be interesting to see how this goes.
Lightning Talks, Christopher Neugebauer 0933-10:55
I enjoyed many of these, although a lot were good as lightning talks rather than something where I’d want to see a 30-45 minute version.
Jonas, Promo for PyCon APAC 2023 and other PyCons in the APAC region
Grant, Opinion that Python (and Python-like, e.g. Mojo) will become the norm for development and other languages all exceptions (by 2045)
Sarah Greeff, Issue of low uptake of programming by females in high school education
Sam, “Loss & Grief” (the Tamagochi Effect, need to be careful about downstream consequences of development)
Simon “DevOps for Highly Regulated Environments” – comes up against arguments that devops practices conflict with security regulations, but argues that it’s entirely possible
Kristina Photos of the conference – Kiwi PyCon is about people, and not only developers, basically thanking everyone through photos (started with te reo & a mihi :tada:)
Steve Baker Wavetable Synthesis, live demo playing an instrument (electric ukelele) (music and live demos always very popular)
Kelsey Vavasour How to bring more people into programming (started with a te reo greeting :tada:)
Kesara PyPI Supply Chain Attacks (brief history of improvements that PyPI has made recently, and where there is still work to be done)
Warwick ?Walter? Basic introduction into binary/logic gates for addition (half/full adders), live demo of a home-built 1-bit adder with transistors (again live demo with hardware always popular)
Chelsea Finnie Learn A Sea Shanty (audience participation, learning a sea shanty), mostly just an excuse to get the room to sing a song together (audience partipation and music popular with a subset)
Hugh Davenport Showing a toy OS he has written (in x86 assembly), how he debugs issues with it using Python, live demo (one-handed), includes extremely minimal Python in the OS
Vicki McKay What to do when you don’t have a plan (decide to do something, follow intructions, listen and learn, follow the most passionate person), plan things, unclear on the message of the talk (maybe it was that people should participate in groups?)
Joelle Maslak How Networks Surprise Developers – works for Netflix, examples of how physical networks aren’t always as expected, how distance matters to speed
Daisy Talked far too fast (not the point of lightning talks), history of supermarket development in Austrailia and AoNZ (!)
Unconference
During the first two days of the conference attendees could suggest topics for ‘unconference’ sessions, and vote on suggested topics. My ride for Queenstown was leaving just before this, and none of the topics were ones I was particularly wanting to take part in, so I skipped this.
I think the rise of social media over the last few years have significantly decreased my interest in unconferences. It (possibly unfairly) feels like this would just be 30 minutes of ‘arguing with someone on the internet’ but in person. If there was a practical point, that would be different, but if it’s just a discussion, then I don’t feel like this is going to give me value, and will just get me annoyed. Again, this could definitely be unfair, particularly since I didn’t try these.
The topics were:
Can the Python Community Support Python Education in NZ? (answer: yes – and for the details this really relies on having people from education here, and I don’t think there were enough)
How Do We Improve the Python Packaging Experience, Especially for Beginners? (this seems like a talk for a bigger PyCon or elsewhere)
What are the Most Fun Things You’ve Done with Python (seems like this should just be lightning talks)
What Should Change in the Python Language Over the Next 10 Years / What Are Python’s Biggest Regrets or Mistakes? (this seems like it would drive me crazy)
Southern Tech: Is There Interest in Setting Up A Tech Advocacy Group Across Invercargill/Dunedin/Lakes District (probably good, but entirely out of my scope)
Is ChatGPT/Copilot etc Ruining Programming (this would also drive me crazy)
What Does Best Practice Python Data Science Look Like in 2023? / Do Notebooks Rot the Brain? (just not interesting for me personally)
What Can Python Learn from Other Languages? (another drive me crazy one)
Linters: Who Should Use Them? Which one? (Everyone, whichever one suits you/your team)
GNU Radio Live Demo (probably better during lunchtime)
Conference Closing
I obviously skipped this as well.
Closing Thoughts
I had three reasons for attending Kiwi Pycon this year:
To re-evaluate my now 10-year-old conclusion that attending Kiwi Pycon was not high value for me
To continue exploring areas of AoNZ that I haven’t travelled to
Originally, I was potentially not going to have a full-time development job at this time, and thought it could possible have some job search value; instead this became the value from combining the trip with working in Christchurch for a few days
I did get to see more of Christchurch, and visited Invercargill for the first time, and did the Invercargill->Queenstown road trip that I was keen on, so from that perspective it was a win. The tacked on induction visit in advance was really great (and also very valuable) and I doubt I would have done that without having this additional reason (Christchurch isn’t that far from Auckland, but it’s far enough, as compared to Christchurch and Invercargill when already travelling), particularly since Ben & I would be meeting in Riga in a few more weeks anyway. It’s interesting that the most positives from my trip are in this area, which vanishes when the conference becomes anchored in Wellington.
I did get a chance to re-evaluate attending Kiwi PyCon, and that was valuable. My conclusion ends up the same: I don’t get enough value out of it to attend. This is even more the case than in 2013, since I could watch any of the talks when the videos are available (fairly soon, I expect), so it’s really the experience and the networking that’s providing value. There were plenty of interesting and smart people, and I had some interesting conversations, but nothing that was so amazing (or so unable to be replicated online) that I would pay >$1000 and consume 3 days for it.
If the conference had more of the really great talks, and especially more that were aimed at people that have been using Python for 10+ years, then that might change my opinion (this is something I thought would have changed since 2013), although there’s still the “videos are all online” counter. I would like a mix something like 10% beginner, 80% intermediate, 10% experts, and 20% ‘fun and interesting’ rather than entirely practical, and roughly 30% soft, 70% technical talks. Obviously, other people will have other tastes.
If you’re someone that really enjoys the social & networking aspects (I don’t) or looking specifically to be hired by one of the sponsors or are very early in your Python journey or want somewhere to practice a talk you’re going to give elsewhere, then it could be worth it for you. However I have to recommend everyone against attending Kiwi PyCon because of the Code of Conduct issue. That’s a complete blocker to attending, and should be for anyone in 2023 and beyond (unless it does get publicly addressed).
Kiwi PyCon 2013 was held last weekend at AUT in Auckland. This was the first time I’ve been able to attend; although I’ve planned to in previous years, the timing never worked out (even this year was very tight).
I missed Michael’s keynote, unfortunately, and also the first session, because it’s also the end of the winter sports season, and so I had to attend prizegiving that morning. If the conference had been somewhere else, I probably couldn’t have attended at all, but since it was only ~65km from where I live, I could still attend most of the two days.
The first talk I attended was Integrating Javascript with Python Web Frameworks. This is an interesting topic, and was well presented, but seemed more novice than intermediate to me. Unfortunately, most of my interest in this topic is more on the side of light Javascript integration (i.e. where the bulk of the work is still done on the Python side), and the talk focused on the other area. However, that wasn’t a flaw in the talk, just a limit in what I got out of it (it seems likely that by the time that I ever do something that’s Javascript-heavy, if I ever do, everything will have changed considerably by then).
Next up was Testing and OpenStack. I’m only vaguely familiar with OpenStack, and the abstract is very poor, but I don’t like changing tracks mid-session, and testing is of interest, so this was the talk to attend. Again the presentation was fine, but the talk seemed more novice and less intermediate (some familiarity with OpenStack was assumed, but I don’t consider that means that the talk itself was at an intermediate level). I didn’t really take much away from this.
The final talk in the session was Python and Creative Data Analysis. This was a novice talk, and for someone at novice level, probably well worth attending (it was presented quite well). For someone not a novice, even someone with nearly no matplotlib experience (like me), there wasn’t much to be gained.
For the final session of the day, I started with Dissecting Memory Mysteries of Python. I had a lot of hope for this presentation, because this is an area of interest for me, and practical advice would be really useful for work that I do. It was labelled as an intermediate talk, and I would say that was accurate (but I was probably hoping for more of an experienced level talk). The presentation was ok, but suffered from having two speakers, one of whom spoke too quietly. The talk did cover some of how memory management works in Python, but concentrated too much on reference-cycles for my taste (which I find in practice is never the problem when short on memory), and their practical suggestions for improving memory usage weren’t really that good. For someone with no previous understanding of how Python manages memory, this would probably have been a good talk.
The final talk of the day, Using Cython for distributed-multiprocess steganographic md5sum-collision generation. For… reasons, was the best of the conference. The speaker was excellent – far superior to most of those at the conference, and the talk was entertaining and somewhat informative (mostly entertaining, but that’s exactly what it claimed to be, and those are often the best talks at a conference: pure information is better found elsewhere). The only negative was that the abstract was pretty poor – it doesn’t really reflect what the talk was about at all. If the conference had 5 talks of this quality, I would have no hesitation towards attending again.
The second (or third, if you count the tutorials) day was opened with a keynote by Jessica McKellar. Jessica is a very good speaker, and the topic was suitable for a keynote, especially from someone with her background. Essentially, she was advocating increasing involvement with and usage of Python, and going over what she saw as the key barriers to entry at the moment, and therefore what should be targeted in order to help Python remain popular (her brief explanation of why popular is important was well done). Although I certainly agree with her central tenet (everyone needs to do a couple of small things and that’s enough to make a significant difference, and that difference is important), I don’t agree with all of the examples she gave. Her four points were Windows, games, mobile, and science (the latter being an example of something that is working well; i.e. where we can copy ideas from and remain strong).
I started with Python on Windows, although I almost never use it any more. There are some difficulties, although I think that if you’re the sort of person for whom programming is a good match, you can work through the issues without much difficulty – the challenge would be more with ‘casual’ programmers – e.g. a scientist that could use Python to do something, but isn’t really a developer. Most of the challenges here I think can be addressed by documentation – e.g. the Python Tools for Visual Studio are excellent, fairly simple to use, and familiar to a lot of Windows developers. All that they need is more people pointed towards them. I don’t know enough about the casual programmer to know how they get started, but it seems like better documentation would help them too. However, the core of my disagreement here is that I’m convinced that Windows use is imploding – this is going to happen more rapidly than people realise, and so putting a lot of effort in here is not a good use of resources. It would be far better to target mobile instead.
Although Python isn’t necessarily the first choice one would make for games, I think the examples that Jessica gave were really just a re-hash of the Windows issues, and those will also just go away as fewer games are developed on/for Windows, in favour of mobile devices and possibly consoles. I would argue here that again the resources would be better spent on making sure that developing games on the web, iOS, and Android is as straightforward and well-supported as possible.
Her last two points, mobile, and science, I do generally agree with, although I think she undersold the mobile issue. For example, there are many people that will only be using a mobile device – they need to be able to actually develop on iOS or Android (or maybe Chrome OS), not just build for it. There are some tools for this – some that are really pretty good, but more would be better.
The first proper talk of the day was Exploring Science on Twitter with IPython Notebook and Python Pandas. Again, this was labelled as intermediate, but really was novice. It was an ok introduction to IPython Notebook in particular, but not a lot more than that. For a novice, or someone that had never heard of IPython or Pandas, probably valuable. For others, not so much.
The second talk of the session was From nothing to daily use: How Python changed my work life. This was correctly labelled as novice, but was by another excellent speaker. There wasn’t much to take away in terms of Python development, but it was a great insight into non-programmers (sort-of) coming into Python, and how Python is in use at a central New Zealand organisation. Again, if there were five talks of this quality, then PyCon NZ would be an easy recommendation.
The final talk of the session was Advanced methods for creating decorators. This was correctly labelled as experienced (one of only two at the conference), and was exactly what it claimed to be. The speaker read the presentation, which is never great (I’m not sure what I got from it that I wouldn’t get from reading an essay), but otherwise it was informative and well done. More talks like this, especially if they were better presented, would be excellent.
After lunch I attended Publishing Theology with Python, again labelled as intermediate but actually novice. For a novice talk, it was fine. I was hoping for more practicalities, and more focus on getting Word documents to ReST (when actually that step is done by a raw copy and paste and manual markup), but it was moderately interesting.
Prior to afternoon tea were the lightning talks (around 12, I think). These were generally very low quality – there were a couple that were worth listening to, but many that I would rather have skipped, and some where the speaker was both not good at speaking, and didn’t really appear to have anything to say. Too many people used it as a “share what you are doing” opportunity, rather than something that would be of interest to the group.
The final session of the day started with Computational Advertising, Billions of records, and AWS – Lessons Learned. This was listed as experienced, but was really intermediate (at best). A poor abstract (just throwing together a lot of words, really), but an ok talk. Either more practicalities (exactly how were things done), or being much more general would have improved this, rather than the middle ground that was taken.
The last session of the conference was the third-best: Testing for Graceful Failure with Vaurien and Marteau (actually Loads). This was accurately intermediate (although on the novice side rather than the experienced side), and very well presented. The two tools sound interesting, and definitely something that I’ll be checking out (these are the only two tools that I learned about at the conference that sound worth investigating). It would be great to see more talks like this.
There’s not much to say about the rest of the conference – it was fairly typical (venue, food, etc – although the swag-bag was very light). There were a lot of giveaways (t-shirts, books, licenses, etc) that took a lot of time and were a bit odd. I don’t really understand why people would applaud someone who was just randomly selected to get some free stuff, or why the giveaways needed to be drawn out so much. In general the organisers did a good job, though – it’s not really their fault that the quality of talks (and speakers) wasn’t as high as it could be (unless they turned down the good talks, which is unlikely). It’s possible that I missed some great talks – I’ll be watching the videos once they are available (most of them, if not all).
Two issues that should be addressed for next year are the “audience level”. Of the talks I saw, there was only one that was actually experienced, four that were actually intermediate, and six that were actually novice. Many of the novice talks (and one of the intermediates) claimed to be higher. The first problem is that the level need to be accurate, so that people can go into a talk with a realistic expectation of what’s required. The second problem is that this skews far too far towards novices – there needs to be more experienced talks in particular, and more truly intermediate ones as well.
Overall, I wasn’t particularly impressed. Since the conference was close to home, it only cost me around $400 (travel, registration, food), which is very cheap as far as conferences go, but could instead pay for a new iPad Mini (which I’d use for much more than a weekend), or several books, or licenses, or various other things where I think I would get better value. If I was looking for work (or workers), or for collaborators on an open-source project, then I can absolutely see value. However, I’m not doing any of those right now. If the conference had more experienced-level talks, more inspiring talks, and more great speakers, then I would absolutely attend again. If I was a novice, or low-level ‘intermediate’, then I would certainly see value. The venue for 2014 wasn’t announced (Dunedin was two years ago, and they tend to alternate, so I would guess that Christchurch and Wellington are the two most likely, although Hamilton might be a contender), but as things are I’m not really sold on attending again, unless the speaker line-up looks particularly good, or something else changes (e.g. if I am looking for workers).
An option that I would be interested in, but I doubt will be done, is a “green” option for attending. I would pay a discounted registration (90%?) to get access to live streaming video of the presentations and a posted t-shirt (or even the whole conference bag). I can still interact with other attendees in real time (via Twitter, ADN, etc – questions can also be handled this way), if not to quite the same level, get much the same out of the conference, and save a lot of the cost (e.g. even this year with it so close to where I live, I would still save 75% of the overall cost), and be much more environmentally friendly (i.e. reducing wasteful travel).
Textastic is a programmers editor for iOS. It’s not perfect, but it’s very close to the app that I was waiting for ever since the first iPad was released.
Even before I had an iPad, I’d mostly stopped using my laptop. The only time I did use it was when travelling overnight (I’d take it if I had to work while away, or in case there was an emergency and I had to work on something). I don’t need a full computer for this – typing on a software keyboard on a 9.7 inch screen is perfectly adequate for emergency work, and when combined with a bluetooth keyboard (which is small enough to easily pack, and I already own) and a monitor (now a TV via AirPort mirroring) it’s quite useable as a work-while-travelling device.
The only missing component was the software: for a very long time there was nothing available. There are oodles of word processing applications, note takes, and there are even a few HTML editors – but nothing designed for real programming work. I’m not sure why this is, but I suspect that most professional programmers already have something along the lines of a small MacBook Pro or Air and find it convenient to travel with that, so wouldn’t use an iPad, even in these situations. The best available was, unfortunately, using SSH (this was before Prompt, too) and doing the word in a command line on a server somewhere.
At $14, Textastic is expensive for an iOS app, but cheap for a programmers tool (it’s definitely worth the price). This is a text editor, not an IDE, so you don’t get a debugger or interactive prompt or anything like that – it would be difficult to do that anyway given Apple’s restrictions, and I prefer a dedicated programmers text editor to an IDE anyway. (You can easily switch to other apps that together provide most of what an IDE does).
It’s a good editor – it does syntax highlighting for many languages (including Python and everything else I’m interested in), shows line numbers, and you can switch the file’s encoding and line ending choice. You can quickly jump to “symbols” (e.g. method), although I generally just scroll since I know where I’m going. There’s a decent find (and replace), and you can choose from DejaVu Sans Mono, Courier New, Luxi Mono, Monofur or Inconsolata for the font. There are a variety of colour themes, there’s control over tab settings (including soft tabs) and word-wrap. Although you can set the font size, you can also just pinch & zoom to get the size that you’re after, which is far superior to manually picking a size.
Generally the app does what it should: it gets out of the way and lets you get on with writing/editing the code. There’s an additional top row in the keyboard that offers symbols that you’re likely to need (this oddly scrolls horizontally to fit everything in) so that you don’t have to toggle between keyboards often (except for numbers) if you’re not using an external keyboard.
Where the app falls down for me is where iOS in general performs badly: moving data between applications. You can share files to the app (e.g. from Dropbox), and there are actually many ways of getting files in and out (via WebDAV, iTunes, creating local files), but you’re left with the same issue that lots of iOS apps have: you end up with duplicates. To its credit, the app tries to address this (e.g. it can know that a file you’re editing belongs in a particular Dropbox location and sync the changes back), but at the end of the day it’s clearly a hack. The app is still useable, but this does mean that I more often read code in it than write it (it’s far better for reading code than the Dropbox app is).
It seems obvious to me how to fix this problem (I don’t understand why it isn’t already the case). Surely nearly every programmer that would use this app has their code stored in some sort of repository (CVS, SVN, Git, Mercurial, Bazaar, etc). The repository is the file system. The app has a working copy checked out, and you can commit changes back to the repository. The app doesn’t need to support every action that the VCS/DVCS offers – really just (in SVN terms) add/remove/update/checkout (and perhaps propset) – if you need to do something else, then you use a dedicated SVN/Git/etc app). This completely solves the issue of multiple copies of files, because that’s exactly what these tools are designed to handle.
Unfortunately, the app would need to support at least SVN, Git, Mercurial, and Bazaar since there’s a lot of diversity at the moment. However, it seems likely that there are libraries that can be used (even in iOS) that would handle a lot of the grunt work. If the app let me check out a SVN working copy, make changes, and then commit them back, it would be absolutely perfect (I’d pay ten times the price if the app supported this).
If you need a programmers text editor on iOS, then I highly recommend Textastic.
PyPad is a Python interpreter for iOS. This sounds incredibly exciting, right – finally I can do proper development and run Python programs on iOS! Unfortunately, that’s not really the case (mostly due to Apple’s restrictions).
PyPad lets you create multiple modules and execute each of them. However, only a subset of the standard library is available, and there’s nothing iOS-specific available (so you can’t access the camera, or touch information, and so on). Getting code in and out of the app is done via copy and paste. The standard keyboard is provided, with start/pause/stop buttons.
I keep the app installed so that I can (via AirPlay mirroring) demonstrate simple Python snippets. However, if I have an Internet connection available, then I can do that in Prompt (ssh’d to a server that has Python installed) much more elegantly.
The app is clearly limited by Apple’s restrictions as to what’s acceptable for iOS. However, it does seem like it could do much more (e.g. see Codea) if more of the standard library was available (this would mean rewriting chunks, I presume) and if there were special iOS-specific modules available for accessing things specific to the device (especially for accessing touch and graphical output). It could accept .py and text files from other applications, making it easy to get code in (e.g. from Dropbox) and share files (as text) – although perhaps that crosses Apple’s boundary for what’s ok. It would be nice to include the Python documentation, too (I have a separate app for this, but it makes sense to have it in once place).
The app is only $2, so if you’ve any interest in Python on iOS, then I’d recommend buying it to have a look and to encourage more development. You probably won’t end up using it that much, however.
One project I work on uses Trac and has a custom “due date” field (it doesn’t really have milestones – updates are more granular). While this is useful, one problem is that I don’t check this Trac instance every day, and so sometimes I’ve missed deadlines because I haven’t noticed that they are due. However, I do check my calendar every day (multiple times a day). It seems like exporting this “due date” value into my calendar will help with this.
This little script creates a calendar that can be subscribed to. I run it once a day (due dates don’t change very often), and have iCal set to update once a day, so it should work fine. If it’s of use to you, use it (no restrictions). Let me know if there are things that can be improved! It requires the Python iCalendar module, which I already use for parsing public holiday data.
#! /usr/bin/env python
import sqlite3
import datetime
import icalendar
cal = icalendar.Calendar()
cal.add("prodid", "-//PROJECT NAME Trac Deadlines//trac.tonyandrewmeyer.com//")
cal.add("version", "2.0")
cal.add("method", "publish")
cal.add("x-wr-calname", "PROJECT NAME Ticket Due Dates")
cal.add("x-wr-caldesc", "Due dates for PROJECT NAME tickets")
db = sqlite3.connect("/trac_location/db/trac.db")
c = db.cursor()
c.execute("select t.id, t.owner, t.summary, c.value from ticket t, "
"ticket_custom c where t.id=c.ticket and t.status!='closed'")
for ticket_id, owner, summary, due_date in c.fetchall():
if not due_date:
continue
due_date = datetime.datetime.strptime(due_date, '%d/%m/%Y')
due_date = datetime.date(due_date.year, due_date.month, due_date.day)
event = icalendar.Event()
event.add("summary", "PROJECT NAME #%s (%s): %s" % (ticket_id, owner, summary))
event.add("dtstart", due_date)
event.add("dtend", due_date)
event.add("dtstamp", datetime.datetime.now())
event.add("url", "https://trac.tonyandrewmeyer.com/ticket/%s" % ticket_id)
event["sequence"] = datetime.datetime.now().strftime("%Y%m%d%H%M")
event["uid"] = "ticket_due_%s@trac.tonyandrewmeyer.com" % ticket_id
cal.add_component(event)
c.close()
db.close()
open("/var/www/subfolder/project-name-trac-due.ics", "wb").write(cal.as_string())
No radical changes from either last year’s week two or last week. In a way, this is the real first week – in the previous week we learn about the course and about what IronPython is (and remember how to program in Python), but we don’t do much more than that. In the second week, we really get into doing some actual IronPython programming. I gave the students notes [PDF], and the first assessed lab exercise [PDF], and the recommended reading was two Joel Spolsky posts: one on (IT) customer service and one on how hardware improvements impact software design. The notes are again in three sections: textbook chapters (this week is Chapter Three, a fairly essential introduction to .NET and IronPython), key points, and example code (from Chapter Three). The lab is essentially the same as in previous years. Continue reading “D520 Week Two – 2010”→
Around this time last year, I started posting weekly reports on the IronPython classes I was teaching at Northtec, including copies of the material that I was giving the students. These stopped abruptly around the middle of the course. The course did complete (and was fairly successful – I think the change to IronPython was definitely for the better), and I did continue making notes as I taught. However, I didn’t manage to get them online.
On the 10th of October 2009, my father passed away (very unexpectedly, of a heart attack the day before). As a result, I didn’t have as much extra time as I had anticipated, and I didn’t really have the energy/motivation to post the notes. (The classes continued, except the week of the funeral, where the hours were halved).
The course began again last week (21st July 2010), and I’m going to try this again. As I go, I’ll complete the 2009 notes as well (some/all of the links in the 2009 ones are broken, which I’ll fix, and when I get to where the notes stopped, I’ll post the notes that I took last year, although these will be less exhaustive than if I had done them at the time).
No promises, but I expect that I’ll be able to post throughout the entire course this year, and I’ll again make the material that I use available (you may use it under a Creative Commons license if you wish, although much of the material is references to IronPython in Action).
I had planned to present a short summary of the experience of using IronPython in this way at PyCon NZ, but I’m again unable to make it this year (for happier reasons – a close friend is getting married that day); perhaps next year! I’m still interested in hearing from anyone else that’s using IronPython in the classroom.
I am still putting together the weekly D520 notes. However, the last couple of weeks have been a bit busy and so they’re waiting to be cleaned up and have links added. The intra-semester break starts next week so I’ll catch up then.