Archive

PyCon UK 2017

Yay. I have made it to PyCon UK again this year.

I’m starting on day 2 this year but still glad to be here.

As usual the friendly Python community are making everyone feel welcome.

I shall be posting notes and tips I pick up over the next few days.

Visit the conference site for more information about PyConUK.

Look out for the video uploads of the talks post conference too.

Scrum master training

I really enjoyed refreshing my Scrum practice, when I recently attended Scrum master training with Paul Goddard from Agilify.  Below is a quick overview of Scrum.

What is Scrum?

Scrum is an Agile framework for software development.

The ability to respond to change and deliver useful quality products quickly through incremental development and client participation.

Scrum makes use of…

Cross skilled self-organising groups that work at a sustainable rate.

This leads to my favourite outcome:

Sane happy people make nice code!

Scrum manifesto

Scrum has a manifesto of core principles which I will paraphrase below as:

  1. Continuous customer satisfaction
  2. Advantage through change
  3. Frequent functional deliveries
  4. Constant team collaboration
  5. Trust the team
  6. Get together often
  7. Delivery = Progress
  8. On-going sustainable development
  9. On-going best practice
  10. Keep it simple – Think less waste and minimal viable product.
  11. Collaboration optimises results
  12. Learning from experience

What are the roles within a Scrum team?

Scrum Master

This role is to facilitate and coach the team.  To assist in the application of the Scrum framework.  As teams are self-managing, this role must support the group developing the product not dictate to the team nor assign tasks.

Product owner

Essentially the client.  Scrum relies on strong client participation, co-locating with the team.  Continual prioritisation of tasks and feedback help to deliver a relevant product and high customer satisfaction.

Team members

The doers – makers, fixers, testers, designers, sysadmins, developers, … Scrum teams tend to be made up of between 4 to 9 people.  Smaller teams are more likely to suffer from a lack of a range of skills.

Key Scrum meetings and artefacts

  • Product vision – what are we building and why.
  • Product backlog – a continually reprioritised list of high-level product features or tasks.
  • Daily stand up meetings – 15 minutes long and should include all team members.
  • Sprints – development blocks of a fixed length between 1 to 4 weeks long.
  • Deliverables – A functional and potentially deployable deliverable should be produced at the end of each sprint.
  • Sprint planning meetings – this can be scheduled to last for 1 hour for each week of sprint’s length.  Product backlog items are selected to be implemented in this sprint and more detailed planning of their implementation is done at this point.
  • Sprint review meetings – A wider user engagement meeting where more user and or clients are shown the Sprint deliverable
  • Sprint retrospective meetings – a look back at how the previous sprint went and ways to improve going forward.

Find out more

Starting with a short fun overview of key Scrum concepts – muppets included.

Scrum for Schmucks https://www.youtube.com/watch?v=oJV-kgj4m68&feature=youtu.be

Learn about Scrum https://www.scrumalliance.org/why-scrum

What is Scrum https://www.scrum.org/resources/what-is-scrum

Notes on R

R – an interpreted programming environment for statistical computing and graphics

Coming to R from Python and other programming languages, my notes are comparative versus exhaustive. See the following for a good guide.

There is a mechanism for installing R local packages (akin to the usage of virtualenv for isolated Python package installations)

 install.packages

Lists are like dictionaries

$ is a key (like [‘sfsf’] or dot)

data.frames are like pandas

dot just a naming convention

<- and <= assignment

Speed tips:
Vectorise (map/reduce like functions) vs looping in r

Can easily import/export CSV

Space tip – If you need to store large amounts of data, consider using binary vs ASCII or other plain text files.

Can access DBs directly, using data frames

Note to self, look up NETCDF (commonly used as a climate data format)

Nice built in datasets

Very easily generate charts and save the output to jpeg, pdf, etc. See for more options:

DjangoCon Europe 2015: Day 1

I’m lucky enough to be attending DjangoCon Europe this week.  See the schedule of talks for a teaser.  Talks are all being videoed and transcribed and will be shared online soon.

My thoughts and fairly rough notes to self can be found below:

Baptiste Mispelon: Baptiste’s adventures in Djangoland

This speacker was very encouraging of welcoming new members to the community

Look up PyCON INC?? Pixy dust workshops? Must have misheard this but there is another group akin to django girls

Hanna Kollo: Avoiding monoliths

Uses some Erlang – load sensitive

Dealing with fluid requirements

Over engineering upfront to be very modular can lead to issues with referencing other apps

Instead incrementally creating new apps from the initial app.

Grow in a tree like structure, app at a time.

Aim – when you add new feature only need to touch one app

They use a services layer – found idea on stackoverflow article – look up seemed to work for them.

Sounds like their project could be on the scale of BOS codebase.

She thinks services and unit tests first, end user HTML later.

Q: A repo per app

A: Same repo for all the apps

Abdulrahman Alotaibi: Injecting Django into the work environment

Snakes and rubies convinced him to go down the Django vs Ruby path.

Use of clis

See slide that covers principals he brought into place in his team.

Cardiff University Wellbeing service

Daniele puts out a call to assist with sprint to develop something for the Cardiff Wellbeing centre. They are volunteering and offering free 25 minute counselling sessions slots to attendees.

Ola Sitarska: Pushing the pony’s boundaries

Lots of experience creating Django admin interfaces.  Jokes about leaving PHP behind.

Discusses how the admin site is wired together

Useful overrides for admin site:

  • site_title
  • index_title
  • site_header
  • save_as (save as new)
  • show_full_count – may wish to disable in certain circumstances

Ola’s favs:

  • actions_on_top boolean
  • actions_on_bottom

Don’t use list_editable as not currently multi user safe way of editing your database.

ChangeList – if overriding here, maybe you are in too deep

Tips & tricks:

Advanced permissions

method overrides used to achieve permissions for DjangoGirls websites

  • get_queryset
  • get_form
  • get_readonly_fields

Customising changelist

Additional annotations for attributes/properties that appear on changelist.

  • attribute. is_boolean
  • attribute.allow_tags
  • custom actions
  • django admin autocomplete – look up
  • Look up: rowid fields

She wants to see updates to django admin area

Supporting django-flat-theme – updated CSS mainly

Ola wishes admin components were more reusable

Dafydd Evans: CAMEL, the Cardiff Maths e-learning project

Lecturer

Font has held Mathematics back from exploding on the web.

Can we do something with Latex and eLearning

Will unicode come and save us in the end ;)

MathJax is a revolution.  Javascript, accessible browser rendering of Mathematical symbols

https://github.com/mathjax/

http://docs.mathjax.org/en/latest/glossary.html#term-mathml

Describes a very interesting start of a Maths VLE.

MathML – not human readable

#django live

Django core committers fielded IRC style questions from the audience

Lucie Daeye: Reaching out – Django in the social sciences

Spoke about the importance of bringing humanities students along with digital/programming movement.

Made an interesting point about the lack of non mathematical examples when demonstrating coding constructs.  e.g frequent citations of coding the Fibonacci sequence.

Mentioned a good resource aimed at non programmers, Hello web app.

Yann Malet: Salt for Django developers

Introduced Salt terminology and showed some basic Salt commands.

Presentation tip: Use Ctrl + L to move cursor to be shown at the top of the terminal window

Salt allows you to add breakpoints

salt-cloud – provision AWS etc

mines are data stores

He co-wrote the book High Performance Django

There is talk of hpd-states

Mathieu Agopian: Switching from nose to py.test at Mozilla

Tips:

a much better write up

pytest-cache --lf run the last test that failed

You can decorate with parameters to re-run the test with different variables

When even Google cannot help you.  Mishearing jungle parler will not help you search for the django parler internationalisation egg ;)  Context helped me decode viable to mean variable a lot sooner ;)

why use py.test?

  • More pythonic – eg use clean asserts
  • well supported
  • Claims current tests are compatible – diff counts beg to differ
  • Look up autouse – node related egg for fixtures
  • Better output

Look out for slide notes – he was very keen on py.test and was using it at Mozilla.

Look into the cricket test tool

Erik Romijn: A sincere tale of Django, developers and security

Walked through an example of a PHP script that he found online that had huge security issues.

He developed an online tool to check security configuration of a django site

All related to prefixed SECURITY_ settings.

Recommends book: Bulletproof SSL and TLS

Remember to test for unexpected cases.  e.g not just test for logged in user, test when not logged in too.

Check out requires.io – tracks the releases of your dependencies

@erikpub

Maik Hoepfel: On privilege and moral duty

An almost poetic call to embrace life and do more with our ability to change many lives.