+ - 0:00:00
Notes for current slide
Notes for next slide

Test-Driven Writing

1 / 20

Agenda

2 / 20

Agenda

(1) Intro (~ 10 minutes)
  1. About Me
  2. Objectives
2 / 20

Agenda

(1) Intro (~ 10 minutes)
  1. About Me
  2. Objectives
(2) Theory (~ 40 minutes)
  1. Test-Driven Development
  2. Test-Driven Writing
  3. Learning to Learn
2 / 20

Agenda

(1) Intro (~ 10 minutes)
  1. About Me
  2. Objectives
(2) Theory (~ 40 minutes)
  1. Test-Driven Development
  2. Test-Driven Writing
  3. Learning to Learn
(3) Break (~ 10 minutes)
2 / 20

Agenda

(1) Intro (~ 10 minutes)
  1. About Me
  2. Objectives
(2) Theory (~ 40 minutes)
  1. Test-Driven Development
  2. Test-Driven Writing
  3. Learning to Learn
(3) Break (~ 10 minutes)
(4) Practice (~ 2 hours)
  1. Red
  2. Green
  3. Refactor
2 / 20

Agenda

(1) Intro (~ 10 minutes)
  1. About Me
  2. Objectives
(2) Theory (~ 40 minutes)
  1. Test-Driven Development
  2. Test-Driven Writing
  3. Learning to Learn
(3) Break (~ 10 minutes)
(4) Practice (~ 2 hours)
  1. Red
  2. Green
  3. Refactor
(5) Next Steps (~ 5 minutes)
2 / 20

Intro

3 / 20

About Michael

$ whoami
michael.herman

me

4 / 20

About Michael

$ whoami
michael.herman

me

Senior Software Engineer from Denver, CO

  1. Python and JavaScript Contractor
  2. TestDriven.io

testdriven.io

4 / 20

About Michael

$ whoami
michael.herman

me

Senior Software Engineer from Denver, CO

  1. Python and JavaScript Contractor
  2. TestDriven.io

testdriven.io

Also

  1. Founder and Organizer of Denver Node.js Meetup Group
  2. Former Lead Instructor at Galvanize
  3. Co-founder/author of Real Python
  4. 😍 - tech writing/education, open source, financial models, radiohead
4 / 20

Objectives

5 / 20

Objectives

By the end of this training, you should be able to...

5 / 20

Objectives

By the end of this training, you should be able to...

  1. Explain what AWS EC2 and ECS are and why you may need to use each of them
5 / 20

Objectives

By the end of this training, you should be able to...

  1. Explain what AWS EC2 and ECS are and why you may need to use each of them

  2. Develop a technical blog post using the Red-Green-Refactor process

5 / 20

Objectives

By the end of this training, you should be able to...

  1. Explain what AWS EC2 and ECS are and why you may need to use each of them

  2. Develop a technical blog post using the Red-Green-Refactor process

  3. Describe the difference between a step-by-step tutorial, a high-level overview, a low-level reference piece, and a list post

5 / 20

Objectives

By the end of this training, you should be able to...

  1. Explain what AWS EC2 and ECS are and why you may need to use each of them

  2. Develop a technical blog post using the Red-Green-Refactor process

  3. Describe the difference between a step-by-step tutorial, a high-level overview, a low-level reference piece, and a list post

  4. Explain what narrative is and why it's important

5 / 20

Objectives

By the end of this training, you should be able to...

  1. Explain what AWS EC2 and ECS are and why you may need to use each of them

  2. Develop a technical blog post using the Red-Green-Refactor process

  3. Describe the difference between a step-by-step tutorial, a high-level overview, a low-level reference piece, and a list post

  4. Explain what narrative is and why it's important

  5. Engage in reverse-planning by writing objectives first

5 / 20

Objectives

By the end of this training, you should be able to...

  1. Explain what AWS EC2 and ECS are and why you may need to use each of them

  2. Develop a technical blog post using the Red-Green-Refactor process

  3. Describe the difference between a step-by-step tutorial, a high-level overview, a low-level reference piece, and a list post

  4. Explain what narrative is and why it's important

  5. Engage in reverse-planning by writing objectives first

  6. Describe the learning to learn process

5 / 20

Theory

6 / 20

What is Test-Driven Development?

7 / 20

What is Test-Driven Development?

Test-Driven Development (TDD) is a methodology in software development that focuses on an iterative development cycle where the emphasis is placed on writing test cases before the actual feature or function is written.

  • verify, code, verify, repeat
  • validate, design, validate, repeat
7 / 20

What is Test-Driven Development?

Test-Driven Development (TDD) is a methodology in software development that focuses on an iterative development cycle where the emphasis is placed on writing test cases before the actual feature or function is written.

  • verify, code, verify, repeat
  • validate, design, validate, repeat

TDD

  1. Utilizes repetition of a short development cycle
  2. Combines building and testing
  3. Helps ensure correctness of code—but also helps to indirectly evolve the design and architecture of the project at hand.
7 / 20

What is Test-Driven Development?

Test-Driven Development (TDD) is a methodology in software development that focuses on an iterative development cycle where the emphasis is placed on writing test cases before the actual feature or function is written.

  • verify, code, verify, repeat
  • validate, design, validate, repeat

TDD

  1. Utilizes repetition of a short development cycle
  2. Combines building and testing
  3. Helps ensure correctness of code—but also helps to indirectly evolve the design and architecture of the project at hand.



"Code without tests is broken by design."
- Jacob Kaplan-Moss
(co-creator of Django)
7 / 20

Red-Green-Refactor

8 / 20

Red-Green-Refactor

TDD usually follows the "Red-Green-Refactor" cycle:

tdd

8 / 20

Red-Green-Refactor

TDD usually follows the "Red-Green-Refactor" cycle:

tdd

  1. It can be slower in the short-term, but it generally improves the quality of the software project in the long run.
8 / 20

Red-Green-Refactor

TDD usually follows the "Red-Green-Refactor" cycle:

tdd

  1. It can be slower in the short-term, but it generally improves the quality of the software project in the long run.

  2. Having adequate test coverage acts as a safeguard so you don't accidentally change the functionality.

8 / 20

Red-Green-Refactor

TDD usually follows the "Red-Green-Refactor" cycle:

tdd

  1. It can be slower in the short-term, but it generally improves the quality of the software project in the long run.

  2. Having adequate test coverage acts as a safeguard so you don't accidentally change the functionality.

  3. Finally, test suites can encapsulate the expectations of your software project so that your project's stakeholders (current self, future self, everyone else) can better understand the project.

8 / 20

Check for Understanding

9 / 20

Check for Understanding

(1) What is Test-Driven Development?

9 / 20

Check for Understanding

(1) What is Test-Driven Development?

(2) Can the Test-Driven model be applied to writing?

9 / 20

Check for Understanding

(1) What is Test-Driven Development?

(2) Can the Test-Driven model be applied to writing?

  • Is there a way that you can write "tests" beforehand that tell you what to write and what not to write?
  • Can you "encapsulate" the expectations of your tutorial so that your readers can better understand it?
  • Will tests help to strengthen your thesis?
  • Can you make a strong, upfront case that your readers can easily assert against?

🤔

9 / 20

Test-Driven Writing

10 / 20

Test-Driven Writing

tdd

10 / 20

Test-Driven Writing

tdd

The goals are different:

  1. You SHOULD NOT always adhere to the Test-Driven process! The Test-Driven model can constrain the artistic side when practiced rigidly. Constrains can be good at times, though. They can help you stay focused and keep you within scope.
  2. You CANNOT fully test out your writing. (Watson API?)
10 / 20

Test-Driven Writing Process

11 / 20

Test-Driven Writing Process

  • Start with the audience, article type, narrative (e.g.,the common thread) and objectives.
11 / 20

Test-Driven Writing Process

  • Start with the audience, article type, narrative (e.g.,the common thread) and objectives.

  • Then, write out an outline and possibly the conclusion.

11 / 20

Test-Driven Writing Process

  • Start with the audience, article type, narrative (e.g.,the common thread) and objectives.

  • Then, write out an outline and possibly the conclusion.

  • As you write out each section from the outline, look back to the audience, narrative, and objectives to ensure that you are staying on track.

11 / 20

Test-Driven Writing Process

  • Start with the audience, article type, narrative (e.g.,the common thread) and objectives.

  • Then, write out an outline and possibly the conclusion.

  • As you write out each section from the outline, look back to the audience, narrative, and objectives to ensure that you are staying on track.

tweet

11 / 20

Learning to Learn

12 / 20

Learning to Learn

Developers must be lifelong learners!

12 / 20

Learning to Learn

Developers must be lifelong learners!

Learning to learn process:
  1. Set the state
  2. Play
  3. Reflect


Sources:

  1. http://slides.com/evanmoore/learning-to-learn
  2. https://github.com/realpython/learning
  3. https://css-tricks.com/learning-to-learn/

12 / 20

Learning to Learn (continued...)

13 / 20

Learning to Learn (continued...)

(1) Set the Stage

13 / 20

Learning to Learn (continued...)

(1) Set the Stage

  • Slow down, get your mind right
13 / 20

Learning to Learn (continued...)

(1) Set the Stage

  • Slow down, get your mind right

  • Eliminate distractions—close browser tabs, silence your phone, use the Pomodoro method

13 / 20

Learning to Learn (continued...)

(1) Set the Stage

  • Slow down, get your mind right

  • Eliminate distractions—close browser tabs, silence your phone, use the Pomodoro method

  • Clarify the what and why: What is it that you're trying to achieve? Why is that important?

13 / 20

Learning to Learn (continued...)

(1) Set the Stage

  • Slow down, get your mind right

  • Eliminate distractions—close browser tabs, silence your phone, use the Pomodoro method

  • Clarify the what and why: What is it that you're trying to achieve? Why is that important?

  • Focus on the process—The process is much more important than the end product:

    • How do you approach a problem?
    • What do you do when you get stuck?
    • Can you brute force your way through?
13 / 20

Learning to Learn (continued...)

14 / 20

Learning to Learn (continued...)

(2) Play

14 / 20

Learning to Learn (continued...)

(2) Play

  • Wrestle with it. Take risks and experiment. The most fruitful place to be is at the edge of your ability.
14 / 20

Learning to Learn (continued...)

(2) Play

  • Wrestle with it. Take risks and experiment. The most fruitful place to be is at the edge of your ability.

  • Be vulnerable.

14 / 20

Learning to Learn (continued...)

(2) Play

  • Wrestle with it. Take risks and experiment. The most fruitful place to be is at the edge of your ability.

  • Be vulnerable.

  • Have fun! Recognize if you're in 'fight or flight' mode, and take steps to get yourself back in a positive state of mind.

14 / 20

Learning to Learn (continued...)

(2) Play

  • Wrestle with it. Take risks and experiment. The most fruitful place to be is at the edge of your ability.

  • Be vulnerable.

  • Have fun! Recognize if you're in 'fight or flight' mode, and take steps to get yourself back in a positive state of mind.

(3) Reflect

14 / 20

Learning to Learn (continued...)

(2) Play

  • Wrestle with it. Take risks and experiment. The most fruitful place to be is at the edge of your ability.

  • Be vulnerable.

  • Have fun! Recognize if you're in 'fight or flight' mode, and take steps to get yourself back in a positive state of mind.

(3) Reflect

  • Self assess
14 / 20

Learning to Learn (continued...)

(2) Play

  • Wrestle with it. Take risks and experiment. The most fruitful place to be is at the edge of your ability.

  • Be vulnerable.

  • Have fun! Recognize if you're in 'fight or flight' mode, and take steps to get yourself back in a positive state of mind.

(3) Reflect

  • Self assess

  • Ask new questions and discover new things

14 / 20

Learning to Learn (continued...)

(2) Play

  • Wrestle with it. Take risks and experiment. The most fruitful place to be is at the edge of your ability.

  • Be vulnerable.

  • Have fun! Recognize if you're in 'fight or flight' mode, and take steps to get yourself back in a positive state of mind.

(3) Reflect

  • Self assess

  • Ask new questions and discover new things

  • Provide continuous feedback

14 / 20

Learning to Learn (continued...)

(2) Play

  • Wrestle with it. Take risks and experiment. The most fruitful place to be is at the edge of your ability.

  • Be vulnerable.

  • Have fun! Recognize if you're in 'fight or flight' mode, and take steps to get yourself back in a positive state of mind.

(3) Reflect

  • Self assess

  • Ask new questions and discover new things

  • Provide continuous feedback

  • Ask the following questions at the end of each writing session:

    • What were my objectives?
    • How far did I get? How much is left?
    • How was the process? Am I on the right track?
14 / 20

Practice

15 / 20

Red

16 / 20

Red

Scenario: Your boss wants you to write an article on "Understanding OAuth 2.0 and OpenID Connect".

Where do you start?

16 / 20

Red

Scenario: Your boss wants you to write an article on "Understanding OAuth 2.0 and OpenID Connect".

Where do you start?

Component Description
Audience Your readers (e.g., current self, future self, and outside readers)
Article Type Step-by-step tutorial, a high-level overview, a low-level reference piece, and a list post
Narrative What's the common thread taking the reader from the top of the article to the bottom?
Objectives What should your readers take away from your article?
16 / 20

Red

Scenario: Your boss wants you to write an article on "Understanding OAuth 2.0 and OpenID Connect".

Where do you start?

Component Description
Audience Your readers (e.g., current self, future self, and outside readers)
Article Type Step-by-step tutorial, a high-level overview, a low-level reference piece, and a list post
Narrative What's the common thread taking the reader from the top of the article to the bottom?
Objectives What should your readers take away from your article?


Your turn! Open up your favorite markdown editor...

16 / 20

Red (continued...)

17 / 20

Red (continued...)

Who is your audience?

17 / 20

Red (continued...)

Who is your audience?

Put yourself in their shoes:

  1. What do they know?
  2. What do they need to know?
17 / 20

Red (continued...)

Who is your audience?

Put yourself in their shoes:

  1. What do they know?
  2. What do they need to know?


What kind of article do you want to write?

17 / 20

Red (continued...)

Who is your audience?

Put yourself in their shoes:

  1. What do they know?
  2. What do they need to know?


What kind of article do you want to write?

  1. Step-by-step tutorial (short code snippets, practical examples)
  2. High-level overview (comparison posts, starting with a question, taking someone on a journey)
  3. Low-level reference piece (i.e., API docs)
  4. List post (i.e., 5 ways you can do something better, etc.)
17 / 20

Red (continued...)

18 / 20

Red (continued...)

How does the article type affect the narrative?

18 / 20

Red (continued...)

How does the article type affect the narrative?

Narrative examples:

  1. Building on a project
  2. Real-world analogy or theme
  3. Working toward a common goal, like contributing to an open source project
  4. Answering a question
18 / 20

Red (continued...)

How does the article type affect the narrative?

Narrative examples:

  1. Building on a project
  2. Real-world analogy or theme
  3. Working toward a common goal, like contributing to an open source project
  4. Answering a question


What makes for a good objective?

18 / 20

Red (continued...)

How does the article type affect the narrative?

Narrative examples:

  1. Building on a project
  2. Real-world analogy or theme
  3. Working toward a common goal, like contributing to an open source project
  4. Answering a question


What makes for a good objective?

  1. Objectives should be specific, measurable, achievable.
  2. They generally start with action verbs
    • GOOD: explain, assess, analyze, describe, identify, evaluate
    • BAD: understand, gain
18 / 20

Green/Refactor

19 / 20

Green/Refactor

What's next?

19 / 20

Green/Refactor

What's next?

  • Create a basic outline
19 / 20

Green/Refactor

What's next?

  • Create a basic outline

  • As you write out each section from the outline, look back to the audience, narrative, and objectives to ensure that you are staying on track.

19 / 20

Green/Refactor

What's next?

  • Create a basic outline

  • As you write out each section from the outline, look back to the audience, narrative, and objectives to ensure that you are staying on track.

Recommendations

19 / 20

Green/Refactor

What's next?

  • Create a basic outline

  • As you write out each section from the outline, look back to the audience, narrative, and objectives to ensure that you are staying on track.

Recommendations

  • Eliminate distractions
  • Time-box yourself
  • Try not to revise as you write (inspiration is fleeting!)
  • Force yourself to step away
  • Think about the length (shorter posts generally receive more comments, longer posts get more SEO love)
tweet
19 / 20

That's it!

20 / 20

Agenda

2 / 20
Paused

Help

Keyboard shortcuts

, , Pg Up, k Go to previous slide
, , Pg Dn, Space, j Go to next slide
Home Go to first slide
End Go to last slide
Number + Return Go to specific slide
b / m / f Toggle blackout / mirrored / fullscreen mode
c Clone slideshow
p Toggle presenter mode
t Restart the presentation timer
?, h Toggle this help
Esc Back to slideshow