(Ebook) Re-Engineering Legacy Software by Chris Birchall ISBN 9781617292507, 1617292508
(Ebook) Re-Engineering Legacy Software by Chris Birchall ISBN 9781617292507, 1617292508
com
https://ebooknice.com/product/re-engineering-legacy-
software-6770444
OR CLICK HERE
DOWLOAD EBOOK
(Ebook) Biota Grow 2C gather 2C cook by Loucas, Jason; Viles, James ISBN
9781459699816, 9781743365571, 9781925268492, 1459699815, 1743365578, 1925268497
https://ebooknice.com/product/biota-grow-2c-gather-2c-cook-6661374
ebooknice.com
https://ebooknice.com/product/engineering-software-products-an-introduction-to-
modern-software-engineering-22694604
ebooknice.com
https://ebooknice.com/product/engineering-software-products-an-introduction-to-
modern-software-engineering-33960916
ebooknice.com
https://ebooknice.com/product/search-based-software-engineering-6th-
international-symposium-ssbse-2014-fortaleza-brazil-
august-26-29-2014-proceedings-4932368
ebooknice.com
(Ebook) Re-Engineering Humanity by Brett Frischmann; Evan Selinger
https://ebooknice.com/product/re-engineering-humanity-7163370
ebooknice.com
https://ebooknice.com/product/software-engineering-for-game-developers-software-
engineering-series-1463414
ebooknice.com
https://ebooknice.com/product/fundamentals-of-software-engineering-engineering-
handbook-36522684
ebooknice.com
ebooknice.com
https://ebooknice.com/product/business-process-modeling-software-engineering-
analysis-and-applications-software-engineering-analysis-and-
applications-51348846
ebooknice.com
Re-Engineering Legacy
Software
Chris Birchall
Copyright
For online information and ordering of this and other Manning books,
please visit www.manning.com. The publisher offers discounts on this
book when ordered in quantity. For more information, please contact
Special Sales Department
Manning Publications Co.
20 Baldwin Road
PO Box 761
Shelter Island, NY 11964
Email: [email protected]
ISBN 9781617292507
1 2 3 4 5 6 7 8 9 10 – EBM – 21 20 19 18 17 16
Brief Table of Contents
Copyright
Brief Table of Contents
Table of Contents
Preface
Acknowledgments
About this Book
1. Getting started
Index
List of Figures
List of Tables
List of Listings
Table of Contents
Copyright
Brief Table of Contents
Table of Contents
Preface
Acknowledgments
About this Book
1. Getting started
1.5. Summary
2.5. Summary
3.5. Summary
Chapter 4. Refactoring
4.4. Summary
Chapter 5. Re-architecting
5.1. What is re-architecting?
5.2. Breaking up a monolithic application into modules
5.4. Summary
6.4. Summary
7.4. Summary
8.4. Summary
10.2.1. Documentation
10.2.2. Foster communication
10.6. Summary
Index
List of Figures
List of Tables
List of Listings
Preface
This book would not have been possible without the support of
many people. I’ve been lucky enough to work with a lot of highly
skilled developers over the years who have indirectly contributed
countless ideas to this book.
I’d also like to thank everybody at M3, where I had my first taste of
release cycles measured in days rather than months. I learned a lot,
especially from the “tigers” Lloyd Chan and Vincent Péricart. It was
also at M3 that Yoshinori Teraoka introduced me to Ansible.
Right now I’m at the Guardian, where I’m incredibly lucky to work
with so many talented and passionate developers. More than
anything else, they have taught me what it means to really work in
an agile way, rather than merely going through the motions.
I’d also like to thank the reviewers who took the time to read the
book in manuscript form: Bruno Sonnino, Saleem Shafi, Ferdinando
Santacroce, Jean-François Morin, Dave Corun, Brian Hanafee,
Francesco Basile, Hamori Zoltan, Andy Kirsch, Lorrie MacKinnon,
Christopher Noyes, William E. Wheeler, Gregor Zurowski, and Sergio
Romero.
This book also owes a great deal to the entire Manning editorial
team. Mike Stephens, the acquisitions editor, helped me get the
book out of my head and onto paper. Karen Miller, my editor, worked
tirelessly to review the manuscript. Robert Wenner, my technical
development editor, and René van den Berg, technical proofreader,
both made invaluable contributions. Kevin Sullivan, Andy Carroll, and
Mary Piergies helped take the finished manuscript through to
production. And countless other people reviewed the manuscript or
supported me in myriad other ways, some of which I probably didn’t
even know about!
This book is ambitious in scope, setting itself the aim of teaching you
everything you need to do in order to transform a neglected legacy
codebase into a maintainable, well-functioning piece of software that
can provide value to your organization. Covering absolutely
everything in a single book is, of course, an unachievable goal, but
I’ve attempted to do so by approaching the problem of legacy
software from a number of different angles.
That’s not to say that the book has no technical content—far from it.
We’ll cover a wide range of technologies and tools, including Jenkins,
FindBugs, PMD, Kibana, Gradle, Vagrant, Ansible, and Fabric. We’ll
look in detail at a number of refactoring patterns, discuss the relative
methods of various architectures, from monoliths to microservices,
and look at strategies for dealing with databases during a rewrite.
Roadmap
Chapter 1 is a gentle introduction, explaining what I mean when I
talk about legacy software. Everybody has their own definitions of
words like “legacy,” so it’s good to make sure we understand each
other from the start. I also talk about some of the factors that
contribute to code becoming legacy.
The next three chapters move away from the code and look at
infrastructure. In chapter 7 we’ll look at how a little automation can
vastly improve the onboarding process for new developers, which
will encourage developers from outside the team to make more
contributions. This chapter introduces tools such as Vagrant and
Ansible.
In chapter 10, the final chapter, I’ll offer a few simple rules that you
can follow to hopefully prevent your code from becoming legacy.
Source code
We have tried to format the code so that it fits within the available
page space in the book by adding line breaks and using indentation
carefully.
All the code used in the book is available for download from
www.manning.com/books/re-engineering-legacy-software. It is also
available on GitHub at https://github.com/cb372/ReengLegacySoft.
Author Online
Dress codes have changed since then and the diversity by region, so
rich at the time, has faded away. It is now hard to tell apart the
inhabitants of different continents, let alone different towns or
regions. Perhaps we have traded cultural diversity for a more varied
personal life—certainly for a more varied and fast-paced
technological life.
In the first chapter we’ll investigate what legacy means and what
factors contibute to the creation of unmaintainable software. In
chapter 2 we’ll set up an inspection infrastructure that will allow us to
quantitatively measure the current state of the software and provide
structure and guidance around refactoring.
Why not? Because you’re tasked with maintaining a few zillion lines
of untested, undocumented, incomprehensible legacy code. This
code has been in production since before you wrote your first Hello
World and has seen dozens of developers come and go. You spend
half of your working day reviewing commits to make sure that they
don’t cause any regressions, and the other half fighting fires when a
bug inevitably slips through the cracks. And the most depressing
part of it is that as time goes by, and more code is added to the
increasingly fragile codebase, the problem gets worse.
But don’t despair! First of all, remember that you’re not alone. The
average developer spends much more time working with existing
code than writing new code, and the vast majority of developers
have to deal with legacy projects in some shape or form. Secondly,
remember that there’s always hope for revitalizing a legacy project,
no matter how far gone it may first appear. The aim of this book is
to do exactly that.
First of all, I want to make sure we’re on the same page concerning
what a legacy project is. I tend to use a very broad definition,
labeling as legacy any existing project that’s difficult to maintain or
extend.
Note that we’re talking about a project here, not just a codebase. As
developers, we tend to focus on the code, but a project
encompasses many other aspects, including
Of course, the code itself is important, but all of these factors can
contribute to the quality and maintainability of a project.
It’s neither easy nor particularly useful to lay down a rule about what
counts as a legacy project, but there are a few features that many
legacy projects have in common.
Old
It goes without saying that the larger the project is, the more
difficult it is to maintain. There is more code to understand, a larger
number of existing bugs (if we assume a constant defect rate in
software, more code = more bugs), and a higher probability of a
new change causing a regression, because there is more existing
code that it can potentially affect. The size of a project also affects
decisions about how the project is maintained. Large projects are
difficult and risky to replace, so they are more likely to live on and
become legacy.
Inherited
I once worked on the software for a forum in which users could post
messages in threads. The system had an API that allowed you to
retrieve a list of the most popular threads, along with a few of the
most recently posted messages in each of those threads. The API
looked something like the following listing.
/**
* Retrieve a list of summaries of the most popular threads.
*
* @param numThreads
* how many threads to retrieve
* @param recentMessagesPerThread
* how many recent messages to include in thread summary
* (set this to 0 if you don't need recent messages)
* @return thread summaries in decreasing order of popularity
*/
public List<ThreadSummary> getPopularThreads(
int numThreads, int recentMessagesPerThread);
That religion, which is true, and has God for its author, is, like the
light of the sun, the common property of all who will only open their
eyes, and gaze upon the gift of God. It is not a religion for the rich or
the studious only, but is equally open to the understanding and the
hearts of the poor and unlearned. And therefore the Bible describes
the heavenly wisdom thus—“She standeth in the top of high places,
by the way in the places of the paths; she crieth at the gates at the
entry of the city, at the coming in at the doors: Unto you, O men, I
call; and my voice is to the sons of man. O ye simple, understand
wisdom; and, ye fools, be of an understanding heart.” (Prov. viii. 2-5.)
And so God invites men of every class by the mouth of the prophet
—“Ho, every one that thirsteth, come ye to the waters, and he that
hath no money; come ye, buy and eat; yea, come, buy wine and milk
without money and without price.” (Isa. lv. 1.) Every religion of man’s
making, presents, on the contrary, peculiar advantages to the rich
and the learned. It offers salvation either as the purchase of
almsgiving, or as the reward of religious study, or it makes religion so
difficult and intricate as to put it out of the poor labouring man’s
power to acquire any competent knowledge of its requirements. And
any system that does so must necessarily be false. Religion is as
necessary to the soul as daylight is to the corporeal eye, and it would
be a hard case, indeed, if the poor, who want it most, should be
excluded from the possibility of acquiring its consolations; or if, in the
day of judgment, the man who devotes his life to books should have
a better chance, than he who labours hard to get an honest living for
himself and his family; yet this is the case with the labouring classes
of the Jews. The religion of the oral law has so perplexed even the
simplest commandments, that an unlearned man has no chance of
being able to keep them. If nothing more were required for salvation
than the rabbinic sanctification of the Sabbath-day the majority of the
Jewish people must despair of attaining it; for the accurate
knowledge of the innumerable precepts and distinctions, which is
indispensable to obedience, requires time and study, which no
labouring man can bestow. And we are convinced that a
considerable portion of the Jewish population of this city live in
continual profanation of the Sabbath-day, if the rabbinic explanations
be true. Either they move something which they ought not to move,
or they carry something which they ought not to carry; and, if they do
it wilfully, render themselves liable to the utmost severity of the law.
For instance, the rabbies have determined that in one place it is
lawful to move or carry certain things on the Sabbath-day, but in
another place the very some act is unlawful, and calls down extreme
punishment. They distinguish between these places thus—
רשות, רשות היחיד ורשות הרבים כרמלית ומקום פטור, ארבע רשויות לשבת
היחיד הוא המקום המוקף מחיצות גבוהות עשרה ויש בו ארבעה טפחים על
ארבעה ואפילו אם יש בו כמה מילין אם מוקף לדירה ודלתותיו נעולות בלילה הוי
וכן חריץ עמוק עשרה ורחב ד׳ על ד׳ או יותר וכן. ודיר וסהר וחצר, רשות היחיד
וכותלים המקיפין רשות היחיד על גביהן, תל גבוה י׳ ורחב ארבעה על ארבעה
ואויר רשות היחיד הוא רשות היחיד עד לרקיע ואפילו כלי, וחוריהן רשות היחיד
ורשות, אם גבוה י׳ ורחב ד׳ על ד׳ כגון תיבה או כוורת או מגדל הוי רשות היחיד
היחיד הוא רחובות ושווקים הרחבים י׳ אמה על י׳ אמה ומפולשים משער לשער
וכל דבר שהוא ברשות הרבים ואינו גבוה ג׳ טפחים חשוב, וששים רבוא עוברין בו
ואם, כקרקע והוא רשות הרבים אפילו קוצים או צואה שאין רבים דורסין עליהם
הוא גבוה ג׳ ומג׳ עד ט׳ ולא ט׳ בכלל אם הוא רחב ד׳ על ד׳ הוי כרמלית פחות
מכאן הוי מקום פטור ׃
In reference to the Sabbath, places are distinguished into four sorts
of jurisdiction. 1st, the private jurisdiction; 2d, the public jurisdiction;
3d, the place called Karmelith; 4th, the place which is free.
By a private jurisdiction is meant a place surrounded by walls, ten
handbreadths high, and in which there is a space of four
handbreadths by four. But even though it should contain many miles,
if it be inclosed for habitation, and its gates be bolted at night, it is a
private jurisdiction. A lodging-place, an inclosed space, and a court,
are considered as in the same class. And thus, also, a pit which is
ten handbreadths deep, and whose breadth is four by four, or more;
and a raised place which is ten handbreadths high, and whose
breadth is four by four. The top of the walls, also, by which a private
jurisdiction is surrounded, and the openings in them, are considered
as private jurisdiction. The air of a private jurisdiction, up to the
firmament, is also considered; and even a vessel like a chest, if it be
ten handbreadths high, and in breadth four by four. A hollow vessel,
or a tower, is also considered as a private jurisdiction.
The term public jurisdiction includes roads and streets, if their
breadth be sixteen ells by sixteen, and they be open from gate to
gate, and six hundred thousand persons pass thereon. And
everything in a public jurisdiction, which is not three handbreadths
high, is reckoned as the ground, and is public jurisdiction: even
thorns and filth upon which the public does not tread.
But if it be from three to nine handbreadths high, but not nine
entirely, and its breadth be four by four, it is called a Karmelith.
“If it be less, it is called a free place.” (Orach Chaiim, 344.)
Now it may well be doubted, concerning many Jews in this city,
whether they are acquainted with even this portion of the Sabbath
laws, but it is quite certain that they are ignorant of the innumerable
modes of possible transgression which arise from these distinctions;
for the oral law then goes on to define what is lawful concerning
each. In a public jurisdiction he may move anything four ells:—
כל אדם יש לו ד׳ אמות ברשות הרבים שיכול לטלטל בהם ׃
“Every man has got four ells within which he may move things.” Or,
as Rambam expresses it—
רשות היחיד ומקים פטור מותר לטלטל בכולן אפילו היה אורך כל אחת משתיהן
אבל רשות הרבים והכרמלית אין מטלטלין בהן אלא, כמה מילין מטלטל בכולה
בארבע אמות ׃
“In a private jurisdiction, and in a free place it is lawful to move things
the whole length of the place, even though the length of each should
be many miles. But in a public jurisdiction or a Karmelith things may
not be moved more than four ells.” (Hilchoth Shabbath, c. xxiv. 11.)
Now, it may well be asked, upon what passage of the law of Moses
these distinctions are grounded, and what there is in a public
jurisdiction which converts an act lawful in a private jurisdiction, into
a sin to be expiated only by stoning the offender? For instance, in a
private jurisdiction a man may carry certain matters for miles without
violating the Sabbath commands, but if he venture out into a public
jurisdiction with a pocket-handkerchief or a snuff-box, or a half-crown
in his pocket, and carry it only five ells, he is guilty of death; and if
the Talmudists held the reigns of power, would be led out as soon as
the Sabbath was over, and stoned. Reason revolts against such
doctrine, the act is the very same in both cases, and is therefore in
both cases a sin, or in both cases lawful. Humanity shudders at the
thought of stoning a man for carrying a pocket-handkerchief, and the
Bible teaches us that a religion, teaching such inexorable and
wanton cruelty, cannot be from God. It is true that at present the
power of Christianity protects Israelites from such harsh treatment;
but wherever the Talmud has any degree of influence, Israel groans
under its bondage. Many a time have we seen Jews with their
pocket-handkerchief tied round their knee like a garter, for this is
lawful, though to carry it in his pocket would be a grave and capital
offence. And we once knew an Israelite who was taking a walk on
the Sabbath-day, and being addressed by a Gentile beggar, put his
hand into his pocket and gave the poor man a small coin. He was
observed by some Talmudists, who immediately attacked him for his
profanation of the Sabbath. Afraid of losing his character, and being
at that time more anxious for the praise of man than that which
cometh of God, he defended himself by saying, that he had
unintentionally taken out the money in his pocket, but had
remembered it when addressed by the beggar, and therefore took
the opportunity of getting rid of that which it was not lawful to carry.
The Talmudists were satisfied, and their wrath changed into profound
admiration for his piety. These cases exemplify the practical working
of the rabbinic system. It burdens the consciences of the sincere,
and makes the unscrupulous hypocrites. It may be replied that such
things could not happen in England, and that here the Jews are too
enlightened to observe such distinctions. But every one who makes
this reply condemns modern Judaism as a religion unfit for the
observation of the enlightened, and if he be a conscientious man,
should protest against doctrines which he believes to be false, and
laws which he abhors as cruel. These Sabbatic laws are a part, an
essential part, of modern Judaism. There is not any part of the oral
law upon which Talmudists lay more stress. The man, therefore, who
does not observe them has changed his religion. He has got a new
faith, as really, as if he had been baptized and professed Christianity.
Every Israelite who carries a pocket-handkerchief in his pocket
through the streets of London on the Sabbath-day, has apostatized
from that Jewish religion, which has been professed for near two
thousand years, and practically declares that the religion of the
synagogue is false. How then can he, without hypocrisy, profess to
believe in the religion of the Jews? or how can he, as an honest
man, uphold a system which he regards as false, and which would
have him executed as a criminal if it had the power? If such persons,
who live in the habitual transgression of all the Sabbatic laws, have
any regard for truth and for Divine revelation, they should openly
declare their sentiments, announce to the world that they have
forsaken the religion of their fathers, and assert that religion which
they regard as true. The blindest and most bigoted Talmudist is a far
more respectable man, and more acceptable in the sight of God,
than he who pretends to profess a religion in which he does not
believe, and whose precepts he regards as fanatical and
superstitious.
But to return. From the above laws it appears that it is a sin to carry
anything in a public jurisdiction a distance of more than four ells. But
suppose, then, that there was something which the Talmudists might
find it convenient or desirable to move to a greater distance, is there
no provision to effect its conveyance? Yes. These scrupulous
persons, who would stone a man to death for carrying anything five
ells, have an expedient for conveying it a hundred miles if necessary:
—
לגיכך מותר לאדם לעקור החפץ מרשות הרבים ולתנו לחברו שאצלו בתוך ד׳
אמותיו וחברו לחברו שאצלו אפילו ק׳ מילין אע׳׳פ שהחפץ הולך כמה מילין ברשות
הרבים שכל אחד לא יטלטלנו אלא בתוך ד׳ אמותיו ׃
“Therefore it is lawful for a man to move a matter from the public
jurisdiction, and to give it to his neighbour, who is within a distance of
four ells; and his neighbour to his neighbour again, and so on, even
for a hundred miles. For although the thing itself go many miles,
each person has only moved it his four ells.” (Orach Chaiim, 348.)
We have often heard of the wonderful effects of division of labour,
but never knew before that it could convert a capital offence into an
innocent employment. Surely it is not necessary to prove that if it be
unlawful for one person to do a particular act, it is equally unlawful
for a hundred persons to combine for its performance. This law really
has more the appearance of a caricature devised by some enemy of
the oral law, than the grave decision of religious men in a matter of
life and death. But if we examine a little further, we shall find that it is
unlawful to move this same thing, whatever it be, from one
jurisdiction to another, though that other be close at hand:—
כשם שאסור לטלטל בכל הכרמלית אסור להוציא ממנה לרשות היחיד או לרשות
ואם הוציא או, הרבים או להכניס לכרמלית מרשות היחיד או מרשות הרבים
הכניס פטור ׃
“As it is unlawful to move anything in the place called Karmelith, so it
is unlawful to carry anything out of it into a public or private
jurisdiction, or, vice versa, to introduce anything from either of these
into the Karmelith. But if any one does either he is not guilty,” that is,
he is only to get a flogging, but not to be stoned. An unlearned man
who had already seen something conveyed by the above expedient,
might easily be led to commit an offence of this kind. His untutored
mind might not perceive why the one should be sinful, if the other
was lawful; but such an assertion of common sense would draw
down certain chastisement. At all events, he might be tempted to put
his head from one jurisdiction into another, especially if he was
standing in the street, and was offered a drink by a friend in a house,
he might put his head into the window and take what was offered,
but would soon find, to his cost, that he had broken one of the
Sabbatic laws:—
לא יעמוד אדם ברשות היחיד ויוציא ראשו לרשות הרבים וישתה שם או איפכא
אלא אם כן יכניס ראשו ורובו למקים שהוא שותה דכיון שהוא צריך לאלו המים אנו
חוששין שמא יביאם אליו אבל מותר לעמוד ברשות היחיד או ברשות הרבים
ולשתות בכרמלית ׃
“A man may not stand in a private jurisdiction, and put forth his head
into a public jurisdiction, and then drink, or vice versa. But if he does
so, let him introduce his head and most of his body into the place in
which he drinks, for as he wants the water, we fear lest he should
take it to himself (into the place where he is standing). But it is lawful
to stand in a private or public jurisdiction and drink in that which is
called Karmelith. (Orach Chaiim, 349.) It is evident that no unlearned
man can stand a fair chance with laws like these. He could not hope
even to escape corporal punishment. But if the accurate observance
of such laws was the condition of salvation, he would have reason to
despair. The most honest desire to yield obedience and the utmost
exertion of his understanding will not help him, nor compensate for
his ignorance. If, for instance, he should conclude, because it is
unlawful for himself to have his head in one jurisdiction and his body
in another whilst he is drinking, that it would be equally unlawful for
cattle in the same predicament to get food, he would be mistaken:—
בהמה שהיתה רובה בחוץ וראשה בפנים אובסין אותה ׃
“A beast that has got most of its body outside, and its head inside,
may be fed.” And if he should take this as the general rule of his
conduct, he would be mistaken again, for long-necked animals form
an exception:—
ובגמל עד שיהא ראשו ורובו בפנים הואיל וצוארו ארוך ׃
“But in the ease of the camel, he must have his head and most of his
body inside, because his neck is long.” (Hilchoth Shabbath, c. xxv.
1.) And so with endless cases which arise from this one distinction of
places into four classes. Judaism is in all its parts a religion for the
studious, and for them only. For an unlearned man to keep the
Sabbath, as the oral law requirers, is absolutely impossible. And
after all, what good does it bestow upon those who spend their life in
the study? Does it improve the heart, or open more abundant views
of the Divine mercy, or fill the soul with love to man? That it sharpens
the wit and subtlety, we do not doubt, but that is but small profit to
man in general. The criminal law of any country will do the same,
and in truth the oral law is very little more than the rabbinical criminal
code. Its great subject is guilty and not guilty. And even in this it does
not address itself to the conscience, and lead a man to consider the
workings of the heart and the wanderings of the thought, and shew
him sin at its fountain-head. It is a mere dry detail of external
observances, as may be seen from the numerous specimens
adduced in these papers, and as might be shown more fully by
translating the whole. If real devout feeling and improvement of the
heart in the fear of God and the love of man be true religion, we
might expect it, if anywhere, in the Sabbath laws. The Sabbath is
that holy day which God has set apart to raise men’s thoughts from
earth to heaven. It is that period of earned relaxation on which even
the poor and the unlearned may lay aside their worldly cares and
occupations, and meditate upon the love and will of God, and that
eternity to which he is hastening. In the laws, then, respecting the
observance of this day, we might naturally expect the spirit of
devotion to be manifested; but in the oral law we look in vain for
anything of the kind. Its directions about the Sabbath are one
continued dry detail of external observances, which to a
conscientious man acquainted with them, must constitute a load
upon his conscience, sufficient to make the Sabbath the most
unhappy day of all the seven. But as to the poor and labouring
classes, who have no time for study, it is impossible that they should
know, and much more that they should keep, all that is necessary for
the right observation of the rabbinic Sabbath. If, therefore, the oral
law were true, the poor must lose a large portion of the blessings,
and even be in danger of perdition. Nay, if it be true, then we must
believe that God has given a religion impossible to be observed by
the poor, and offering great advantages to the rich and learned, that
is that He is a respecter of persons, though Moses and the prophets
teach the contrary. But we would ask our readers, what use is it to
them to profess a religion of which they can never attain a competent
knowledge? We venture to affirm that the majority of Israelites do not
know enough of the oral law to help them to keep the Sabbath, much
less to observe the six hundred and thirteen commandments; can it
be said, then, that they possess a religion with which they are not
even acquainted? If the knowledge and practice of the oral law be
necessary to constitute a true Jew, ninety-nine out of every hundred
must give up their claims to the Jewish name. But then what is to
become of the Jewesses, who are not even obligated to learn?
Every rabbi will be willing to confess that the women at least are
ignorant of the oral law. Can they then have a portion in the world to
come? If the knowledge and practice of the oral law be necessary to
salvation, they cannot. But if they can be saved without it, then it
follows that God has given a law, the knowledge of which is not
necessary to salvation. Let every Jew ask himself this question, Am I
acquainted with all the precepts of the oral law? If not, can I be
saved without this knowledge? If I cannot, then the Jewish religion is
one which makes it impossible for the poor to be saved. If I can, then
the Jewish religion is of no real use, for I can be saved even without
knowing it. Such a religion cannot be from God. His religion is
necessary to be known by every man, woman, and child in the world,
and the knowledge of it is just as easy to be acquired by the poor
and unlearned as by the rich and studious. Let then the poor and the
unlearned consider the folly of professing a religion, with which they
can never hope to become acquainted, and let them return to the
religion of Moses and the prophets, which, by the help of the God of
Israel, every one can understand, at least so far as is necessary to
salvation. The Bible, like everything that has God for its author, has
beauties discoverable by the eye of the poor, at the same time that it
has perfections to exercise the observation and skill of the most
learned. And this holy book is the heritage of Israel, which the oral
law can never be. The oral law may be the heritage and religion of
the rabbies who know it, but it has no more to do with the religion of
those who know it not, than the laws of the Chinese. The great
majority of the Jewish people might just as well call themselves
followers of Confucius. No man can be said to believe in doctrines
which he does not know, and can never hope to know: and this is the
case with nine-tenths of the oral law.
No. XXXI.
RABBINIC EXCOMMUNICATION.
It is a fact, that the religion of the oral law has hitherto done but little
to promote the temporal welfare of the Jewish people, and it is
equally certain that, if supreme, it would destroy the happiness both
of Jews add Gentiles. Its endless definitions would necessarily
produce transgression. Its severity and readiness in
excommunication would be the source of constant trouble to
individuals and families, and the sanguinary spirit of its criminal code
would make the Jews a nation of mourners. Indeed, we seriously
doubt, whether any, but a few fanatics, wish to see the oral law
vested with supreme power, and ruling over the lives and properties
of the Jewish nation. Every reflecting Israelite must know that the
Sanhedrin, wielding the absolute power ascribed to it in the rabbinic
traditions, would be the most oppressive tribunal that ever lorded it
over the consciences of men. But we must remember that it would
not be with the Sanhedrin and other tribunals alone, that the
Israelites would have to do. Every rabbi, and every disciple of a wise
man, would have the right of excommunicating any one who
offended them. After determining that the tribunals can and ought in
certain cases to excommunicate, the oral law adds—
וכן החכם עצמו מנדה לכבודו לעם הארץ שהקפיד בו ואין צריך לא עדים ולא
ואם מת החכם באין שלשה, ואין מתירין לו עד שירצה את החכם, התראה
ואם רצה החכם למחול לו ולא לנדהו הרשות בידו ׃. ומתירין לו
“And in like manner the wise man himself may, on account of his
honour, excommunicate an unlearned man who has treated him with
contumely, and there is no need of witnesses nor admonition. And
the excommunicate person is not to be absolved until he appease
the wise man. But if the wise man die, three persons come and
absolve him. If, however, the wise man wish to pardon, and not
excommunicate him, the power is in his own hand.” (Hilchoth Talmud
Torah, c. vi. 12.) From this law we see that the restoration of rabbinic
power would be the most oppressive system of government ever
devised. Every learned man would be a petty tyrant, constituting
both judge and jury in his own person, and able, at his own caprice,
to inflict a severe punishment. The most absolute aristocracy of the
feudal times never dared to assume or exercise a power so
monstrous and so oppressive. No priesthood, even in the darkest
times, ever claimed such personal authority as is here given to every
individual rabbi. It is true that he may, if he please, forgive the
unfortunate offender, but it is much to be feared that such absolute
power would in most cases be too strong a temptation to the frail
sons of men. And at all events the principle is utterly inconsistent
with wise legislation, and most dangerous to the liberty of the poor
and unlearned; for the reader will observe that it is only an unlearned
man, an “am-haaretz,” who may be dealt with in this summary
manner. And this is another proof that the religion of the oral law is a
religion devised for the advantage of the rich and learned, but
regardless of the spiritual and temporal welfare of the lower classes.
For the learned and the great the law is very different:—
חכם זקן בחכמה וכן נשיא או אב ב׳׳ד שסרח אין מנדין אותו בפרהסיא לעקלם
אלא אם כן עשה כירבעם בן נבט וחביריו אבל כשחטא שאר חטאות מלקין אותו
, בצנעה שנאמר וכשלת היום וכשל גם נביא עמך לילה אע׳׳פ שכשל כסהו בלילה
ואומרים לו הכבד ושב בביתך וכן כל ת׳׳ח שנתחייב נידוי אסור לב׳׳ד לקפוץ
ולנדותו במהרה ׃
“A wise man, old in wisdom, or a prince, or a president of a tribunal,
who has sinned, is never to be excommunicated publicly, unless he
have done as Jeroboam, the son of Nebat, and his companions. But
when he commits other sins, he is to be flogged in private. For it is
said, ‘Therefore shalt thou fall in the day, and the prophet also shall
fall with thee in the night,’ (Hos. iv. 5,) i.e., although he fall, cover him
as it were with the night. And they say to him, ‘Honour thyself, and
abide in thy house.’ (2 Kings xiv. 10.) In like manner, when a disciple
of a wise man makes himself guilty of excommunication, it is
unlawful for the tribunal to be too quick, and to excommunicate him
hastily.” (Ibid. c. vii. 1.) The rabbies have endeavoured to justify this
different legislation for the learned and unlearned by a verse of the
Bible, but their interpretation of that verse is quite erroneous. When
God says, “Therefore shalt thou fall in the day, and the prophet shall
also fall with thee in the night,” he is not speaking of the learned and
unlearned, nor of the different way in which their sins were to be
punished, but of the destruction which was coming upon Israel, as
may be seen in Kimchi’s Commentary. He interprets the verse thus—
היום ר׳׳ל חזמן הזה, וכשלת היום אמר כנגד ישראל בעבור מעשיך תכשל ותפול
ביום ההוא שורש ישי, וכן וחרה אפי בו ביום ההוא, בקרוב תבוא מפלתך
וכשל גם נביא עמך לילה נביא שקר המתעה, ענינם עת וזמן, והדומים להם
אותך יכשל עמך כמו האדם נכשל בלילה בחשכה וכן תרגם יונתן ׃
“Therefore shalt thou stumble in the day.” This refers to Israel, and
means on account of thy deeds thou shalt stumble and fall. This day;
that is, in this time; thy fall shall soon come. And so we read, “Then
my anger shall be kindled against them in that day.” (Deut. xxxi. 17.)
And again, “In that day there shall be a root of Jesse,” (Isaiah xi. 10,)
where day means time and period. And the prophet also shall fall
with thee in the night, that is, the false prophet who deceiveth thee
shall stumble with thee, as men stumble in the night in darkness; and
so the Targum of Jonathan has it. (Kimchi, Comment. in Hos. iv. 2.)
Kimchi and Jonathan, then, both testify that the oral law gives a false
interpretation of this verse. This is in itself rather awkward for a law
that professes to have been given by God, but still more so when it is
made the basis of most unjust and partial legislation, to save the
learned from the punishment which an unlearned man would have in
similar circumstances to suffer. No one can deny that the learned
and unlearned are here placed on very unequal terms. If an
unlearned man provoke a rabbi, he may be excommunicated by that
individual without either judge or jury, or even the form of a trial. But
if a learned man makes himself liable to the same punishment, even
a court of justice has not the power to pronounce the sentence. Who
can doubt that the rabbies made these laws for their own
convenience? Can any one believe that God has given this law,
which makes the learned a privileged class of persons, who, though
guilty of the same offence as the working classes, is to be spared,
whilst they are to be punished? God is no respecter of persons, and
therefore no such law can be from him.
The extreme injustice of this mode of legislation will appear still more
from considering the nature of the punishment:—
מנודה אסור לספר ולכבס כאבל, מהו המנהג שינהג המנודה בעצמו ושנוהגין עמו
, ולא כוללין אותו בעשרה לכל דבר שצריך עשרה, ואין מזמנין עליו, כל ימי נידויו
, ונשכר ושוכר, אבל שונה הוא לאחרים ושונין לו, ולא יושבין עמו בארבע אמות
, כלומר שחן רוגמין אותו, ואם מת בנדויו בית דין שולחין ומניחין אבן על ארונו
לפי שהוא מובדל מן הציבור ואין צריך לומר שאין מספידין אותו ואין מלוין את
מי שישב בנידויו שלשים יום ולא בקש להתירו מנדין אותו שנייה ישב... מטתו
שלשים יום אחרים ולא בקש להתירו מחרימין אותו ׃
“How is an excommunicate person to conduct himself, and how are
others to conduct themselves towards him? It is unlawful for an
excommunicate person, as for a mourner, to trim his heard or hair, or
to wash all the days of his excommunication; neither is he to be
associated in pronouncing the benedictions; neither is he to be
reckoned as one of ten, wherever ten persons are required; neither
may any one sit within four ells of him. He may however teach others
and be taught. He may hire and be hired. But if he die in his
excommunication, the tribunal send and lay a stone upon his coffin
to signify that they stone him because he is separated from the
congregation. And it is unnecessary to say that he is not to be
mourned for, and that his funeral is not to be attended.... Whosoever
remains thirty days in his excommunication without seeking to be
absolved, is to be excommunicated a second time. If he abide thirty
days more without seeking absolution, he is then to be
anathematized.” (Hilchoth Talmud Torah, ibid.) This, then, is the
punishment which a learned man has it in his power to inflict at will.
He may deprive him of the comforts of cleanliness and perhaps
injure his health. He may hold him up to the public scorn by
separating him by four ells from all decent people. He may heap
obloquy upon his death and deprive him of a respectful burial, or if
the man survive under the public contempt, and refuse to give the
rabbi satisfaction, he will be anathematized, and his prospects for
this world, at least, irretrievably ruined. The law respecting the
anathematized person is this:—
אינו שונה לאחרים ואין שונין לו אבל שונה הוא לעצמו שלא ישכח תלמודו ואינו
ואין מתעסקין עמו אלא מעט עסק, ואין נושאין ונותנין עמו, נשכר ואין נשכרין לו
כדי פרנסתו ׃
“He is not to teach others nor to be taught, but may learn by himself
that he may not forget the learning. He is not to be hired, nor to hire.
Men may have no dealings with him, nor any business except a little
that he may get a livelihood.” Now then suppose that an unlearned
man does or says something, which a rabbi interprets as contempt,
he is first excommunicated. If, in the consciousness of innocence, he
refuses to ask for the rabbi’s forgiveness, he is at last
anathematized, and all his business stopped, and all this is done to
him because he is an unlearned man. He is himself to be
dishonoured, his business ruined, and he himself to die of a broken
heart, not because he has committed some grievous crime, but
because he has been wanting in respect either to the rabbi’s person
or his words. The most absolute autocrat never made a law more
despotic.
But some one will say, that the rabbi has the power of forgiving if he
please, and that the oral law recommends him to do so. It is true that
if the affront be given in private, he has this power, and is told to
forgive, but not so if it be offered in public, he has then no choice. He
is bound to excommunicate the offender. That we may not appear to
act unfairly, we will give the whole passage:—
אף על פי שיש רשות לחכם לנדות לכבודו אינו שבח לתלמיד חכם להנהיג עצמו
בדבר זה אלא מעלים אזניו מדברי עם הארץ ולא ישית לבו להן כענין שאמר
וכן היה דרך חסידים, שלמה בחכמתו גם לכל הדברים אשר ידברו אל תתן לבך
הראשונים שומעים חרפתם ואינן משיבין ולא עוד אלא שמוחלים למחרף וסולחים
וחכמים גדולים היו משתבחים במעשיהם הנאים ואומרים שמעולם לא נידו, לו
, וזו היא דרכם של תלמידי חכמים שראוי לילך בה, אדם ולא החרימוהו לכבודן
במה דברים אמורים כשבזוהו או חרפוהו בסתר אבל תלמיד חכם שבזהו או חרפו
אדם בפרהסיא אסור לו למחול על כבודו ואם מחל נענש שזה בזיון של תורה אלא
נוקם ונוטר הדבר כנחש עד שיבקש ממנו מחילה ׃
“Although a wise man has the power to excommunicate on account
of his honour, yet it is not to be praised in the disciple of a wise man
who does so. On the contrary he ought to shut his ears against the
words of an unlearned man (am-haaretz), and not to attend to them,
according as Solomon has said in his wisdom, ‘Take no heed to all
the things that are spoken.’ (Eccles. vii. 21.) And such was the
custom of the saints of old, who heard their reviling, but did not
answer; and not only so, but they pardoned the reviler, and forgave
him. The greatest of the wise men used to glory in their good deeds,
and say, that they had never excommunicated nor anathematized
any man on account of their honour, and this is the way in which the
disciples of the wise men ought to walk. In what case is this to be
applied? When they have been despised or reviled in secret. But if
the disciple of a wise man be despised or reviled by any man
publicly, it is unlawful for him to forgive any affront to his honour, and
if he forgive he is to be punished, for this is a contempt of the law. He
is on the contrary, to avenge and keep the thing in mind, like a
serpent, until the offender entreat to be forgiven.” (Ibid. c. vii. 13.)
The great object of these laws is plainly to uphold the power and
dignity of the rabbies, and to make it impossible for the people to
shake off their yoke. The care which is taken to punish every offence
against the wise men betrays a lurking consciousness of error, and a
fear lest the common people should compare their precepts with
Scripture, assert the plain unsophisticated truth, and thus shake off
the galling chains of rabbinism. To prevent this, the very first
semblance of disobedience is to be punished with excommunication.
But for the poor and unlearned, if insulted by a learned man, there is
no satisfaction. He cannot thunder out an excommunication or an
anathema in return. For him the oral law makes no provision, except
for his punishment. If Judaism, therefore, should ever attain the
supreme power, the working and unlearned classes will be placed in
the power and at the mercy of the learned, and every disciple of a
wise man will wield the absolute power of an autocrat.
But some one may say, that if the disciple of a wise man should
excommunicate any one hastily that the people would not regard his
excommunication. But if they did not, they would do it at their peril,
for the oral law expressly declares that they are bound to observe
the excommunication not only of a rabbi, but of one of his disciples:
—
הרב שנידה לכבודו כל תלמידיו חייבין לנהוג בו נדוי במנודה אבל תלמיד שנידה
לכבוד עצמו אין הרב חייב לנהוג בו נדוי אבל כל העם חייבין לנהוג בו נדוי ׃
“When a rabbi excommunicates on account of his honour, all his
disciples are bound to treat the excommunicate person as such. But
when a disciple excommunicates on account of his own honour, the
rabbi is not bound to treat that person as excommunicate, but all the
people are bound.” (Ibid. c. vi. 13.) Nothing can more clearly prove
the injustice of such excommunication. If the rabbi be not bound to
regard the disciples’ excommunication, why should all the people be
bound? If the offence committed against the disciple be a sin before
God, and such it ought to be to require such severe punishment, the
excommunication ought to be as binding upon the rabbi as upon the
people. But if it be not binding upon the rabbi, then the offence for
which it was inflicted cannot be a sin in the sight of God, it is
therefore an arbitrary and unjust punishment, and it is both wicked
and cruel to require the people to obey it. But the principle itself is
monstrous, that the disciple of a rabbi should be constituted both
judge and jury in his own case, and have the power of lording it over
those, whose circumstances do not permit them to devote their time
to study, and who, therefore, cannot be enrolled in the privileged
class. Just suppose that the clergy of this land, or the professors and
students at our Universities, were to claim such power, and to
excommunicate and anathematize all who treated them with
disrespect, and that without any trial or conviction before a legal
tribunal, and that the unfortunate victims were to be separated from
society, ruined, and then their dead bodies treated with dishonour,
would not this be regarded as a monstrous and insupportable
tyranny? Yet this is what the oral law claims for the rabbies and their
disciples, and what they would possess and exercise if Judaism ever
attains to supreme power. Would the Jews wish such a power
established? Do they desire to live under such a government? If they
do not, if they prefer the personal liberty and the even-handed justice
secured to them by Christian laws, then they confess that the
Christian principles are better than those of their own religion, and
they must be charged with inconsistency in professing and asserting
the truth of a religion, which they hope may never triumph. Every
man who believes his religious principles to be Divine, must wish
that they should triumph, and that they should have free scope for
their development. Any man who dreads the triumph of his religion
must have secret misgivings that it is false. We therefore ask every
Jew whether he desires that the oral law should attain that absolute
power which it claims, and that every rabbi and his disciples should
have the power of excommunicating and anathematizing all who
affront them? One of the most perfect tests of a religion, is to
consider what would be its effects if supreme. At present there are
various systems of religion in the world, some of which, as directly
contradicting others, must be decidedly false. The hope of all
reflecting men is, that the truth will ultimately triumph, that God
himself will at last interpose, and establish the dominion of truth and
eradicate all error. Each hopes that his own system will then prevail,
but let him follow out that system, and see how it will work, when all
resistance shall be vain. Let the Jews calmly consider the state of
things, when the rabbies and their disciples shall be masters of the
world, as they must one day be, if Judaism be true. The unlearned
will then be completely at their mercy, their servants and their
bondmen. Will this be a happy condition, or is this state of things
desirable? In the first place, there will be no personal liberty. Any
man who may chance to differ from a rabbi, and treat him with
disrespect will immediately be excommunicated. In the second
place, there will be no liberty of conscience or of thought. Every man
must then let the rabbies think for him, and he must be content to
receive their decisions without any appeal. The body will scarcely
have the appearance of being free, and the intellect will be bound in
fetters of adamant. It will no doubt be a glorious period for the wise
men and their disciples, but they will always form a small minority,
compared with the bulk of mankind. The majority of Israel, not now to
speak of the Gentiles, will then be degraded into poor, crouching,
submissive servants of the learned, afraid to use their reason, and
always having the fear and dread of excommunication before their
eyes. Do they then honestly wish for such a state of things, to be tied
hand and foot, and given into the hands of their learned men? If they
do not, if they see the horror and the injustice and degradation of
such a state of things, why do they profess a religion which will
inevitably lead to it, if it be true? If such laws be unjust, and such a
consummation dreadful, instead of desirable, the religion of the oral
law must necessarily be false; and it is the duty of every Israelite to
consider what he is doing in upholding it. The present state of things
will not continue always. The Jewish nation cannot always wish to be
wanderers in foreign lands. They look forward to a restoration to the
land of their fathers, and they wish in that land to be happy and
prosperous. But happiness and prosperity will be unknown words, if
they are then to be governed according to the principles of the oral
law. That law gives the learned a monopoly of power and happiness,
but leaves the mass of the nation in bondage. Do they then, in
contemplating the re-establishment of the kingdom of Israel, expect
another than the oral law, and other principles of religion and justice?
If they do, they confess that the oral law is false, and if it would be
false and hurtful, and destructive of all happiness, if supreme, it is
equally false and hurtful now. The Israelite, therefore, who upholds it,
is upholding a false system. He may do it in ignorance, and we
believe that this is the case with the majority; but it is most
unbecoming in any reasonable man to profess a religion of which he
is ignorant. He may answer, I have no time to acquire an accurate
knowledge of my religion. The books in which it is contained are too
voluminous to admit of my acquiring an acquaintance with them. I
must work for my bread. We grant that this is the fact, but then this
brings us back to our original position, that Judaism is only a religion
for those who have leisure, that is, for the rich and the learned, and
we conclude, on that very account, that it cannot be from God, who
looks neither at riches nor learning, but considereth the welfare, and
above all, the religious welfare of the poorest of his creatures. The
especial character of the Messiah is, that he will care for the poor.
“He shall judge the poor of the people, he shall save the children of
the needy.” (Psalm lxxii. 4.) He, therefore, cannot have the religion of
the oral law. He will not be a rabbi, nor a rabbi’s disciple.
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.
ebooknice.com