05 Mar 2020

Making others more productive

History / Edit / PDF / EPUB / BIB / 3 min read (~412 words)
Questions

How can you make people more productive?

Start by asking your teammates to assess whether they are at their peak productivity or not. If they already are, ask them what you could do to help them be more productive. If they are not at their peak productivity, ask them what is making them unproductive. Make it your goal to help your teammates be as productive and efficient as possible.

Being unproductive is like slow software. If you want to improve it, you have first to start with profiling the program to have an idea of what is making it slow. Once you have a general idea of the cause of the slowness, you will want to focus on your biggest sources of slowness because they are likely to be the ones you can help improve.

In software development, the biggest source of productivity loss is meetings. Meetings break the flow of developers, they consume time and are generally easy to replace with a properly written document. If you can act as the proxy for multiple members of your team so that they do not have to attend all the same meetings you are attending, you can help them reduce this meeting fatigue.

Another source of ineffectiveness is back and forth code reviews. If you need to do multiple iterations of review to close a PR, this PR was too big. If you also end up having to do more than two back and forth, you should simply reach out to the author of the PR and do a pair programming session with them to resolve most of the issues you have with the PR in a single session.

Code depends on other code. It should be your first priority to make sure that code that is developed by others is not stuck in the PR queue for a long period of time because the author might be building on that code. The code in that PR may actually be used by code the author is already writing while waiting for the PR to be reviewed. If he needs to go back and fix things because of delays in the PR, this will make his whole development process inefficient. Having to wait or being blocked is an important source of productivity loss.

Help others avoid working on too many tasks at once. The brain does not handle multitasking very well and it generally leads to lower performance and higher error rate.

04 Mar 2020

The most important part of a meeting

History / Edit / PDF / EPUB / BIB / 1 min read (~177 words)
Questions

What is the most important part of a meeting?

The agenda.

If you get invited to a meeting that only has a title, ask for an agenda. If the agenda is only the title of the meeting, ask for a detailed agenda.

If people cannot prepare an agenda for a meeting, then there is no point in meeting. A meeting with no preparation will generally be ineffective simply because it will be spent either sharing information, something that could have been done without meeting, or actually doing preparatory work for something that would deserve to be done in a group, but not as a meeting in itself.

If you need to make some decisions with a few people, then prepare the list of decisions that will be made during the meeting.

Make sure that your meetings have an agenda. You will get a lot more out of your meeting because you will know the outcome you expect out of them.

04 Mar 2020

List outdated packages using poetry

History / Edit / PDF / EPUB / BIB / 1 min read (~145 words)
Problems Python

I use poetry as my python package manager and I'd like to know the packages that I depend on that are currently outdated.

An easy way to get this list is to run poetry show --outdated. This will return you a list of all the packages that are outdated, their current version, the latest version, as well as a description of the package.

There are in my opinion three missing features here:

  • having the command respect the semantic versioning constraint and only letting you see the latest version according to those constraints
  • having a flag to switch between showing the latest version available without semantic versioning constraint vs the latest version constrained by semantic versioning
  • having a flag to list only the packages that are direct dependencies (listed in the pyproject.toml file)

How can you tell between noisy and useful code refactoring?

The classical adage in software development is that "if it ain't broke, don't fix it". Code may not be in an ideal state, but you should not focus on refactoring it if you aren't working to change it to do something else or so that it can be used in other parts of the code. It is fine to do code refactoring from time to time, especially if you have free cycles and know about a few pieces of code that have been bothersome. However, spending time refactoring systems that are already working but a bit clunky may not be the best use of time, especially if you or your team don't have free cycles to spare to review your changes. A better use of time may for example to help others on their tasks or to prepare future work so it goes smoothly.

In a business environment, a refactor also means implicating other developers to review your changes. As such, this introduces distractions in those developers that could be more focused.

In this case, whether a refactor or other changes to the code is noisy is a matter of timing.

03 Mar 2020

Mypy and implicit namespaces

History / Edit / PDF / EPUB / BIB / 1 min read (~78 words)
Problems Python

I use mypy but it doesn't seem to scan all my files. Why?

You might be using implicit namespaces in your code (see PEP 420). Support for implicit namespaces in mypy is rather flaky as of 2020-03-03.

One solution for the moment is to add __init__.py and make all your namespaces explicit.

Another solution is to replace your calls to mypy some-path with mypy $(find some-path -name "*.py").