Counteracting Code Complexity With Wily

The Python Podcast.__init__

Episode | Podcast

Date: Mon, 21 Jan 2019 08:00:00 -0500

<div class="wp-block-jetpack-markdown"><h3>Summary</h3> <p>As we build software projects, complexity and technical debt are bound to creep into our code. To counteract these tendencies it is necessary to calculate and track metrics that highlight areas of improvement so that they can be acted on. To aid in identifying areas of your application that are breeding grounds for incidental complexity Anthony Shaw created Wily. In this episode he explains how Wily traverses the history of your repository and computes code complexity metrics over time and how you can use that information to guide your refactoring efforts.</p> <h3>Preface</h3> <ul> <li>Hello and welcome to Podcast.__init__, the podcast about Python and the people who make it great.</li> <li>When you&#8217;re ready to launch your next app or want to try a project you hear about on the show, you&#8217;ll need somewhere to deploy it, so take a look at our friends over at Linode. With 200 Gbit/s private networking, scalable shared block storage, node balancers, and a 40 Gbit/s public network, all controlled by a brand new API you&#8217;ve got everything you need to scale up. Go to <a href="https://www.pythonpodcast.com/linode?utm_source=rss&amp;utm_medium=rss">pythonpodcast.com/linode</a> to get a $20 credit and launch a new server in under a minute. And don&#8217;t forget to thank them for their continued support of this show!</li> <li>And to keep track of how your team is progressing on building new features and squashing bugs, you need a project management system designed by software engineers, for software engineers. Clubhouse lets you craft a workflow that fits your style, including per-team tasks, cross-project epics, a large suite of pre-built integrations, and a simple API for crafting your own. Podcast.__init__ listeners get 2 months free on any plan by going to <a href="https://www.pythonpodcast.com/clubhouse?utm_source=rss&amp;utm_medium=rss">pythonpodcast.com/clubhouse</a> today and signing up for a trial.</li> <li>Visit the <a href="https://www.pythonpodcast.com?utm_source=rss&amp;utm_medium=rss">site</a> to subscribe to the show, sign up for the newsletter, and read the show notes. And if you have any questions, comments, or suggestions I would love to hear them. You can reach me on Twitter at <a href="https://twtiter.com/Podcast__init__?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">@Podcast__init__</a> or email <a href="mailto:hosts@podcastinit.com">hosts@podcastinit.com</a>)</li> <li>To help other people find the show please leave a review on <a href="https://itunes.apple.com/us/podcast/podcast.-init/id981834425?mt=2&amp;uo=6&amp;at=&amp;ct=&amp;utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">iTunes</a>, or <a href="https://play.google.com/music/m/I7ogju4xv6adasgqz6545jndgsy?t=Podcastinit_-_Python_and_the_people_who_make_it_great&amp;utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">Google Play Music</a>, tell your friends and co-workers, and share it on social media.</li> <li>Join the community in the new Zulip chat workspace at <a href="https://www.pythonpodcast.com/chat?utm_source=rss&amp;utm_medium=rss">pythonpodcast.com/chat</a></li> <li>Your host as usual is Tobias Macey and today I&#8217;m interviewing Anthony Shaw about Wily, a command-line application for tracking and reporting on complexity of Python tests and applications</li> </ul> <h3>Interview</h3> <ul> <li>Introductions</li> <li>How did you get introduced to Python?</li> <li>Can you start by describing what Wily is and what motivated you to create it?</li> <li>What is software complexity and why should developers care about it? <ul> <li>What are some methods for measuring complexity?</li> </ul> </li> <li>I know that Python has the McCabe tool, but what other methods are there for determining complexity, both in Python and for other languages?</li> <li>What kinds of useful signals can you derive from evaluating historical trends of complexity in a codebase?</li> <li>What are some other useful metrics for tracking and maintaining the health of a software project?</li> <li>Once you have established the points of complexity in your software, what are some strategies for remediating it?</li> <li>What are your favorite tools for refactoring?</li> <li>What are some of the aspects of developer-oriented tools that you have found to be most important in your own projects?</li> <li>What are your plans for the future of Wily, or any other tools that you have in mind to aid in producing healthy software?</li> </ul> <h3>Keep In Touch</h3> <ul> <li><a href="https://github.com/anthonywritescode?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">anthonywritescode</a> on GitHub</li> <li><a href="https://twitter.com/anthonypjshaw?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">@anthonypjshaw</a> on Twitter</li> <li><a href="https://tonybaloney.github.io/?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">Website</a></li> <li><a href="https://medium.com/@anthonypjshaw?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">Medium</a></li> </ul> <h3>Picks</h3> <ul> <li>Tobias <ul> <li><a href="https://en.wikipedia.org/wiki/Disk_Usage_Analyzer?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">Baobab</a></li> <li><a href="https://www.trutv.com/shows/impractical-jokers/index.html?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">Impractical Jokers</a></li> </ul> </li> <li>Anthony <ul> <li><a href="https://www.imdb.com/title/tt2303687/?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">Line Of Duty</a></li> <li><a href="https://www.abc.net.au/radio/programs/fierce-girls/?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">Fierce Girls</a></li> </ul> </li> </ul> <h3>Links</h3> <ul> <li><a href="https://github.com/tonybaloney/wily?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">Wily</a></li> <li><a href="https://www.dimensiondata.com?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">Dimension Data</a></li> <li><a href="https://app.pluralsight.com/profile/author/anthony-shaw?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">Pluralsight</a></li> <li><a href="https://www.realpython.com?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">Real Python</a></li> <li><a href="https://en.wikipedia.org/wiki/Seattle?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">Seattle</a></li> <li><a href="https://en.wikipedia.org/wiki/C_Sharp_(programming_language)?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">C#</a></li> <li><a href="https://en.wikipedia.org/wiki/Cyclomatic_complexity?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">Cyclomatic Complexity</a></li> <li><a href="https://github.com/pycqa/mccabe?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">McCabe</a></li> <li><a href="https://git-scm.com/?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">Git</a></li> <li><a href="https://en.wikipedia.org/wiki/C_(programming_language)?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">C</a></li> <li><a href="https://en.wikipedia.org/wiki/Assembly_language?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">Assembly</a></li> <li><a href="https://en.wikipedia.org/wiki/Halstead_complexity_measures?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">Halstead</a></li> <li><a href="https://radon.readthedocs.io/en/latest/?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">Radon</a></li> <li><a href="https://www.python.org/dev/peps/pep-0020/?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">The Zen Of Python</a></li> <li><a href="https://en.wikipedia.org/wiki/Halstead_complexity_measures?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">Vocabulary Metric</a></li> <li><a href="https://en.wikipedia.org/wiki/Java_(programming_language)?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">Java</a></li> <li><a href="https://en.wikipedia.org/wiki/Anti-pattern?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">Anti Patterns</a></li> <li><a href="https://en.wikipedia.org/wiki/God_object?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">God Object</a></li> <li><a href="https://github.com/pre-commit/pre-commit?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">Pre-Commit</a></li> <li><a href="https://codeclimate.com/?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">Codeclimate</a></li> <li><a href="https://github.com/mahmoud/glom?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">Glom</a></li> <li><a href="https://github.com/sixty-north/asq?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">ASQ</a></li> <li><a href="https://www.jetbrains.com/pycharm/?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">PyCharm</a></li> <li><a href="https://github.com/PyCQA/pydocstyle?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">PyDocStyle</a></li> <li><a href="https://github.com/PyCQA/lint?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">PyLint</a></li> <li><a href="https://github.com/ambv/black?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">Black</a></li> <li><a href="https://datavizcatalogue.com/methods/sunburst_diagram.html?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">Sunburst Chart</a></li> <li><a href="https://code.visualstudio.com/?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">Visual Studio Code</a></li> </ul> <p>The intro and outro music is from Requiem for a Fish <a href="http://freemusicarchive.org/music/The_Freak_Fandango_Orchestra/?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">The Freak Fandango Orchestra</a> / <a href="http://creativecommons.org/licenses/by-sa/3.0/?utm_source=rss&amp;utm_medium=rss" rel="noopener" target="_blank">CC BY-SA</a></p> </div> <img alt="" height="0" src="https://analytics.boundlessnotions.com/piwik.php?idsite=1&amp;rec=1&amp;url=https%3A%2F%2Fwww.pythonpodcast.com%2Fwily-code-complexity-episode-195%2F&amp;action_name=Counteracting+Code+Complexity+With+Wily+-+Episode+195&amp;urlref=https%3A%2F%2Fwww.pythonpodcast.com%2Ffeed%2F&amp;utm_source=rss&amp;utm_medium=rss" style="border: 0; width: 0; height: 0;" width="0" />