Anthony Shaw - Wily Python: Writing simpler and more maintainable Python - PyCon 2019

Поделиться
HTML-код
  • Опубликовано: 19 дек 2024

Комментарии • 18

  • @stalinthomas9850
    @stalinthomas9850 3 года назад +8

    05:12 Cyclomatic Complexity
    10:12 Halstead Metrics
    13:18 Maintainability Index
    14:56 Radon
    16:12 Wily
    16:54 Demo
    20:08 Gravity of Complexity
    21:36 Testing and refactoring
    24:01 Summary
    26:40 QnA

  • @SanemSSever
    @SanemSSever 4 года назад +15

    Loved the readability counts joke :)

  • @dmitriyg1030
    @dmitriyg1030 5 лет назад +29

    Had anyone ever had an idea to measure code complexity of popular libs / frameworks such as pandas or Django , with this nice tool? That would be a nice research.

  • @02TLE
    @02TLE 5 лет назад +6

    Great Pycon talk, you should definitely do more of those

  • @dmitrysysoev4254
    @dmitrysysoev4254 5 лет назад +2

    Very useful tool in production! Thank you, authors.

  • @willd0g
    @willd0g 3 года назад

    I really enjoyed that talk thanks.

  • @luckiertwin2
    @luckiertwin2 4 года назад +1

    Excellent talk and tool.

  • @hotharvey2
    @hotharvey2 3 года назад +1

    Nice talk. Would have appreciated some more complex practical examples of good refactoring from complex->simpler code.
    I will be using Wily :)

  • @disenchitilapillydevassy6203
    @disenchitilapillydevassy6203 Год назад

    Do we have a github action file/docs for wiley ?

  • @patrickmullan8356
    @patrickmullan8356 4 года назад

    How to record and (visually) replay the keystrokes on the shell, as he shows at around 17:00?

  • @FinallyAFreeUsername
    @FinallyAFreeUsername 5 лет назад +3

    Oooh, that's clever!

  • @sreeragm8366
    @sreeragm8366 3 года назад

    Is there a way to identify why cc or mi affected?

  • @jayprakashs
    @jayprakashs 5 лет назад +7

    github link mentioned is not correct. it opens "page not found". could not get the slides from speakerdeck as well. :( Please help.

    • @AnthonyShaw
      @AnthonyShaw 5 лет назад +20

      My website is tonybaloney.github.io/ that should have a link to most of the related repos. Wily is at github.com/tonybaloney/wily

    • @polares8187
      @polares8187 5 лет назад +5

      @@AnthonyShaw Awesome talk man. People like you makes me love python.

  • @unperrier5998
    @unperrier5998 4 года назад +5

    Anyone who is willing to use radon and wily should also read this:
    avandeursen.com/2014/08/29/think-twice-before-using-the-maintainability-index/
    In particular the original formula is for languages like C and pascal, but it hasn't been updated fo python.

    • @DavidFarnan
      @DavidFarnan 3 года назад +1

      Let me summarize the article: You should use lines of code because the weights in the equation for maintainability index are partly empirical and partly opinion. They were derived for other languages which vary a lot from python. Also LOC is stupid simple to use.
      But he doesn't have any compelling arguments to detract from the fundamental measures derived in the process of calculating MI, or any counter points to the issues with using lines of code blindly in languages like python where there can be strong motivation toward complex one liners that can make for heavy lines of code. Nor does propose anything better.
      I think the middle ground is to use the raw metrics for your project and modules, and to use good judgement when reviewing pull requests. There is no substitute for peer review and MI is no silver bullet.
      Technical debt if left untended will compound. Developers should learn to be mindful of technical debt, and as with all chores in programming we'll try to automate it. But these tools are never a substitute for experience and sound judgement, and if used as a blunt object to bludgeon your team will cause more harm than good.