Effective Python by Brett Slatkin Review and Summary

90 Specific Ways to Write Better Python

Effective Python, following in the same vein as the other “Effective” programming books, has a list of best practices to follow for becoming proficient in this particular programming language. Brett Slatkin has provided 90 very thorough examples to help boost your Python 3.x skills ranging from the most basic of things like Item 1: Know Which Version of Python You’re Using, to more esoteric things like Item 51: Prefer Class Decorators Over Metaclasses for Composable Class Extensions.

Overall I found the book to be pretty solid and would recommend it to anyone that’s either incredibly late to the game in hopping to Python 3.x now that Python 2.7 has been a dead language for a year and a half, or to someone that’s taken an introductory Python course and has played with the language for a little while and wants to get better.

I have worked through all of the examples in the book and created iPython notebooks from them which can be found in my GitHub repository. I would encourage you to check out the notebooks to see if purchasing the book would be a good option for you (I think it would be).

Select Code Snippets

Item 4: Prefer Interpolated F-Strings Over C-Style Format Strings and str.format

pantry = [
    ('avocados', 1.25),
    ('bananas', 2.5),
    ('cherries', 15),
]

# comparing C-style, format and f-string formatting
for i, (item, count) in enumerate(pantry):
    old_style = '#%d: %-10s = %d' % (i+1, item.title(), round(count))
    
    new_style = '#{}: {:<10s} = {}'.format(i+1, item.title(), round(count))
    
    f_string = f'#{i+1}: {item.title():<10s} = {round(count)}'
    
    print(old_style)
    print(new_style)
    print(f_string)
#1: Avocados   = 1
#1: Avocados   = 1
#1: Avocados   = 1
#2: Bananas    = 2
#2: Bananas    = 2
#2: Bananas    = 2
#3: Cherries   = 15
#3: Cherries   = 15
#3: Cherries   = 15

Item 17: Prefer defaultdict over setdefault to Handle Missing Items in Internal State

# Naive way, using setdefault
class Visits:
    def __init__(self):
        self.data = {}
        
    def add(self, country, city):
        city_set = self.data.setdefault(country, set())
        city_set.add(city)
        
visits = Visits()
visits.add('England', 'Bath')
visits.add('England', 'London')
print(visits.data)

# Better way, using defaultdict
from collections import defaultdict

class Visits:
    def __init__(self):
        self.data = defaultdict(set)
        
    def add(self, country, city):
        self.data[country].add(city)
        
visits = Visits()
visits.add('England', 'Bath')
visits.add('England', 'London')
print(visits.data)
{'England': {'Bath', 'London'}}
defaultdict(<class 'set'>, {'England': {'Bath', 'London'}})

Item 25: Enforce Clarity with Keyword-Only and Positional-Only Arguments

'''
We can require callers to be clear about their intentions by 
using keyword-only arguments, which can be supplied by keyword only, 
never by position. To do this, we use the * symbol in the 
argument list to indicate the end of positional arguemtns and 
the beginning of keyword-only arguments:
'''
def safe_division_c(number, divisor, *, 
                    ignore_overflow=False,
                    ignore_zero_division=False):
    try:
        return number / divisor
    except OverflowError:
        if ignore_overflow:
            return 0
        else:
            raise
    except ZeroDivisionError:
        if ignore_zero_division:
            return float('inf')
        else:
            raise
            
result = safe_division_c(1.0, 0, ignore_zero_division=True)
print(result)

'''
trying to call the function requiring keyword-only arguments with 
positional arguments will fail: 
'''
#result = safe_division_c(1.0, 10**500, True, False)

'''

A problem still remains, though: Callers may specify the first 
two required arguments (number and divisor) with a mix of 
positions and keywords. If I later decide to change the 
names of these first two arguments it will break all the 
existing callers. This is especially problematic because I 
never intended for number and divisor to be part of an explicit 
interface for this function; they were just confnenient parameter 
names that I chose for the implementation, and I didn't expect 
anyone to rely on them explicitly.

Python 3.8 introduces a solution to this problem, called 
positional-only arguments. These arguments can be supplied 
only by position and never by keyword. The symbol/ in the 
argument list indicates where positional-only arguments end:
'''
def safe_divisor_d(numerator, denominator, /, *, 
                   ignore_overflow=False,
                   ignore_zero_division=False):
    try:
        return number / divisor
    except OverflowError:
        if ignore_overflow:
            return 0
        else:
            raise
    except ZeroDivisionError:
        if ignore_zero_division:
            return float('inf')
        else:
            raise
            
result = safe_division_d(1.0, 0, ignore_zero_division=True)
print(result)
result = safe_division_d(2, 5)
print(result)

'''
Now an exception is raised if keywords are used for the 
positional-only arguments
'''
#safe_division_d(numerator=2, denominator=5)

Item 27: Use Comprehensions Instead of map and filter

# naive way (for loop and list.append)
a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
squares = []
for x in a:
    squares.append(x**2)
print(squares)

# slightly better way (using map built-in function)
alt_squares = map(lambda x: x**2, a)
print(list(alt_squares))

# best way (list comprehensions)
alt_squares2 = [x**2 for x in a]
print(alt_squares2)

# Unlike map, list comprehensions let you easily filter items from the input list:
even_squares = [x**2 for x in a if x % 2 == 0]
print(even_squares)

# The filter built in function can be used along with map to achieve the same result, but is much harder to read:
alt = map(lambda x: x**2, filter(lambda x: x % 2 == 0, a))
print(list(alt))
[1, 4, 9, 16, 25, 36, 49, 64, 81, 100]
[1, 4, 9, 16, 25, 36, 49, 64, 81, 100]
[1, 4, 9, 16, 25, 36, 49, 64, 81, 100]
[4, 16, 36, 64, 100]
[4, 16, 36, 64, 100]

Item 37: Compose Classes Instead of Nesting Many Levels of Built-in Types

from collections import namedtuple, defaultdict

# named tuple to represent a simple grade
Grade = namedtuple('Grade', ('score', 'weight'))

class Subject:
    """ Class to represent a single subject that contains a set of grades."""
    def __init__(self):
        self._grades = []
        
    def report_grade(self, score, weight):
        self._grades.append(Grade(score, weight))
        
    def average_grade(self):
        total, total_weight = 0, 0
        for grade in self._grades:
            total += (grade.score * grade.weight)
            total_weight += grade.weight
        return total / total_weight
    
class Student:
    """ Class to represent a set of subjects that are studied by a single student."""
    def __init__(self):
        self._subjects = defaultdict(Subject)
        
    def get_subject(self, name):
        return self._subjects[name]
    
    def average_grade(self):
        total, count = 0, 0
        for subject in self._subjects.values():
            total += subject.average_grade()
            count += 1
            
        return total / count
    
class GradeBook:
    """ 
    Class to represent a container for all of the students, 
    keyed dynamically by their names.
    """
    def __init__(self):
        self._students = defaultdict(Student)
        
    def get_student(self, name):
        return self._students[name]
    
    
book = GradeBook()
albert = book.get_student('Albert Einstein')

math = albert.get_subject('Math')
math.report_grade(75, 0.05)
math.report_grade(65, 0.15)
math.report_grade(70, 0.80)

gym = albert.get_subject('Gym')
gym.report_grade(100, 0.40)
gym.report_grade(85, 0.60)

print(albert.average_grade())
80.25

Beyond Legacy Code by David Scott Bernstein Review and Summary

Nine Practices to Extend the Life and Value of Your Software

Beyond Legacy Code was recommended to me by my good friend Paul a while back, and I really enjoyed this book for its brevity and high level summary of many best practices in software craftsmanship that get covered in more detail by books like CLEAN code, Refactoring, etc. I also enjoyed it due to his disdain for the scourge that is waterfall project management.

This is going to be a relative long post, as it is a thorough summary of the book and serves as a nice reference back to it (and writing all this stuff down helps me process and remember things better). I highly recommend this book as it serves as a nice high level summary of other software craftsmanship books and ties them all together. You’re not likely to see anything new in here unless you’re coming at it from a non-technical background, in which case I recommend this book even more, but I still found its strength to be its synthesizing nature.

Chapters 1 and 2

Bernstein himself describes the usage of the book with the paragraph: “How software is written may be an alien concept to most people, yet it affects us all. Because it has become such a complex activity, developers often find themselves trying to explain concepts for which their customers, and even their managers, may have no point of reference. This book helps bridge that communications gap and explains technical concepts in common sense language to help us forge a common understanding about what good software development actually is.

What is Legacy Code?

Putting it quite succinctly, Bernstein states that legacy code is “most simply… code that, for a few different reasons, is particularly difficult to fix, enhance, and work with… You think of tangled, unintelligible structure, code that you have to change but don’t really understand. You think of sleepless nights trying to add in features that should be easy to add, and you think of demoralization, the sense that everyone on the team is so sick of a code base that it seems beyond care, the sort of code that you wish would die.” Michael Feathers further defines legacy code as any code without tests. “But having good unit tests presupposes that you have good, testable code, which is often not the case with legacy code, so you’ll have to clean up the code and put it into a better state.”

Why Waterfall Doesn’t Work

Bernstein likens the risks of using waterfall style project management to that of playing the odds in Las Vegas. “In order for anything to work, everything has to work. Programmers don’t see their code run with the rest of the system until integration – one of the last stages before release – when all the separate pieces of code are brought together to make a whole. When we put off integration until the very end, we’re basically playing roulette where we have to win ten times in a row in order to succeed.”

The author compares creating physical things, like a house, to that of virtual things, like software. If you’re building a house you will want to get everything you need to build it up front, but often with software we don’t have a good idea what that is. Case in point, if you were to try to build a house from scratch without ever having done it before, would you know what you needed to buy or do? That’s what software development usually is.

Bernstein states that “Batching things up doesn’t work well for things in the virtual space… It’s not just that it’s inefficient… It forces us to build things that are unchangeable.”

Anecdotes from early in the book

An outdated comment is worse than no comment at all. This turns the comment into a lie, and we don’t want lies in our code. Excessive comments are noise at best and worst they’re lies, however unintentional. Code should be self-expressive, and this is best accomplished by naming things well and using consistent metaphors to make software easy to follow and clear.

Most of what a software developer does lies in unexplored areas. Everyone knows it makes management – almost anyone in fact – feel comfortable if we rely on numbers, charts, and deadlines. But to do great things in any profession means to venture into the unknown, and the unknown can’t easily be quantified… Ultimately we measure because it gives us the feeling that we understand and are in control. But these are just illusions.”

The reason that we rarely know how long a particular task will take is that we’ve never done it before. It’s possible, and in fact probable, that we’ll miss a step… More than anything we need to think things through, and we can never do that as effectively as when we’re actually performing the task.

The tasks we perform when writing software are vastly different moment to moment, day to day, month to month, and project to project… The problems themselves, and their solutions, are often markedly dissimilar to ones we’ve encountered before.

Developing software is risky. It’s rarely done well and the software is practically obsolete moments after it’s written. Faced with this increased complexity, the traditional approach to fixing problems in software development is to create a better process. We rely on process to tell us what to do, to keep us on track, keep us honest, keep us on schedule, and so on. This is the basic philosophy behind waterfall development. Because changing code after the initial design phase is difficult to accomplish, we’ll prevent changes after the design is done. Since testing is time consuming and expensive, we’ll wait till the end of the project so we have to test only once. This approach makes sense in theory, but clearly is inefficient in practice.

Chapter 3: Smart People, New Ideas

Lean says waste in software development is any task that’s started but not yet complete: It’s work in progress. I would even go as far as to say that anything that isn’t software, or anything that doesn’t provide direct value to the customer, can be seen as waste.

The core of Agile is to, rather than create more process to assure quality, use less process so that developers have more time to focus on applying solid engineering practices.

Devs are almost never sure how long a project is going to take. Software design is, in many ways, barely past the starting line, and we’re not exactly sure we can finish a marathon. We can’t see the finish line from the starting line, and we’re not even sure in some sense how long the race actually is. The finish line might be any distance away, or we might know where it is but not how to get there.

Bernstein suggest that instead of concentrating on the whole race, we should concentrate on just one small piece along the way: this two weeks’ worth of development rather than the whole year. This way we can respond to individual portions of it and try to forecast things into the future.

He posits that one of the central things to do is to build in batches, which allows devs to take tasks from start to finish as quickly as possible, and smaller tasks can be taken to completion quicker.

Bernstein completes this chapter by quoting Jeff Sutherland, saying that the number one key success factor for Agile adoption is to demand technical excellence.

Chapter 4: The Nine Practices

If software is to be used it will need to be changed, so it must be written to be changeable. This is not how most software has been written. Most code is intertwined with itself so it’s not independently deployable or extendable, and that makes it expensive to maintain.

Bernstein states that the best software developers he knows are also the neatest. He assumed that fast coders had to be sloppy coders, but what he discovered was quite the opposite. The fastest programmers paid particular attention to keeping their code easy to work with. They don’t just declare instance variables at the top of their classes; they list them in alphabetical order (or however else it makes sense), they constantly rename methods and move them around until their right home is found, and they immediately delete dead code that’s not being used. These people weren’t faster in spite of keeping code quality high, they were faster because they kept their code quality high.

Principles: Principles point us in the right direction and take us closer to the true nature of what the principle applies to. They’re like lofty goals; things that we want to strive for because we know they’re good and virtuous.

Practices: A practice provides value at least most of the time, is easy to learn and easy to teach others, is so simple to do you can do it without actually thinking about it.

Principles guide practices; they tell us how to apply practices to maximal effect.

Anticipate or Accomodate

Without the right set of practices that support creating changeable code, we are unable to easily accommodate change with it happens and we pay a big price. This leaves us in a position where we have to anticipate change before it happens in order to accommodate it later. And that can be stressful. And stress never helps build a better product.

Anticipating future needs can be exhausting, and you’re probably going to be wrong most of the time anyway. Trying to anticipate all of your future needs can cause developers to waste time worrying about features and functionality that are not currently needed and robs them of valuable time to deal with the things that are needed right now. It’s better to just accept that things are going to change, and find ways to accommodate change once it’s asked for.

Given the costs involved in fixing bugs and adding features to existing software, Bernstein states that above and beyond all else, that good software does what it’s supposed to do and is changeable so it’s straightforward to address future needs. Making software changeable extends the return on investment of the initial effort to create it.

The purpose of the nine practices outlined in the book is therefore to help devs build bug-free software that is simpler (and therefore cheaper) to maintain and extend: build better / risk less.

The nine practices are:

  1. Say What, Why and for Whom before How
  2. Build in Small Batches
  3. Integrate Continuously
  4. Collaborate
  5. Create CLEAN Code
  6. Write the Test First
  7. Specify Behaviors with Tests
  8. Implement the Design Last
  9. Refactor Legacy Code

Chapter 5: (Practice 1) Say What, Why and for Whom before How

As software developers, we want to know from the Product Owners and customers what they want and why they want it, and we want to know who it’s for – we don’t want them to tell us how to do it, because that’s our job.

Bernstein states that every great software development project he’s ever worked on has had a product owner. The PO is a superstar, but also the single wring-able neck. The final authority. The product owner is the relationship hub. Everyone goes to that person with updates and questions, and he or she filters that information. The PO is the person who says, “This is the next most important feature to build.”

The Product Owner orders the backlog and the features to be built, ensuring that the most important stuff gets built and the least important doesn’t.

Stories

A story is a one-sentence statement that describes:

  • what it is…
  • why it’s there…
  • and who it’s for.

Stories are a promise for a conversation. We don’t have enough information to build the feature, but we do have enough information to start a conversation about that feature. Stories are about making sure the focus remains on the development of the software itself, rather than on the plan for the development of the software. In agile we say “Barely sufficient documentation.”

A story is finite and speaks of a single feature for a specific type of user and for a single reason. When a story is finite it means it’s testable, and when a story is testable, you know when you’re done.

Set Clear Criteria for Acceptance Tests

Working from barely sufficient documentation, the team will need to know a few things before starting to build a feature. Rather than working from step-by-step requirements, product owners need to know

  1. What are the criteria for acceptance?
  2. How much detail do they need in order to engage in a conversation with developers?

Acceptance criteria state:

  1. What it should do
  2. When it’s working
  3. When we’re ready to move on

Seven Strategies for Product Owners

  1. Be the SME
    The PO must be the subject matter expert and have a deep understanding of what the product is to be. POs must spend time visualizing the system and working through examples before it’s built so they understand it as much as possible.
  2. Use development for discovery
    While POs must hold the product vision, they must also keep an open mind to discovering better solutions in the process of building it. Iterative development provides many opportunities for feedback, and POs should take these opportunities to get features that are in the process of being built into the hands of users to make sure development is on track.
  3. Help developers understand why and for whom
    Understanding why a feature is being requested and who it is for gives developers a better context for what’s being requested. Developers can often come up with better, more maintainable implementations that get the same job done but that are also more generalizable, flexible and extendable.
  4. Describe what you want, not how to get it
    One of the many benefits of stories over specifications or use cases is the focus on what to build and not how to build it. POs must be careful not to tell developers how to do something, and instead focus on what they want done.
  5. Answer questions quickly
    The PO must always be available to answer questions that come up throughout development. Often, answering developer questions becomes the bottleneck during development, and when the PO is not available, development slows down and developers must make assumptions that may turn out not to be true.
  6. Remove dependencies
    POs typically don’t code, but they can help the team by working with other teams their developers depend on to ensure the dependencies don’t hold anyone up. They order the backlog and must ensure that any dependencies across teams have enough lead time.
  7. Support refactoring
    It’s a POs job to request features, but a PO must also be sensitive to the quality of the code being produced so it remains maintainable and extendable. This often means supporting the team when they feel that refactoring can help.

Seven Strategies for Writing Better Stories

  1. See it as a placeholder
    Stories alone are not meant to replace requirements. They are supposed to help start a conversation between the Product Owner and the developer. It is those conversations that replace requirements; stories are just placeholders. Use stories to capture the main ideas you want to bring to sprint planning for further discussion.
  2. Focus on the “what”
    Stories focus on what a feature does, not how it does it. Developers should determine how to build a feature as they’re coding it but first figure out what the feature will do and how it will be used.
  3. Personify the “who”
    Knowing who a feature is for helps developers better understand how the feature is likely to be used, which gives insight into improving the design. This may not be an actual person, but anything that is consuming that feature.
  4. Know why a feature is wanted
    Understanding why a feature is wanted and what it’s trying to achieve can often lead us to better options. The “so that” clause of a story specifies why a feature is desirable by stating the benefits of the feature.
  5. Start simple and add enhancements later
    Incremental design and development is not only the most efficient way to build software, it also offers the best results. Designs that are allowed to emerge are often more accurate, maintainable, and extendable.
  6. Think about edge cases
    Stories state the happy path but there are often other paths we have to take, including alternate paths and exception/error handling. Bernstein typically jots down edge cases on the back of the story card to keep track of them, and then later write tests for them to drive their implementation.
  7. Use acceptance criteria
    Before embarking on implementing a story it’s important to have clearly defined acceptance criteria. This is best expressed as a set of acceptance tests, either using an acceptance testing tool such as SpecFlow, FIT, or Cucumber, or you can just jot it down on the story card.

Chapter 6: (Practice 2) Build in Small Batches

If we need to tell ourselves lies to do things – and I mean “lies” in the most positive sense of the word – then let’s let those lies be small lies so we won’t suffer the full agony of the truth when it comes out. That’s really what Agile is. We set up horizons that are shorter; we build in smaller pieces so that when we feel we’re off course we know it sooner and can do something about it. And that’s the important part: to do something about it.

Be willing to flex

The iron triangle, or project management triangle, states that scope, time, and resources are the three variables in project management. In manufacturing they say pick two and the third must be fixed.

The Iron Triangle

Traditionally people have used the formula Scope = Time * Resources, but this is the wrong approach when building software. In the construction industry, often scope is fixed. You can’t after all release a half completed roof, but in software development, scope is the easiest thing to flex. Developers often build the wrong thing, or overbuild the right thing, so flexing scope should be the first place we look. The most valuable features should be created first, and possibly released early to customers. Given that nearly half of the features delivered are never used, giving the user something instead of nothing can mean the difference between success and failure.

All this leads to shorter feedback cycles. The more feedback you get the more likely you’ll be to identify a problem, and the sooner you get that data the more likely you’ll be able to do something about it.

By working in smaller batches, we’re seeing validations over assumptions.

Agile replaces requirements with stories, and we’ve established that stories are promises for conversations, so what Agile is really saying is that we need to replace requirements with conversations.

Smaller is Better

Agile states that we should mainly measure ourselves on what is valuable to the customer. Bernstein states that this is one of the very few metrics he subscribes to as it discourages local optimization.

The way Bernstein recommends dealing with complex stories is to separate the known from the unknown. We iterate on the unknowns until we make that domain, the domain of the unknowns, smaller and smaller until it simply disappears.

The agile approach of time boxing can be very valuable here. It says: I will take this next iteration to look at this issue and figure out what options are open to me in solving it. Are there libraries that can help me? Can I break it out smaller? What are the key things that I need to know? What do I not know?

The author talks about the modified version of Little’s Law:

Cycle Time = Work in Progress / Throughput

Work in progress, the number of items on our to-do list, divided by the time necessary to complete each item, equals our cycle time.

By reducing the number of items on your to-do list, your cycle time decreases accordingly, providing faster feedback and revealing issues while they’re still small problems that are more easily fixed. Contrasted to waterfall style project management, everything is front loaded onto that list since we do all of our planning up front. This creates for extremely long cycle times.

Whenever you put off integration and testing until later, you’re keeping your work in progress high. Taking a task to 99% completion isn’t good enough because the amount of risk is still unknown. The only way to eliminate the risk associated with adding a new feature is to fully integrate that feature into the system as it is being developed. The solution is to integrate continuously.

Shorten Feedback Cycles

It’s not enough to break tasks down and get more feedback. Developers need constructive feedback that they can take action on. Perhaps most importantly for developers is having a fast automated build that they can depend on for catching errors as they go. This also means that the build and test process should be as short as possible, thereby allowing developers to do it many times a day.

Good software development calls for building the parts and the whole together, but making each part as independent as possible.

Respond to feedback! The Lean Startup movement was created to figure out what the market for something really is.

Build a backlog, which is basically the list of stories we want to build. Order the backlog, don’t prioritize it.

Break stories into tasks. Stories describe an observable behavior in a system, but they may be too involved or too big to do within a two-week iteration. Break it down further into general work items called tasks. The ideal tasks is something that takes about 4 hours to complete.

Don’t use hours for estimating. In an eight hour workday we really get about four ideal hours. So if a task takes about for hours it’s about a day’s work. This is about as small as you can get a task.

Both Extreme Programming and Scrum are akin to nicotine patches in that the real purpose is to try to get teams off the addition of building in releases. Once off that addiction you don’t need the patch anymore. There’s an Agile methodology that embraces that, and it’s called Kanban.

Kanban demands that we limit the number of in progress items, the size of each queue (To Do, In Progress, and Done), but there are no sprints. All this is meant to help you work smarter, not harder, and trying to work on everything all at once is much harder. Work in progress (WIP) limits restrict the number of tasks the team can work on at any given time.

Seven Strategies for Measuring Software Development

  1. Measure time-to-value
  2. Measure time spent coding
  3. Measure defect density
  4. Measure time to detect defects
    It’s been shown that the cost of fixing defects increases exponentially as time elapses since the defect was created. The cheapest defects to fix are the ones that are detected and fixed immediately after creation.
  5. Measure customer value of features
  6. Measure cost of not delivering features
  7. Measure efficiency of feedback loops
    A good development process has built-in feedback loops that can be used to tweak the process. The faster the feedback, the more efficient we can become. Find ways to fail fast and learn from failure. This is how teams rapidly improve.

Seven Strategies for Splitting Stories

  1. Break down compound stories into components
  2. Break down complex stories into knowns and unknowns
  3. Iterate on unknowns until they’re understood
  4. Split on acceptance criteria
  5. Minimize dependencies
  6. Keep intentions singular
  7. Keep stories testable

Chapter 7: (Practice 3) Integrate Continuously

Continuous integration is the practice of integrating software as it’s built rather than waiting until just before a release. CI is critical because it not only helps eliminate bugs early but also helps developers learn how to build better code – code that can be integrated more easily.

Developers should be running continuous integration all the time and immediately seeing the results of their efforts on the system, seeing if bugs have been introduced or if their code plays well with the rest of the system.

Establish the Heartbeat of a Project (The Build Server)

The build server sits there and waits for new code to be added to the repository. When it sees new code come in, it goes about automatically rebuilding the whole system. It runs the automated tests, verifies that everything works, and gives you a result.

In addition to the source code, a version control system should version everything else needed to build the system. This includes technical elements like configuration files, database layouts, test code and test scripts, third party libraries, installation scripts, documentation, design diagrams, use case scenarios, UML diagrams, and so on.

The build should happen on the developer’s local machine first. When everything works there, it gets promoted up to the build server. Once the new code is compiled, tests should automatically be run to verify that those changes don’t affect other parts of the system. Tests that take too long to run can move to a nightly build.

Developers should integrate at least once every day. An even better way is to integrate all the time, as soon as you have the tiniest bit of functionality to add.

The first and most important factor in improving software development is to automate the build.

If you take software to only 99% completion, that last 1% can hold an unknown amount of risk. Instead, fully integrate features into the system as they are built.

Seven Strategies for Agile Infrastructure

  1. Use version control for everything
  2. One-click build end-to-end
  3. Integrate continuously
  4. Define acceptance criteria for tasks
  5. Write testable code
    Once a team commits to automated testing, life becomes a lot less painful, especially for developers who get instant feedback as to whether an approach they’re trying will work. It also encourages devs to start writing code that’s easier to test, which is ultimately higher quality code than untestable code.
  6. Keep test coverage where it’s needed
    As an idealist, Bernstein strives for 100% test coverage of the behaviors his code creates, even though he knows it isn’t always achievable. Because he writes his tests before he writes his code, he tends to have a high percentage of code coverage.
  7. Fix broken builds immediately

Seven Strategies for Burning Down Risk

  1. Integrate continuously
  2. Avoid branching
  3. Invest in automated tests
  4. Identify areas of risk
  5. Work through unknowns
  6. Build the smallest pieces that show value
  7. Validate often

Chapter 8: (Practice 4) Collaborate

When you’re working as a team it’s not enough to be on the team – a member of the team or somehow “team adjacent” – you really have to be in the team – immersed in that culture. Teams that are more productive are often more collaborative. They’re able to look up and see their colleagues, ask a question, answer a question, or discuss a question.

Extreme programming does away with cubicles in favor of shared desks and a more communal setting, free of private spaces.

Pair Programming

Software development is more than a technical activity. It’s also a social activity. Team members must be able to communicate complex abstract ideas and work well together. Communication depends more on common understanding than common workspace. One of the most valuable of Extreme Programming practices is that of pair programming, where two devs work on the same task together on one computer. Pairing is not about taking turns at the computer, but about bringing two minds to bear on the same task so that task is completed more rapidly and at a much greater level of quality than if one person worked on it alone. Software devs can get a lot more accomplished when they work together than when they work alone.

Pair programming disseminates knowledge across a team far more quickly than any other method, and it creates for a notion of collective code ownership. It will also cause developers to get more done writing less code, which also drops the cost of maintenance, but will also create a huge decrease in the amount of bugs written, which will dramatically speed up the time to delivery.

As a step towards pair programming, people can try buddy programming, where you work by yourself for most of the day, then spend the last hour of the day getting together with a buddy and do a code review of what you both did that day.

Spiking is when two or more developers focus on a single task together, usually working for a predefined length of time to resolve some kind of unknown.

Swarming is when the whole team, or small groups of more than two members each, work together on the same problem, but they’re all working simultaneously.

Mobbing is when the whole team normally works together on a single story, like a swarm of ants working together to break down a piece of food.

In the thinking of extreme programming, if code reviews are a good thing, why don’t we review every line of code as we’re writing it? That’s where the pair programming came from; it’s an extreme version of a code review.

Always strive to be mentoring and mentored.

Seven Strategies for Pair Programming

  1. Try it
    You won’t know if you like it unless you try it.
  2. Engage drive and navigator
    Pairing is not about taking turns doing the work. Each member has specific duties, working together, and in parallel. Both the person at the keyboard (the driver) and the one looking over the driver’s shoulder (navigator) are actively engaged while pairing.
  3. Swap roles frequently
  4. Put in an honest day
    Pairing takes a lot of energy. You are “on” and focused every minute of the day.
  5. Try all configurations
    Try random pairing but story, task, hour, all the way down to twenty minutes. Often, people who wouldn’t think to pair with each other make the best and most productive pairs.
  6. Let teams decide on the details
    Pair programming – like any of the Agile practices – cannot be forced on a team by management. Team members have to discover the value for themselves.
  7. Track progress

Seven Strategies for Effective Retrospectives

  1. Look for small improvements
  2. Blame process, not people
  3. Practice the five whys
    When faced with a problem, ask why it happened, or what caused it to happen, and with that answer ask why that happened, and so on, until you’ve asked “why” at least five times. After about the fourth “why” you’ll often start to discover some interesting problems you may not have been aware of.
  4. Address root causes
  5. Listen to everyone
    Retrospectives should engage everyone on a team. Don’t just let the most vocal team members get all the say. Instead, solicit opinions from everyone and give everyone actionable objectives for making small improvements.
  6. Empower people
    Give people what they need to make improvements. Demonstrate to people that you are serious about continuous improvement and support them making changes. If people fear making changes it’s generally because they feel unsupported. Show them that you encourage and reward this kind of initative.
  7. Measure progress

Chapter 9: (Practice 5) Create CLEAN Code

This chapter is a short overview of Uncle Bob Martin’s Clean Code. He talks about quantifiable code qualities, which are little things that can make a big difference. An object should have well-defined characteristics, focused responsibilities, and hidden implementation. It should be in charge of its own state, and be defined only once.

C ohesive
L oosely Coupled
E ncapsulated
A ssertive
N onreduntant

Quality Code is Cohesive

High quality code is cohesive, that is, each piece is about one and only one thing. To software developers cohesion means software entities (classes and methods) should have a single responsibility.

Our programs should be made up of lots and lots of little classes that will have very limited functionality.

When we have cohesive code, if a change is required, it will likely only be focused on one or a few classes, making the change easier to isolate and implement.

Good object-oriented programs are like ogres, or onions: they have layers. Each layer represents a different level of abstraction.

In order to model complex things, use composition. For example, a person class would be composed of a class for walking, a talking class, an eating class, and so on. The walking class would be composed of a class for balance, a forward step class, and so on.

Quality Code is Loosely Coupled

Code that is loosely coupled indirectly depends on the code it uses so it’s easier to isolate, verify, reuse and extend. Loose coupling is usually achieved through the use of an indirect call. Instead of calling a service directly, the service is called through an intermediary. Replacing the service call later will only impact the intermediary, reducing the impact of change on the rest of the system. Loose coupling lets you put seams into your code so you can inject dependencies instead of tightly coupling to them.

Rather than call a service directly you can call through an abstraction such as an abstract class. Later you can replace the service with a mock for testing or an enhanced service in the future with minimal impact on the rest of the system.

Quality Code is Encapsulated

Quality code is encapsulated – it hides its implementation details from the rest of the world. One of the most valuable benefits of using an object oriented language over a procedural language is its ability to truly encapsulate entities. By encapsulation, I don’t just mean making state and behavior private. Specifically, I want to hide interface (what I’m trying to accomplish) from implementation (how I accomplish it). This is important because what you can hide you can change later without breaking other code that depends on it.

“Encapsulation is making something which is varying appear to the outside as if it’s not varying.”

Quality Code is Assertive

Quality code is assertive – it manages its own responsibilities. As a rule of thumb, an object should be in charge of managing its own state. In other words, if an object has a field or property then it should also have the behavior to manage that field or property. Objects shouldn’t be inquisitive, they should be authoritative – in charge of themselves.

Quality Code is Nonredundant

DRY – don’t repeat yourself. 95% of redundant code is duplicated code, which is the phrase used in extreme programming, but the other 5% is code that’s functionality doing the same thing despite slightly different implementations. Nonidentical code can be redundant; redundancy is a repetition of intent.

Code Qualities Guide Us

  • When code is cohesive it’s easier to understand and find bugs in it because each entity is dealing with just one thing.
  • When code is loosely coupled we find fewer side effects among entities and it’s more straightforward to test, reuse and extend.
  • When code is well encapsulated it helps us manage complexity and keep the caller out of the implementation details of the callee – the object being called – so it’s easier to change later.
  • When code is assertive it shows us that often the best place to put behavior is with the data it depends on.
  • When code is nonredundant it means we’re dealing with bugs and changes only once and in one location.

Quality code is Cohesive, Loosely coupled, Encapsulated, Assertive, and Nonredundant, or CLEAN for short.

Code that lacks these qualities is difficult to test. If I have to write a lot of tests for a class I know I have cohesion issues. If I have lots of unrelated dependencies, I know I have coupling issues. If my test are implementation dependent, I know I have encapsulation issues. If the results of my test are in a different object that he one being tests, I probably have assertiveness issues. If I have to write the same test over and over, I know I have redundancy issues.

Testability then becomes the yardstick for measuring the quality of a design or implementation.

Bernstein states that when faced with two approaches that seemed equally valid, he will also go with the one that is easier to test, because he knows it’s better.

Ward Cunningham coined the term technical debt to express what can happen when developers don’t factor their learning back into their code as they’re building it. Nothing slows development down and throws off estimates more than technical debt.

Bernstein has a friend who says “I don’t have time to make a mess”, because he knows working fast is working clean.

Seven Strategies for Increasing Code Quality

  1. Get crisp on the definition of code quality
  2. Share common quality practices
  3. Let go of perfectionism
  4. Understand trade-offs
  5. Hide “how” with “what”
  6. Name things well
    Name entities and behaviors for what they do, not how they do it.
  7. Keep code testable.

Seven Strategies for Writing Maintainable Code

  1. Adopt collective code ownership
  2. Refactor enthusiastically
  3. Pair constantly
    Pair programming is the fastest way to propagate knowledge across a team.
  4. Do code reviews frequently
  5. Study other developers’ styles
  6. Study software development
  7. Read code, write code, and practice coding

Chapter 10: (Practice 6) Write the Test First

Tests are specifications, they define behavior. Write just enough tests to specify the behaviors you’re building and only write code to make a failing test pass.

Acceptance Tests = Customer Tests

Unit Tests = Developer Tests

Other Tests (Integration Tests) = Quality Assurance Tests

Unlike unit tests that mock out all dependencies, integration tests use the real dependencies to test the interaction of components, making the test more brittle and slower.

When you start seeing test-first development as a way of specifying behaviors rather than verifying behaviors, you can get a lot clearer on what tests you need. Writing tests after you write the code also often reveals that the code you wrote is hard to test and requires significant cleaning up to make testable, which can become a major project. It’s better to write testable code in the first place, and the simplest way to write testable code is to write it test-frst.

One of the other significant benefits of writing a test first is that you’re only going to write code covered by tests and so will always have 100% code coverage.

Writing code to make a failing test pass assures that you’re building testable code since it’s very hard to write code to fulfill a test that’s untestable. One of the biggest challenges we have as developers is that we tend to write code that’s not inherently testable. Then, when we go to try to test it alter, we find ourselves having to redesign and rewrite a lot of stuff.

Tests play a dual role. On one hand it’s a hypothesis – or a specification for a behavior – and on the other hand, it’s a regression test that’s put in place and is always there, serving us by verifying that the code works as expected.

Keep in mind that unit tests test units of behavior – an independent, verifiable behavior. It must create an observable difference in the system and not be tightly coupled to other behaviors in the system. It means that every observable behavior should have a test associated with it.

The cheapest way to develop software is to prevent bugs from happening in the first place, but the second cheapest way is to find them immediately so they’re fixed by the same person or team that wrote them rather than fixed later by a different team entirely.

TDD supports refactoring, as code that’s supported by unit tests is safer to refactor. That’s because if you make a mistake, it’ll likely cause one of your tests to fail, so you’ll know about it immediately and can fix it right away.

“In TDD there’s always something I can do to stay productive. I can clean up code or write another test for new behavior; I can break down a complex problem into lots of smaller problems. Doing TDD is like having a difficulty dial, and when I get stuck I can always dial it down to ‘pathetically simple’ and stay there a little while until I build up confidence and feel ready to turn the dial up to raise the difficulty. But all the while, I’m in control.”

TDD can also fail if done improperly. If you write too many tests, and therefore write tests that test against implementation – the way something is done – instead of testing against interface – what they want done- it will fail. Remember, unit tests are about supporting you in cleaning up code, so we have to write tests with supportability in mind.

Unit test are only meant to test your unit of behavior.

If you interface with the reset of the world, you need to mock out the rest of the world so that you’re only testing your code.

Developers should start with the what because that’s what the interface is. That’s what the test is. The test is all about the what.

Seven Strategies for Great Acceptance Tests

  1. Get clear on the benefits of what you’re building
    Writing acceptance tests forces you to get clear on exactly what you’re building and how it will manifest in the system.
  2. Know who it’s for and why they want it.
    This can help developers find better ways of accomplishing a task so that it’s also more maintainable.
  3. Automate acceptance criteria
  4. Specify edge cases, exceptions, and alternate paths
  5. Use examples to flesh out details and flush out inconsistencies
    Working through an example of using a feature is a great way to start to understand the implementation issues around that feature.
  6. Split behaviors on acceptance criteria
    Every acceptance test should have a single acceptance criterion that will either pass or fail.
  7. Make each test unique

Acceptance tests tell developers what needs to be built, and most importantly, when they’ll be done.

Seven Strategies for Great Unit Tests

  1. Take the caller’s perspective
    Always start the design of a service from the callers perspective. Think in terms of what the caller needs and what it has to pass in.
  2. Use tests to specify behaviors
  3. Only write tests that create new distinctions
  4. Only write production code to make a failing test pass
  5. Build out behaviors with tests
  6. Refactor code
  7. Refactor tests

A good set of unit tests provides regression and supports developers in safely refactoring code.

Chapter 11: (Practice 7) Specify Behaviors with Tests

The three distinct phases of TDD are red, green, refactor. Meaning you write a test first that is failing, you then write code to make the test pass, and you then refactor.

Start with stubs, a method that just returns a dummy value instead of doing actual calculations, and then add actual behaviors and constraints.

Think of unit tests as specifications. It’s difficult or even impossible to tell if a requirements document is out of date, but with the click of a button you can run all of your unit tests and verify that all of your code is up to date. They’re living specifications.

Make each test unique.

Test driven development is a design methodology. It helps developers build high quality code by forcing them to write testable code and by concretizing requirements.

Unit tests can be useful for specifying parameters, results, how algorithms should behave, and many other things, but they can’t test that a sequence of calls are in the right order, or other similar scenarios. For that you need another kind of testing called workflow testing.

Workflow testing uses mocks, or stand-ins for real objects. Anything that’s external to the code you’re testing needs to be mocked out.

Seven Strategies for Using Tests as Specifications

  1. Instrument your tests
    Instead of using hard coded values as parameters, assign those values to variables that are named for what they represent. This makes generalizations explicit so the test can read like a specification.
  2. Use helper methods with intention-revealing names
    Wrap setup behavior and other chunks of functionality into their own helper methods.
  3. Show what’s important
    Name things for what’s important. Call out generalizations and key concepts in names. Say what the test exercises and state it in the positive.
  4. Test behaviors, not implementations
    Tests should exercise and be named after behaviors and not implementations. testConstructor is a bad name; tesetRetrievingValuesAfterConstruction is better. Use long names to express exactly what the test is supposed to assert.
  5. Use mocks to test workflows.
  6. Avoid overspecifying
  7. Use accurate examples

Seven Strategies for Fixing Bugs

  1. Don’t write them in the first place
  2. Catch them as soon as possible
  3. Make bugs findable by design
    Your ability to find bugs in code is directly related to the code’s qualities. For example, software that is highly cohesive and well encapsulated is less likely to have side effects that can cause bugs.
  4. Ask the right questions
  5. See bugs as missing tests
  6. Use defects to fix process
    When you find a bug, ask why the bug happened in the first place. Often times this leads back to a problem in the software development process, and fixing the process can potentially rid you of many future bugs.
  7. Learn from mistakes
    If bugs represent false assumptions or flaws in our development process, it’s not enough to simply fix the bug. Instead, fix the environment that allowed the bug to happen in the first place. Use bugs as lessons on vulnerabilities in your design and process so you can look for ways to fix them. Use mistakes as learning opportunities and gain the valuable message each of our problems hold.

Chapter 12: (Practice 8) Implement the Design Last

Common developer practices that can be impediments to change:

  1. Lack of encapsulation
    The more one piece of code “knows” about another, the more dependencies it has, whether it’s explicit or implicit. This can cause subtle and unexpected problems where one small change can break code that’s seemingly unrelated.
  2. Overuse of inheritance
  3. Concrete implementations
  4. Inlining code
  5. Dependencies
  6. Using objects you create or creating objects you use
    To instantiate an object, you need to know a great deal about it, and this knowledge breaks type encapsulation – users of the code must be aware of sub-types – and forces callers to be more dependent on a specific implementation. When users of a service also instantiate that service, they become coupled to it in a way that makes it difficult to test, extend, or reuse.

Tips for writing sustainable code

  1. Delete dead code
    dead code serves no purpose except to distract developers. Delete it.
  2. Keep names up to date.
  3. Centralize decisions
  4. Abstractions
    Create and use abstractions for all external dependencies, and create missing entities in the model because, again, your model should reflect the nature of what you’re modelling.
  5. Organize classes

Bernstein finds it helpful to distinguish between coding and cleaning, and treat them as separate tasks. When he’s coding he’s looking for solutions to a specific task at hand. When he’s cleaning he’s taking working code and making it supportable. Coding is easier when he’s focused on just getting a behavior to work and his tests to pass. Cleaning is easier when he has working code that’s supported with tests and he can focus on making the code easier to understand and work with.

Pay off technical debt both in the small – during the refactoring step of test-first development – and in the large – with periodic refactoring efforts to incorporate the team’s learning into the code.

On average, software is read 10 times more than it’s written, so write your code for the reader (someone else) as opposed to the writer (yourself). Software development is not a “write once” activity. It is continually enhanced, cleaned up, and improved.

Use intention revealing names instead of comments to convey the meaning of your code. You may want to use comments to describe why you’re doing something, but don’t use them to describe what you’re doing. The code itself should say what it’s doing. If you find yourself writing a comment because you don’t think a reader will understand what’s going on just by reading the code, you should really consider rewriting the code to be more intention revealing.

Program by intention

Programming by intention: Simply delegate all bits of functionality to separate methods in all your public APIs. It gives your code a cohesion of perspectives, meaning that all the code is at the same level of abstraction so it’s easier to read and understand.

Think of object-oriented code in layers. This is how we naturally think. If we think about the high-level things we need to do today, we’re not thinking about all the little details. Then, when we think about how we’re going to do that step, we unfold the top layer and start looking at the details. Understand and look at code the same way, with those levels of abstraction.

When you look at the how, when you jump into that level inside the what, you find a bunch more whats that have to happen to implement that how. That’s how to think about the whats, and it delegates the how to others and so on until you work down the chain.

Reduce Cyclomatic Complexity

Cyclomatic complexity represents the number of paths through code. Code with just one conditional or if statement has a cyclomatic complexity of two – there are two possible paths through the code and therefore two possible behaviors the code can produce. If there are no if statements, no conditional logic in code, then the code has a cyclomatic complexity of one. This quantity grows exponentially: if there are two if statements the cyclomatic complexity is four, if there are three it is eight, and so on. Drive the cyclomatic complexity down to as low as you can because, generally, the number of unit tests needed for a method is at least equal to its cyclomatic complexity.

Correspondingly, the higher the cyclomatic complexity, the higher the probability that it will have bugs. If you build each entity with a low cyclomatic complexity, you need far fewer tests to cover your code.

Separate Use from Creation

Use factories to separate the instantiation of an object from the usage of that object.

Polymorphism allows you to build blocks of code independent of each other so they can grow independently from each other. For example, when someone comes up with a new compressor that was never envisioned before, the existing code can automatically take advantage of it because it’s not responsible for selecting the compressor to use. It’s just responsible for delegating to the compressor it’s given. In order to do this correctly though, you need to create objects separately, in a different entity than the entity that’s using the objects. By isolating object creation we also isolate the knowledge about which concrete objects are being used and hide it from other parts of the system.

Emergent Design

As you pay attention to the challenges you’re having as you’re building software, those challenges are actually indicating that there’s a better way to do something. This allows you to take things like bugs, the pain, nagging customers not getting what they want, and turn them into assets. They hold the clues to how to do things so much better. If you use the information you’re getting in that way, they’re really blessings in disguise.

Seven Strategies for Doing Emergent Design

  1. Understand object-oriented design
    Good object-oriented code is made up of well-encapsulated entities that accurately model the problem it’s solving.
  2. Understand design patterns
    Design patterns are valuable for managing complexity and isolating varying behavior so that new variations can be added without impacting the rest of the system. Patterns are more relevant when practicing emergent design than when designing up front.
  3. Understand test-driven development
  4. Understand refactoring
    Refactoring is the process of changing one design to another without changing external behavior. It provides the perfect opportunity to redesign in the small or in the large with working code. Bernstein does most of his design during refactoring once he’s already worked out what needs to be done. This allows him to focus on doing it well and so that the right design can emerge.
  5. Focus on code quality
    CLEAN – cohesive, loosely coupled, encapsulated, assertive, and nonredundant.
  6. Be merciless
    Knowing the limits of a design and being willing to change it as needed is one of the most important skills for doing emergent design.
  7. Practice good development habits
    To create good designs, first understand the principles behind the practices of Extreme Programming and Agile, and make good development practices into habits.

Seven Strategies for Cleaning Up Code

  1. Let code speak for itself
    Write code clearly using intention-revealing names so it’s obvious what the code does. Make the code self-expressive and avoid excessive comments that describe what the code is doing.
  2. Add seams to add tests
    One of the most valuable things to do with legacy code is add tests to support further rework. Look to Michael Feathers’ book Working Effectively with Legacy Code for examples of adding seams.
  3. Make methods more cohesive
    Two of the most important refactorings are Extract Method and Extract Class (look to Refactoring by Martin Fowler). Method are often made to do too much.Other methods and sometimes entire classes can be lurking in long methods. Break up long methods by extracting new methods from little bits of functionality that you can name. Uncle Bob Martin says that ideally methods should be no longer than four lines of code. While that may sound a bit extreme, it’s a good policy to break out code into smaller methods if you can write a method name that describes what you’re doing.
  4. Make classes more cohesive
    Another typical problem with legacy code is that classes try to do too much. This makes them difficult to name. Large classes become coupling points for multiple issues, making them more tightly coupled than they need to be. Hiding classes within classes gives those classes too many responsibilities and makes them hard to change later. Breaking out multiple classes makes them easier to work with and improves the understandability of the design.
  5. Centralize decisions
    Try to centralize the rules for any given process. Extract business rules into factories if at all possible. When decisions are centralized, it removes redundancies, making code more understandable and easier to maintain.
  6. Introduce polymorphism
    Introduce polymorphism when you have a varying behavior you want to hide. For example, I may have more than one way of doing a task, like sorting a document or compressing a file. If I don’t want my callers to be concerned with which variation they’re using, then I may want to introduce polymorphism. This lets me add new variations later that existing clients can use without having to change those clients.
  7. Encapsulate construction
    An important part of making polymorphism work is based on clients using derived types through a base type. Clients call sort() without knowing which type of sort they’re using. Since you want to hide from clients the type of sort they’re using, the client cant instantiate the object. Give the object the responsibility of instantiating itself by giving it a static method that invokes new on itself, or by delegating that responsibility to a factory.

Chapter 13: (Practice 9) Refactor Legacy Code

Refactoring is restructuring or repackaging the internal structure of code without changing its external behavior.

Software by its very nature is high risk and likely to change. Refactoring drops the cost of four things:

  • comprehending the code later
  • adding unit tests
  • accommodating new features
  • and doing further refactoring

By making incremental changes, adding tests, and then adding new features, legacy code gets cleaned up in a systematic manner without fear of introducing new bugs.

Refactoring Techniques

Pinning Tests – A very coarse test. It may test a single behavior that takes hundreds or thousands of lines of code to produce. Ultimately you want more tests that are smaller tests than this, but start by writing a pinning test for your overall behavior so that at least you have some support in place. Then as you make changes to the code, you rerun the pinning test to verify that the end-to-end behavior is still correct.

Dependency Injection – Instead of creating the objects we use ourselves, we let the framework create them for us and inject them into our code. Injecting dependencies as opposed to creating them decouples objects from the services they use.

System Strangling – Wrap an old service with your new one and let it slowly grow around the old one until eventually the old system is strangled. Create a new interface for a new service that’s meant to replace an old service. Then ask new clients to use the new interface, even though it simply points to the old service. This at least stops the bleeding and allows new clients to use a new interface that will eventually call cleaner code.

Branch by Abstraction – Extract an interface for the code you want to change and write a new implementation, but keep the old implementation active while you build it. , using feature flags to hide the feature that’s under development from the user while you’re building it.

Refactor to Accommodate Change

Clean up legacy code, make it more maintainable and easier to understand, and then retrofit in tests to make it safer to change. Then, and only then, with the safety of unit tests, refactor the code in more significant ways.

Refactor the the Open-Closed

The open-closed principle says software entities should be “open for extension but closed for modification.” In other words, strive to make adding any new feature a matter of adding new code and minimally changing existing code. Avoid changing existing code because that’s when new bugs are likely to be introduced.

Refactor to Support Changeability

Changeability in code does not happen by accident. It has to be intentionally created in new code, or carefully introduced in refactoring legacy code, by following good developer principles and practices. Supporting changeability in code means finding the right abstractions and making sure code is well encapsulated.

Do it right the second time.

Seven Strategies for Helping you Justify Refactoring

  1. To learn an existing system
  2. To make small improvements
  3. To retrofit tests in legacy code
  4. Clean up as you go
  5. Redesign an implementation once you know more
  6. Clean up before moving on
  7. Refactor to learn what not to do

Seven Strategies for When to Refactor

  1. When critical code is not well maintained
  2. When the only person who understands the code is becoming unavailable
  3. When new information reveals a better design
  4. When fixing bugs
  5. When adding new features
  6. When you need to document legacy code
  7. When it’s cheaper than a rewrite

Tribe

Tribe: On Homecoming and Belonging by Sebastian Junger

Tribe is an interesting, relatively quick read about the phenomena of loneliness in modern society, a place where people, more or less, lack a tribe. Junger makes strong arguments about why we may feel better in tribal cultures, with more loyalty, sense of belonging, and meaning. He explains why many veterans, even if they have not seen the fields of battle, have increasing rates of PTSD after returning to civilian life.

This book was recommended to me after moving home to Minnesota and feeling like I had no community, no structure, that I didn’t really have anything that mattered all that much. While reading Tribe I found myself nodding my head along with the words and finding that a lot of what Junger had to say made a lot of sense to me and that I really related to it. It made me realize that a lot of what I felt, the sever loneliness and longing for something more, was likely due to the loss of community, and coming together to work towards a common goal, that I had at my former startup.

Favorite Quotes

“The sheer predictability of life in an American suburb left me hoping – somewhat irresponsibly – for a hurricane or a tornado or something that would require us to all band together to survive. Something that would make us a tribe.”

“This book is about why that sentiment is such a rare and precious thing in modern society, and how the lack of it has affected us all. It’s about what we can learn from tribal societies about loyalty and belonging and the eternal human quest for meaning. It’s about why – for many people – war feels better than peace and hardship can turn out to be a great blessing and disasters are somethings remembered more fondly than weddings or tropical vacations. Humans don’t mind hardship, in fact they thrive on it; what they mind is not feeling necessary. Modern society has perfected the art of making people not feel necessary.”

“It may say something about human nature that a surprising number of Americans – mostly men – wound up joining Indian society rather than staying in their own. They emulated Indians, married them, were adopted by them, and on some occasions even fought alongside them. And the opposite almost never happened: Indians almost never ran away to join white society. Emigration always seemed to go from the civilized to the tribal.”

“On the other hand, Franklin continued, white captives who were liberated from the Indians were almost impossible to keep at home: ‘Tho ransomed by their friends, and treated with all imaginable tenderness to prevail with them to stay among the English, yet in a short time they become disgusted with our manner of life… and take the first good opportunity of escaping again into the woods.'”

“For all the temptations of native life, one of the most compelling might have been its fundamental egalitarianism. Personal property was usually limited to whatever could be transported by horse or on foot, so gross inequalities of wealth were difficult to accumulate… Social status came through hunting and war, which all men had access to, and women had far more autonomy and sexual freedom – and bore fewer children – than women in white society. ‘Here I have no master,’ an anonymous colonial woman was quoted by the secretary of the French legation as saying about her life with the Indians. “I am the equal of all the women in the tribe, I do what I please without anyone’s saying anything about it, I work only for myself, I shall marry if I wish and be unmarried again when I wish. Is there a single woman as independent as I in your cities?”

“But as societies become more affluent they tend to require more, rather than less, time and commitment by the individual, and it’s impossible that many people feel that affluence and safety simply aren’t a good trade for freedom.”

“One study in the 1960s found that nomadic !Kung people of the Kalahari Desert needed to work as little as twelve hours a week to survive – roughly one-quarter the hours of the average urban executive at the time… The relatively relaxed pace of !Kung life – even during times of adversity – challenged long -standing ideas that modern society created a surplus of leisure time. It created exactly the opposite: a desperate cycle of work, financial obligation, and more work… Among anthropologists, the !Kung are thought to present a fairly accurate picture of how our hominid ancestors lived for more than a million years before the advent of agriculture… Early humans would most likely have lived in nomadic bands of around fifty people, much like the !Kung… And they would have done almost everything in the company of others. They would have almost never been alone.”

“…And as society modernized, people found themselves able to live independently from any communal group. A person living in a modern city or suburb can, for the first time in history, go through an entire day – or an entire life- mostly encountering complete strangers. They can be surrounded by others and yet feel deeply, dangerously alone… The evidence that this is hard on us is overwhelming. Although happiness is notoriously subjective and difficult to measure, mental illness is not. Numerous cross-cultural studies have shown that modern society- despite its nearly miraculous advances in medicine, science, and technology – is afflicted with some of the highest rates of depression, schizophrenia, poor health, anxiety, and chronic loneliness in human history. As affluence and urbanization rise in a society, rates of depression and suicide tend to go up rather than down. Rather than buffering people from clinical depression, increased wealth in a society seems to foster it.”

“…there is remarkably little evidence of depression-based suicide in tribal societies. Among the American Indians, for example, suicide was understood to apply in very narrow circumstances: in old age to avoid burdening the tribe, in a ritual paroxysms of grief following the death of a spouse, in a hopeless but heroic battle with an enemy, and in an attempt to avoid the agony of torture. “

“In the United States, white middle-aged men currently have the highest (suicide) rate at nearly 30 suicides per 100,000.”

“In 2015, the George Washington Law Review surveyed more than 6,000 lawyers and found that conventional success in the legal profession – such as high billable hours or making partner at a law firm – had zero correlation with levels of happiness and well-being reported by the lawyers themselves… The findings are in keeping with something called self-determination theory, which holds that human beings need three basic things in order to be content: they need to feel competent at what they do, they need to feel authentic in their lives, and they need to feel connected to others. These values are considered intrinsic to human happiness and far outweigh extrinsic values such as beauty, money, and status. Bluntly put, modern society seems to emphasize extrinsic values over intrinsic ones, and as a result, mental health issues refuse to decline with growing wealth.”

“The economic and marketing forces of modern society have engineered an environment that maximizes consumption at the long-term cost of well-being. In effect, humans have dragged a body with a long hominid history into an overfed, malnourished, sedentary, sunlight-deficient, sleep-deprived, competitive, inequitable, and socially-isolating environment with dire consequences.”

“…Clearly, touch and closeness are vital to the health of baby primates – including humans… Only in Northern European societies do children go through the well-known development stage of bonding with stuffed animals; elsewhere, children get their sense of safety from the adults sleeping near them.”

“Before the war, projections for psychiatric breakdown in England ran as high as four million people, but as the Blitz progressed, psychiatric hospitals around the country saw admissions go down. Emergency services in London reported an average of only two cases of bomb neuroses a week. Psychiatrists watched in puzzlement as long-standing patients saw their symptoms subside during the period of intense air raids. Voluntary admissions to psychiatric wards noticeably declined, and even epileptics reported having fewer seizures. ‘Chronic neurotics of peacetime now drive ambulances,’ one doctor remarked. Another ventured to suggest that some people actually did better during wartime.”

“The positive effects of war on mental health were first noticed by the great sociologist Emile Durkheim, who found that when European countries went to ware, suicide rates dropped. Psychiatric wards in Paris were strangely empty during both world wars, and that remained true even as the German army rolled into the city in 1940.”

“An Irish psychologist named H. A. Lyons found that suicide rates in Belfast dropped 50 percent during the riots of 1969 and 1970, and homicide and other violent crimes also went down. Depression rates for both men and women declined abruptly during that period, with men experiencing the most extreme drop in the most violent districts.”

“‘When people are actively engaged in a cause, their lives have more purpose… with a resulting improvement in mental health’, Lyons wrote in the Journal of Psychosomatic Research in 1979. ‘It would be irresponsible to suggest violence as a means of improving mental health, but the Belfast findings suggest that people will feel better psychologically if they have more involvement with their community.'”

“Fritz’s theory was that modern society has gravely disrupted the social bonds that have always characterized the human experience, and that disasters thrust people back into a more ancient, organic way of relating. Disasters, he proposed, create a community of sufferers that allows individuals to experience an immensely reassuring connection to others. As people come together to face an existential threat, Fritz found that class differences are temporarily erased, income disparities become irrelevant, race is overlooked, and individuals are assessed simply by what they are willing to do for the group.”

“The beauty and tragedy of the modern world is that it eliminates many situations that require people to demonstrate a commitment to the collective good. Protected by police and fire departments and relieved of most of the challenges of survival, an urban man might go through his entire life without having to come to the aid of someone in danger – or even give up his dinner.”

“What catastrophes seem to do – sometimes in the span of a few minutes – is turn back the clock on ten thousand years of social evolution. Self-interest gets subsumed into group interest because there is no survival outside group survival, and that creates a social bond that many people sorely miss.”

“For a former solider to miss the clarity and importance of his wartime duty is one thing, but for civilians to is quite another, ‘Whatever I say about ware, I still hate it’, one survivor made sure to tell me after I’d interviewed her about the nostalgia of her generation. ‘I do miss something from the war. But I also believe that the world we are living in – and the peace we have – is very fucked up if somebody is missing war. And many people do… Although she was safe in Italy, and finally healing form her wounds, the loneliness she felt was unbearable. She was worried that if the war never stopped, everyone would be killed and she would be left alone in the world.”

“‘I missed being that close to people, I missed being loved in that way’, she told me. ‘In Bosnia – as it is now – we don’t trust each other anymore; we became really bad people. We didn’t learn the lesson of the war, which is how important it is to share everything you have with human beings close to you. The best way to explain it is that the war makes you an animal. We were animals. It’s insane – but that’s the basic human instinct, to help another human being who is sitting or standing or lying close to you… We were the happiest then, and we laughed more.'”

“But in addition to all the destruction and loss of life, war also inspires ancient human virtues of courage, loyalty, and selflessness that can be utterly intoxicating to the people who experience them… The Iroquois Nation presumably understood the transformative power of war when they developed parallel systems of government that protected civilians from warriors and vice versa. Peacetime leaders, called sachems, were often chosen by women and had complete authority over the civil affairs of the tribe until war broke out. At that point war leaders took over, and their sole concern was the physical survival of the tribe… If the enemy tried to negotiate an end to hostilities, however, it was the sachems, not the war leaders, who made the final decision. If the offer was accepted, the war leaders stepped down so that the sachems could resume leadership of the tribe… The Iroquois system reflected the radically divergent priorities that a society must have during peacetime and during war. Because modern society often fights wars far away from the civilian population, soldiers wind up being the only people who have to switch back and forth.”

“Treating combat veterans is different from treating rape victims (PTSD), because rape victims don’t have this idea that some aspects of their experience are worth retaining.”

“Combat veterans are, statistically, no more likely to kill themselves than veterans who were never under fire. The much-discusses estimate of twenty-two vets a day committing suicide in the United States is deceptive: it was only in 2008 that – for the first time in decades – the suicide rate among veterans surpassed the civilian rate in America, and though each death is enormously tragic, the majority of those veterans were over the age of fifty… The discrepancy might be due to the fact that intensive training and danger create what is known as unit cohesion – strong emotional bonds within the company or the platoon – and high unit cohesion is correlated with lower rates of psychiatric breakdown.”

“35 years after finally acknowledging the problem, the US military now has the highest reported PTSD rate in its history – and probably in the world. American soldiers appear to suffer PTSD at around twice the rate of British soldiers who were in combat with them… Since only 10 percent of our armed forces experience actual combat, the majority of vets claiming to suffer from PTSD seem to have been affected by something other than direct exposure to danger. This is not a new phenomenon: decade after decade and war after war, American combat deaths have generally dropped while disability claims have risen… Soldiers in Vietnam suffered one-quarter the mortality rate of troops in WWII, for example, but filed for both physical and psychological disability compensation at a rate that was 50 percent higher… Today’s vets claim three times the number of disabilities that Vietnam vets did, despite a generally warm reception back home and a casualty rate, thank God, that is roughly one-third what it was in Vietnam.”

“The vast majority of traumatized vets are not faking their symptoms, however. They return from wars that are safer than those their fathers and grandfathers fought, and yet far greater numbers of them wind up alienated and depressed. This is true even for people who didn’t experience combat. In other words, the problem doesn’t seem to be trauma on the battlefield so much as reentry into society. And vets are not alone in this. It’s common knowledge in the Peace Corps that as stressful as life in a developing country can be, returning to a modern country can be far harder. One study found that one in four Peace Corps volunteers reported experiencing significant depression after their return home, and that figure more than doubled for people who had been evacuated from their host country during wartime or some other kind of emergency… It makes one wonder exactly what it is about modern society that is so mortally dispiriting to come home to.”

“What people miss (after re-entering civilian life) presumably isn’t danger or loss, but the unity that these things often engender. There are obvious stresses on a person in a group, but there may be even greater stresses on a person in isolation, so during disasters there is a net gain in well-being. Most primates, including humans, are intensely social, and there are very few instances of lone primates surviving in the wild. A modern soldier returning from combat – or a survivor of Sarajevo – goes form the kind of close-knit group that humans evolved for, back into a society where most people work outside the home, children are educated by strangers, families are isolated from wider communities, and personal gain almost completely eclipses collective good.”

“Our fundamental desire, as human beings, is to be close to others, and our society does not allow for that… In humans, lack of social support has been found to be twice as reliable at predicting PTSD as the severity of the trauma itself.”

“Israel is arguably the only modern country that retains a sufficient sense of community to mitigate the effects of combat on a mass scale… Those who come back from combat are reintegrated into a society where those experiences are very well understood. We did a study of seventeen-year-olds who had lost their father in the military, compared to those who had lost their fathers to accidents. The ones whose fathers died in combat did much better than those whose fathers hadn’t… The Israelis are benefiting from what the author and ethicist Austin Dacey describes as a ‘shared public meaning’ of the war. Shared public meaning gives soldiers a context for their losses and their sacrifice that is acknowledged by most of the society. That helps keep at bay the sense of futility and rage that can develop among soldiers during a war that doesn’t seem to end.”

“Such public meaning is probably not generated by the kinds of formulaic phrases, such as ‘thank you for your service’ that many Americans now feel compelled to offer soldiers and vets. Neither is it generated by honoring vets at sporting events, allowing them to board planes first, or giving them minor discounts at stores. If anything, these token acts only deepen the chasm between the military and civilian populations by highlighting the fact that some people serve their country, but the vast majority don’t.”

“Anthropologists like Kohrt, Hoffman and Abramowitz have identified three factors that seem to crucially affect a combatant’s transition back into civilian life. First, cohesive and egalitarian tribal societies do a very good job at mitigating the effects of trauma, but by their very nature, many modern societies are exactly the opposite: hierarchical and alienating… Secondly, ex-combatants shouldn’t be seen as victims… Third, and perhaps most important, veterans need to feel that they’re just as necessary and productive back in society as they were on the battlefield. Iroquois warriors who dominated just about every tribe within 500 miles of their home territory would return to a community that still needed them to hunt and fish and participate in the fabric of everyday life. There was no transition when they came home because – much like life in Israel – the battlefield was an extension of society, and vice versa.”

“There are many costs to modern society, starting with its toll on the global ecosystem and working one’s way down to its toll on the human psyche, but the most dangerous loss may be to community.”

“The earliest and most basic definition of community – of tribe – would be the group of people that yo would both help feed and help defend. A society that doesn’t offer its members the chance to act selflessly in these ways isn’t a society in any tribal sense of the word; it’s just a political entity that, lacking enemies, will probably fall apart on its own. Soldiers experience this tribal way of thinking at war, but when they come home they realize that the tribe they were actually fighting for wasn’t their country, it was their unit. It makes absolutely no sense to make sacrifices for a group that, itself, isn’t willing to make sacrifices for you. That is the position American soldiers have been in for the past decade and a half.”

“The public is often accused of being disconnected from its military, but frankly it’s disconnected from just about everything… This fundamental lack of connectedness allows people to act in trivial but incredibly selfish ways. Rachel Yehuda pointed to littering as the perfect example of an everyday symbol of disunity in society. ‘It’s a horrible thing to see because it sort of encapsulates this idea that you’re in it alone, that there isn’t a shared ethos of trying to protect something shared. It’s the embodiment of every man for himself. It’s the opposite of the military.’ When you throw trash on the ground, you apparently don’t see yourself as truly belonging to the world that you’re walking around in.”

“Gang shootings – as indiscriminate as they often are – still don’t have the nihilistic intent of rampages. Rather, they are rooted in an exceedingly strong sense of group loyalty and revenge, and bystanders sometimes get killed in the process.”

“Rampage killings dropped significantly during WWII, then rose again in the 1980s and have been rising ever since. It may be worth considering whether middle-class American life – for all its material good fortune – has lost some essential sense of unity that might otherwise discourage alienated men from turning apocalyptically violent.”

“New York’s suicide rate dropped around 20 percent in the six months following the attacks (on 9/11), the murder rate dropped by 40 percent, and pharmacists saw no increase in the number of first-time patients filling prescriptions for anti-anxiety and antidepressant medication. Furthermore, veterans who were being treated for PTSD at the VA experienced a significant drop in their symptoms in the months after the September 11th attack.”

“Today’s veterans often come home to find that, although they’re willing to die for their country, they’re not sure how to live for it. It’s hard to know how to live for a country that regularly tears itself apart along every possible ethnic and demographic boundary… To make matters worse, politicians occasionally (editors note: very often these days) accuse rivals of deliberately trying to harm their own country – a charge so destructive to group unity that most past societies would probably have punished it as a form of treason. It’s complete madness, and the veterans know this. In combat, soldiers all but ignore differences of race, religion, and politics within their platoon. It’s no wonder many of them get so depressed when they come home.”

“I know what coming back to America from a war zone is like because I’ve done it so many times. First there is a kind of shock at the level of comfort and affluence that we enjoy, but that is followed by the dismal realization that we live in a society that is basically at war with itself. People speak with incredible contempt about – depending on their views – the rich, the poor, the educated, the foreign-born, the president, or the entire US government. It’s a level of contempt that is usually reserved for enemies in wartime, except that now it’s applied to our fellow citizens. Unlike criticism, contempt is particularly toxic because it assumes a moral superiority in the speaker. Contempt is often directed at people who have been excluded from a group or declared unworthy of its benefits. Contempt is often used by governments to provide rhetorical cover for torture or abuse. Contempt is one of four behaviors that, statistically, can predict divorce in married couples. People who speak with contempt for one another will probably not remain united for long.”

“The most alarming rhetoric comes out of the dispute between liberals and conservatives, and it’s a dangerous waste of time because they’re both right. The perennial conservative concern about high taxes supporting a nonworking ‘underclass’ has entirely legitimate roots in our evolutionary past and shouldn’t be dismissed out of hand. Early hominids lived a precarious existence where freeloaders were a direct threat to survival, and so they developed an exceedingly acute sense of of whether they were being taken advantage of by members of their own group. But by the same token, one of the hallmarks of early human society was the emergence of a culture of compassion that cared for the ill, the elderly, the wounded, and the unlucky. In today’s terms, that is a common liberal concern that also has to be taken into account. Those two driving forces have coexisted for hundreds of thousands of years in human society and have been duly codified in this country as a two-party political system. The eternal argument over so-called entitlement programs- and, more broadly, over liberal and conservative thought- will never be resolved because each side represents an ancient and absolutely essential component of our evolutionary past.”

“If you want to make a society work, then you don’t keep underscoring the places where you’re different – you underscore your shared humanity.”

“The United States is so powerful that the only country capable of destroying her might be the United States herself, which means that the ultimate terrorist strategy would be to just leave the country alone. That way, America’s ugliest partisan tendencies could emerge unimpeded by the unifying effects of war. The ultimate betrayal of tribe isn’t acting competitively – that should be encouraged- but predicating your power on the excommunication of others from the group. That is exactly what politicians of both parties try to do when they spew venomous rhetoric about their rivals.” (*cough* Trump *cough*)

“In 2009, an American soldier named Bowe Bergdahl slipped through a gap in the concertina wire at his combat outpost in southern Afghanistan and walked off into the night. He was quickly captured by a Taliban patrol, and his absence triggered a massive search by the US military that put thousands of his fellow soldiers at risk. The level of betrayal felt by soldiers was so extreme that many called for Bergdahl to be tried for treason when he was repatriated five years later… The collective outrage at Sergeant Bergdahl was based on very limited knowledge but provides a perfect example of the kind of tribal ethos that every group – or country- deploys in order to remain unified and committed to itself… Bergdahl put a huge number of people at risk and may have caused the deaths of up to six soldiers. But in purely objective terms, he caused his country far less harm than the financial collapse of 2008, when bankers gambled trillions of dollars of taxpayer money on blatantly fraudulent mortgages… Almost 9 million people lost their jobs during the financial crisis, 5 million families lost their homes, and the unemployment rate doubled to around 10 percent… For nearly a century, the national suicide rate has almost exactly mirrored the unemployment rate, and after the financial collapse, America’s suicide rate increased by nearly 5 percent. In an article published in 2012 in The Lancet, epidemiologists who study suicid estimated that the recession cost almost 5,000 additional American lives during the first two years – disproportionately among middle-aged white men. That is close to the nation’s losses in the Iraq and Afghan wars combined. If Sergeant Bergdahl betrayed his country – and that’s not a hard case to make – surely the bankers and traders who caused the financial collapse did as well. And yet they didn’t provoke nearly the kind of outcry that Bergdahl did.”

How To Be Happy At Work

How To Be Happy At Work by Annie McKee

This is the book that started my deep dive into emotional intelligence… and I’ll give you one guess as to why I read it. One of the things that I loved about this book was that it did so much to validate some of the feelings I was having, as well as invalidate all the typical crap people of the older generation say like, “Well, they call it work for a reason.”

It managed to get me to evaluate some of my values, how they relate to my career, and gave me the opportunity to identify further reading material to help me start my journey of increasing my emotional intelligence… and let me tell you, engineers don’t usually have much of it.

I don’t really think this book needs much of a summary since the title does a pretty good job of explaining what it’s about, but it is one of those books that I have post it flags and highlighter marks all over. So without much summary, let’s just dive into the passages that resonated with me.

Favorite Quotes

OK, so this quotes section is going to be super long and is basically going to be my condensing of this book down to be able to continue to revisit in the future… Here we go.

“Life really is too short to be unhappy at work.”

“A lot of us give up and settle for less than fulfilling jobs. We tell ourselves that we’re not supposed to be happy at work; that’s for other parts of life. We try to cope by avoiding that bad manager or getting that stubborn, annoying person off the team. We shut down, give less, and fantasize about telling someone off. Sometimes we run away from the job, the company, even our careers. But running away isn’t going to make things better. To be happy, I’ve discovered, you’ve got to run toward something: meaningful work; a hopeful, inspiring vision of the future; and good relationships with the people you work with every day.

“What leads to long-lasting fulfillment at work? What leads to happiness? And can we even expect to be happy at work? Does it really matter?
To answer these questions, I reviewed my work on emotional intelligence and resonant leadership and revisited the dozens of studies I’ve done in companies worldwide. What I found is both simple and profound: Happiness matters at work as much as it does in our personal lives. And when we are happy, we are more successful… My conclusion: to be happy at work, we need purpose, hope, and friendships.

“We are wired to seek meaning in everything we do. It’s what makes us human. In some cases, it’s what keeps us alive. In his classic book, Man’s Search for Meaning, Austrian psychiatrist and holocaust survivor Victor Frankl shows that even in the worst of circumstances, purpose, hope and connection are what keep us going.

“Hope, optimism, and a vision of a future that is better than today help us rise above trials and deal with setbacks… Unfortunately, we often assume that our organization’s vision is enough to keep us hopeful and focused on the future. I’ve rarely seen this to be the case. An organization’s vision, however inspiring, is for the organization – not you… To be truly happy at work, we need to see how our workplace responsibilities and opportunities fit with a personal vision of our future. This kind of vision is vitally tied to hope and optimism, which we can with focus and hard work, cultivate even in difficult jobs and toxic workplaces. When we see our jobs through a positive lens, and when a personal vision is front and center in our minds, we are more likely to learn from challenges and even failures, rather than be destroyed by them.”

“Resonant relationships are at the heart of collective success in our companies. That’s because strong, trusting, authentic relationships form the basis for great collaboration and collective success. But I’ve found, we need more than trust and authenticity to get us through good times and bad. We need to feel that people care about us and we want to care for them in return.”

“We’ve known for years that emotional intelligence (EI) is key to being effective at work. The more EI you have, the better you (likely) are at your job – no matter what kind of role you have or how senior you are… In practical terms, EI is a set of competencies that enables you to understand your own and others’ feelings, and then use this knowledge to act in ways that support your own and others’ effectiveness… Here’s a secret about EI: it’s a virtuous circle. The more you use it, the better you get.”

Happiness at work is a choice. When you decide to look within yourself to connect with what’s most important to you, what makes you feel hopeful about the future, and what you long for in your relationships, you are taking that first, all-important step toward a work life that is deeply satisfying, challenging, and fun.

“(When we are unhappy at work) Time away from our jobs (if there is such a thing) is affected, too, because we don’t leave our feelings at the office and unhappiness seeps into the rest of life. Our families and friends suffer when we are disengaged, dissatisfied, and unfulfilled. Worse, slow-burning stress, anger, and other negative emotions can literally kill us.
Destructive emotions like fear and constant frustration interfere with reasoning, adaptability, and resilience. We just can’t focus when we’re gripped by negativity or when we’re obsessing about how to protect ourselves (or get back at our boss).”

“She fostered a “we’re in this together” mindset that made people feel they belonged to an important group, one with a resonant microculture marked by excitement, enthusiasm, safety, and trust – the kind of environment where people can take big risks and have fun without the fear of losing their jobs.”

“But Candace had what Ari had lost: clarity about the value of her work, an inspiring vision of the future, and resonant relationships… With dedicated effort, Ari found his way, and he did not quit his job. The first step was accepting that he deserved to be happy at work (for some of us, this is a big step). Then, he focused on recapturing what was most important to him in life and learning how to bring it back to work.”

“I define happiness at work as a deep and abiding enjoyment of daily activities fueled by passion for a meaningful purpose, a hopeful view of the future, and true friendships... Happiness is not simply about feeling good in the moment. That is hedonism.”

“…What we’ve found is that positive emotions – like those we experience when we are happy – support individual and collective success… Most of us intuitively know that feelings and inner experiences like eagerness, enjoyment, optimism, belonging, and confidence fuel our energy and creativity.”

“The business case: happiness before success: A common myth tells us that once we achieve success, we’ll be happy. If this were true, all successful people would be happy. They are not… The belief that we will be happy once we become successful is backward. It all starts with happiness because happiness breeds resonance and resonance breeds success. Scholars agree, starting with the popular author and psychologist Shawn Achor, who says it in a straightforward, no-nonsense manner: “Happiness comes before success.” This statement is based on studies showing that when we are positive, we are 31 percent more productive and 40 percent more likely to receive a promotion, we have 23 percent fewer health-related effects from stress, and our creativity rates triple… “when we find and create happiness in our work, we show increased intelligence, creativity, and energy, improving nearly every single business and educational outcome”… So, if we sacrifice happiness, we sacrifice success.”

Happiness Traps

“I’ve always wondered why we don’t fight back – why we settle for so little happiness at work… First, we’ve bought into old myths about the meaning of work and what we can expect from it (or not). Namely, we believe that work isn’t supposed to be fun or fulfilling, and that we don’t have to like the people we work with. Instead, we’re there to follow orders and produce results. Our values, hopes, and dreams have a very small place in this picture.
Second, most of us have stumbled into happiness traps – mindsets and habitual ways of approaching work and career that keep us stuck on a hamster wheel and pursuing the wrong goals.
Third – and this is the good news – there’s something we can do to break free from these old myths and dangerous traps: develop and use our emotional intelligence.”

“Only one-third of US employees are engaged at work. The rest are either neutral or actively engaged.”

Myth one: Work has to be grueling.
Myth two: How we feel at work doesn’t matter.
– By the middle of the last century, there was a vast body of knowledge showing that how we feel about our bosses, work, and workplaces affects our contributions and outcomes.
Myth three: we can’t ask for more of work.”

“But when we ask for more, well-meaning friends and family tell us to check our unrealistic expectations and pull out old sayings like, “that’s why they call it work.” Or, when we complain about not being trusted to make decisions or being asked to do things that are counter to our values, people say, “Stop making trouble. Be grateful you even have a job. Do what you’re told and you’ll be fine.”
In the end, far too many of us accept the notion that work is not where we can be fully human, not where we can realize our potential or our dreams. We pursue goals that don’t jive with our values or our own hopes for the future. We accept being treated as “doers”, not people.”

“But, organizations aren’t filled with mindless automatons that live for the privilege of serving the god of profit; they never were. And as the knowledge revolution takes the world by storm, more rand more of us think for a living, rather than make for a living, even in manufacturing. We need our brains to work at their best, and in order for that to happen we need physical, psychological, and spiritual well-being.
We need to replace outdated beliefs with new ways of understand what we can expect from work – and from each other. To start with, we need to create workplaces that honor our humanity and foster common decency, camaraderie, mutual respect, and sustainable success.”

The overwork trap: We spend every waking moment doing something – checking our email, talking, dashing off a text. We’re always behind, running as fast as we can to catch up… We live in a world where overwork is overvalued… As Harvard Business Review’s Sarah Green Carmichael writes, “we log too many hours because of a mix of inner drivers, like ambition, machismo, greed, anxiety, guilt, enjoyment, pride, the pull of short-term rewards, a desire to prove we’re important, or an overdeveloped sense of duty.” Sometimes, too, work is an escape. When our jobs are less stressful than home, work becomes a “haven, a place to feel confident and in control.” Regardless of the reason, overwork has become so prevalent that “busy” is the most common answer I get when I ask people how they are doing… The first step out of the overwork trap is to try to figure out why you are working s much. Is it because you really have to? Or is t a habit? Or is something deeper going on, like trying to escape your home life or prove your importance?”

The money trap: Money is great. Until our desire for it overshadows reason… How many of us have stayed in jobs that we hate because the money was good? Or taken a promotion that we didn’t want or weren’t suited for because it came with a raise?… There’s something deeper going on: the decision to choose money over happiness is fueled by insecurity, social comparison, and the need to display one’s power for all to see… Insecurity also comes from the belief that we aren’t good enough. We suffer from the imposter syndrome and are terrified that people will find out. Money, we think, will fool them into believing we are deserving of our success… When we feel we must have money and the power that goes with it, that we must display our wealth for others to see, then we’ve crossed into dangerous territory. At this point, we make decisions to choose emptiness over happiness at work – just to get more cash.”

“The ambition trap: This trap is linked to something we usually think of as good: ambition. But, when our ambition is coupled with an overdeveloped focus on competition and winning, we can find ourselves in trouble… some people put their own personal ambition above morals, ethics and reason. They’re blinded by their desire to win and will do just about anything to come out on top… But winning is downright destructive when other people get hurt, when it becomes the most important goal, when you’re willing to sacrifice anything to achieve your goal and to hell with the costs and consequences.
First, success isn’t really success when we define it as a win-lose, zero-sum game. Second, hyper-competitiveness in the workplace leaves us empty and unfulfilled, hurts our ability to lead effectively, and makes us no fun to be around.”

The “should” trap: The next happiness trap is a big one, one all of us face at some point in our careers: doing something simply because we should, rather than because we truly want to… But, some of the cultural rules that guide us at work are outdated and destructive, especially those that limit or constrain our dreams…. Workplace “shoulds” are such powerful drivers of our beliefs and behaviors that we often go along with rules that make no sense. Social rules and “shoulds” are a fact of life. It’s not about getting rid of them; it’s about sorting through them and making conscious choices about which to follow – those that enable you to live your values, reach your potential, and be happy… This belief that we can make things happen is critical to happiness. Without it, you fall into the last trap: helplessness.”

“The helplessness trap: Some people truly believe that no matter how hard they try, they can’t influence the world around them, change things, or get what they want.”

Breaking free of the traps

“Why, we need to ask ourselves, do we work all the time? Why are we so seduced by money and power? Is our ambition and desire to win serving us or hurting us? Why are we so trapped by what we feel we should do rather than pursuing what we want to do? And why do we sometimes give up on being happy at all? To answer these questions, we need to return to emotional intelligence.”

“If we are to combat these outdated myths and happiness traps and take control of our own happiness… we need more than a modicum of emotional intelligence. Emotional intelligence is the capacity to understand one’s own and others’ emotions and deal with them in a way that leads to resonance in relationships as well as individual and collective success. There are twelve emotional intelligence competencies…”

Emotional self-awareness: Avoiding the happiness traps starts with emotional self-awareness. You must tune in to those faint whispers in your mind, those almost imperceptible feelings of “something’s not right.””

“Self-management: Emotional self-control helps us stay tuned in to our feelings, even when we don’t like what we discover… Once you know what’s driving you, self-management helps you shift your attention. This subtle but powerful internal change supports willpower, focus, and courage – all of which you need to do the hard work of breaking free.”

“Social awareness and relationship management: When you focus on empathizing with people and understanding your organizational environment, you can see what is coming from inside you, and what’s coming from others or your company. With this knowledge, you are better equipped to make choices about what you will or will not accept at work.”

The power of purpose

“Purpose and work go hand in hand… When work is an expression of our values and we have positive impact on something we care about, we are motivated from within; we don’t need others to push us or beg us to do our jobs, and we can withstand challenge and turmoil. ”

“Today, our organizations are our tribes. Work is still where we express ourselves and make a difference… But work and life are no longer seen as vitally intertwined. Rather, we see our jobs as a means to an end, a way to earn money so we can have meaningful lives outside of work… The result, as management scholars Jeffrey Pfeffer and Robert Sutton tell us, is that “many companies do not worry that much about providing meaning and fulfillment to their people. Work is, after all, a four letter word.” But it’s impossible to pull life and work apart. We are meaning making creatures, no matter if we’re sitting in an office, giving tours of historical places, hiking Mount Kilimanjaro, or eating dinner with our family. We don’t give up the essential human need to do something worthwhile when we start our workday. We want to know that we’re doing something that matters.
Seeing our work as an expression of cherished values and as a way to make a contribution is the foundation of well-being, happiness, and our ongoing success. Passion for a cause fuels energy, intelligence, and creativity. And, when we see that the results of our labor will benefit ourselves and others, we want to “fight the good fight” together.”

Is your work a job, a career, or a calling?

“When we see our work as just a job, we’re focused on what we get for our labor – a paycheck and other tangible benefits like insurance… seeing work as just a job can be soul-destroying… We tell ourselves that the money’s worth it, but we feel empty.”

“We might, instead, see our work as a career. Our job is then linked to a bigger picture, often advancement in a profession or a company. We see our current role as an important step toward a destination. For example, we may see ourselves having significant impact on a field or rising in an organization we care about. This can be fun and exciting and can fulfill the need for a guiding purpose at work, presumably because our career is linked to our values. This can and often does make us happy. However, people who view work as a career are often largely motivated by things like prestige or upward mobility… but a singular focus on external recognition and rewards can make day to day work feel like a means to an end. We can find ourselves constantly seeking the next goal or prize, but each time we get that job, bonus, or raise, our ambition kicks in and we turn our attention to the next win.
When we view our work as a career, we should ask ourselves, “to what end?” If the answer is only to advance or progress, something vital is probably missing.”

“When we experience our work as a calling, our efforts are not simply the means to an end, and we’re not just jumping from one goal to the next. Instead, what we do every single day brings deep satisfaction. Even simple activities are seen as important, fulfilling, and meaningful. When work is a calling, our passion motivates us from the inside out… It’s becoming increasingly clear to me that if we are to experience our work as a calling we’ve got to understand which values matter to us and the act on these values to have positive impact.

“In an attempt to keep up with continuous change, some leaders focus so intensely on business objectives that they bulldoze through people, crushing everything in their path… Josh was under pressure to move fast. But, rather than shifting into execution mode, he decided to invest time in understanding what people – wherever they sat in the organization – found fulfilling in their current ways of working and what got in their way… The more time I spent talking and listening to them about those elements rather than just about business issues, the more appreciation I had for their perspectives and the more ideas I had about how I could help. If you give people space, they’ll find the solutions themselves. They’ll understand how what they do every day has some purpose: to help the company, the customer, and society.”… His role was to create space for people to identify that purpose for themselves to help them feel heard, and to remove any obstacles that got in their way. This may sound like common sense, but frankly, in my experience, very few managers do this as well as they might. This is often because of a perceived lack of time or pressure from above to move fast.”

“Motivation that comes from inside us is a far more potent force than any carrot or stick used by our boss or the company… Studies show that people actually become less interested in tasks when they are externally rewarded… Real rewards, the kind that help us sustain commitment, engagement, and happiness, come from within us.”

Ok, at this point you may begin to realize that I’ve highlighted basically every other paragraph in this book, which I guess just goes to speak to how well I felt like I related to this book when I read it. Continuing on…

“To be happyat work, we need to make a difference. We need to be consciously attending to and enacting what we find to be inherently worthwhile – our values and beliefs… they’re often very private because they are derived from our upbringing and the culture of our families and communities… we are better off if we can find a way to incorporate what we care about into our day-to-day work.”

“Sometimes our values don’t align with our organization’s values, so we have to make a calculation about which values we can bring – and which we can’t… the reality is that sometimes, we and our values just don’t fit in certain workplaces. That’s where social awareness comes in.”

“If you want to bring more of your core self – your core values – to work, there are two things you can do. First, figure out what you care most about. One way to begin this process is to reflect on what you get excited about, what makes you proud. You can also spot values by examining what makes you uncomfortable or what makes you feel as if you are compromising in a way that does not feel good.”

“People want to feel that their work is linked to a larger, noble purpose… and that their company’s mission is meaningful. But often these missions don’t inspire people the way leaders hope they will. Sometimes they do the opposite. This is because a lofty, distant organizational mission can’t replace the need to live our values and have a personal impact on something that matters to us.”

Practical Ways to Find Purpose in Your Work

Human beings are inherently creative. We like to innovate, see new ways of doing things, and engage in activities that result in something that didn’t exist before.
For many years, we’ve known that we care more about the quality of our work when we see the fruits of our labor than when we’re told to move widgets from one part of a machine to another.
Doing meaningful work is rewarding in itself, and we are willing to do more work for less pay when we feel our work has some sort of purpose, no matter how small.”

Keep your eyes open for opportunities to join a group that is exploring a new idea or trying to solve a problem.
Find a way to track accomplishments .
Experiment with developing new processes to get work done.

“Don’t blame others for inefficient, broken work systems and processes. Don’t curse the proverbial “them” or wait for someone else to fix everything. They won’t. You can.”

Don’t be resigned to the way things have always been. Accept that most organizations are rife with old, worn out, and inefficient processes and pick some to fix.

Start small. You may not be able to fix an entire, convoluted budgeting process, but maybe you can change one report or form that will make your – and everyone else’s – life better.

“The very act of helping or supporting people can counteract the feeling that we’re toiling at a meaningless job. Because we’re so rarely working alone anymore, positively engaging with people may be the easiest way to express our values at work. Resonant relationships make us feel good and get more done because we are connected to and respectful of one another… People who give generously of themselves are actually more successful than those who sneak, connive, and take.”

Personal Reflection and Mindful Practice

  1. What is my definition of happiness? Where did my beliefs about happiness come from? What role do family, religion or spirituality, philosophy of life, and experience play in how I define happiness?
  2. Does my definition of happiness limit where, when and with whom I can experience joy, fun, and real fulfillment?
  3. Is my way of viewing happiness serving me well? Why, or why not?
  4. If I were to redefine what it takes to make me happy at work, what would my new definition be?

The Power of Hope

“Hope is the starting point for creating a future that is better than today. It encourages us to dig deep down inside ourselves to find our most unique talents and gifts and to use all of our resources to help us along the way. Whatever difficulties we face… the hope that tomorrow will be better is what helps us get up every morning.”

“Hope is at the heart of happiness at work.”

“when we’re angry or frightened, our thinking brain is essentially kidnapped and gagged by our limbic brain. In this state, we are guided by survival instincts. Our manager – or whoever is threatening us – begins to look suspiciously like a saber toothed tiger. We can to save ourselves and to hell with the consequences… Fortunately the exact opposite happens when we experience hope… When we are hopeful we are better able to access our knowledge and intellect, us our emotional intelligence, and rely on our intuition. We are more open and willing to consider new and different ways to reach our goals and have the emotional wherewithal to deal with challenges and problems.”

“… We can choose to view our memories through a positive lens or a negative lens… Obsessing about all the things that went wrong in the past and imagining it will all happen again today or tomorrow affects your ability to think, to process feelings, and to act in ways that will help rather than hurt you.”

Yes, You Do Need Friends at Work

“…We had our answer to the question: Sunglass Hut was doing well in part because of strong, warm relationships and a powerful sense of belonging in the company.”

“Having friends at work is critical. When we feel cared for – even loved, as one does in a friendship – and when we belong to a group that matters to us, we are generous with our time and talents because we’re committed to people, not just the job or the company.”

“… if employees suspect that someone doesn’t respect or care about them or their goals, they will likely become self-protective.”

“Love – the kind of love founded in companionship, caring and shared purpose – is the single most important factor influencing happiness in life… The love of family and friends is essential to our overall well-being. Similarly, caring relationships with colleagues at work enable us to thrive physically and psychologically. The positive emotions we feel in such relationships help us deal with stress, and we are even less likely to become depressed… Being in the company of friends helps us experience a deep and satisfying sense of belonging – another key element of happiness.”

Belonging: Our Tribe at Work

“From the time we lived in small, nomadic bands, we’ve needed one another to survive. We still do. There’s more to being part of a tribe, however, than finding food or protecting one another. We also have a deep human need to belong – to feel part of a group of people who share our values, hopes, and dreams… When we find ourselves in a team or organization that doesn’t want us or doesn’t accept us for who we are, we live in a constant state of physiological arousal: fears take over, we’re anxious, and we can even become depressed. Stress is constant and our physical and mental health suffer.”

“We thrive when we belong to groups where people care about, like, and respect us – and where we can give the same back in return. We want to feel that people we work with are our people, even if we come from different backgrounds and cultures.”

“Friendships don’t just form magically… to start, you can focus on trust, generosity, and fun… these help us to build warm, positive friendships in the workplace.”

“Make it a priority to get to know your colleagues. You can read about their cities, states, or countries.. or take time at the beginning of conferencealls to talk about nonwork topics.”

I Hate My Boss

“First, if your boss is indeed destructive, you need to defend yourself. You can start by creating psychological boundaries that protect you from emotional damage. If the situation is untenable, you should think about leaving.”

“Stop blaming and start creating a more positive relationship. When you respond with over the top negativity, you make the situation worse. People know when you don’t respect them and will often respond in kind.”

The Long March to Unhappiness

“Kala was caught in the boiling frog syndrome. When you’re in warm water and the heat’s turned up slowly, you don’t notice. You get used to it, whatever “it” is: being marginalized, unappreciated, treated unfairly, or taken for granted. The hot water feels normal, and we stay, even when it hurts… ‘I though I couldn’t do better. They devalued me, so I devalued myself.’… Kala’s problem is not unusual. It’s rarely one problem at work that leas us across the happiness line. More often, it’s a combination of many smaller challenges, seemingly logical compromises, and unending pressure. What kala did that’s less common, however, was to listen to her inner voice and bravely take a stand on what she wanted from her work experience.”

“overwork is a trap… it is not a good coping mechanism for stress. It makes things worse as we ignore our relationships, cut out fun, and eat and sleep poorly. “

Hearing the Wake Up Call

Physical wake up calls:

  • Eating too much or too little.
  • Difficulty sleeping, or sleeping too much.
  • Chronic Fatigue
  • Gastrointestinal issues
  • Headaches
  • Neck and back problems
  • Tightness in the chest
  • Too many colds and other seasonal illnesses
  • Onset or worsening of chronic health problems
  • Not smiling or laughing as much as you used to


Emotional wake up calls:

  • Seeing the glass half empty when you’re normally a half full kind of person
  • Seeing even small problems as insurmountable obstacles
  • Feeling sad more often than normal
  • Having difficulty snapping out of a bad mood
  • Feeling unappreciated or taken for granted
  • Feeling exhausted at the idea of doing something new and different
  • Believing that no matter what you do, it won’t be enough
  • Dreading your work
  • Getting frustrated easily or having a short fuse


Relational wake up calls:

  • Most conversations are terse and task-oriented
  • People say things like: “are you ok?” “Are you mad at me?” “you never listen to me anymore”
  • You are not interested in getting to know your coworkers
  • People in your life and at work are distancing themselves from you
  • People get quiet when you enter a room
  • You find yourself disagreeing and fighting with people about minor things
  • You are prone to criticize or blame others
  • You overreact when people disappoint you
  • You can’t remember when you last had a good time with coworkers – or anyone else.

Four Stages of the Journey from Despair and Resignation to Happiness

Stage One: Get Me the Hell Out of Here
Emotional self-awareness: Allow yourself to feel, really feel, those primal emotions.
Emotional self-control: Even if you think it might be time to leave, it’s a mistake to make decisions in amygdala hijack, when our limbic brain – not our rational brain – is calling the shots.
Positive outlook: When we choose optimism over pessimism, the parts of our nervous system that are involved in the stress response begin to lose power and we’re able to remain calm, energized, and focused

Stage Two: Figure Out What You Like and Hold Steady, Even When It’s Tough
“You’ve got to like what you do. You’ve got to find meaning in it and you have to feel that what you do will make a difference.”

Stage Three: Honestly Assess Your Work Situation
What’s really going on in your organization? Is the culture as powerful and toxic as you think it is? Are there any redeeming values that you can focus on? There usually are, and people have a hard time fighting you if you lead with something inspiring about the company, its noble purpose, and its values.

The Basic lesson here is that if we want to assess our work situation fairly, we have to let go of the habitual ways we view people and our work experience.

Stage Four: Run Toward the Future, Not Away From the Past
Sometimes running away is the right thing to do, but it’s better – much better – to run toward something… It’s important to understand that when you’ve heard a wake up call, you need to engage optimism and commit to a positive outlook about the future.

For intentional change to work, you also need to tap into confidence and self-efficacy. Trust yourself: if you’ve heard the call, and if you commit to moving toward a dream rather than running away, you are ready to craft a personal vision and a plan to get there.

Sharing Happiness at Work

“Cultivating happiness at work is a deliberate, conscious act. You now know what it takes: finding and living your purpose, focusing passionately on your future, and
building meaningful friendships.”

“…Create a resonant microculture on your team. A resonant microculture is marked by a powerful and positive emotional climate as well as shared purpose, hope, vision, and norms that support happiness and success. Everyone is supported to work hard and work smart, while also feeling good about themselves and their accomplishments… Take charge of the emotional climate of your team, commit to a shared purpose and vision, and create emotionally intelligent norms to support healthy ways of working together.”

“… Throughout his career, Roberto has worked to humanize his organizations, making it possible for people to learn, grow, and thrive… One of the ways Roberto has brought this to life has been to focus on culture, something he knows to be one of the most important drivers of individual and collective success… Unfortunately, too many of our organizations’ cultures do not help us to accomplish our goals, much less be happy. They are toxic: they stifle talent, hijack success, and make us miserable.”

Signs of Toxic Cultures:

  • Intense pressure to get short-term results
  • Taboos against speaking up to power
  • Us versus them mentality
  • Dysfunctional competition
  • Lots of talk about values but not enough action
  • Lack of clarity around a vision
  • Disrespect
  • Lack of appreciation
  • Pessimism
  • Incivility and hurtfulness tolerated or even encouraged
  • Inequity, absence of meritocracy, and injustice


Signs of Resonant Cultures:

  • A sense of unity around a noble purpose
  • Overt commitment to virtues and values like honesty, forgiveness, gratitude, wisdom, and love
  • A clear, inspiring, and shared vision of the future
  • Generosity of time, talent, and resources
  • Taboos against hurtful treatment of others, dishonesty, and cynicism
  • Respect for the individual’s right to grow and develop
  • Celebration of differences
  • Compassion and humane treatment of everyone in good times and bad
  • Fairness and justice
  • Integrity
  • Fun

“In Primal Leadership… ‘great leaders move us. They ignite our passion and inspire the best in us… Great leaders are awake, aware, and attuned to themselves, to others, and to the world around them. They commit to their beliefs, stand strong in their values, and live full, passionate lives.’.. Today each and every one of us must be a resonant leader.”

Create a resonant microculture, shape your team’s emotional reality, seek common purpose, nurture hope and your team’s shared vision.

Commit to Emotionally Intelligent Team Norms

  • Seek to understand each other’s viewpoints and feelings
  • Actively care for people
  • Respect and accept people for who they are
  • Connect with people around higher purpose and dreams
  • Engage in open, honest dialogue
  • Don’t shy away from conflict, but don’t harm people or relationships
  • Be reliable and consistent to build trust
  • Take the lead and also be a good follower
  • Celebrate success
  • Adopt norms that support a sense of belonging

TL;DR
Life is too short to be unhappy at work.
Free yourself from the happiness traps that keep you miserable.

  • Be authentically yourself and celebrate others for who they are
  • Live the virtues and values that support purpose, hope and friendships
  • attend to and honor your feelings
  • Celebrate and suffer together
  • Be calm
  • Be brave.
  • Fight Oppression
  • Break the rules about overwork; just don’t do it anymore
  • be compassionate with yourself and others
  • Love yourself and find something to love and honor in everyone
  • Have fun

Men’s Short Story Night I: The Tale of Thorstein Staff-Struck

For the first meeting of our men’s short story night I chose to select three short Icelandic tales, or þáttr: The Tale of Thorstein Staff-Struck, The Tale of Thorstein Shiver, and The Tale of Audun of the West Fjords. Since I don’t have all the time in the world I will only discuss the longest story here, Thorstein Staff-Struck.

The Tale of Thorstein Staff-Struck

There are many aspects of this tale that can easily go unappreciated without further analysis of society during 13th century Iceland. For this reason I will break up my discussion of Thorstein Staff-Struck into a few different sections.

Summary

This short tale originated around the mid-13th century and chronicles the conflict between the houses of Thorarinn and Bjarni Brodd-Helgason at Hof, Iceland. Thorarinn is a poor, bad tempered, retired viking, but despite his poverty he is a bondi who breeds horses. His son, Thorstein, is regarded as a good, even-tempered man with the strength and determination to do the work of three. Thorstein becomes involved in a horse fight with Thord, a horse breeder for Brjani Brodd-Hegason. When Thord notices that his horse is losing he strikes Thorstein’s horse. In return, Thorstein strikes Thord’s horse, causing Thord to strike Thorstein. Thorstein dismisses the strike as an accident so as to avoid conflict. Two of Bjarni’s farmhands, Thorvall and Thorhall, create an insulating nickname for Thorstein, Staff-Struck.

Months later, Thorstein is accused by his father of being a ragr for running away from conflict and not demanding compensation. Because of this accusation by his father, Thorstein confronts and kills Thord. Thorstein then notifies a local woman that Thord has been gored by a bull and is dying. The woman then later informs Bjarni at dinner. Bjarni, as gothi, outaws Thorstein for killing Thord, but does not actively pursue him or remove him from the lands.

Later on, Thorvall and Thorhall insult Bjarni for not properly avenging his thingmen, causing him to command the two to find and kill Thorstein. Thorstein easily kills both of them and ties their corpses to their horses who trot home to Bjarni’s farm. Rannveig, Bjarni’s wife, convinces him that he should kill Thorstein, fearing that the unavenged death of the three thingmen by an outlaw would damage their honor. Against Rannveig’s wishes that he go with an assembly of men, he sets out alone to fight Thorstein.

Thorstein and Bjarni enter into a duel. During the fight Bjarni asks for multiple stoppages to get a drink of water, tie his shoe, sharpen his sword, etc. It soon becomes apparent to Bjarni that Thorstein has been holding back, at which point he offers to end the fight if he takes the place of the three men he killed. Thorstein accepts.

Bjarni then tells Thorarinn, that he has slain Thorstein, and offers to support him in his son’s absence. Thorarinn then delivers a diatribe against gothis who support the dependents of people that they kill, at which point he attempts to kill Bjarni. Bjarni easily defends against the attack and informs him that he and Thorstein had actually come to terms. Bjarni, Thorstein and Thorarinn then move to Hof and live successful lives.

Societal Relevance and Terms

Bondi –A bondi during this time was essentially the core of Norse society, formed by farmers and craftsmen, and constituted the widespread middle class. Bondis were free men and had rights entitling them to such things as the use of weapons and to join the Thing. In Iceland, a Bondi was subject to the authority of a gothi, so their rights as free men were subject by law to a minimum in properties. Thereafter a bondi was considered a follower of the gothi and his vote as a thingmen was influenced by the will of the gothi in the Althing.

Thing – In early Germanic society a thing was the governing assembly of freemen. The roots of the word thing, whether of norse or old-english origin, essentially mean “an assemblage, or a coming together of parts”. In the viking age things functioned as both parliaments and courts. Their purpose was to solve disputes and make political decisions; often their sites were also places of public religious activity.

In pre-Christian, clan oriented culture of Scandinavia, and later Iceland, members of clans were obliged to avenge their dead and mutilated relatives. This value on vengeance often created a cyclical pattern of violence, and as a result, feuding is often see as the most common form of conflict resolution used in Viking society. However, things often served as balancing structures used to reduce tribal feuds and and to help avoid social disorder. Things played an important role as forums for such topics as conflict resolution, marriage alliances, power display, honor, and inheritance settlements.

The thing’s negotiations were presided over by the lawspeaker, chieftain or king, but in reality were dominated by the most influential members of the community, typically being the heads of clans and wealthy families, but in theory the system of rule was one-person one-vote.

In particular, Iceland was divided into four administrative quarters with a fixed number of 39 gothis. Unique to Iceland was the organization of the Althing, which served as the legislative and judicial institution at the national level. Thingvellir was the site of the Althing, and was a place where people came together once a year to bring cases to court, render judgments, and discuss laws and politics. Besides the Althing, there were local assembly districts in each of the four quarters of Iceland. Each spring an assembly was held called the vorthing, brought together by three of the gothis who lived in each local assembly district.

Gothi – A gothi is a chieftain-priest in Old Norse. The title is most commonly associated with medieval Iceland where it was continued to be used as a secular political title after Christianization. During the pagan era, the gothi was a local chieftain who also served in the role of priest. After settlement in Iceland, a hofgothi was a temple priest. The hofgothi was typically a wealthy and respected man in his district as he had to maintain the communal hall, or hof, in which community religious observances and feasts were held. After the year 1000, when Christian conversion began to occur in Iceland, the term gothi had lost its sacred connotations and come simply to mean the local chieftain.

Staff-Struck – The nickname given to Thorstein is a play on the Nordic practice of shame-stroke. The act of creating an insulting nickname was a serious crime, carrying a penalty of lesser outlawry for three years. The passive acceptance of this nickname, combined with with Thorstein’s initial refusal to pursue legal action against Thord causes a cowardly stigma, acknowledged especially by his father.

Shame-Stroke – Shame-stroke is the act of cutting off or stabbing a man’s ass cheek; the injury was symbolically representative of the anal rape of a man. The injury was designed to not only be debilitating, but also sexually humiliating through the symbolic feminization of the victim by turning him into an ergi. It was considered symbolic of the loss of power in the Norse society, where power and status were very important, as well as an outward declaration of the physical and social power that the dominator wielded over the dominated. The feminization of the victim also typically came with an insulting cognomen indicating status degradation, and once the name stuck, ensured that the shame would not be forgotten.

Nith, Argr, Ragr, Ergi – All four of these are essentially terms indicating the loss of honor within Germanic society. More particularly, argr (roughly pronounced arr-yur), ragr (roughly pronounced raw-yur), and Ergi were very severe insults which demanded retribution if the accusations had been made without justification. These three words all indicated an individuals “unmanliness”, and declared them to be a “male bottom” in a homosexual relationship.

Interpretations and Themes

Cultural Aggression

The tale has often been seen as a critique of the aggressive nature of medieval Icelandic culture. Under the system at the time, an individual was expected to avenge all transgressions or be seen as dishonorable or cowardly. The ending fight between Bjarni and Thorstein can be interpreted as being a cultural display of manliness when both parties are in fact tired of the cycle of perpetual violence. Both men are forced to blows to put up a display of violence so they can be seen as assertive, despite neither of them wishing to do actual harm to the other. In this regard, it can be seen that Bjarni and Thorstein are caught between respect and indignation for heroic code that demands vengeance despite the absurdity of the situation.

Nicknames

Of obvious importance to this tale is that of the Nordic practice of nicknaming, which I will not further expand upon.

Gendered Insults

All of the negative terms used in this tale refer to a man being unmanly, or womanly. Even the claimed goring by a bull of Thord has been interpreted as a sexual metaphor for anal rape. In addition to all of the insults used, even the actions of women are seen as childish and unintelligent.

Feminism is For Everybody

Feminism is For Everybody by Bell Hooks

This book, is without a doubt, the single worst piece of published text I have ever read. It pains me, as a man that identifies as a feminist, that a book entitled “feminism is for everybody” is as poorly written as it this, with grammatical errors, logical fallacies, and extremely polarizing opinions abounding. Besides all of these detracting attributes of the book, Bell Hooks also has decided to not cite any of her sources, so the reader is unable to tell if everything she accepts as true is her personal opinion or something else.

It is ironic to me that a book with this title has the phrase “male domination” appearing 53 times in its 118 pages, and the phrase “white supremacist capitalist patriarchy” appearing 15 times, let alone without even giving any kind of definition of how she would like the reader to interpret her use of these polarizing phrases. In addition to these polarizing phrases, there are passes such as the following:

“If welfare not warfare was sanctioned by our government and all citizens legally had access to a year or two of their lives during which they received state aid if they were unable to find a job, then the negative stigma attached to welfare programs would no longer exist.”

“Many men blame women working for unemployment, for their loss of the stable identity being seen as patriarchal providers gave them, even if it was or is only a fiction.”

“… but as the movement progressed evidence showed… that children were also victims of adult patriarchal violence enacted by women and men.”

“The term ‘patriarchal violence’ is useful because unlike the more accepted phrase ‘domestic violence’ it continually reminds the listener that violence in the home is connected to sexism and sexist thinking, to male domination.”

“Clearly most women do not use violence to dominate men… but lots of women believe that a person in authority has the right to use force to maintain authority. A huge majority of parents use some form of physical or verbal aggression against children.

What’s worse is the abhorrent punctuation, or lack thereof, that she uses. For example, the following passage,

“More than other religious faith Christian doctrine which condones sexism and male domination informs all the ways we learn about gender roles in society”

is pretty much unintelligible without proper use of commas. Without them, the reader must re-read the sentence a handful of times and make assumptions about what is being said. I am assuming the sentence that she intended to construct was: “More than other religions, Christian doctrine, which condones sexism and male domination, informs us of all the ways we learn about gender roles in society.” Is it christian doctrine that condones sexism and male domination, or is it christian doctrine that only condones sexism? Does christian doctrine alone inform, or christian doctrine and male domination? What I’m getting at is that no one is able to understand what the verb informs is applied to, and who is the subject? Informs is a 3rd person present tense verb, but what is the subject? us?

Origin

Origin by Dan Brown

Plot

Origin, following the formulaic yet entertaining Dan Brown suspenseful writing style chronicles the fifth fast paced and perilous adventure that Robert Langdon is involuntarily thrust into. The story begins with prominent computer science and tech billionaire Edmund Kirsch requesting the input of religious world leaders in how best to announce a discovery he has made that will prove all world religions wrong. The three religious leaders he meets with are deeply shaken by his presentation, and even begin to frantically devise a plan to try to control the backlash of his discovery, as well as fear for their safety in obtaining this knowledge. Two of the religious leaders are later found dead, under very suspicious circumstances.

A short time later, Kirsch invites prominent individuals from all over the world to a presentation at the Guggenheim museum in Bilboa, Spain, where he indicates he will be announcing a breakthrough that will change the religious world. Upon entering the Guggenheim, Langdon is given a headset in which a virtual docent gives him a personal guided tour of the museum, whom Langdon eventually learns is an advanced, first of it’s kind, AI-complete intelligent artificial agent named Winston.

Once the theatrical presentation begins, it is revealed that Kirsch has found an answer to the deeply philosophical questions “where do we come from?” and “where are we going?” In classic Dan Brown fashion, the night is abruptly derailed as Kirsch is assassinated during his presentation, in front of the live audience as well as an online audience numbering in the millions. It is revealed that the assassin has been recruited by a seemingly omniscient and mysterious person, only known as “The Regent”, who has the power and influence to manipulate almost anyone.

The pace of the night quickly accelerates as Langdon finds himself eluding authorities with the beautiful Ambra Vidal, Guggenheim curator as well as fiancee of the future king of Spain, due to his attempt to save Kirsch after being informed of his impending death mere seconds before its occurrence. The suspicion of the involvement of the catholic church and ties back to the Spanish royal family lead Langdon and Vidal to flee in an attempt to find a way to release Kirsch’s presentation to the world. Langdon and Vidal are tasked with discovering the long pass phrase to Kirsch’s personal, custom made, cell phone, which upon being unlocked will have the ability to share his theatrical presentation to the world. At the same time, they discover that Kirsch had been suffering from terminal pancreatic cancer, and was only estimated to have a few days left to live at the time of the presentation.

After a briskly moving and dangerous night, Langdon and Vidal arrive at the facility that houses the supercomputer that Winston operates on. Upon getting Winston to queue the presentation to upload to the world, it (he?) reveals startling information about the events of the night. It reveals to Langdon and Vidal that it is the one posing as The Regent, and it was the entity responsible for employing individuals to assassinate two of the religious leaders, as well as Kirsch. Winston elucidates its actions by concluding that Kirsch was going to die in the very near future anyway, and that by bringing about his death in this fashion, the public attention of his presentation would grow exponentially. The story concludes after the presentation is shared with the world, but the content is not grave, as is hinted previously, rather, it’s hopeful and suggests the future of man is to become one with technology.

Thoughts and reactions

Now, I have to say, much of my wanting to review this book to the extent that I have is in response to an article written by Matthew Walther on the website TheWeek, entitled “Dan Brown is a very bad writer”. The article is, in essence, a diatribe against Brown’s writing style and the author’s interpretation that the way in which Brown presents architectural, technological, geographical and historical information suggests the common reader is somewhat of a dimwit. The aforementioned article suffers from a number of logical fallacies, and conforms to the all too common, mentally arrogant belief that takes some form of the argument “Dan Brown is low brow literature that is below me, an intelligent person who enjoys real literature such as that written by Dostoevsky and Tolstoy, blah blah blah.” To downplay Brown’s skill as a writer who found a way to create an engaging, fast reading, culture weaving, semi-didactic and horizon expanding novel for individuals who would not otherwise be exposed to the locations, architecture and technology presented in his books is a disservice to all literature. If you do not enjoy his writing, that is fine, but to compare it to the likes of classical literature heavyweights and judge it in the same vein is to, as Einstein put it, judge a fish by its ability to climb a tree.

One particularly bothersome section of this piece goes like this:

“Brown thinks that a “classicist” is someone who likes old things rather than a scholar of classical languages, that Harvard professors of subjects real or imaginary say things like “Nostradamus was the most famous prognosticator of all time,” that it would cost untold billions to create a computer with the epoch-making ability to tell you what the Dow closed at on August 23, 1974, that there exists a “priceless manuscript,” as opposed to a paperback book, entitled The Complete Works of William Blake, or that this or any manuscript has standard page numbers. Page numbers are in fact a major pitfall for Brown, at one point leading me to wonder how many books he has actually opened in his life, let alone read:

“It’s a clever decoy.”

“You’ve lost me,” Langdon said, eyeing the painting.

“Edmond chose page 163 because it’s impossible to display that page without simultaneously displaying the page next to it — page 162!” [Origin]

Reader: If you ever come across a book in which it is possible to “display” page 163 without also displaying page 162, write to the publisher. You are almost certainly due a refund of some kind, to say nothing of an explanation.”

Now, I understand most people are not intimately familiar with say, robotics, but the most vexing part of this diatribe is the conclusion that “Brown thinks… it would cost untold billions to create a computer with the epoch-making ability to tell you what the Dow closed at on August 23, 1974.”

Alas, the point is completely missed that untold billions would be required to create some kind of AI complete agent that is able to converse, understand abstract notions, create its own works of art, etc. To compare the capabilities of this entity with that of the google assistant, let me inform you that it was groundbreaking when you could begin to use pronouns in conversations with the assistant, resulting in possible conversations such as:
“Hey google, in what year was the movie Bullitt filmed?

What location was it filmed at?”

It’s safe to say, simply, that nearly all bashing of Dan Brown novels I have come across are the result of mental arrogance and lack of understanding of what purpose the novel was written for.

Analysis

Brown, in my opinion, does a great job of weaving together culture, architecture, and history that may otherwise be foreign to American readers. In addition, he shares aspects of technology, art, music, literature, and history that gives the reader a feeling of learning about more intellectual facets of life, all the while indulging in a mystery that is tailored to match the speed and attention span required of watching modern day movies. He has found a way to weave classical, slow moving literature and art with a fast moving narrative more in tune with the speed of modern times.

Speed of Brown novels

The Langdon series of books all have a structure comprised of short, interleaved chapters with viewpoints alternating between the main protagonist, Langdon, the antagonist, another “victim” type protagonist that Langdon eventually interacts with, and the beautiful woman who he eventually partners up with during the events over the course of the novel. Each chapter typically ends with a suspenseful sentence, such as “who could possibly want me dead?  Frighteningly, he could come up with only one logical answer.”
or,
“‘Thank goodness,’ Winston said. ‘Listen carefully. We may have a serious problem.'”

The sharp, intriguing wrap up to each chapter, along with the brevity of each chapter, creates a feeling of “OK, just one more chapter”, which lends to the speed at which readers seem to progress through Dan Brown novels.

Cultural, technological, and occult exposure

In addition to describing and referencing literature and the arts, Brown paints a detailed picture of foreign cities and countries that are largely associated with the enlightenment and classical intellectual progress. He gives the reader exposure to architecture and locations that they likely have heard of before, but have not had described in such didactic detail; his writing invokes a feeling of connection with the more intellectual and enlightened side of life.
Examples of his foreign architectural lessons include:
“The Guggenheim Museum in Bilbao, Spain, looked like something out of an alien hallucination – a swirling collage of warped metallic forms that appears to have been propped up against one another in an almost random way. Stretching out into the distance, the chaotic mass of shapes was draped in more than thirty thousand titanium tiles that glinted like fish scales and gave the structure a simultaneously organic and extraterrestrial feel, as if some futuristic leviathan had crawled out of the water to sun herself on the riverbank.”

References to historic art include:
“‘Klein is best known for his blue paintings, but he is also known for a disturbing trick photograph called Leap into the Void, which caused quite a panic when it was revealed in 1960.’
Langdon had seen Leap into the Void at the Museum of Modern Art in New York. The photo was more than a little disconcerting, depicting a well-dressed man doing a swan dive off a high building and plunging toward the pavement. In truth, the image was a trick – brilliantly conceived and devilishly retouched with a razor blade, long before the days of Photoshop.”

Besides the “classier”, historical creations Brown exposes to the reader, he typically merges innovations of the past with current innovations in a way that creates a feeling of mystique; a sense of mystery around the general lack of knowledge of things that have been created long ago, and things that are nascent.
Semi-scientific aspects of his writing include excerpts such as:
“For Langdon, the only familiar sensation was the sterile tang on the back of his tongue; museum air was the same worldwide – filtered meticulously of all particulates and oxidants and then moistened with ionized water to 45 percent humidity.”
and
“I hope Ludwig van Beethoven gets his cut, Langdon thought, fairly certain that the original inventor of bone conduction technology was the eighteenth-century composer who, upon going deaf, discovered he could affix a metal rod to his piano and bite down on it while he played, enabling him to hear perfectly through vibrations in his jawbone.”

Adding to these informational and mysterious facets of his writing, he furthers the curiosity piqued by readers by speaking in detail about, and having illustrations of, historic symbols as well as novel ones that seem to create a foreign language that the reader is unaccustomed to. Adding all of these elements together results in an easy to digest way to teach surface level things while evoking a deep sense of mystery and intrigue.

One prominent example of this “symbology” occurs in describing a piece created by Kirsch himself, with the following excerpt:

“‘Edmund did this?’ grumbled a mink-clad woman with Botoxed lips. ‘I don’t get it.’
The teacher in Langdon could not resist. ‘It’s actually quite clever,’ he interrupted. ‘So far it’s my favorite piece in the entire museum.’
The woman spun, eyeing him with more than a hint of disdain. ‘Oh really? Then do enlighten me.’
I’d be happy to. Langdon walked over to the series of markings etched coarsely into the clay surface.
‘Well, first of all,’ Langond said, ‘Edmond inscribed this piece in clay as an homage to mankind’s earliest written language, cuneiform.’
The woman blinked, looking uncertain.
‘The three heavy markings in the middle,’ Langdon continued, ‘spell the word ‘fish’ in Assyrian. It’s called a pictogram. If you look carefully, you can imagine the fish’s open mouth facing right, as well as the triangular scales on his body.’
…’And if you look over here,’ Langdon said, pointing to the series of depressions to the left of the fish, ‘you can see that Edmond made foot prints in the mud behind the fish, to represent the fish’s historic evolutionary step onto land.’
‘And finally,’ Langdon said, ‘the asymmetrical asterisk on the right – the symbol that the fish appears to be consuming – is one of history’s oldest symbols for God.’
The Botoxed woman turned and scowled at him. ‘A fish is eating God?’
‘Apparently so. It’s a playful version of the Darwin fish – evolution consuming religion.’ Langdon gave the group a casual shrug. ‘As I said, pretty clever.'”

Quotes and relatable excerpts

“Tolerance, Avila reminded himself. He had met countless men like these – simpleminded, unhappy souls, who had never stood for anything, men who blindly abused the liberties and freedoms that others had fought to give them.”

“‘For the human brain,’ Edmond explained, ‘any answer is better than no answer. We feel enormous discomfort when faced with insufficient data, and so our brains invent the data – offering us, at the very least, the illusion of order – creating myriad philosophies, mythologies and religions to reassure us that there is indeed an order and structure to the unseen world … Where do we come from? Where are we going? These fundamental questions of human existence have always obsessed me, and for years I’ve dreamed of finding the answers … Tragically, on account of religious dogma, millions of people believe they already know the answers to these big questions. And because not every religion offers the same answers, entire cultures end up warring over whose answers are correct, and which version of God’s story is the One True Story.'”

“Science is the antithesis of faith … Science, by definition, is the attempt to find physical proof for that which is unknown or not yet defined, and to reject superstition and misperception in favor of observable facts. When science offers an answers, that answer is universal. Humans do not go to war over it; they rally around it.”

“I’m paraphrasing here, but Gould essentially assured me that there was no question whatsoever among real scientists that evolution is happening. Empirically we can observe the process. The better questions, he believed, were: Why is evolution happening? And how did it all start? … he did illustrate his point with a thought experiment. It’s called the Infinite Hallway … It goes like this: imagine yourself walking down a long hallway – a corridor so long that it’s impossible to see where you came from or where you’re going … then behind you in the distance, you hear the sound of a bouncing ball. Sure enough, when you turn, you see a ball bouncing toward you. It is bouncing closer and closer, until it finally bounces past you, and just keeps going, bouncing into the distance and out of sight … The question is not: Is the ball bouncing? Because clearly, the ball is bouncing. We can observe it. The question is: Why is it bouncing? How did it start bouncing? Did someone kick it? Is it a special ball that simply enjoys bouncing? Are the laws of physics in this hallway such that the ball has no choice but to bounce forever? Gould’s point being, that just as with evolution, we cannot see far enough into the past to know how the process began … All we can do is observe that it is happening … And because the human mind is not equipped to handle ‘infinity’ very well, most scientists now discuss the universe in terms of moments after the Big Bang – Where T is greater than zero – which ensures that the mathematical does not turn mystical.”

“‘God is dead. God remains dead. And we have killed him. How shall we comfort ourselves, the murderer of all murderers?’
– Nietzsche
God is dead … Those who erase God… must be gods.”

“‘Did Edmond actually read all of these books in his library?’
‘I believe so, yes,’ Winston replied. ‘He was a voracious consumer of text and called this library his ‘trophy room of knowledge.””

“…my mother’s unwavering zealotry has a lot to do with my abhorrence of religion. I call it – ‘Newton’s Third Law of Child Rearing: For every lunacy, there is an equal and opposite lunacy.'”

“The Roswell saucer was a government weather balloon called Project Mogul.”

“The term ‘atheist’ should not even exist. No one ever needs to identify himself as a ‘nonastrologer’ or a ‘nonalchemist.’ We do not have words for people who doubt that Elvis is still alive, or for people who doubt that aliens traverse the galaxy only to molest cattle. Atheism is nothing more than the noises reasonable people make in the presence of of unjustified religious beliefs … That definition is not mine, by the way. Those words belong to neuroscientist Sam Harris. And if you have not already done so, you must read his book Letter to a Christian Nation.”

“The dark religions are departed & sweet science reigns.”

“Titled Missa Charles Darwin, it was a Christian-style mass in which the composer had eschewed the traditional sacred Latin text and substituted excerpts from Charles Darwin’s On the Origin of Species to create a haunting juxtaposition of devout voices singing about the brutality of natural selection.”

“Success is the ability to go from one failure to another with no loss of enthusiasm.
– Winston Churchill
‘Edmund’s favorite quote … He said it pinpoints the single greatest strength of computers … computers are infinitely persistent. I can fail billions of times with no trace of frustration. I embark upon my billionth attempt at solving a problem with the same energy as my first. Humans cannot do that.'”

“Chemists Stanley Miller and Harold Urey had conducted a legendary scientific experiment in the 1950s attempting to answer that very question (Where do we come from?). Their bold experiment had failed, but their efforts had been lauded worldwide and been known ever since as the Miller-Urey experiment… Apparently, the original Miller-Urey experiment had produced many more amino acids and complex compounds than Miller had been able to measure at the time. The new analysis of the vials even identified several important nucleobases – the building blocks of RNA, and perhaps eventually DNA.”

“If Professor England’s theory is correct, then the entire operating system of the cosmos could be summed up by a single overriding command: spread energy!”

“I’m sorry to have to show you this … but in every model I ran, the same thing happened. The human species evolved to our current point in history, and then, very abruptly, a new species materialized, and erased us from the Earth…. In a flash, Langdon realized what Edmond was describing. The Seventh Kingdom … It was called: Technicum… What you are seeing here is a rare evolutionary process known as obligate endosymbiosis. Normally, evolution is a bifurcating process – a species splits into two new species – but sometimes, in rare instances, if two species cannot survive without each other, the process occurs in reverse… and instead of one species bifurcating, two species fuse into one… Human beings are evolving into something different. We are becoming a hybrid species – a fusion of biology and technology. The same tools that today live outside of our bodies – smartphones, hearing aids, reading glasses, most pharmaceuticals – in fifty years will be incorporated into our bodies to such an extent that we will no longer be able to consider ourselves Homo Sapiens… I urge you to place your faith in the human capacity for creativity and love, because these two forces, when combined, possess the power to illuminate any darkness… May our philosophies keep pace with our technologies. May our compassion keep pace with our powers. And may love, not fear, be the engine of change.

“Creationists are today’s flat-earth advocates, and I would be shocked if anyone still believes in Creationism a hundred years from now.”

“Anthropological data clearly showed that cultures practicing religions historically had outlived non-religious cultures. Fear of being judged by an omniscient deity always helps inspire benevolent behavior.”

“Love is from another realm. We cannot manufacture it on demand. Nor can we subdue it when it appears. Love is not our choice to make.”

“True or false?

I + XI = X


‘One plus eleven is ten? False.’
Langdon gently reached out and took her hand, guided her around to where he had been standing. Now, when Ambra glanced down, she saw the markings from Langdon’s vantage point.
The equation was upside down.


X = IX + I


Startled, she glanced up at him.
‘Ten equals nine plus one… Sometimes, all you have to do is shift your perspective to see someone else’s truth.'”

“Love is not a finite emotion.
We don’t have only so much to share.
Our hearts create love as we need it.
Just as parents could love a newborn instantly without diminishing their love for each other, so now could Ambra feel affection for two different men.
Love truly is not a finite emotion, she realized. It can be generated spontaneously out of nothing at all.”

“I am surprised to hear your dismay, Professor… considering that your own faith is built on an act of far greater ethical ambiguity.
For God so loved the world, that he gave his only begotten Son.
Your God brutally sacrificed his son, abandoning him to suffer on the cross for hours. With Edmond, I painlessly ended a dying man’s suffering in order to bring attention to his great works.”

“We should all do what so many churches already do – openly admit that Adam and Eve did not exist, that evolution is a fact, and that Christians who declare otherwise make us all look foolish… I don’t believe that the same God who endowed us with sense, reason and intellect intended for us to forgo their use.”

More Thoughts

The notion of technology playing a part in evolution is not new. I cannot recall where I first encountered the notion, but what seems to make more sense to me is that technology is not a separate “kingdom”, but rather a continuation of human evolution. Evolution has been shown to be occurring at increasing rates as time progresses, but eventually “natural” evolution could no longer keep pace with this rate. Thus, technology serves as a means of accelerating human evolution beyond what is biologically possible, changing humans in an exponentially increasing rate.

Belief vs Faith

From a philosophical stand point, I would also like to comment on the distinction between belief and faith, as the latter is a central part of this novel. The easiest way for me to illustrate the difference between the two, as used by philosophers in creating logical arguments, is to define belief as a subjective truth based on objective evidence. An example of this could be if you’re playing baseball as an outfielder, see the batter hit the ball far into left field. Because you have observed projectiles (balls) being hit into the air hundreds of thousands of times, you have a model in your head of where the ball will go. Where you think the ball will end up is your belief of where the ball will land. It is what you think will be true given facts (objective truths), the ball has been hit, it has this initial trajectory, I have seen this many times before, etc.

Faith can then be defined as a subjective truth based on subjective evidence. People typically think of religious faith, but there can be other types of faith as well. An example would be the statement “God must exist because my mother had cancer, and without any medical intervention, she no longer has it.” The existence of God is your subjective truth, and the evidence you have is also subjective; it cannot be proven objectively. The initial diagnoses could have been incorrect, etc.
One may say “well, some people of faith have no evidence at all!” My counterargument to this is that no one of sound mind can come to a conclusion without premises or evidence. “well,” I have been told “some people have faith because they are just told to.” That is valid, but I would argue that there is still evidence for them to draw their conclusions. Typically this takes some form of “I have been taught most everything else in my life by this person, and all of that I have observed to be true. I have no reason to question things they have told me. Therefore this religious faith must also be true.”

My First Summer in the Sierra

My First Summer in the Sierra by John Muir

Summary

My First Summer in the Sierra is based upon John Muir’s personal diary, beginning June 3rd, 1869 and ending September 22nd of the same year.  During this time he was employed by a sheep owner named Mr. Delaney to assist in herding his flock to the headwaters of the Merced and Tuolumne rivers.  Although he was employed to assist in the sheep herding, he was left mostly to his own devices to explore, investigate the flora, bask in the religious grandeur of the alpine scenery, and document it, all while being accompanied by a St. Bernard named Carlo.

Personal Relation To The Book

After moving from California back home to Minnesota, I found myself soon lamenting the lack of natural beauty and respect commanded by the high sierras.  Among other outdoors type books, I was hoping this would assist in scratching my itch for alpine adventure, though, not so surprisingly, it only exacerbated that itch.

One of the things to which I could easily relate was Muir’s interpretation of these vistas as being religious; seemingly literally bringing him closer to god.  One thing I have always had a difficult time elucidating to others is the bond one feels with a mountain when they are on it by themselves, in the back country, with no one around.  In doing such a thing by oneself, everything is amplified; the emotions of every little noise you hear are heightened, the feeling of accomplishment when summitting is enhanced, the work involved even seems to be greater when one realizes they are the only one that can safely bring themselves out alive.  This appeared to be something Muir realized, and in feeling so connected to the landscape, in it’s immense beauty, he was positive that there could not possibly be any more manifest evidence of the existence of God than in the Yosemite valley.  

One thing is also evident when reading My First Summer: Muir was a damned crazy man.  He longed to climb trees during storms just to experience the storm the way a tree would.  To charge at bears to see what they would look like while running; it is somewhat surprising that his natural curiosity didn’t result in his demise.  I do find it difficult to believe that this “interview”, as he calls it, actually happened, along with the story of him “feeling” like his old professor friend was in the valley, so he rushed head long down a mountain to realize he was indeed there.

His eloquence in documenting this vastly emotional and religious summer has surely helped advanced his fame; I am curious though, how much time he spent post-processing his manuscripts to achieve the literary beauty we are left with today.  One more thing is obvious from this work, and that is Muir loved to be overly didactic when it comes to flora.  The book is seemingly bubbling with Muir’s excitement and enthusiasm for the Yosemite valley; appearing to be one of the first of many zealots worshiping the spiritual power of the region.

Favorite Quotes

Now, some of the quotes from the book that were saturated with highlighter:

“We are now in the mountains and they are in us, kindling enthusiasm, making every nerve quiver, filling every pore and cell of us.  Our flesh-and-bone tabernacle seems transparent as glass to the beauty about us, as if truly an inseparable part of it, thrilling with the air and trees, streams and rocks, in the waves of the sun – a part of all nature, neither old nor young, sick nor well, but immortal.”

In speaking regarding the lowly life of a shephard:
“Coming into his dingy hovel-cabin at night, stupidly weary, he finds nothing to balance and level his life with the universe.  No, after his dull drag all day after the sheep, he must get his supper… and depends on the genial stupefaction of tobacco for the rest.”

“I have oftentimes found the curious twining lily… Like man, it has few friends, and the blind question, ‘Why was it made?’ goes on and on with never a guess that first of all it might have been made for itself.”

“Another glorious Sierra day in which one seems to be dissolved and absorbed and sent pulsing onward we know not where.  Life seems neither long nor short, and we take no more heed to save time or make haste than do the trees and stars.  This is true freedom, a good practical sort of immortality.”

“The daylight fades, the color spell is broken, and the forest breathes free in the night breeze beneath the stars.”

In speaking about escaped sheep:
“Having escaped restraint, they were, like some people we know of, afraid of their freedom, did not know what to do with it, and seemed glad to get back into the old familiar bondage.”

“Oh, these vase, calm, measureless mountain days, inciting at once to work and rest!  Days in whose light everything seems equally divine, opening a thousand windows to show us God.  Nevermore, however weary, should one faint by the way who gains the blessings of one mountain day; whatever his fate, long life, short life, stormy or calm, he is rich forever.”

“Every morning, arising from the death of sleep, the happy plants and all our fellow animal creatures great and small, and even the rocks, seemed to be shouting, ‘Awake, awake, rejoice, rejoice, come love us and join in our song.  Come!  Come!’  Looking back through the stillness and romantic enchanting beauty and peace of the camp grove, this June seems the greatest of all the months of my life, the most truly, divinely free, boundless like eternity, immortal.  Everything in it seems equally divine – one smooth, pure, wild glow of Heaven’s love, never to be blotted or blurred by anything past or to come.”

“So extravagant is Nature with her choicest treasures, spending plant beauty as she spends sunshine, pouring it forth into land and sea, garden and desert.  And so the beauty of lilies falls on angles and men, bears and squirrels, wolves and sheep, birds and bees, but as far as I have seen, man alone, and the animals he tames, destroy these gardens.”

In regards to his encounter with a bear:
“… I thought I should like to see his gait in running, so I made a sudden rush at him, shouting and swinging my hat to frighten him, expecting to see him make haste to get away,  But to my dismay he did not run or show any sign of running.  On the contrary, he stood his ground ready to fight and defend himself, lowered his head, thrust it forward, and looked sharply and fiercely at me… We stood staring at each other in solemn silence within a dozen yards or thereabouts… How long our awfully strenuous interview lasted, I don’t know; but at length in the slow fullness of time he pulled his huge paws down off the log, and with magnificent deliberation turned and walked leisurely up the meadow…”

“As to our own work, duty, influence, etc., concerning which so much fussy pother is made, it will not fail of its due effect, though, like a lichen on a stone, we keep silent.”

“No wonder the hills and groves were God’s first temples, and the more they are cut down and hewn into cathedrals and churches,the farther off and dimmer seems the Lord himself.”

“It seems strange that visitors to Yosemite should be so little influenced by its novel grandeur, as if their eyes were bandaged and their ears stopped.  Most of those I saw yesterday were looking down as if wholly unconscious of anything going on about them, while the sublime rocks were trembling with the tones of the mighty chanting congregation of waters gathered from all the mountains round about, making music that might draw angels out of heaven.”

This Is Water

This Is Water: Some Thoughts, Delivered on a Significant Occasion, about Living a Compassionate Life by David Foster Wallace

Summary

This is Water is an essay written by writer and philosopher David Foster Wallace, delivered as a commencement address in 2005.  It is a short essay, composed at times with only a few words per page, reading just as much like poetry as philosophical essay.  At the heart of the essay the author asks, and in turn answers the questions:
How do we keep from going through adult life unconsciously, comfortably entrenched in habit?
How do we remove ourselves from the foreground of our thoughts and achieve compassion?

In short, Wallace makes his case to the 2005 graduating class of Kenyon College, that the true value of a liberal arts education is “learning how to think”, as the platitude often goes, which he expands to mean having the ability to choose to live your life consciously and compassionately.  The first few sentences explain the essay’s namesake: 
“There are these two young fish swimming along and they happen tot meet an older fish swimming the other way, who nods at them and says, ‘Morning, boys.  How’s the water?’  And the two young fish swim on for a bit, and eventually one of them looks over at the other and goes, ‘What the hell is water?'”
He ultimately resolves to explain his didactic parable as an example that many adults, who have not been taught how to think, live the majority of their life in an unconscious state, completely unaware of the ubiquitous things around them.

Favorite Quotes

What follows are some of the sentences that were highlighted by the time I finished reading the essay.

“True, there are plenty of religious people who seem arrogantly certain of their own interpretations, too.  They’re probably even more repulsive than atheists, at least to most of us here, but the fact is that the religious dogmatists’ problem is exactly the same as the story’s atheists – arrogance, blind certainty, a closed-mindedness that’s like an imprisonment so complete that the prisoner doesn’t even know he’s locked up.  The point here is that I think this is one part of what the liberal arts mantra of “teaching me how to think” is really supposed to mean: to be just a little less arrogant, to have some “critical awareness” about myself and my certainties… because a huge percentage of the stuff that I tend to be automatically certain of is, it turns out, totally wrong and deluded.”

“Probably the most dangerous thing about an academic education, at least in my own case, is that it enables my tendency to over-intellectualize stuff, to get lost in abstract thinking instead of simply paying attention to what’s going on in front of me.  Instead of paying attention to what’s going on inside me.  As I’m sure you guys know by now, it is extremely difficult to stay alert and attentive instead of getting hypnotized by the constant monologue inside your head.”

“‘Learning how to think’ really means learning how to exercise some control over how and what you think.”

“And I submit that this is what the real, no-shit value of your liberal arts education is supposed to be about: How to keep from going through your comfortable, prosperous, respectable adult life dead, unconscious, a slave to your head and to your natural default setting of being uniquely, completely, imperially alone, day in and day out.”

“If you’re automatically sure that you know what reality is and who and what is really important – if you want to operate on your default setting – then you, like me, probably will not consider possibilities that aren’t pointless and annoying.  But if you’ve really learned how to think, how to pay attention, then you will know you have other options.  It will actually be within your power to experience a crowded, hot, slow, consumer-hell-type situation as not only meaningful, but sacred, on fire with the same force that lit the stars – compassion, love, the subsurface unity of all things.”

“…Look, the insidious thing about these forms of worship is not that they’re evil or sinful; it is that they are unconscious.  They are default settings.  They’re the kind of worship you just gradually slip into, day after day, getting more and more selective about what you see and how you measure value without ever being fully aware that that’s what you’re doing.”

“The really important kind of freedom involves attention, and awareness, and discipline, and effort, and being able truly to care about other people and to sacrifice for them, over and over, in myriad petty little unsexy ways, every day.  That is real freedom.  That is being taught how to think.  The alternative is unconsciousness, the default setting, the ‘rat race’ – the constant, gnawing sense of having had and lose some infinite thing.”

“The capital-T Truth is about life before death.  It is about making it to thirty, or maybe even fifty, without wanting to shoot yourself in the head.  It is about the real value of a real education, which has nothing to do with grades or degrees and everything to do with simple awareness – awareness of what is so real and essential, so hidden in plain sight all around us, that we have to keep reminding ourselves over and over: ‘This is water’.  ‘This is water’.  ‘These Eskimos might be much more than they seem.’  It is unimaginably hard to do this – to live consciously, adultly, day in and day out.”