Three Great Virtues Of A Programmer

Renowned programmer Larry Wall, the creator of the Perl programming language, identified three great virtues of a programmer in his book "Programming Perl". These virtues are:

1. Laziness

The quality that makes you go to great effort to reduce overall energy expenditure. It makes you write labor-saving programs that other people will find useful, and document what you wrote so you don't have to answer so many questions about it.

Laziness in the context of programming isn't about avoiding work but about investing time upfront to save effort in the long run. Programmers with this virtue:

  • Automate Repetitive Tasks: Rather than manually performing routine tasks over and over, a lazy programmer will write scripts or programs to automate the process. This reduces the potential for human error and frees up time for more complex and creative work.
  • Efficient Code: They strive to write efficient, reusable code that minimizes future maintenance. By creating libraries or modules, they ensure that the same code can be used across multiple projects, reducing redundancy.
  • Proper Documentation: Good documentation is a hallmark of a programmer who values their own time as well as others. By writing clear documentation, they reduce the time needed to explain their code to teammates or even to themselves in the future.
  • Learning and Adopting Tools: Lazy programmers are quick to adopt frameworks, libraries, and tools that streamline development processes rather than reinventing the wheel.

2. Impatience

The anger you feel when the computer is being lazy. This makes you write programs that don't just react to your needs, but actually anticipate them. Or at least pretend to.

Impatience drives programmers to improve the speed and performance of their code and processes. This virtue manifests in several ways:

  • Performance Optimization: Impatient programmers hate waiting for programs to execute. They optimize algorithms and data structures to speed up execution and reduce computational overhead.
  • User Experience (UX): The impatience extends to end-users. Developers want users to have a seamless and fast experience with their software, which leads to responsive and efficient applications.
  • Anticipating Needs: Impatience with inefficiencies drives programmers to anticipate user needs and add features before they become necessary. This proactive approach creates more cohesive and intuitive software.
  • Rapid Prototyping: They favor practices like rapid prototyping and iterative development to quickly bring features to life, test them, and refine them based on feedback.

3. Hubris

The quality that makes you write (and maintain) programs that other people won't want to say bad things about.

Hubris is about taking pride in one's work and striving for excellence. While arrogance can be detrimental, a healthy amount of hubris ensures a programmer aims for high standards:

  • Quality Code: Programmers with hubris write neat, clear, and maintainable code that they and others can be proud of. They adhere to best practices and coding standards.
  • Open Source Contributions: They often contribute to open source projects, knowing that exposing their work to public scrutiny ensures it meets high standards and benefits from community improvements.
  • Continuous Learning: The desire to be recognized for high-quality work drives ongoing learning and self-improvement. This leads programmers to keep up with the latest technologies and methodologies.
  • Peer Reviews: They are not afraid of code reviews and peer feedback, seeing them as opportunities to showcase their skills and improve the quality of their work.

These virtues are intended partly as humor while also conveying real insights into qualities that can drive innovation and productivity in software development, when properly balanced, cultivate a mindset geared towards efficiency, performance, and excellence. They push programmers to create better, faster, and more reliable software.

To view or add a comment, sign in

Others also viewed

Explore content categories