Sign in

The Pragmatic Programmers
By professional developers for professional developers.
Photo by Bryson Hammer on Unsplash

The Prisoner’s Dilemma from mathematical game theory makes for an interesting launching point for a discussion about cooperation. The Iterated Prisoner’s Dilemma (IPD) is even more interesting, and you can apply a solution for IPD to the employee/manager relationship. In fact, IPD can help you think about interactions with your manager as a non-zero-sum game — meaning both sides can win.

In the classic Prisoner’s Dilemma, two prisoners, A and B, are captured for their roles in the same crime. The police interrogate each separately, and neither prisoner can communicate with the other. Each has a choice of whether to…


  1. Can you spot the difference between the two bikes?
  2. What purpose do these bikes have in common?

Multitasking accelerates our eagerness towards additive solutions while monotasking supports subtractive thinking, research shows. This finding matters since adding rigid constraints to a complex system may make the system even more complex.

Subtractive thinking was always emphasized in agile. Simplicity was one of the four values in Kent Beck’s seminal Extreme Programming from the 90s. Further specified as, “the art of maximizing the amount of work not done,” it’s also one of the twelve principles in the Agile Manifesto, from 2001.

Faced with…


A Rust Programming Puzzle

Let’s see what you already know about structures in Rust and how the compiler handles them.

See if you can guess the output from the following program:

Click here to run the program on the Rust Playground.

Result

You may be surprised by the result:

OneByte occupies 1 bytes.
TwoBytes occupies 2 bytes.
ThreeBytes occupies 4 bytes.

The OneByte and TwoBytes structures are occupying 1- and 2-bytes of memory — as you would expect. ThreeBytes has only 3-bytes of data but reports a size of 4 bytes.

Discussion

By default, Rust makes no promises about the layout of structures, other…


Part 3

We finally are nearing the end of the pandemic and the effects, or are we?

In 2020, the pandemic produced a big splash. However, the resulting ripples included a rapid shift to remote work, Zoom fatigue, feelings of isolation, stress built up from managing multiple responsibilities and activities at home, or just even finding a quiet place to work at home some days. Those were just the work-related ripples.

Ripples from a drop of water on a late afternoon
Ripples from a drop of water on a late afternoon
Photo by Izzy Gibson on Unsplash

Beware Forced Transformation

Keep in mind that the pandemic represented a forced transformation in how we work. Those of us who help guide change management efforts never use “forced” and “transformation” together. Transformations take time to be absorbed by the organization and trying to push a transformation to completion…


Winning at the Game of School is different from actually learning the material.

Photo by Ivan Aleksic on Unsplash

To play the Game of School masterfully you must figure out the answer your teacher wants and provide the answer in the way the teacher wants to see it. Understanding that formula is crucial to getting partial credit on a question for which you don’t know the actual answer. Being good at the Game of School is very different from actually learning the material, and some people are good at one and not the other.

Years ago when I was a graduate student at Princeton University, one of our requirements was to present our research in a pre-general seminar. The…


Photo by Michaela on Unsplash

The year I moved to Silicon Valley to become a full-time editor and writer, Steve Wozniak crashed his private plane on takeoff from Scotts Valley Airport.

With only 50 hours of flight training, Woz was not certified to pilot the Beechcraft A36TC Bonanza, a notoriously challenging aircraft. But he had just become a millionaire due to Apple’s historic IPO, he had recently become engaged, and he had bought an airplane. He was flying high.

Well, not literally. The plane barely got off the runway before it stalled, dropped, crashed through two fences, and rolled to a stop in a roller…


I work hard, write code, and love my job. At the end of a long day, I also enjoy unwinding with a quick Xbox gaming session. I’m not a hard-core gamer, so things like subscriptions to monthly game services don’t really appeal to me, but finding good bargains certainly does. While PC gaming services like Steam alert customers when a wish-listed item is on sale, Microsoft doesn’t offer any sort of alert service. No matter — a quick Python script using the Beautiful Soup library and a Discord client will alert me when a game is on sale. …


Modern Front-End Development With Rails

A few months ago, Basecamp released Hotwire, their support tools for client-side development using HTML over the wire rather than JSON. These are the generic versions of the tools that power Hey. Hotwire consists of the already released StimulusJS, and Turbo, which is the successor to Turbolinks.

I’m very excited about these tools, and I discuss them at length in Modern Front-End Development With Rails (on sale now)!

In this post, I’m going to show how I used Turbo to add a couple of effects to the sample app used in the book, with basically no custom JavaScript.

In the…


Image from Pixabay

Part II

The first part of our modeling UEFA Euro 2020 article, in case you want to start there:

Modeling the Data

We are all responsible Python programmers (or at least pretend to be responsible Python programmers), so let’s implement the model as a class Team. A team has a name and strength. The team’s strength would be estimated by a subject-matter expert (SME): someone who knows European soccer better than an average Python programmer. If we cannot get hold of such an expert or cannot afford to pay them, let’s choose strength uniformly at random from the range 0 through 1. …


📝 You may have experienced terrible one-on-ones where the manager canceled the meeting, or worse, where the meeting interrupted critical work. Perhaps the manager didn’t even offer useful feedback or coaching, never mind career development. One-on-ones don’t have to be that way. You can create great one-on-ones with the following three tips.

Photo by Christina @ wocintechchat.com on Unsplash

You might think that one-on-ones don’t matter in an agile environment because a manager doesn’t need to ask for status. However, one-on-ones are not about status — they are the place a manager can see early warning signs to know if a person or a team is successful…

The Pragmatic Programmers

By professional developers for professional developers.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store