100% found this document useful (1 vote)
18 views

Professional Test Driven Development with C Developing Real World Applications with TDD 1st Edition James Bender instant download

Ebook download

Uploaded by

rusnedaminag
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
18 views

Professional Test Driven Development with C Developing Real World Applications with TDD 1st Edition James Bender instant download

Ebook download

Uploaded by

rusnedaminag
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 63

Professional Test Driven Development with C

Developing Real World Applications with TDD 1st


Edition James Bender download

https://ebookname.com/product/professional-test-driven-
development-with-c-developing-real-world-applications-with-
tdd-1st-edition-james-bender-2/

Get Instant Ebook Downloads – Browse at https://ebookname.com


Instant digital products (PDF, ePub, MOBI) available
Download now and explore formats that suit you...

Professional test driven development with C developing


real world applications with TDD 1st Edition James
Bender

https://ebookname.com/product/professional-test-driven-
development-with-c-developing-real-world-applications-with-
tdd-1st-edition-james-bender/

Test Driven Development for Embedded C 1st Edition


James W. Grenning

https://ebookname.com/product/test-driven-development-for-
embedded-c-1st-edition-james-w-grenning/

Test Driven NET Development with FitNesse 2nd Edition


Edition Gojko Adzic

https://ebookname.com/product/test-driven-net-development-with-
fitnesse-2nd-edition-edition-gojko-adzic/

The ploy of instinct Victorian sciences of nature and


sexuality in liberal governance 1st Edition
Frederickson

https://ebookname.com/product/the-ploy-of-instinct-victorian-
sciences-of-nature-and-sexuality-in-liberal-governance-1st-
edition-frederickson/
Crafting Rails Applications Expert Practices for
Everyday Rails Development 1st Edition Jose Valim

https://ebookname.com/product/crafting-rails-applications-expert-
practices-for-everyday-rails-development-1st-edition-jose-valim/

American Public Policy Promise and Performance B. Guy


Peters

https://ebookname.com/product/american-public-policy-promise-and-
performance-b-guy-peters/

Injection Treatments in Cosmetic Surgery 1st Edition


Benjamin Ascher

https://ebookname.com/product/injection-treatments-in-cosmetic-
surgery-1st-edition-benjamin-ascher/

Between Transcendence And Historicism The Ethical


Nature Of The Arts In Hegelian Aesthetics Brian K.
Etter

https://ebookname.com/product/between-transcendence-and-
historicism-the-ethical-nature-of-the-arts-in-hegelian-
aesthetics-brian-k-etter/

Medical Nutrition Disease A Case Based Approach 3rd


Edition Lisa Hark

https://ebookname.com/product/medical-nutrition-disease-a-case-
based-approach-3rd-edition-lisa-hark/
Psychology of Terrorism Condensed Edition Coping with
the Continuing Threat Contemporary Psychology Chris E.
Stout

https://ebookname.com/product/psychology-of-terrorism-condensed-
edition-coping-with-the-continuing-threat-contemporary-
psychology-chris-e-stout/
PROFESSIONAL
TEST-DRIVEN DEVELOPMENT WITH C#

INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxv

 PART I GETTING STARTED


CHAPTER 1 The Road to Test-Driven Development . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
CHAPTER 2 An Introduction to Unit Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
CHAPTER 3 A Quick Review of Refactoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .41
CHAPTER 4 Test-Driven Development: Let the Tests Be Your Guide . . . . . . . . . . . . 73
CHAPTER 5 Mocking External Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97

 PART II PUTTING BASICS INTO ACTION


CHAPTER 6 Starting the Sample Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
CHAPTER 7 Implementing the First User Story . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .137
CHAPTER 8 Integration Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169

 PART III TDD SCENARIOS


CHAPTER 9 TDD on the Web . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
CHAPTER 10 Testing Windows Communication Foundation Services . . . . . . . . . . . 227
CHAPTER 11 Testing WPF and Silverlight Applications . . . . . . . . . . . . . . . . . . . . . . . . 245

 PART IV REQUIREMENTS AND TOOLS


CHAPTER 12 Dealing with Defects and New Requirements . . . . . . . . . . . . . . . . . . . . 267
CHAPTER 13 The Great Tool Debate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279
CHAPTER 14 Conclusions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299
APPENDIX TDD Katas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307

INDEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311
PROFESSIONAL

Test-Driven Development with C#


PROFESSIONAL

Test-Driven Development with C#


DEVELOPING REAL WORLD APPLICATIONS WITH TDD

James Bender
Jeff McWherter
Professional Test-Driven Development with C#: Developing
Real World Applications with TDD
Published by
Wiley Publishing, Inc.
10475 Crosspoint Boulevard
Indianapolis, IN 46256
www.wiley.com
Copyright © 2011 by Wiley Publishing, Inc., Indianapolis, Indiana

Published simultaneously in Canada

ISBN: 978-0-470-64320-4
ISBN: 978-1-118-10210-7 (ebk)
ISBN: 978-1-118-10211-4 (ebk)
ISBN: 978-1-118-10212-1 (ebk)

Manufactured in the United States of America

10 9 8 7 6 5 4 3 2 1

No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means,
electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108
of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization
through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers,
MA 01923, (978) 750-8400, fax (978) 646-8600. Requests to the Publisher for permission should be addressed to
the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011,
fax (201) 748-6008, or online at http://www.wiley.com/go/permissions.

Limit of Liability/Disclaimer of Warranty: The publisher and the author make no representations or warranties with
respect to the accuracy or completeness of the contents of this work and specifically disclaim all warranties, including
without limitation warranties of fitness for a particular purpose. No warranty may be created or extended by sales or
promotional materials. The advice and strategies contained herein may not be suitable for every situation. This work
is sold with the understanding that the publisher is not engaged in rendering legal, accounting, or other professional
services. If professional assistance is required, the services of a competent professional person should be sought. Neither
the publisher nor the author shall be liable for damages arising herefrom. The fact that an organization or website is
referred to in this work as a citation and/or a potential source of further information does not mean that the author or the
publisher endorses the information the organization or website may provide or recommendations it may make. Further,
readers should be aware that Internet websites listed in this work may have changed or disappeared between when this
work was written and when it is read.

For general information on our other products and services please contact our Customer Care Department within the
United States at (877) 762-2974, outside the United States at (317) 572-3993 or fax (317) 572-4002.

Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be available
in electronic books.

Library of Congress Control Number: 2011924919

Trademarks: Wiley, the Wiley logo, Wrox, the Wrox logo, Programmer to Programmer, and related trade dress are
trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affi liates, in the United States and other
countries, and may not be used without written permission. All other trademarks are the property of their respective
owners. Wiley Publishing, Inc., is not associated with any product or vendor mentioned in this book.
For Gayle. Thank you for being so awesome!

—James

To everyone who has believed in me.

—Jeff

To my wonderful wife Courtney and my


two amazing kids, Katie and Jacob.

— Michael
ABOUT THE AUTHORS

JAMES BENDER is Vice Present of Technology for Improving Enterprises and has been involved in
software development and architecture for 17 years. He has worked as a developer and architect
on everything from small, single-user applications to Enterprise-scale, multi-user systems. His
specialties are .NET development and architecture, SOA, WCF, WF, cloud computing, and agile
development methodologies. He is an experienced mentor and author.
James has spent his career pushing the envelope of software development and pursuing new and
better ways of building applications. He began his career developing credit card processing
applications in C++ on SCO Unix based systems. In the late 90’s James began exploring web
development with both Java based JSP pages and Microsoft’s ASP technologies. He was an early
adopter of .NET starting with the fi rst public beta. He continued exploring the .NET technology
stack, focusing on the distributed computing paradigm made possible by .NET web services, which
naturally evolved into a somewhat obsessive interest in Microsoft’s Windows Communication
Foundation (WCF).
James has been practicing agile-based methodologies since 2003, including Scrum and eXtreme
Programming (XP). At part of this interest in agile methodologies, James began exploring test-driven
development at the same time. He was instrumental in introducing the concepts and techniques used
in agile software development and test-driven development to many developers at his clients and in
the software development community in general.
James is a Microsoft MVP for Visual C#. James is an active member of the development community.
He is the current president of the Central Ohio .NET Developers Group (www.condg.org) and
continues to lead the Columbus Architects Group (www.colarc.org) and is the senior editor of
fi rst-party content for nplus1.org, an educational website aimed toward architects and aspiring
architects. His blog can be found at www.jamescbender.com.

JEFF MCWHERTER is a partner and director of development at Gravity Works Design and
Development, based in a historic office in Lansing Michigan’s Old Town District. A graduate of
Michigan State University with over 12 years of professional software development experience, Jeff
holds numerous certifications from Microsoft including Microsoft Certified Solutions Developer
(MCSD), Microsoft Certified Database Administrator (MCDBA), Microsoft Certified Application
Developer (MCAD), and Microsoft Technology Specialist (MCTS).
In 2010 Jeff was awarded with the Microsoft Most Valuable Professional (MVP) for the third year
in a row. Also in 2010, Jeff received the Ten Over The Next Ten award presented by the Lansing
Regional Chamber of Commerce, which recognizes 10 young professionals to “watch” over the next
10 years. Jeff is also a published author, with Testing ASP.NET Web Applications published by
Wrox Press.
ABOUT THE AUTHORS

Along with being an author and software developer, Jeff is very active in developing programming
communities across the country by speaking at conferences and organizing events such as the
Lansing Give Camp, which pairs developers with non-profit organizations for volunteer projects.

MICHAEL EATON has been developing awesome solutions using Microsoft tools and technologies
since 1994, but in 2001 he broke free from the confi nes of the cube farm to go out on his own.
While he lives in the middle- of-nowhere Michigan, he serves clients throughout the Midwest. Well
known for his dislike of web development and box lunches, his focus over the past few years has
been on XAML -based technologies like WPF and Silverlight. He speaks at regional events and user
groups, runs the Kalamazoo X Conference and helps with the Ann Arbor Give Camp. He is also a
C# MVP. When not working on projects or spending time with his family, he treats his World of
Warcraft addiction with ample doses of time on his XBox 360.

x
ABOUT THE TECHNICAL EDITOR

MITCHEL SELLERS specializes in software development using Microsoft technologies. He is the CEO
of IowaComputerGurus Inc., a Microsoft C# MVP, a Microsoft Certified Professional, has served
as an author on two books, and served as technical editor on many other books. You will often fi nd
Mitchel interacting with the greater software development community either at events/conferences
or in online discussion forums. To obtain additional information on Mitchel’s professional
experience, certifications, and publications refer to his resume at MitchelSellers.com.
CREDITS

ACQUISITIONS EDITOR PRODUCTION MANAGER


Paul Reese Tim Tate

PROJECT EDITOR VICE PRESIDENT AND EXECUTIVE GROUP


Sydney Jones PUBLISHER
Richard Swadley
TECHNICAL EDITORS
Jeff McWherter VICE PRESIDENT AND EXECUTIVE PUBLISHER
Mitchell Sellers Barry Pruett

PRODUCTION EDITOR ASSOCIATE PUBLISHER


Rebecca Anderson Jim Minatel

COPY EDITOR PROJECT COORDINATOR, COVER


Gayle Johnson Katie Crocker

EDITORIAL DIRECTOR PROOFREADER


Robyn B. Siesky Carrie Hunter, Word One New York

EDITORIAL MANAGER INDEXER


Mary Beth Wakefield J & J Indexing

FREELANCER EDITORIAL MANAGER COVER DESIGNER


Rosemarie Graham Michael E. Trent

ASSOCIATE DIRECTOR OF MARKETING COVER IMAGE


David Mayhew © iStock / technotr
ACKNOWLEDGMENTS

I WANT TO START BY THANKING MY GIRLFRIEND (with any luck, fiancé by the time you are reading
this) Gayle. She has been very supportive and EXTREMELY understanding during the process of
writing this book. More than she should have had to be. Thank you.
I want to thank my parents for making this book possible by making me possible. My mother is so
proud she’ll read every page of this book. Bless her heart. I hope she’s still proud when she realizes
I lied and this is NOTHING like a Stephen King novel.
In the understanding and supporting department I would also like to thank Daniel Grey, Mark
Kovacevich, Jeff Perry and everyone else at Improving Enterprises. I’d also like to thank Pete
Klassen. We miss you man!
I’d like to thank Jeff McWherter and Michael Eaton for their contributions to this book. Jeff; thanks
for taking some of the load off. Mike; thank you for pushing me to include the “non-web” people.
I’d also like to thank my editor Sydney for making this book look like I know how to write.
Brian Prince; thank you for pushing me to get involved in the development community. I was going
to write something funny here, but I couldn’t think of anything. I’ll getcha in the next one.
When I was presented with the opportunity to write this book, I almost said no. I want to thank
Ted Neward for talking me into it. So, this is kinda your fault too.
I want to thank my partners in NPlus1.org Mike Wood and Chris Woodruff for picking up my slack
of the past several months while I worked on this.
Long list of general thanks: Brahma Ghosh, Brian Sherwin, Bill Sempf, Jeff Blankenburg, Carey
Payette, Caleb Jenkins, Jennifer Marsman, Sarah & Kevin Dutkiewicz, Steve Harman, Josh
Holmes. Thanks to Matt Groves for pimping this book almost as much as I did. I’m sure I forgot
someone, so I apologize.

—James

FIRST AND FOREMOST I WOULD LIKE TO THANK my very patient wife Carla. Thank you for all the
support, patience, and understanding you have provided to me for all of my endeavors. Thank you to
the staff at Gravity Works — Amelia Marschall, Lauren Colton, Scott Gowell and Dave Smith — for
answering my random questions that appeared to come out of nowhere. And lastly I would like to
thank James for his hard work, dedication, and friendship.

—Jeff
CONTENTS

INTRODUCTION xxv

PART I: GETTING STARTED

CHAPTER 1: THE ROAD TO TEST-DRIVEN DEVELOPMENT 3

The Classical Approach to Software Development 4


A Brief History of Software Engineering 4
From Waterfall to Iterative and Incremental 5
A Quick Introduction to Agile Methodologies 6
A Brief History of Agile Methodologies 6
The Principles and Practices of Test-Driven Development 7
The Concepts Behind TDD 8
TDD as a Design Methodology 8
TDD as a Development Practice 8
The Benefits of TDD 9
A Quick Example of the TDD Approach 10
Summary 17
CHAPTER 2: AN INTRODUCTION TO UNIT TESTING 19

What Is a Unit Test? 19


Unit Test Definition 20
What Is Not a Unit Test? 20
Other Types of Tests 22
A Brief Look at NUnit 24
What Is a Unit Test Framework? 24
The Basics of NUnit 25
Decoupling with Mock Objects 28
Why Mocking Is Important 28
Dummy, Fake, Stub, and Mock 29
Best and Worst Practices 35
A Brief Look at Moq 36
What Does a Mocking Framework Do? 36
A Bit About Moq 36
Moq Basics 36
Summary 40
CONTENTS

CHAPTER 3: A QUICK REVIEW OF REFACTORING 41

Why Refactor? 42
A Project’s Lifecycle 42
Maintainability 43
Code Metrics 43
Clean Code Principles 45
OOP Principles 45
Encapsulation 45
Inheritance 46
Polymorphism 48
The SOLID Principles 49
The Single Responsibility Principle 50
The Open/Close Principle 50
The Liskov Substitution Principle 51
The Interface Segregation Principle 51
The Dependency Inversion Principle 52
Code Smells 52
What Is a Code Smell? 52
Duplicate Code and Similar Classes 53
Big Classes and Big Methods 54
Comments 55
Bad Names 56
Feature Envy 57
Too Much If/Switch 58
Try/Catch Bloat 59
Typical Refactoring 60
Extract Classes or Interfaces 60
Extract Methods 62
Rename Variables, Fields, Methods, and Classes 66
Encapsulate Fields 67
Replace Conditional with Polymorphism 68
Allow Type Inference 71
Summary 71

CHAPTER 4: TEST-DRIVEN DEVELOPMENT: LET THE TESTS


BE YOUR GUIDE 73

It Starts with the Test 74


Red, Green, Refactor 76
The Three Phases of TDD 77
The Red Phase 77
The Green Phase 78

xviii
CONTENTS

The Refactoring Phase 79


Starting Again 79
A Refactoring Example 79
The First Feature 80
Making the First Test Pass 83
The Second Feature 83
Refactoring the Unit Tests 85
The Third Feature 87
Refactoring the Business Code 88
Correcting Refactoring Defects 91
The Fourth Feature 93
Summary 94

CHAPTER 5: MOCKING EXTERNAL RESOURCES 97

The Dependency Injection Pattern 98


Working with a Dependency Injection Framework 99
Abstracting the Data Access Layer 108
Moving the Database Concerns Out of the Business Code 108
Isolating Data with the Repository Pattern 108
Injecting the Repository 109
Mocking the Repository 112
Summary 113

PART II: PUTTING BASICS INTO ACTION


CHAPTER 6: STARTING THE SAMPLE APPLICATION 117

Defining the Project 118


Developing the Project Overview 118
Defining the Target Environment 119
Choosing the Application Technology 120
Defining the User Stories 120
Collecting the Stories 120
Defining the Product Backlog 122
The Agile Development Process 123
Estimating 124
Working in Iterations 124
Communication Within Your Team 126
Iteration Zero: Your First Iteration 127
Testing in Iteration Zero 127
Ending an Iteration 128

xix
CONTENTS

Creating the Project 129


Choosing the Frameworks 129
Defining the Project Structure 131
Organizing Project Folders 131
Creating the Visual Studio Solution 132
Summary 134

CHAPTER 7: IMPLEMENTING THE FIRST USER STORY 137

The First Test 138


Choosing the First Test 138
Naming the Test 139
Writing the Test 140
Implementing the Functionality 148
Writing the Simplest Thing That Could Possibly Work 148
Running the Passing Test 157
Writing the Next Test 158
Improving the Code by Refactoring 165
Triangulation of Tests 166
Summary 166
CHAPTER 8: INTEGRATION TESTING 169

Integrate Early; Integrate Often 170


Writing Integration Tests 171
How to Manage the Database 171
How to Write Integration Tests 172
Reviewing the ItemTypeRepository 173
Adding Ninject for Dependency Injection 174
Creating the Fluent NHibernate Configuration 177
Creating the Fluent NHibernate Mapping 179
Creating the Integration Test 183
End-to-End Integration Tests 191
Keeping Various Types of Tests Apart 191
When and How to Run Integration Tests 191
Summary 192

PART III: TDD SCENARIOS

CHAPTER 9: TDD ON THE WEB 197

ASP.NET Web Forms 197


Web Form Organization 198
ASPX Files 198

xx
CONTENTS

Code-Behind Files 198


Implementing Test-Driven Development with MVP and Web Forms 199
Working with the ASP.NET MVC 210
MVC 101 211
Microsoft ASP.NET MVC 3.0 212
Creating an ASP.NET MVC Project 212
Creating Your First Test 213
Making Your First Test Pass 215
Creating Your First View 216
Gluing Everything Together 217
Using the MVC Contrib Project 220
ASP.NET MVC Summarized 220
Working with JavaScript 220
JavaScript Testing Frameworks 221
Summary 226

CHAPTER 10: TESTING WINDOWS COMMUNICATION


FOUNDATION SERVICES 227

WCF Services in Your Application 228


Services Are Code Too 228
Testing WCF Services 228
Refactoring for Testability 229
Introducing Dependency Injection to Your Service 231
Writing the Test 236
Stubbing the Dependencies 239
Verifying the Results 243
Trouble Spots to Watch 244
Summary 244

CHAPTER 11: TESTING WPF AND SILVERLIGHT APPLICATIONS 245

The Problem with Testing the User Interface 246


The MVVM Pattern 246
How MVVM Makes WPF/Silverlight Applications Testable 248
Bringing It All Together 261
Summary 263

PART IV: REQUIREMENTS AND TOOLS

CHAPTER 12: DEALING WITH DEFECTS AND NEW REQUIREMENTS 267

Handling Change 268


Change Happens 268

xxi
CONTENTS

Adding New Features 268


Addressing Defects 269
Starting with a Test 270
Changing the Code 272
Keeping the Tests Passing 276
Summary 276

CHAPTER 13: THE GREAT TOOL DEBATE 279

Test Runners 279


TestDriven.NET 280
Developer Express Test Runner 280
Gallio 281
Unit Testing Frameworks 282
MSTest 282
MbUnit 283
xUnit 284
Mocking Frameworks 285
Rhino Mocks 285
Type Mock 287
Dependency Injection Frameworks 289
Structure Map 289
Unity 291
Windsor 293
Autofac 294
Miscellaneous Useful Tools 295
nCover 295
PEX 295
How to Introduce TDD to Your Team 296
Working in Environments That Are Resistant to Change 297
Working in Environments That Are Accepting of Change 297
Summary 297

CHAPTER 14: CONCLUSIONS 299

What You Have Learned 299


You Are the Client of Your Code 300
Find the Solutions Step by Step 300
Use the Debugger as a Surgical Instrument 300
TDD Best Practices 301
Use Significant Names 301
Write at Least One Test for One Unit of Functionality 301
Keep Your Mocks Simple 302

xxii
CONTENTS

The Benefits of TDD 302


How to Introduce TDD in Your Team 303
Summary 304
APPENDIX: TDD KATAS 307

Working with TDD Katas 307


Share Your Work 308
OSIM User Stories 308

INDEX 311

xxiii
Exploring the Variety of Random
Documents with Different Content
Who was the traitor, Cromwell, then;
So I care not what they do with me.

They have betray'd our noble prince,


And banish'd him from his royal crown;
But the gallant Grahams have ta'en in hand35
For to command those traitors down.

In Glen-Prosen we rendezvous'd,
March'd to Glenshie by night and day,
And took the town of Aberdeen,
And met the Campbells in their array.40

Five thousand men, in armour strong,


Did meet the gallant Grahams that day
At Inverlochie, where war began,
And scarce two thousand men were they.

Gallant Montrose, that chieftain bold,45


Courageous in the best degree,
Did for the king fight well that day;
The Lord preserve his majestie!

Nathaniel Gordon, stout and bold,


Did for King Charles wear the blue;50
But the cavaliers they all were sold,
And brave Harthill, a cavalier too.

And Newton-Gordon, burd-alone,


And Dalgatie, both stout and keen,
And gallant Veitch upon the field,55
A braver face was never seen.

Now, fare ye weel, Sweet Ennerdale!


Countrie and kin I quit ye free;
Cheer up your hearts, brave cavaliers,
For the Grahams are gone to High Germany.

Now brave Montrose he went to France,61


And to Germany, to gather fame;
And bold Aboyne is to the sea,
Young Huntly is his noble name.

Montrose again, that chieftain bold,65


Back unto Scotland fair he came,
For to redeem fair Scotland's land,
The pleasant, gallant, worthy Graham!

At the water of Carron he did begin,


And fought the battle to the end;70
Where there were kill'd, for our noble king,
Two thousand of our Danish men.

Gilbert Menzies, of high degree,


By whom the king's banner was borne;
For a brave cavalier was he,75
But now to glory he is gone.

Then woe to Strachan, and Hacket baith!


And, Leslie, ill death may thou die!
For ye have betray'd the gallant Grahams,
Who aye were true to majestie.80

And the Laird of Assaint has seized Montrose,


And had him into Edinburgh town;
And frae his body taken the head,
And quarter'd him upon a trone.
And Huntly's gone the self-same way,85
And our noble king is also gone;
He suffer'd death for our nation,
Our mourning tears can ne'er be done.

But our brave young king is now come home,


King Charles the Second in degree;90
The Lord send peace into his time,
And God preserve his majestie!
1. A corruption of Endrickdale. The principal and most ancient
possessions of the Montrose family lie along the water of Endrick, in
Dumbartonshire. S.
5. About the time when Montrose first occupied Aberdeen (1639) the
Covenanters began to wear a blue ribbon, first as a scarf, afterwards
in bunches in their caps. Hence the phrase of a true blue Whig. The
blue ribbon was one of "Montrose's whimsies," and seems to have
been retained by his followers (see v. 50) after he had left the
Covenanters for the king.
14. The faithful friend and adherent of the immortal Wallace, slain at
the battle of Falkirk. S.
37. Glen-Prosen is in Angus-shire. S.
49. Of the family of Gicht in Aberdeenshire. He was taken at
Philiphaugh, and executed the 6th of January, 1646.
52. Leith, of Harthill, was a determined loyalist, and hated the
Covenanters, by whom he had been severely treated. S.
53. Newton, for obvious reasons, was a common appellation of an
estate, or barony, where a new edifice had been erected. Hence, for
distinction's sake, it was anciently compounded with the name of the
proprietor; as, Newton-Edmonstone, Newton-Don, Newton-Gordon,
&c. Of Newtown, I only observe, that he was, like all his clan, a
steady loyalist, and a follower of Montrose. S.
54. Sir Francis Hay, of Dalgatie, a steady cavalier, and a gentleman
of great gallantry and accomplishments. He was a faithful follower of
Montrose, and was taken prisoner with him at his last fatal battle. He
was condemned to death with his illustrious general. S.
55. I presume this gentleman to have been David Veitch, brother to
Veitch of Dawick, who, with many other of the Peebles-shire gentry,
was taken at Philiphaugh. S.
64. James, Earl of Aboyne, who fled to France, and there died heart-
broken. It is said his death was accelerated by the news of King
Charles's execution. He became representative of the Gordon family
(or Young Huntly, as the ballad expresses it) in consequence of the
death of his elder brother, George, who fell in the battle of Alford. S.
72. Montrose's foreign auxiliaries, who, by the way, did not exceed
600 in all. S.
73. Gilbert Menzies, younger of Pitfoddells, carried the royal banner
in Montrose's last battle. It bore the headless corpse of Charles I.,
with this motto, "Judge and revenge my cause, O Lord!" Menzies
proved himself worthy of this noble trust, and, obstinately refusing
quarter, died in defence of his charge. Montrose's Memoirs. S.
77. Sir Charles Hacket, an officer in the service of the Estates. S.
85. George Gordon, second Marquis of Huntly, one of the very few
nobles in Scotland who had uniformly adhered to the King from the
very beginning of the troubles, was beheaded by the sentence of the
Parliament of Scotland (so calling themselves) upon the 22d March,
1649, one month and twenty-two days after the martyrdom of his
master. S.

THE BATTLE OF LOUDON HILL.


Graham of Claverhouse and Balfour of Kinloch, commonly called
Burly, the principal persons mentioned in this ballad, are characters
well known to the readers of Old Mortality, in the earlier chapters of
which the skirmish at Loudon Hill is described.
A few weeks after the memorable assassination of Archbishop
Sharpe, Robert Hamilton, a fierce Cameronian, Burly, and a few
others of the proscribed "Westlan' men" resolved to take up arms
against the government. They began their demonstrations by
entering the royal burgh of Rutherglen, on the 29th of May, 1679
(which, as the anniversary of the Restoration, was appointed by
Parliament to be kept as a holyday) extinguishing the bonfires made
in honor of the occasion, and burning at the cross certain acts in
favor of Prelacy and for the suppression of Conventicles. After this
exploit, and affixing to the cross a solemn protest against the
obnoxious acts, they encamped at Loudon Hill, being by this time
increased to the number of five or six hundred men. Claverhouse
was in garrison at Glasgow, and immediately marched against the
insurgents, with about a hundred and fifty cavalry. Hamilton, the
commander of the Whigs, had skilfully posted his men in a boggy
strait with a broad ditch in front, and the dragoons in attempting to
charge were thrown into utter disorder. At this critical moment they
were vigorously attacked by the rebels and easily routed.
Claverhouse barely escaped being taken prisoner, and lost some
twenty of his troopers, among them his cornet, Robert Graham,
whose fate is alluded to in the ballad. Burly, though not the captain,
was a prominent leader in this action. See Scott's Minstrelsy, vol. ii.
206, et seq.

You'l marvel when I tell ye o'


Our noble Burly and his train,
When last he march'd up through the land,
Wi' sax-and-twenty Westland men.

Than they I ne'er o' braver heard,5


For they had a' baith wit and skill;
They proved right well, as I heard tell,
As they cam up o'er Loudon Hill.

Weel prosper a' the gospel lads,


That are into the west countrie,10
Aye wicked Claver'se to demean,
And aye an ill deid may he die!

For he's drawn up i' battle rank,


An' that baith soon an' hastilie;
But they wha live till simmer come,15
Some bludie days for this will see.

But up spak cruel Claver'se, then,


Wi' hastie wit, an' wicked skill;
"Gae fire on yon Westlan' men;
I think it is my sov'reign's will."20

But up bespake his Cornet, then,


"It's be wi' nae consent o' me!
I ken I'll ne'er come back again,
An' mony mae as weel as me.

"There is not ane of a' yon men,25


But wha is worthy other three;
There is na ane amang them a',
That in his cause will stap to die.

"An' as for Burly, him I knaw;


He's a man of honour, birth, and fame;30
Gie him a sword into his hand,
He'll fight thysell an' other ten."

But up spake wicked Claver'se, then,


I wat his heart it raise fu' hie!
And he has cried that a' might hear,35
"Man, ye hae sair deceived me.
"I never ken'd the like afore,
Na, never since I came frae hame,
That you sae cowardly here suld prove,
An' yet come of a noble Græme."40

But up bespake his Cornet then,


"Since that it is your honour's will,
Mysell shall be the foremost man
That shall gie fire on Loudon Hill.

"At your command I'll lead them on,45


But yet wi' nae consent o' me;
For weel I ken I'll ne'er return,
And mony mae as weel as me."

Then up he drew in battle rank;


I wat he had a bonny train!50
But the first time that bullets flew,
Aye he lost twenty o' his men.

Then back he came the way he gaed,


I wat right soon and suddenly!
He gave command amang his men,55
And sent them back, and bade them flee.

Then up came Burly, bauld an' stout,


Wi's little train o' Westland men,
Wha mair than either aince or twice
In Edinburgh confined had been.60

They hae been up to London sent,


An' yet they're a' come safely down;
Sax troop o' horsemen they hae beat,
And chased them into Glasgow town.
THE BATTLE OE BOTHWELL BRIDGE.
From Minstrelsy of the Scottish Border, ii. 237.
The success of the Cameronians at Loudon Hill induced a
considerable number of the moderate Presbyterians to join the army
of the insurgents. But though increased numbers gave the revolt a
more formidable appearance, they cannot be said to have added
much to the strength of the rebels, since there was no concert
between the two factions, each having its own set of officers, and
issuing contrary orders at the same time. An army of ten thousand
men under the Duke of Monmouth advanced from Edinburgh against
these distracted allies, who, in all not more than four thousand, were
encamped near Hamilton, on the western side of the Clyde, and had
possession of the bridge between that point and the village of
Bothwell. While the Duke was preparing to force a passage, the
more moderate of the Whigs offered terms, and while they were
debating the Duke's reply, the Cameronians, who bravely defended
the bridge, were compelled to abandon their post. The Duke's army
then crossed the river without opposition, because the rebels were
at that juncture occupied with cashiering their officers and electing
new ones. The first discharge of Monmouth's cannon caused the
cavalry of the Covenanters to wheel about, and their flight threw the
foot into irrecoverable disorder. Four hundred of the rebels were
killed, and a body of twelve hundred surrendered at discretion, and
were preserved from death by the clemency of the Duke. This action
took place on the 22d of June, 1679.
Scott informs us that there were two Gordons of Earlstoun engaged
in the rebellion, a father and son. The former was not in the battle,
but was met hastening to it by English dragoons, and was killed on
his refusing to surrender. The son, who is supposed to be the person
mentioned in the ballad, was of the milder Presbyterians, and fought
only for freedom of conscience and relief from the tyrannical laws
against non-conformists. He escaped from the battle, and after
being several times condemned to die, was finally set at liberty, and
restored to his forfeited estates.
In this ballad Claverhouse's unsparing pursuit of the fugitives is
imputed to a desire to revenge the death of his kinsman at Loudon
Hill, and his anger at being thwarted is, with great simplicity,
asserted to have led to the execution of Monmouth.
Scott's copy of this ballad was given from recitation. In the First
Series of Laing's Fugitive Scottish Poetry, there is an amusingly
prosaic Covenanting ditty upon this subject, called Bothwell Lines,
and in the Second Series, a Cavalier song, entitled The Battell of
Bodwell Bridge, or The Kings Cavileers Triumph.

"O, billie, billie, bonny billie,


Will ye go to the wood wi' me?
We'll ca' our horse hame masterless,
An' gar them trow slain men are we."

"O no, O no!" says Earlstoun,5


"For that's the thing that mauna be;
For I am sworn to Bothwell Hill,
Where I maun either gae or die."

So Earlstoun rose in the morning,


An' mounted by the break o' day;10
An' he has joined our Scottish lads,
As they were marching out the way.

"Now, farewell, father, and farewell, mother,


And fare ye weel, my sisters three;
An' fare ye weel, my Earlstoun,15
For thee again I'll never see!"

So they're awa' to Bothwell Hill,


An' waly they rode bonnily!
When the Duke o' Monmouth saw them comin',
He went to view their company.20

"Ye're welcome, lads," the Monmouth said,


"Ye're welcome, brave Scots lads, to me;
And sae are you, brave Earlstoun,
The foremost o' your company!

"But yield your weapons ane an a',25


O yield your weapons, lads, to me;
For gin ye'll yield your weapons up,
Ye'se a' gae hame to your country."

Out then spak a Lennox lad,


And waly but he spoke bonnily!30
"I winna yield my weapons up,
To you nor nae man that I see."

Then he set up the flag o' red,


A' set about wi' bonny blue;
"Since ye'll no cease, and be at peace,35
See that ye stand by ither true."

They stell'd their cannons on the height,


And showr'd their shot down in the howe;
An' beat our Scots lads even down,
Thick they lay slain on every knowe.40

As e'er you saw the rain down fa',


Or yet the arrow frae the bow,—
Sae our Scottish lads fell even down,
An' they lay slain on every knowe.

"O hold your hand," then Monmouth cry'd,45


"Gie quarters to yon men for me!"
But wicked Claver'se swore an oath,
His Cornet's death revenged sud be.
"O hold your hand," then Monmouth cry'd,
"If onything you'll do for me;50
Hold up your hand, you cursed Græme,
Else a rebel to our king ye'll be."

Then wicked Claver'se turn'd about,


I wot an angry man was he;
And he has lifted up his hat,55
And cry'd, "God bless his Majesty!"

Than he's awa' to London town,


Aye e'en as fast as he can dree;
Fause witnesses he has wi' him ta'en,
And ta'en Monmouth's head frae his body.60

Alang the brae, beyond the brig,


Mony brave man lies cauld and still;
But lang we'll mind, and sair we'll rue,
The bloody battle of Bothwell Hill.

THE BATTLE OF KILLIECRANKIE.


This battle was fought on the evening of the 27th of July, 1689, a
little to the north of the pass of Killiecrankie, in the Highlands of
Perthshire, between King William's army under General Mackay, and
a body of Highlanders under the renowned Claverhouse, the bravest
and most faithful adherent of the house of Stuart. Mackay's troops,
which were partly Dutch and partly English, amounted to 4,500 foot
and two companies of horse. The Highlanders were not much more
than half as numerous. They consisted of the followers of Maclean,
Macdonald of Sky, Clanronald, Sir Evan Cameron of Lochiel, and
others, with a few Irish. The left wing of Mackay's army was almost
instantly routed by a furious charge of the Macleans. The right wing
stood their ground manfully, and even repulsed the assault of the
Macdonalds, but being taken in flank by the Camerons and a part of
the Macleans, they were forced to retire and suffered great loss.
While directing the oblique movement of the Camerons, Claverhouse
received a mortal wound under the arm, and with him fell the cause
of King James.
This ballad, which is taken from Herd's Scottish Songs, i. 163, was
printed as a broadside near the time of the battle. The author is
unknown. There was an old song called Killiecrankie, which, with
some alterations, was inserted in Johnson's Museum (p. 302). It is
also found in Hogg's Jacobite Relics, i. 32, with an additional stanza.
A contemporary Latin ballad on the same event by Herbert Kennedy,
a professor in the University of Edinburgh, is given in the Museum,
and may be seen in our Appendix.

Clavers and his Highlandmen


Came down upo' the raw, man,
Who being stout, gave mony a clout;
The lads began to claw then.
With sword and terge into their hand,5
Wi which they were nae slaw, man,
Wi mony a fearful heavy sigh,
The lads began to claw then.

O'er bush, o'er bank, o'er ditch, o'er stank,


She flang amang them a', man;10
The butter-box got mony knocks,
Their riggings paid for a' then.
They got their paiks, wi sudden straiks,
Which to their grief they saw, man:
Wi clinkum clankum o'er their crowns,15
The lads began to fa' then.

Hur skipt about, hur leapt about,


And flang amang them a', man;
The English blades got broken heads,
Their crowns were cleav'd in twa then.20
The durk and door made their last hour,
And prov'd their final fa', man;
They thought the devil had been there,
That play'd them sic a paw then.

The Solemn League and Covenant25


Came whigging up the hills, man;
Thought Highland trews durst not refuse
For to subscribe their bills then.
In Willie's name, they thought nae ane
Durst stop their course at a', man,30
But hur-nane-sell, wi mony a knock,
Cry'd, "Furich-Whigs awa'," man.

Sir Evan Du, and his men true,


Came linking up the brink, man;
The Hogan Dutch they feared such,35
They bred a horrid stink then.
The true Maclean and his fierce men
Came in amang them a' man;
Nane durst withstand his heavy hand,
All fled and ran awa' then.40

Oh' on a ri, Oh' on a ri,


Why should she lose King Shames, man?
Oh' rig in di, Oh' rig in di,
She shall break a' her banes then;
With furichinish, an' stay a while,45
And speak a word or twa, man,
She's gi' a straike, out o'er the neck,
Before ye win awa' then.

O fy for shame, ye're three for ane,


Hur-nane-sell's won the day, man;50
King Shames' red-coats should be hung up,
Because they ran awa' then.
Had bent their brows, like Highland trows,
And made as lang a stay, man,
They'd sav'd their king, that sacred thing,55
And Willie'd ran awa' then.
17. The Highlanders have only one pronoun, and as it happens to
resemble the English her, it has caused the Lowlanders to have a
general impression that they mistake the feminine for the masculine
gender. It has even become a sort of nickname for them, as in the
present case, and in a subsequent verse, (31,) where it is extended
to her-nain-sell. Chambers, Scottish Songs, p. 48.

THE BATTLE OF SHERIFF-MUIR.


Fought on the 13th of November, 1715, between the Duke of Argyle,
general of the forces of King George the First, and the Earl of Mar,
for the Chevalier de St. George. The right wing of both armies, led
by the respective commanders, was successful, and the left wing of
both was routed. Hence the victory was claimed by both sides. The
Chevalier's army was much the larger of the two, and all the
advantages of the contest remained with the other party.
This ballad is printed in Herd's Scottish Songs, i. 170, and in many
subsequent collections. It is ascribed by Burns to the "Rev. Murdoch
M'Lellan, minister of Crathie, Dee-side." Our copy is taken from
Hogg's Jacobite Relics, ii. 1, where the stanzas in brackets appear
for the first time. The notes are from Chambers's Scottish Songs, p.
408.
There are several other ballads upon this battle: Up and war them
a', Willie, Johnson's Museum, p. 195, and (different) Herd's Scottish
Songs, ii. 234: From Bogie Side, or, The Marquis's Raide, a false and
scurrilous party song, Hogg's Jacobite Relics, ii. 13: A Dialogue
between Will Lick-Ladle and Tom Clean-Cogue, &c., written by the
Rev. John Barclay of Edinburgh, many years after the event: and The
Battle of Sherramoor, altered and abridged by Burns from this last,
for Johnson's Museum, (p. 290.) See Appendix.

There's some say that we wan, and some say that they wan,
And some say that nane wan at a', man;
But one thing I'm sure, that at Sherra-muir
A battle there was that I saw, man.
And we ran, and they ran, and they ran, and we ran,5
But Florence ran fastest of a', man.

Argyle and Belhaven, not frighted like Leven,


Which Rothes and Haddington saw, man;
For they all, with Wightman, advanc'd on the right, man,
While others took flight, being raw, man.10
And we ran,
&c.

Lord Roxburgh was there, in order to share


With Douglas, who stood not in awe, man;
Volunteerly to ramble with Lord Loudon Campbell,
Brave Ilay did suffer for a', man.
And we ran, &c.

Sir John Schaw, that great knight, with broad sword most bright,15
On horseback he briskly did charge, man;
A hero that's bold, none could him withhold,
He stoutly encounter'd the targemen.
And we ran, &c.

For the cowardly Whittam, for fear they should cut him,
Seeing glittering broad swords with a pa', man,
And that in such thrang, made Baird edicang,21
And from the brave clans ran awa, man.
And we ran, &c.

[The great Colonel Dow gade foremost, I trow,


When Whittam's dragoons ran awa, man;
Except Sandy Baird, and Naughtan the laird,25
Their horse shaw'd their heels to them a', man.
And we ran, &c.]

Brave Mar and Panmure were firm, I am sure:


The latter was kidnapt awa, man;
With brisk men about, brave Harry retook
His brother, and laugh'd at them a', man.30
And we ran, &c.

Brave Marshall, and Lithgow, and Glengary's pith, too,


Assisted by brave Loggia, man,
And Gordons the bright, so boldly did fight,
That the redcoats took flight and awa, man.
And we ran, &c.

Strathmore and Clanronald cried still, "Advance, Donald,"35


Till both of these heroes did fa', man;
For there was such hashing, and broad swords a-clashing,
Brave Forfar himsel got a claw, man.
And we ran, &c.

Lord Perth stood the storm, Seaforth but lukewarm,


Kilsyth, and Strathallan not slaw, man;40
And Hamilton pled the men were not bred,
For he had no fancy to fa', man.
And we ran, &c.

Brave gen'rous Southesk, Tullibardin was brisk,


Whose father indeed would not draw, man,
Into the same yoke, which serv'd for a cloak,45
To keep the estate 'twixt them twa, man.
And we ran, &c.
Lord Rollo not fear'd, Kintore and his beard,
Pitsligo and Ogilvie, a', man,
And brothers Balflours they stood the first show'rs,
Clackmannan and Burleigh did claw, man.50
And we ran, &c.

But Cleppan fought pretty, and Strowan the witty,


A poet that pleases us a', man;
For mine is but rhyme in respect of what's fine,
Or what he is able to draw, man.
And we ran &c.

For Huntly and Sinclair, they both play'd the tinkler,55


With consciences black as a craw, man;
Some Angus and Fife men, they ran for their life, man,
And ne'er a Lot's wife there at a', man.
And we ran, &c.

Then Laurie the traitor, who betray'd his master,


His king, and his country, an' a', man,60
Pretending Mar might give orders to fight,
To the right of the army awa, man.
And we ran, &c.

Then Laurie, for fear of what he might hear,


Took Drummond's best horse, and awa, man:
'Stead of going to Perth, he crossed the Firth,65
Alongst Stirling bridge, and awa, man.
And we ran, &c.

To London he press'd, and there he profess'd


That he behav'd best o' them a', man,
And so, without strife, got settled for life,
A hundred a-year to his fa', man.70
And we ran, &c.

In Borrowstounness he resides with disgrace,


Till his neck stand in need of a thraw, man;
And then in a tether he'll swing from a ladder,
And go off the stage with a pa', man.
And we ran, &c.

Rob Roy there stood watch on a hill, for to catch


The booty, for ought that I saw, man;76
For he ne'er advanc'd from the place he was stanc'd,
Till no more was to do there at a', man.
And we ran, &c.

So we all took the flight, and Moubray the wright,


And Lethem the smith was a braw man,80
For he took a fit of the gout, which was wit,
By judging it time to withdraw, man.
And we ran, &c.

And trumpet Maclean, whose breeks were not clean,


Through misfortune he happen'd to fa', man;
By saving his neck, his trumpet did break,85
And came off without music at a', man.
And we ran, &c.

So there such a race was as ne'er in that place was,


And as little chace was at a', man;
From each other they run without touk of drum,
They did not make use of a paw, man.90
And we ran, &c.

[Whether we ran, or they ran, or we wan, or they wan,


Or if there was winning at a', man,
There no man can tell, save our brave genarell,
Who first began running of a', man.
And we ran, &c.

Wi' the Earl o' Seaforth, and the Cock o' the North;95
But Florence ran fastest of a', man,
Save the laird o' Phinaven, who sware to be even
W' any general or peer o' them a', man.]
And we ran, &c.
6. Florence was the Marquis of Huntly's horse. Hogg.
7-10. Lord Belhaven, the Earl of Leven, and the Earls of Rothes and
Haddington, who all bore arms as volunteers in the royal army.
Major-General Joseph Wightman, who commanded the centre of the
royal army.
11-14. John, fifth Duke of Roxburgh, a loyal volunteer. Archibald,
Duke of Douglas, who commanded a body of his vassals in the royal
army. Hugh Campbell, third Earl of Loudoun, of the royal army. The
Earl of Ilay, brother to the Duke of Argyle. He came up to the field
only a few hours before the battle, and had the misfortune to be
wounded.
15. Sir John Shaw of Greenock, an officer in the troop of volunteers,
noted for his keen Whiggish spirit.
17. Major-General Whitham, who commanded the left wing of the
King's army.
39-42. James, Lord Drummond, eldest son of the Earl of Perth, was
Lieutenant-general of horse under Mar, and behaved with great
gallantry. William Mackenzie, fifth Earl of Seaforth. The Viscount
Kilsyth. The Viscount Strathallan. Lieutenant-general George
Hamilton, commanding under the Earl of Mar.
27-30. James, Earl of Panmure. The Honourable Harry Maule of
Kellie, brother to the foregoing, whom he recaptured after the
engagement.
31-4. The Earls of Marischal and Linlithgow. The Chief of Glengary.
Thomas Drummond of Logie Almond.
35-8. The Earl of Strathmore, killed in the battle. The Chief of
Clanranald. The Earl of Forfar—on the King's side—wounded in the
engagement.
43. James, fifth Earl of Southesk. The Marquis of Tullibardine, eldest
son of the Duke of Athole.
47-50. Lord Rollo. The Earl of Kintore. Lord Pitsligo. Lord Ogilvie, son
of the Earl of Airly. Bruce, Laird of Clackmannan—the husband, I
believe, of the old lady who knighted Robert Burns with the sword of
Bruce, at Clackmannan Tower. Lord Burleigh.
51. Major William Clephane. Alexander Robertson of Struan, chief of
the Robertsons.
55. Alexander, Marquis of Huntly, afterwards Duke of Gordon. The
Master of Sinclair.
59-74. These four stanzas seem to refer to a circumstance reported
at the time; namely, that a person had left the Duke of Argyle's
army, and joined the Earl of Mar's, before the battle, intending to act
as a spy; and that, being employed by Mar to inform the left wing
that the right was victorious, he gave a contrary statement, and,
after seeing them retire accordingly, went back again to the royal
army.
75. The celebrated Rob Roy. This redoubted hero was prevented, by
mixed motives, from joining either party. He could not fight against
the Earl of Mar, consistent with his conscience, nor could he oppose
the Duke of Argyle, without forfeiting the protection of a powerful
friend.
93. This point is made at the expense of a contradiction. See v. 27.
95-7. The Cock of the North is an honorary popular title of the Duke
of Gordon. Carnegy of Finhaven.

LORD DERWENTWATER.
James Radcliff, Earl of Derwentwater, fell into the hands of the
Whigs at the surrender of Preston, on the very day of the battle of
Sheriff-Muir, and suffered death in February, 1716, for his
participation in the rebellion. Smollet has described him as an
amiable youth,—brave, open, generous, hospitable, and humane.
"His fate drew tears from the spectators, and was a great misfortune
to the country in which he lived. He gave bread to multitudes of
people whom he employed on his estate;—the poor, the widow, and
the orphan rejoiced in his bounty." (History of England, quoted by
Cromek.) We are told that the aurora borealis was remarkably vivid
on the night of the earl's execution, and that this phenomenon is
consequently still known in the north by the name of "Lord
Derwentwater's Lights."
Although this ballad is said to have been extremely popular in the
North of England for a long time after the event which gave rise to
it, no good copy has as yet been recovered. The following was
obtained by Motherwell (Minstrelsy, p. 349) from the recitation of an
old woman. Another copy, also from recitation but "restored to
poetical propriety," is given in the Gentleman's Magazine, for June,
1825 (p. 489), and fragments of a third in Notes and Queries, vol.
xii. p. 492. Two spurious ballads on the death of Lord Derwentwater
have been sometimes received as genuine: one by Allan
Cunningham, first published in Cromek's Nithsdale and Galloway
Song, p. 129, another (Lord Derwentwater's Goodnight) by Surtees,
printed in Hogg's Jacobite Relics, ii. 31. Still another modern
imitation is Young Ratcliffe, in Sheldon's Minstrelsy of the English
Border, p. 401.
There is a ballad on the disgraceful capitulation of Preston in Hogg's
Jacobite Relics, ii. 102, also, Northumberland Garland, p. 85,
beginning "Mackintosh was a soldier brave."

Our King has wrote a long letter,


And sealed it ower with gold;
He sent it to my lord Dunwaters,
To read it if he could.

He has not sent it with a boy,5


Nor with any Scots lord;
But he's sent it with the noblest knight
E'er Scotland could afford.

The very first line that my lord did read,


He gave a smirkling smile;10
Before he had the half of it read,
The tears from his eyes did fall.

"Come saddle to me my horse," he said,


"Come saddle to me with speed;
For I must away to fair London town,15
For to me there was ne'er more need."

Out and spoke his lady gay,


In childbed where she lay:
"I would have you make your will, my lord Dunwaters,
Before you go away."20

"I leave to you, my eldest son,


My houses and my land;
I leave to you, my youngest son,
Ten thousand pounds in hand.

"I leave to you, my lady gay, —25


You are my wedded wife, —
I leave to you, the third of my estate,
That'll keep you in a lady's life."

They had not rode a mile but one,


Till his horse fell owre a stane:30
"It's a warning good enough," my lord Dunwaters said,
"Alive I'll ne'er come hame."
When they came to fair London town,
Into the courtiers' hall,
The lords and knights of fair London town35
Did him a traitor call.

"A traitor! a traitor!" says my lord,


"A traitor! how can that be?
An it be nae for the keeping five thousand men,
To fight for King Jamie.40

"O all you lords and knights in fair London town,


Come out and see me die;
O all you lords and knights in fair London town,
Be kind to my ladie.

"There's fifty pounds in my right pocket,45


Divide it to the poor;
There's other fifty in my left pocket,
Divide it from door to door."

THE BATTLE OF TRANENT-MUIR, OR OF


PRESTON-PANS
Herd's Scottish Songs, i. 166: Ritson's Scotish Songs, ii. 76.
This ballad is the work of Adam Skirving, a clever and opulent
farmer, father of Archibald Skirving, the portrait painter. It was
printed shortly after the battle as a broadside, and next appeared in
The Charmer, vol. ii. p. 349, Edinb. 1751. Neither of those editions
contains the eleventh stanza. The foot-notes commonly attached to
the subsequent reprints are found in The Charmer. (Laing in
Johnson's Museum, iv. 189*.)
To Skirving is also attributed with great probability the excellent
satirical song of Johnnie Cope, or Cope are you waking yet. The
original words are in Ritson, Scotish Songs, ii. 84: another set at p.
82: a third, with alterations and additions by Burns, in Johnson's
Museum, p. 242. Allan Cunningham once heard a peasant boast that
he could sing Johnnie Cope with all its nineteen variations. See
Appendix.
The battle took place on the 22d of September, 1745, between the
villages of Tranent and Prestonpans, a few miles from Edinburgh.
The king's lieutenant-general, Sir John Cope, was disgracefully
defeated by the Highlanders under Charles Edward, and nearly all
his army killed or taken. The details of the conflict are vividly
described in the 46th and 47th chapters of Waverley.

The Chevalier, being void of fear,


Did march up Birsle brae, man,
And thro' Tranent, e'er he did stent,
As fast as he could gae, man:
While General Cope did taunt and mock,5
Wi' mony a loud huzza, man;
But e'er next morn proclaim'd the cock,
We heard another craw, man.

The brave Lochiel, as I heard tell,


Led Camerons on in clouds, man;10
The morning fair, and clear the air,
They loos'd with devilish thuds, man.
Down guns they threw, and swords they drew
And soon did chace them aff, man;
On Seaton-Crafts they buft their chafts,15
And gart them rin like daft, man.

The bluff dragoons swore blood and 'oons,


They'd make the rebels run, man;
And yet they flee when them they see,
And winna fire a gun, man:20
They turn'd their back, the foot they brake,
Such terror seiz'd them a', man;
Some wet their cheeks, some fyl'd their breeks,
And some for fear did fa', man.

The volunteers prick'd up their ears,25


And vow gin they were crouse, man;
But when the bairns saw't turn to earn'st,
They were not worth a louse man.
Maist feck gade hame; O fy for shame!
They'd better stay'd awa', man,30
Than wi' cockade to make parade,
And do nae good at a', man.

Menteith the great, when hersell sh—,


Un'wares did ding him o'er man;
Yet wad nae stand to bear a hand,35
But aff fou fast did scour, man;
O'er Soutra hill, e'er he stood still,
Before he tasted meat, man:
Troth he may brag of his swift nag,
That bare him aff sae fleet, man.40

And Simpson keen, to clear the een


Of rebels far in wrang, man,
Did never strive wi' pistols five,
But gallop'd with the thrang, man:
He turn'd his back, and in a crack45
Was cleanly out of sight man;
And thought it best; it was nae jest
W' Highlanders to fight, man.

'Mangst a' the gang nane bade the bang


But twa, and ane was tane, man;50
For Campbell rade, but Myrie staid,
And sair he paid the kain, man;
Fell skelps he got, was war than shot,
Frae the sharp-edg'd claymore, man;
Frae many a spout came running out55
His reeking-het red gore, man.

But Gard'ner brave did still behave


Like to a hero bright, man;
His courage true, like him were few
That still despised flight, man;60
For king and laws, and country's cause,
In honour's bed he lay, man;
His life, but not his courage, fled,
While he had breath to draw, man.

And Major Bowle, that worthy soul,65


Was brought down to the ground, man;
His horse being shot, it was his lot
For to get mony a wound, man:
Lieutenant Smith, of Irish birth,
Frae whom he call'd for aid, man,70
Being full of dread, lap o'er his head,
And wadna be gainsaid, man.

He made sic haste, sae spur'd his beast,


'Twas little there he saw, man;
To Berwick rade, and safely said,75
The Scots were rebels a', man.
But let that end, for well 'tis kend
His use and wont to lie, man;
The Teague is naught, he never faught,
When he had room to flee, man.80

And Caddell drest, amang the rest,


With gun and good claymore, man,
On gelding grey he rode that way,
With pistols set before, man;
The cause was good, he'd spend his blood,85
Before that he would yield, man;
But the night before, he left the cor,
And never fac'd the field, man.

But gallant Roger, like a soger,


Stood and bravely fought, man;90
I'm wae to tell, at last he fell,
But mae down wi' him brought, man:
At point of death, wi' his last breath,
(Some standing round in ring, man,)
On's back lying flat, he wav'd his hat,95
And cry'd, God save the King, man.

Some Highland rogues, like hungry dogs,


Neglecting to pursue, man,
About they fac'd, and in great haste
Upon the booty flew, man;100
And they, as gain for all their pain,
Are deck'd wi' spoils of war, man;
Fu' bald can tell how hernainsell
Was ne'er sae pra before, man.

At the thorn-tree, which you may see105


Bewest the meadow-mill, man,
There mony slain lay on the plain,
The clans pursuing still, man.
Sick unco' hacks, and deadly whacks,
I never saw the like, man;110
Lost hands and heads cost them their deads,
That fell near Preston-dyke, man.

That afternoon, when a was done,


I gaed to see the fray, man;
But had I wist what after past,115
I'd better staid away, man:
On Seaton sands, wi' nimble hands,
They pick'd my pockets bare, man;
But I wish ne'er to drie sick fear,
For a' the sum and mair, man.120
33. The minister of Longformacus, a volunteer; who, happening to
come, the night before the battle, upon a Highlander easing nature
at Preston, threw him over, and carried his gun as a trophy to Cope's
camp.
41. Another volunteer Presbyterian minister, who said he would
convince the rebels of their error by the dint of his pistols; having,
for that purpose, two in his pockets, two in his holsters, and one in
his belt.
51. Mr. Myrie was a student of physic, from Jamaica; he entered as a
volunteer in Cope's army, and was miserably mangled by the broad-
swords.
69. Lieutenant Smith, who left Major Bowle when lying on the field
of battle, and unable to move with his wound, was of Irish
extraction. It is reported that after the publication of the ballad, he
sent Mr. Skirving a challenge to meet him at Haddington, and
answer for his conduct in treating him with such opprobrium. "Gang
awa back," said Mr. Skirving to the messenger, "and tell Mr. Smith, I
have nae leisure to gae to Haddington, but if he likes to come here,
I'll tak a look o' him, and if I think I can fecht him, I'll fecht him, and
if no—I'll just do as he did at Preston—I'll rin awa'." Stenhouse.
APPENDIX.

THE BATTLE OF OTTERBURN. See p. 5.


In the versions of this ballad given in the body of this work, the Earl
of Douglas is represented as falling by the hand of Harry Percy. In
the ballad which follows, taken from Herd's Scottish Songs, i. 211,
his death is ascribed to the revenge of an offended servant. Though
there is not the slightest reason to give credence to this story, it has
a certain foundation in tradition. Hume of Godscroft writes "there are
that say, that he [Douglas] was not slain by the enemy, but by one
of his own men, a groom of his chamber, whom he had struck the
day before with a truncheon, in ordering of the battle, because he
saw him make somewhat slowly to. And they name this man John
Bickerton of Luffness, who left a part of his armour behind
unfastened, and when he was in the greatest conflict, this servant of
his came behind his back, and slew him thereat." Wintown says that
the Earl was so intent on marshalling his forces, and so eager to be
at the foe, that he neglected to arm himself carefully.—Scott's
Minstrelsy, i. 350.

It fell, and about the Lammas time,


When husbandmen do win their hay,
Earl Douglas is to the English woods,
And a' with him to fetch a prey.

He has chosen the Lindsays light,5


With them the gallant Gordons gay,
And the Earl of Fyfe, withouten strife,
And Sir Hugh Montgomery upon a grey.
They hae taken Northumberland,
And sae hae they the North-shire,10
And the Otter-dale, they burnt it hale,
And set it a' into the fire.

Out then spack a bonny boy,


That serv'd ane o' Earl Douglas kin,
"Methinks I see an English host,15
A-coming branken us upon."

"If this be true, my little boy,


An it be troth that thou tells me,
The brawest bower in Otterburn
This day shall be thy morning fee.20

"But if it be false, my little boy,


But and a lie that thou tells me,
On the highest tree that's in Otterburn
With my awin hands I'll hing thee hie."

The boy's taen out his little penknife,25


That hanget low down by his gare,
And he gae Earl Douglas a deadly wound,
Alas, a deep wound and a sare!

Earl Douglas said to Sir Hugh Montgomery,


"Tack thou the vanguard o' the three,30
And bury me at yon bracken bush,
That stands upon yon lilly lee."

Then Percy and Montgomery met,


And weel I wat they war na fain;
They swapped swords, and they twa swat,35
And ay the blood ran down between.

"O yield thee, yield thee, Percy," he said,


"Or else I vow I'll lay thee low;
"Whom to shall I yield," said Earl Percy,
"Now that I see it maun be so?"40

"O yield thee to yon braken bush,


That grows upon yon lilly lee;
For there lies aneth yon braken bush
What aft has conquer'd mae than thee."

"I winna yield to a braken bush,45


Nor yet will I unto a brier;
But I wald yield to Earl Douglas,
Or Sir Hugh Montgomery, if he was here."

As soon as he knew it was Montgomery,


He stuck his sword's point in the ground,50
And Sir Hugh Montgomery was a courteous knight.
And he quickly caught him by the hand.

This deed was done at Otterburn,


About the breaking o' the day;
Earl Douglas was buried at the braken bush,55
And Percy led captive away.
13. At this place a recited copy, quoted by Finlay (Scottish Ballads, I.
p. xviii.), has the following stanzas:—

Then out an spak a little wee boy,


And he was near o' Percy's kin,
"Methinks I see the English host,
A-coming branking us upon;

Wi' nine waggons scaling wide,


And seven banners bearing high;
It wad do any living gude
To see their bonny colours fly.

43, 44. Supplied by Motherwell from a recited copy.


THE BATTLE OF HARLAW.
From Ramsay's Evergreen, i. 78.
This battle took place at Harlaw, near Aberdeen, on the 24th of July,
1411. The conflict was occasioned by a dispute concerning the
succession to the earldom of Ross, between Donald, Lord of the
Isles, and the son of the Regent, Robert, Duke of Albany, whose
claim was supported by Alexander Stewart, Earl of Mar. The
consequences of this battle were of the highest importance,
inasmuch as the wild Celts of the Highlands and Islands received
such a check that they never again combined for the conquest of the
civilized parts of Scotland.
The Battle of Harlaw is one of the old ballads whose titles occur in
the Complaynt of Scotland (1548). A bag-pipe tune of that name is
mentioned in Drummond of Hawthornden's mock-heroic poem, the
Polemo Middinia:

"Interea ante alios dux Piper Laius heros,


Præcedens, magnamque gerens cum burdine pypam
Incipit Harlai cunctis sonare Batellum."

Mr. Laing, in his Early Metrical Tales (p. xlv.) speaks of an edition
printed in the year 1668 as being "in the curious library of old Robert
Myln." No copy is now known to exist of a date anterior to that
which was published in Ramsay's Evergreen. Of the age of this copy
the most opposite opinions have been maintained, some regarding
the ballad as contemporary with the event, and others insinuating
that Ramsay, or one of his friends, is chargeable with the authorship.
This last notion has no other ground than the freedom which
Ramsay notoriously took with his texts, and that freedom has very
likely been exercised in the present case. We shall, perhaps, be
going quite as far as is prudent, if we acknowledge that this may be
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebookname.com

You might also like