McKay Johns

Tutorials

Master prompt engineering through hands-on, step-by-step tutorials you can follow along with.

Content Creation

Learn to generate high-quality content for blogs, marketing, and social media.

Blog Posts
Social Media
Marketing Copy

Data Analysis

Use AI to analyze data, generate insights, and create reports.

Data Insights
Reports
Visualization

Code Generation

Generate, debug, and optimize code across different programming languages.

Python
JavaScript
SQL

Problem Solving

Tackle complex problems using structured prompting approaches.

Strategy
Research
Analysis

Tutorial 1: Content Creation Mastery

Learn to create compelling content by building effective prompts step by step.

Step 1: Define Your Content Goals

Before prompting, clarify:

  • Target audience
  • Content purpose
  • Desired tone and style
  • Key messages to convey

Step 2: Build Your Base Prompt

"Write a [content type] about [topic] for [audience]. 
The tone should be [tone] and the style should be [style]. 
The main goal is to [objective]."

Step 3: Add Specific Requirements

"Write a blog post about sustainable living tips for busy professionals. 
The tone should be encouraging and practical, and the style should be conversational. 
The main goal is to provide actionable advice that can be implemented immediately.

Requirements:
- 800-1000 words
- Include 5 specific tips
- Add a compelling introduction and conclusion
- Use bullet points for easy scanning
- Include a call-to-action at the end"

Step 4: Refine and Iterate

Pro Tip: After getting initial output, refine with follow-up prompts:

  • "Make the introduction more engaging"
  • "Add more specific examples to tip #3"
  • "Strengthen the call-to-action"

Tutorial 2: Data Analysis with AI

Transform raw data into actionable insights using structured prompting techniques.

Step 1: Data Context Setup

"You are a data analyst examining [data type] from [source/context]. 
The data covers [time period] and includes [key variables]. 
Your goal is to [analysis objective]."

Step 2: Analysis Framework

"Analyze this data following these steps:
1. Identify key patterns and trends
2. Highlight notable anomalies or outliers
3. Calculate relevant metrics and statistics
4. Draw actionable insights
5. Recommend next steps

Present your analysis in a clear, structured format with:
- Executive summary
- Key findings (bullet points)
- Supporting data/evidence
- Recommendations"

Step 3: Specific Data Analysis Example

"Analyze this sales data for Q3 2024:
- Total sales: $2.4M (up 15% from Q2)
- Top product: Widget A (35% of sales)
- Regional breakdown: North 40%, South 35%, East 25%
- Customer acquisition: 1,200 new customers
- Customer retention: 85%

Focus on identifying growth opportunities and potential concerns. 
Provide specific, actionable recommendations for Q4 strategy."

Tutorial 3: Code Generation & Debugging

Generate clean, efficient code and debug existing code using AI assistance.

Step 1: Clear Code Requirements

"Write a [language] function that [specific task]. 

Requirements:
- Input: [describe inputs]
- Output: [describe expected output]
- Constraints: [any limitations]
- Style: [coding style preferences]

Include comments explaining the logic and provide usage examples."

Step 2: Practical Example

"Write a Python function that calculates the moving average of a list of numbers.

Requirements:
- Input: List of numbers and window size
- Output: List of moving averages
- Handle edge cases (empty list, window larger than list)
- Use efficient algorithms
- Follow PEP 8 style guidelines

Include docstring, type hints, and 2-3 usage examples."

Step 3: Code Review and Optimization

"Review this code and suggest improvements:

[paste your code here]

Focus on:
- Performance optimization
- Code readability
- Error handling
- Best practices
- Security considerations (if applicable)

Provide the improved version with explanations for each change."

Tutorial 4: Complex Problem Solving

Break down complex problems into manageable pieces using systematic prompting.

Step 1: Problem Definition

"Help me solve this complex problem: [describe problem]

First, let's break this down:
1. What are the core components of this problem?
2. What constraints or limitations exist?
3. What resources are available?
4. What would success look like?

Provide a structured analysis before suggesting solutions."

Step 2: Solution Generation

"Based on the problem analysis, generate 3-5 potential solutions.

For each solution, provide:
- Brief description
- Pros and cons
- Implementation difficulty (1-5 scale)
- Expected timeline
- Resource requirements
- Risk factors

Rank the solutions by overall viability."

Step 3: Implementation Planning

"Create a detailed implementation plan for the top-ranked solution:

Include:
- Step-by-step action items
- Timeline with milestones
- Resource allocation
- Risk mitigation strategies
- Success metrics
- Contingency plans

Format as a actionable project plan."

Practice Exercises

Exercise 1: Content Creation

Create a prompt to write a product description for an eco-friendly water bottle targeting fitness enthusiasts.

Target: Fitness enthusiasts
Product: Eco water bottle
Goal: Increase sales

Exercise 2: Data Analysis

Analyze website traffic data to identify optimization opportunities for an e-commerce site.

Data: Website analytics
Goal: Optimization
Focus: Conversion

Exercise 3: Code Generation

Generate a JavaScript function that validates email addresses with comprehensive error handling.

Language: JavaScript
Task: Email validation
Include: Error handling

Exercise 4: Problem Solving

Develop a strategy to reduce customer churn for a SaaS company by 25% in 6 months.

Challenge: Customer churn
Target: 25% reduction
Timeline: 6 months