Archive for category History

Lake Erie Is My Laboratory

I recently published another scientific paper in the peer-reviewed journal PLoS ONE. Since PLoS ONE is Open Access, anyone can read the paper without a journal subscription:

Using Wind Setdown and Storm Surge on Lake Erie to Calibrate the Air-Sea Drag Coefficient

The publication date was August 19, 2013. Here is the full citation:
Drews C (2013) Using Wind Setdown and Storm Surge on Lake Erie to Calibrate the Air-Sea Drag Coefficient. PLoS ONE 8(8): e72510. doi:10.1371/journal.pone.0072510

The purpose of the research was to validate the results of the COAWST ocean model (Coupled-Ocean-Atmosphere-Wave- Sediment Transport Modeling System) with actual observations of storm surge. The paper has a lot of figures that we call “spaghetti plots;” these are charts that show multiple time series on a single plot. We call them spaghetti plots because they look like a bunch of noodles stretched from left to right across the page:

Figure 11. December 2006: Wind setdown and storm surge, with experiments E4, E18, E21, and E23. From Drews (2013).

Figure 11. December 2006: Wind setdown and storm surge, with experiments E4, E18, E21, and E23. From Drews (2013).

In Figure 11, the black line represents the observations of water level taken at the Fermi power plant at the western end of the lake, and at Buffalo at the eastern end of the lake. The colored lines represent various model runs. The goal here is to get the colored lines to match the black line as closely as possible. This is done by adjusting the COAWST model parameters in a sensible manner. Adjustments include: the numerical formula for the air-sea drag coefficient, the bottom drag coefficient, the influence of waves, and the algorithm used to simulate wave action, and the presence of ice on the lake.

Why Lake ErieLake Erie happens to be a near-perfect natural laboratory for conducting this kind of experiment. The lake is long, shallow, and subject to strong winds from the west that cause the lake water to slosh back and forth like a big bathtub. Since the lake is surrounded by populated areas in the United States and Canada, there are many weather stations along the coastline that provide archived meteorological data. Lake Erie is also an important seaway for international commerce, and NOAA provides accurate measurements of tides and currents at major ports on the lake. I can run simulation experiments with confidence in the observations that I am trying to match.

The paper describes two windstorms on Lake Erie: December 1–2, 2006 and January 30–31, 2008. Lake Erie is 400 km long and 90 km wide. Since I don’t have a gigantic fan big enough to blow the lake water around and measure what happens, I have to wait for nature to do the blowing instead. Fortunately for me, these windstorms occur often enough to provide several usable data sets. Better yet, there were no human fatalities in either of these storms.

The potential result of the research is a more accurate model for storm surge. When building coastal defenses such as floodwalls, it is crucial to know how high the ocean will rise when the next hurricane comes ashore. The difference between building a seawall one foot higher than the maximum surge, and one foot lower than the maximum surge, can be disastrous.

Moses Crossing the Red Sea

In 2010 I published another paper on wind setdown and storm surge:
Dynamics of Wind Setdown at Suez and the Eastern Nile Delta

That earlier paper reported the emergence of a land bridge in the eastern Nile delta under certain conditions of wind speed and direction. For readers of funmurphys who are interested in Moses crossing the Red Sea, the ocean model indicated that Moses would have 4 hours to lead the Israelites across the yam suf.

At the time, I suspected that the estimate of 4.0 hours was somewhat conservative; that is, the dry passage probably would have stayed open for a longer period of time. There were several factors that we did not include in the 2010 research, such as waves and a drag coefficient more suited to coastal conditions. I had a hunch that these additional factors would increase the duration of the passage. However, the rigorous nature of scientific publishing requires that scientists cannot publish more than a few paragraphs of speculation; peer-reviewed journals require concrete results supported by evidence from observations and computer models.

The Lake Erie research provided a chance for me to test my earlier hunch. I was pleased to find that my hunch was correct; but better yet, that I could provide a revised number for the crossing time. Here it is: Moses had over 8 hours to evacuate all the Israelites from Pi-Hahiroth to safety at Tell Kedua on the other side of the yam suf. Or, for scholars who are more interested in the wind speed, an east wind blowing at 24 meters per second is sufficient to hold open the dry passage for 4 hours (the 2010 paper reported 28 m/s).

Figure 13. Corrections applied to the Lake of Tanis and the Kedua Gap. From Drews (2013).

Figure 13. Corrections applied to the Lake of Tanis and the Kedua Gap. From Drews (2013).

I like this result, because it shows that there is some engineering tolerance to the solution. Although God can of course do anything He wants to do, as an engineer I am happier with a answer in which the parameters can vary a bit and still work. The 2013 paper demonstrates that the Kedua Gap is a more robust reconstruction of Exodus 14 than originally thought.

Tags: , , , , , , , , , , , , , , , , , , , , ,

The Science Behind Biblical Events

That was the title of the article in Newsmax magazine, December 2012, pages 64-66. The subtitle was:

Researchers use new technology to search for the truth behind the stories in the Bible.

This article gave several examples of scientific research that supports certain biblical accounts. Newsmax reporter Jack Penman led off by describing my research about Moses and the Israelites crossing the Red Sea. I published a paper in the peer-reviewed journal PLoS ONE describing the meteorological phenomenon of wind setdown occurring at a place called the Kedua Gap in the eastern Nile delta. A strong wind blowing overnight can indeed cause the waters of the yam suf to recede and divide.

Newsmax covered the following research topics:

  • Parting of the Red Sea during the Hebrew Exodus from Egypt
  • The 10 Plagues
    Author Graham Phillips attributes the plagues visited upon Egypt during the Exodus to the eruption of the volcanic island Thera (Santorini) in Greece. I am more familiar with biblical scholar Kenneth Kitchen, who points out that the first nine plagues correspond to a physical sequence of catastrophic natural events following a high Nile. (See “On The Reliability of the Old Testament” (2003), Table 18 on page 251.)
  • Resurrection of Lazarus
    The article cites the resuscitation of a woman declared medically dead. To me, this example does not match the details of the story recorded in John 11. Nevertheless, we Christians are supposed to follow Jesus’ example, and if we can prevent premature death by medical means, that’s all to the good!
  • Destruction of Sodom and Gomorrah
    The article mentions a hypothesis that the two sinful cities were destroyed by an asteroid, and the event was recorded on a Sumerian clay tablet. You can read more at this article, or search for these keywords: Sodom Gomorrah asteroid Sumerian astronomer Alan Bond Mark Hempsell Köfels.
  • Burning Bush
    Colin Humphreys suggested in his book “The Miracles of Exodus” (2004) that the burning bush was above a volcanic fissure emitting hot gases.
  • Noah’s Flood
    The article cites William Ryan and Walter Pittman and the Black Sea Flood as being the probable source of the Flood story in Genesis and the Gilgamesh Epic.

Whether these ideas will withstand further research and scientific scrutiny remains to be seen, and this is true of all hypotheses. What is notable about the Newsmax article is that they have taken neither extreme position:

  1. Every biblical event occurred exactly as some fundamentalists interpret the King James Version of the Bible.
  2. The Old Testament contains no valid history prior to the Babylonian exile; it was fabricated by Hellenic Jews to create a fictional glorious history.

With regard to extreme position 1, Ryan and Pittman understand the Flood to be a local flood, not a global one. The Black Sea flood was a traumatic event for the people of the time, and they carried those memories forward in their oral history. There is no young-earth Flood Geology here.

Extreme position 2 is rejected by the findings of science. Not only are the biblical narratives scientifically plausible and difficult for ancient bards to fabricate, but research confirms important details of the stories. The plagues follow a natural chain of environmental events; the author of Exodus is not merely stepping through the Egyptian pantheon.

Reporter Jack Penman concludes: “maybe science and religion can better coexist.” Amen to that!

Tags: , , , , , , , ,

“Proving God” on the History channel

Wind setdown and Exodus 14

On December 13, 2011, I appeared in a TV documentary titled “Proving God” shown on the History Channel. My section of the program described how scientists investigate the narrative of Moses parting the “Red Sea” in Exodus 14. Sir Colin Humphreys and I explained how the meteorological phenomenon of wind setdown matches the Biblical account. I am providing here a transcript of what I said on the program; since this blog represents Fair Use in a scholarly setting, I can only provide a limited section of the text.

Ancient Nile delta

Figure 1. Reconstruction of the Nile delta by James Rennell, based on the writings of Herodotus. The black rectangle shows the site of Drews and Han's proposed crossing site at the Kedua Gap (30.9812 North, 32.4553 East). This is Figure 2 of Drews Carl, Han Weiqing, 2010 Dynamics of Wind Setdown at Suez and the Eastern Nile Delta. PLoS ONE 5(8): e12481. doi:10.1371/journal.pone.0012481.

Narrator: Atmospheric scientist Carl Drews of the National Center for Atmospheric Research believes Humphreys may be onto something.

Carl Drews: Wind setdown occurs when a strong wind blows over a period of time across a surface of water; and gradually the water moves in the direction of the wind, and pulls away from the shoreline, and so the surface of the ocean moves down. So what you have there is a section of dry land where there was formerly sea bed.

Narrator: Accessing the power of supercomputers, Drews has studied the effect of wind setdown in locations ranging from the Nile, and coastal England, to a pair of such episodes in the Great Lakes in 2006 and 2008.

Carl Drews: Wind setdown is observed about every 5-10 years on Lake Erie. You have these strong storms that come from the west, and they cause storm surge at Buffalo; but on the Toledo side, which is the upwind side, the large sections of the lake will be completely dry. The water will have disappeared over the horizon!

Colin Humphreys: It’s been observed that the difference in height between one end of Lake Erie and the other can be as high as 16 feet. Absolutely staggering, right? You’d expect Lake Erie to be level water, but in a strong wind, blowing for many hours – 16 feet difference!

Reconstructing the event

Narrator: Harnessing data gathered from NASA satellites, Carl Drews creates an ocean model and terrain map of the Gulf [of Tineh], to examine the possible effects of such a storm.

Parting the Sea at the Kedua Gap

Figure 2. Wind parting the waters at the Kedua Gap. The east wind creates a temporary land bridge at Tell Kedua in the eastern Nile delta. This is Figure 1 from Parting the waters: Computer modeling applies physics to Red Sea escape route, press release by University Corporation for Atmospheric Research, September 21, 2010. (©UCAR, Illustration by Nicolle Rager Fuller.)

Carl Drews: I used geological maps, geological surveys, and sediment cores to reconstruct the configuration of lagoons and rivers that were [present] during the Exodus period. Then I ran this on the ocean model with a supercomputer and applied a digital wind to this, a wind blowing at 63 miles per hour. It would be difficult to walk into that kind of wind, but it’s possible. You can make forward progress.


Narrator: Combining the Biblical account of the crossing with the scientific modeling, Drews constructs a timeline that matches the conditions described in Exodus: the perfect storm.

Carl Drews: The Bible says that this occurred over a night, so – wind blowing for 12 hours suddenly stops, and I find that the waters part, and stay parted for a period of 4 hours. Then they rush back together again.

Narrator: But even given 4 hours to cross the exposed land bridge, it would have been impossible for 2 million Israelites to traverse the Red Sea and escape. Does the scientific evidence disprove the Bible account?

Carl Drews: That would be a lot of people to get through a small space in just 4 hours.

Colin Humphreys: This number is unbelievably large! A lot of people think the Exodus story is made up.

[Humphreys goes on to explain that the word ‘eleph in ancient Hebrew (Strong’s Concordance H505) can mean “thousand”, or it can mean a “company” of soldiers – about 10 fighting men. This re-calculation leads to a total number of 20,000 Israelites of all ages, a much more manageable group of people.]

Narrator: If Humphreys’ new calculation is accurate, it bolsters the case that the Red Sea miracle really did happen.

The return surge

Narrator: From cosmology, and archaeology, to oceanography, researchers from a variety of scientific disciplines have launched a global search to discover quantifiable proof of God. Sir Colin Humphreys and Carl Drews are looking for evidence that will prove that the events described in the Bible actually occurred. Using precise calculations, along with complex computer modeling, each man has detailed a perfect storm scenario which they claim could have caused the parting of the Red Sea, just as described in the book of Exodus.

Tidal bore on the Qiantang river, China.

Figure 3. Tidal bore on the Qiantang river, Hangzhou, China. This image is from Wikimedia Commons at,_Hangzhou.jpg.

According to their theory, a phenomenon known as wind setdown caused winds of rare duration and force to peel back the waters long enough for the Israelites to make their way to freedom across an exposed land bridge. But the book of Exodus also describes the sudden destruction of the Pharaoh’s army as they chased the Israelites across the sea bed. To explain this, Drews and Humphreys point to the opposing natural force that can follow extreme cases of wind setdown.

A bore wave. The term defines the phenomenon where a tide returns displaced water with such force that it forms a giant wave of enormous power.

Carl Drews: When the wind stops, suddenly that water comes back again, and you would get these walls of churning water, thundering in! and crushing anybody who is left in the passage there.

Narrator: Drews’ calculations reveal that a wind setdown powerful enough to part the Red Sea would have unleashed a bore wave of staggering magnitude.


Narrator: Whether invoked by the hand of Moses, or the natural reaction to wind setdown, a bore wave of this force would have obliterated the Pharaoh’s army in an instant.

Carl Drews: Suddenly they hear this roaring in the distance! Then they look up, and what looks like a mountain of water is bearing down on them from both sides, and from the back.

Colin Humphreys: It sweeps these people back into the sea, which is precisely what the book of Exodus says. So even this little detail in the Exodus fits what we know from modern science.

Theology – faith and science

Narrator: But while these natural phenomena offer a scientific explanation for the events described in Exodus, that alone does not prove God.

Anglican cross

Figure 4. Anglican cross. From Letterkenny Cathedral, by Scolye17 at Wikimedia Commons:

Carl Drews: It could be that Moses got very, very, very lucky. It could be that he was a very, very good weather forecaster.

Colin Humphreys: So you may say, Why do we call this a miracle? The reason is because of the timing. They would have been slaughtered!

Carl Drews: It’s a very unlikely event, to happen on a certain night just when you need it. If Moses is that lucky, we should all bet on Moses! (he chuckles)

Colin Humphreys: So I think it’s the timing that shows the hand of God at work.

Narrator: Both Drews and Humphreys agree that the evidence of God is not in the natural events themselves, but rather in their miraculous timing. Ultimately, it is beyond the powers of science to explain how a once-in-a-lifetime storm occurred at the exact place and time to rescue the Israelites.


Narrator: While their work has narrowed the divide between science and the Divine, these scientists admit that, for the moment, faith is needed to span the last gaps.

Carl Drews: The scientist should be humble and realize when their science cannot go into the supernatural. We only study the natural. So I study the movement of the wind and the water. According to the Bible, God sent the wind at the right time and told Moses to be there.

Further reading

Purchase “Proving God” on DVD from the History channel:
Proving God DVD

Our original scientific paper, published in the peer-reviewed journal PLoS ONE:
Dynamics of Wind Setdown at Suez and the Eastern Nile Delta, by Carl Drews and Weiqing Han, August 30, 2010.

A story by reporter Anna Maria-Basquez in the Denver Catholic Register that explores the theology behind the research:
Boulder scientist’s research affirms parting of the Red Sea, December 15, 2010.

An article that I wrote for Weatherwise magazine to explain the research to a general audience:
Could Wind Have Parted the Red Sea? January/February 2011.

Other news coverage:
Parting the Sea.

Proving God” was produced by Karga Seven Pictures for History.

Tags: , , , , , , ,

Bo Hellström and copyright protection

I have at my desk an interesting and rare book: “The Israelites’ Crossing of the Red Sea”, by Professor B. Hellström, published in Stockholm in 1950. Bo Hellstrom was a professor of hydraulics in Stockholm, Sweden from 1914-1955. From Ian Larsen’s paper:

In 1923 he [B. Hellstrom] receives a grant to study wind driven seiches in lakes, a subject that he will follow on and off for a long time to come. In 1924 he suggest that it was a well timed wind-generated seiche that was to allow Moses and his tribe to cross the Red Sea and subsequently to drown Faraoh and his army. The reader of the Bible will see that Bo Hellstrom’s theory is well covered in the actual text. Hollywood on the other hand got it completely wrong as usual. (Larsen 2003)

A remarkable thing about this particular book is that it contains a hand-written dedication on the inner page by Hellstrom himself. “Professor A.E. Bretting, with best wishes for Christmas and the coming year, from Bo Hellstrom”. He touched the same page that I am touching! I like that.

The study of physical laws underlying the parting of the Red Sea has a long history. The Jewish historian Flavius Josephus in 94 AD urged people not to wonder if the strange narration in Exodus 14 “happened of its own accord”. But as any parent knows, as soon as you tell kids not to do something, they go ahead and do it! Generations of scientists have ignored Josephus’ advice, preferring to follow Psalm 111:2 instead. Samuel Bartlett in 1879 suggested that Moses might have taken advantage of wind-lowered water levels, crossing on a shallow ford southeast of modern Suez. Sir Alexander Tulloch actually observed a wind setdown event on Lake Manzala, which led him to conclude in 1896 that the famous passage took place between the Great Bitter Lake and Lake Timsah.

Professor Hellstrom brought the science of hydraulics to bear on the Exodus problem in 1924. In his lab he constructed a wind tunnel over a trough containing water, roughly modeling the topography of the northern reaches of the Gulf of Suez. He used an underwater sill to provide a dry crossing with water on both sides at Serapeum, the same site suggested by Tulloch. His book shows maps and detailed diagrams and photos of the water-level gauges that he built on the side of his wave tank to measure the water surface accurately. Bo Hellstrom was quite the experimentalist! His diagrams look a lot like mine.

Thus, by means of this laboratory experiment, which admittedly is only approximate, proof was obtained of the fact that it may very well be conceived that the wind uncovered the bottom of the Red Sea at Serapeum. It was possible by means of these experiments and exhaustive theoretical investigations to establish the natural laws which prevail. (Hellström 1950, p. 21)

So I have this fascinating book in my hands, and I would like to share Hellström’s scholarship with the rest of the world. As Dr. Frank J. Little, Jr. has stated, “Our purpose is to return Hellstrom’s Exodus hypothesis to the scientific community, plus quantify and update it in light of newly synthesized evidence.” How can I do that? Bartlett’s book is available through Google Books, and anyone can read it on-line. I had to get Hellstrom’s book through an Interlibrary Loan with California State University at Fresno. That’s a big difference in terms of ease of access! People will find and read Samuel Bartlett quicker and more often than Bo Hellstrom.

Samuel Bartlett died in 1898. His work is now in the public domain, and this is why Google can legally digitize his book and make it available on-line. Bo Manne Hellstrom died in 1967. Sweden has a copyright term of 70 years after the author’s death, so his copyright will not expire until the fair year 2037. And until then, “The Israelites’ Crossing of the Red Sea” will languish in Interlibrary Loan Land. Ick.

If Hellstrom’s book suddenly became an overnight sensation, and if scads of people were clamoring for it and paying thousands of dollars to obtain one of the rare copies, then the Royal Institute of Technology in Stockholm would take notice and starting printing a new edition of the book. They would make lots of money and send royalties to Hellstrom’s heirs, wherever they are now. That’s why copyrights endure long after an author’s death, and the system works well for people like Mark Twain and Walt Disney.

Unfortunately, the copyright system is not serving B. Hellström very well. His book contains scholarly and historical interest, but with all due respect, “The Israelites’ Crossing of the Red Sea” will never be a best-seller like “Huckleberry Finn”. Nor does anyone expect that – scholars are valued for their intellectual contributions, not necessarily for their popularity with the general public. Bo Hellstrom’s work will remain locked up for another 26 years where only a few determined scholars will read it; unlike his predecessor Bartlett, who can be read by any high school student who enters the right search string into Google.

Professor Hellstrom would have benefited from Open Access. It would have increased his scholarly impact. We would still be reading his work and he would get all the credit. Too bad the Open Access movement came too late for him.

Special thanks to Professor Ian Larsen of the Royal Institute of Technology in Stockholm for supplying additional information on Bo Hellström. Larsen adds, “A E Bretting was professor in Hydraulic Engineering in Copenhagen and retired around 1958.” I would love to know how Hellstrom’s book made its way from Copenhagen to Cal State Fresno, but I have enough historical mysteries for one lifetime already!


Bartlett, Samuel Colcord, 1879. From Egypt to Palestine: through Sinai, the wilderness and the south country. Harper, New York, New York, USA.

Drews, Carl, and Weiqing Han, 2010. Dynamics of Wind Setdown at Suez and the Eastern Nile Delta. PLoS ONE, 5(8): e12481. doi:10.1371/journal.pone.0012481

Drews, Carl, 2011. Could Wind Have Parted the Red Sea? Weatherwise, January-February 2011, 64, 30-35. doi:10.1080/00431672.2011.536122

Hellström, Bo, 1950. The Israelites’ Crossing of the Red Sea. The Institution of Hydraulics, The Royal Institute of Technology, Stockholm, Sweden. First published in the Swedish language in 1924.

Larsen, Ian, 2003. A La Recherce du Temps Perdu: The times of J Gust Richert and thereafter. Zentech Belgium, Brussels, Belgium.

Tulloch, Alexander Bruce, 1896. Passage of the Red Sea by the Israelites. Journal of the Transactions of the Victoria Institute (now Faith and Thought) 28, 267-280. The Victoria Institute, London, United Kingdom.

Tags: , , , , , , ,

Crossing the Red Sea with Moses and Open Access

Yesterday the scientific journal PLoS ONE published my article “Dynamics of Wind Setdown at Suez and the Eastern Nile Delta”. This publication represents a portion of my Master’s thesis, which was announced here last year. We now present this research in a peer-reviewed journal. Here is the paper’s Abstract:

Wind setdown is the drop in water level caused by wind stress acting on the surface of a body of water for an extended period of time. As the wind blows, water recedes from the upwind shore and exposes terrain that was formerly underwater. Previous researchers have suggested wind setdown as a possible hydrodynamic explanation for Moses crossing the Red Sea, as described in Exodus 14.

Since the paper is about dynamics instead of biblical history, the contents focus on fluid mechanics instead of on Moses and the Hebrew refugees. But for those readers who are interested in the Exodus, Point B in Figure 8 is Pi-hahiroth. The famous crossing is from Point B across to Tell Kedua. My Tanis hypothesis suggests where and how Moses crossed the yam suf. When remains a thorny issue. As with any new hypothesis, scholars from many disciplines will have to consider the proposal from all angles (history, linguistics, military science, archaeology, meteorology, refugee movement, sociology, oceanography, etc.).

What Open Access means for me

PLoS ONE is an Open Access journal, meaning in a general sense that access to the publications is not restricted. You don’t have to pay a download fee or a subscription fee to download and read the articles. It’s free Free FREE! For what Open Access means for the world of science at large, Google for the term and do some reading. Go ahead and peruse some of the debates. I’ll describe here what it means for me.

It means that my co-author and I paid a publication fee to cover the cost of reviewing and preparing the document for on-line publication. Some journals (Open Access or not) are free to publish in, and others require certain page charges. PLoS ONE follows the “author pays” model.

The “Dynamics of Wind Setdown” article is of general interest. I want oceanographers to read it, I want journalists to read it, I want high school students to read it. I want teachers, gardeners, Norwegians, mechanics, historians, kids, pastors, marketing directors, software engineers, physicists, Australians, poor people, airline pilots, retired people, shepherds, and checkout clerks to read it. I want you to read about the parting of the Red Sea. Skip right to Figure 8 if you want! I don’t want any barriers to readership. I want the paper’s exposure to be as wide as possible. And I can achieve that goal by opening up access.

Peer-reviewed articles are read by scholars, who cite previous research when they publish a subsequent study. The citation count is a measure of the impact of a paper – the importance that a paper has on its field. Open Access papers are supposed to have higher citation counts, so this publishing model will presumably be better for my career.

What Open Access means for you

Open Access means that you can make use of the material that we published. The content at PLoS ONE is licensed under a Creative Commons Attribution License. This means that you can use the article in ways described by the license, so long as you properly cite the authors and the journal. The idea behind the CCA license is that scholars’ work should be used and extended, with due credit given to the original publication. You don’t have to get our written permission. Please refer to the Creative Commons web site for further information.

Open Access means that you don’t have to pay $30 or even $15 to download the paper and read it. Your institution or library doesn’t have to pay thousands of dollar$ in subscription fees to get the document. You just have to click. That’s right, you simply have to click on this link. What are you waiting for? Click! Download and read it now!

Tags: , , , , ,

Code Review and the King James Bible

I am a big fan of code review! Whether the software is written in Java, C++, Python, or (shudder!) Fortran, code review serves a number of important purposes in an organization that develops software. When I worked at we used a system of code review designed to produce high-quality code quickly. Here were the steps:

  1. When a developer thinks he/she is done with a single code module (one source code file), that developer calls for a code review. The broadcast e-mail and meeting invitation must go out no less than 48 hours before the scheduled review, so the other developers have at least 48 hours to look over the code before the meeting. You can schedule a code review for 3:00 pm on Thursday as long as you click on the Send button by 2:59 pm on Tuesday (and there were a few of those).
  2. The software developer can invite anyone they want to the review, but at least one participant must be at the Senior level. Go ahead and invite your friends! There was some worry about people only inviting people who would be favorable to them, but we quickly learned this principle: Friends don’t let friends write bad software. You are more likely to accept constructive criticism from your friends than from people you don’t get along with.
  3. A quorum is three people: the developer and two other software engineers, one of whom must be at the Senior level. The code review works better with about 4-5 people.
  4. The code file to review must be less than 1,000 lines long. Generally the other developers retrieve the code from the repository.
  5. The meeting will not last longer than 1 hour. If the code review runs overtime, the participants adjourn and re-schedule.
  6. The goal of the code review is to improve the code. All our jobs depend on producing and marketing high-quality software, and it is in everyone’s best interest for the code in the repository to work well and be easily maintained.
  7. Everyone is nervous at first about their work being reviewed, and for this reason there is a Moderator. The moderator makes sure everyone stays on track, watches out for criticism that is not helpful, and ensures that the experience is professionally positive for the developer. The moderator has the power to kick someone out of the meeting if they are being arrogant or derogatory. I never saw that happen, though – usually it is enough to remind someone that the goal of the code review is to improve the code.
  8. Everyone at the review sits around a table with a listing in front of them. The listing is printed with line numbers for easy reference. The developer begins with a brief explanation of the purpose of the code.
  9. The developer leads everyone else through the code, page by page, or subroutine by subroutine. Everything is fair game for improvement. The reviewers speak up in they have comments on a certain section. If not, the review moves on.
  10. It is great for less experienced programmers to attend! They can learn a lot from someone else’s code. Often they make very worthwhile contributions by requesting more extensive comments for some algorithm that is not clear. Sometimes you get people who just watch out for uniform spacing or lines longer than 80 characters. Those people contribute something positive to the process.
  11. Everyone looks for adherence to the coding standards.
  12. Sometimes design flaws are caught in a code review. The script has to sanitize input for web security. The code has to handle Unicode characters. Sometime a subroutine is just too long!
  13. Reviewers can suggest tests that might produce a failure, if they suspect a bug. The developer makes a note of those and will verify later that the software operates correctly, or fixes the bug if it does not.
  14. If extensive changes are requested, then another code review will be scheduled when the first round of changes are complete. This is rare. Even if there are lots of comments, usually the revisions take only a few days to complete.
  15. After the review: When the developer completes the requested changes to the software, he/she adds a note to the header comments of the file saying that the code was reviewed on that particular date by the following people (full names). Then the developer may check in the code, and move on to another file.

The developer under review gets completed feedback in 49 hours. I’m sure our loyal Funmurphys readers can add to this process and improve it. Tweak it for your organization. Remember that the primary purpose of code review is to improve the code. A secondary purpose is to provide on-the-job training for the more junior programmers. From time to time people will see a clever way of doing something, or suggest one, and notice code overlap that can be eliminated.

Those should be reasons enough for any professional software developer to conduct code reviews. But suppose you are out there thinking, “I’m a good engineer! I’ve written code for years, it’s well tested, and there are only a few minor bugs in my work. I’m good! I don’t need code review. It’s just a waste of my time.” Yeah, you’re kind of arrogant, but you have a right to be.

Here’s why you should request and schedule code reviews on your own code. Because someday, when you least expect it, someone else will come along and have to maintain or extend your code. And yeah, they won’t be as smart as you. They won’t understand your brilliance. They won’t take the time to read through your code and figure out how it’s carefully designed to work. What they will do is go to your boss and say the following: “This code that YourName wrote is dog poop! (but they won’t say ‘poop’)! I can’t follow it at all. This code has to be completely re-written!”

Then your boss will be faced with a dilemma. She knows you are a good software engineer and you write good code. She has not heard any problems with your code until now. But the new person is so insistent that your code is dog poop, that it has to be thrown out and re-written from scratch, and the new person uses lots of CAPITAL LETTERS and exclamation marks and derogatory language in his e-mail complaint. I have seen this happen. What should your boss do?

Your boss has to evaluate the complaint. Your boss has to examine the code you wrote with a fine-toothed comb, checking if you are correct or if the new guy has some validity to what he says. Your boss has to call a technical review at which your detractor will be the star witness. You can’t defend yourself very well since you have moved on to another part of the project. You’re under suspicion. Unless . . .

Unless there is a short section in the header saying the following: This code was reviewed on March 28, 2010 by the following people: Ashley Adams, Bob Biltmore, Charlie Chang, and Debbie Dumas. When your boss finds that comment in the code, her course of action is simple: “Sorry, Mr. New Guy, but this code was reviewed by the software development team and found to be acceptable. You can suggest some improvements, but we are not throwing it out and re-writing the whole thing from scratch. If you cannot understand some else’s code, we will send you back into circulation and hire someone who can.”

Yes, code reviews can be held to Cover Your Anatomy. It’s not a great reason to do them. If the good reasons above are not sufficient to urge you to do code reviews, perhaps this bad one will. Enough said.

Now let’s turn back the clock 400 years to post-Elizabethan England, during the reign of King James I. He decided to produce a new translation of the Bible, the Authorized Version that would bear his name. Alister McGrath has written a great book about this period, which you should stop reading this blog to go out and buy, then come back here. The book is “In the Beginning: The Story of the King James Bible and How it Changed a Nation, a Language, and a Culture” (2001). The translators worked in teams. On page 187 we read this account of the actual translation process:

The translation in King James’ time took an excellent way. That part of the Bible was given to him who was most excellent in such a tongue (as the Apocrypha to Andrew Downes), and then they met together, and one read the translation, the rest holding in their hands some Bible, either of the learned tongues, or French, Spanish, Italian, etc. If they found any fault, they spoke up; if not, he read on.

When I read this excerpt I laughed out loud. These guys are doing a code review! They used the same process 400 years ago to produce a good translation of the Bible that we use in modern times to produce good software! They all sat around a table and checked up on each other’s work. When the King James translators found a discrepancy, they worked together to resolve the problem That’s just what we do, too! I am sure that nobody at Smarttalk or any other software company set out to emulate the King James Bible scholars. But we have hit on the same process to produce a high-quality product.

This does not mean that the King James Bible is a perfect translation; the McGrath book documents a few errors that were corrected later. Another example is Hebrews 11:3 in the King James Version, which reads as follows: “Through faith we understand that the worlds were framed by the word of God, so that things which are seen were not made of things which do appear.” But the Greek word used for ‘worlds’ there is Aion (Strong’s Concordance G165), and should be translated into English as ‘eons’ or ‘ages’. God’s word of command caused huge spans of time to come to pass, as well as physical worlds. The KJV is not perfect. Nevertheless, if people are still using my code 400 years from now, my descendants should be very proud!

Maybe someday I will compare and contrast the process of code review with the peer review conducted by scientific journals.

Tags: , , , , , , , ,

Middle School Field Trip – by Airplane?

Even Dads have to grow up.

My daughter in Middle School is taking a field trip to Washington, DC over Spring Break. They will tour our nation’s capital with American Christian Tours, a tour company that emphasizes our Christian heritage throughout history. She earned part of the money for the tour, and I am making her study up on the places she will visit. When she gets to Gettysburg Battlefield she will know who Pickett was, why and who he was charging, and what happened on that fateful day. When she tours the World War II memorial she will know who were the major powers and leaders on each side of the conflict. When she enters the American History Museum she will tell her friends to look for the half-naked statue of George Washington.

All this is normal.

The strange part for me is that she and the rest of the kids are boarding an airplane to fly to Washington, DC. An airplane! We live in Colorado, so Washington DC is too far to drive over the one-week break. It makes sense to fly. But an airplane??!!! For a Middle School field trip? Sheesh, next thing you know these kids will be taking a field trip to the International Space Station!

I grew up in New Jersey, and my class took field trips by bus to Philadelphia and New York City to see the sights. The historical sites were within easy reach. On the Circle Line ferry around Manhattan Island some elementary school kids from the city challenged us to fight: “Get your gang together. We’ll meet you in the boys’ room!” Remarkably, we were mature enough to laugh, politely decline, and ask them where they were from? They were fun kids once we got past the macho thing.

An airplane!

Perhaps Sean call tell us if airline travel has dropped in cost relative to the Consumer Price Index since the 1970s? In any case, this Dad has to let go and realize that times have changed and let my precious daughter fly to Washington DC for a wonderful and educational adventure with friends I know and teachers I trust to take good care of her. It should be a good trip! She’ll bring her cell phone with her. Oh yeah, you bet she will!

Remembering Y2K

Happy New Year’s Eve!
Happy Last Day of December!
Happy Last Day of 2009!
Happy Last Day of the 2000s decade!

Ten years ago today I was working from home, since I was an independent software developer back then. This was The Day that the dreaded Y2K bug was supposed to hit. The End Of Civilization As We Know It, or just TEOCAWKI for short. Remember?

A number of social commentators were predicting that the Y2K computer bug would cause large-scale failures in our computer-based infrastructure, including some Christian conservatives like Michael Hyatt and Chuck Missler. Ed Yourdon predicted that computer systems administrators would head to the hills en masse because they realized that the problem was huge and couldn’t be fixed. My local hardware store carried large electrical generators with signs saying: “Don’t even think of returning this on January 5 if Y2K turns out to be a bust! We’re onto you.” There were tales of survivalists cashing out their retirement accounts, buying a ranch in the mountains, stockpiling guns and ammo, taking their wives and children up to the compound after Christmas, and keeping a loaded gunsight out for looters when the millennium sun peeked over the horizon. Even modern cars weren’t supposed to work. Remember all that?

As a software engineer, I issued my own prediction in March 1999: Y2K will be no worse than a hurricane. Power and basic utilities will be restored within 48 hours. You’ll be able to go back to work in a week. My prediction seemed pretty mild at the time.

I had a plan, too. I stockpiled about one week’s worth of food, water, and firewood for the “hurricane”, taking care to be sure that anything I bought could be used later for camping trips if Y2K fizzled out. Partly it made good sense to be prepared, partly I was fascinated by the social aspects of worried people getting ready for TEOCAWKI, and partly I wanted to reassure those around me. I still have some extra jugs of drinking water and a few packs of candles and lighters left over. All the Ramen noodles and beef jerky are long gone.

During the summer and early fall I received lots of letters from my bank, my insurance company, my utilities, my retirement company, my post office, all declaring that they had been certified as “Y2K Compliant”. Then in November I got a letter from the supplier of my diskette mailers, saying that they were certified as Y2K Compliant and that the supply of diskette mailers would be uninterrupted by the dawn of the new millennium. I just stared at the letter. Diskette mailers. It’s come to this, probably the most trivial and non-essential item that I purchase. That’s when it hit me that Y2K was gonna be a big bust. The alarmists were wrong. Everything’s going to be all right.

New Year’s Eve fell on a Friday that year, leaving an entire weekend for the computer people to fix whatever problems they found. Ed Yourdon was wrong – the computer system administrators (my friends and colleagues) behaved like the responsible professionals they are, working all that weekend to run tests, re-boot machines, and examine diagnostics for signs of any technical Y2K problems. The weather in Colorado was unusually warm.

I filled up all the bathtubs in my house with drinking water. I remember thinking, “Why should I do this? It’s just a waste of water. Nothing bad is going to happen.” But filling up the bathtubs was Part Of The Plan, so I did it anyway. That evening I discovered that the drains in my tubs didn’t seal very well, and I had lost about half my supply already. The best-laid plans . . .

Since I was working from home, I could keep an eye on the TV. Midnight and the Millennium Dawn were sweeping around the globe. The celebrations were wonderful to watch! In Australia they had trapeze dancers swinging from ropes affixed to the top of the Sydney Opera House. Japan had marvelous dancers and costumed performers. China had spectacular fireworks! Then came Thailand, India, and celebrations in Africa. A few minor problems were reported, like weather maps that displayed the year 19100 and some video rental fees not calculated correctly. But everything was coming out fine, even in Italy who had not done much to prepare. I just relaxed, let all the technical concerns slip away, and watched in wonder as the happy festivals spread around the globe with the coming sunshine. Wow!

Praise God! Happy New Year!

Academic and Choral Achievement

Here is an update since Kevin updated the blogging software. In May 2009 I graduated from the University of Colorado at Boulder with a Master’s degree in Atmospheric and Oceanic Sciences. Wow, five years is a long time! There were quite a few speeches during the graduation ceremony, but I didn’t mind a bit! It took a lot of work to get to that ceremony, and I just sat there in the sunshine with my Master’s robe and mortarboard cap and drank it all in. John Roberts (a CNN correspondent) gave an inspiring address about making your dreams come true. When you come up against a wall, this is your opportunity to show the world how much you want something. If you want your goal bad enough, you will go over, under, around, or through the wall to reach your goal! I feel that I have so much potential, and opportunity, and rich possibilities ahead of me. I don’t ever want to lose that feeling. My sister and family came to see the graduation. Maybe someday when my kids get frustrated with school and homework and term papers and exams they will remember the bagpipes and the funny academic gowns and their Daddy graduating and they will understand that it’s all worthwhile.

Kevin, I don’t know if you wrote a thesis when you got your Master’s degree from Stanford University, or if the co-terminal program had some other option. I wrote a 110-page thesis describing my research and model results:

Title: Application of Storm Surge Modeling to Moses’ Crossing of the Red Sea; and to Manila Bay, the Philippines

Storm surge occurs in low-lying coastal areas when strong winds blow the sea surface up onto the land. The resulting inundation can pose a great danger to lives and property. This study uses an Ocean General Circulation Model and the results from a mesoscale atmospheric model to simulate storm surge and wind setdown. Two case studies are presented. A reconstruction of the crossing of the Red Sea by Moses and the Israelites, as described in Exodus 14, shows that the eastern Nile delta of Egypt matches the Biblical narrative and provides a hydrodynamic mechanism for water to remain on both sides of the dry passage. The vulnerability of Manila Bay and the surrounding areas to a Category 3 typhoon is evaluated and shows that the simulated surge heights depend heavily on the wind direction and the coastal topography.

The thesis document is published electronically by ProQuest, and anyone can download the PDF for a fee and read it. I classified the thesis under Biblical studies in addition to Physical oceanography and Atmospheric sciences. It would be cool to hear a little bell every time someone reads my thesis, but scientific publishing has not reached that stage yet.

I also made the national news for having sung in the Boulder Messiah Sing-Along for 17 consecutive years now. On November 3, 2009 the Associated Press published a news story on Messiah Sing-Along events, featuring the Boulder Messiah Chorale and Orchestra. Hallelujah for Handel’s ‘Messiah’ is by reporter Ann Levin. I am the Enthusiastic Choir Member in the story. If that link ever ceases to work, you can Google for: “Carl Drews” Messiah. Nobody has recognized me on the street yet (“Hey, you’re that Messiah choir dude!”), but it is nice to see that our sound is gone out into all lands, at least electronically.

Tags: , , , , ,

Veterans Day Remembrance

My father never made a big deal about his service in WWII. He graduated in 1942 1/2 (apparently in the old days they had half years before inflation made them worthless), spent six months working at Ludwig Aeolian, which had switched from making pianos to making gliders for the war, until he could join up. When working with power tools he was known to bring up his coworkers at Ludwig who were missing fingers or parts thereof. There wasn’t any question he was going into the armed forces, the only question was which one. He claimed he pictured himself walking all the way across Europe if he joined the Army, so he joined the Navy instead.

The other day my wife came across the letters he wrote and received during the war. My mother swooped on them, and then threw them out when she realized he didn’t even know her when they were written. So my wife rescued from the trash and we started reading them last night. He did his basic training as a member of Company 683-43 at the Farragut training center in Idaho, which I didn’t know before I read the letters.

Letter Home 1943
Letter Home 1943

At boot camp recruits were asked to choose three specialties, so my father chose quartermaster because he figured he’d have a chance to wheel and deal, gunnery because he figured if the other guy was trying to kill him he ought to at least get a chance to fire back, and electrician because that way he’d at least learn a civilian skill. So of course the navy made him a signalman and off the signalman school in San Diego he went.

As that school was finishing up, he had to choose what branch to go into. The first people to come in were trying to recruit for landing craft. He watched movies of the boats driving to shore with the coxwain behind a metal enclosure looking out a slit and the signalman unprotected next to him and then the signalman standing on the beach communicating with the ships offshore while everyone else found as much cover as they could. He didn’t think that was for him. The submarine people came in without any films, just that you got 1.8 base pay and 2 weeks leave for signing up. That sounded good to him, so he volunteered for submarines. He was ticked when he discovered that the 2 weeks leave would be taken off the back end of his enlistment, not immediate.

He was assigned to the S-45 which finished out the war training surface ships in ASW in the Admiralty Islands. Instead of depth charges, the ships would use hand grenades, and about the only excitement he had on the sub was when a grenade when off on the main induction hatch and seawater poured in. He told me just this year that on the way out or back they stopped off at Guadalcanal and while there a classmate working ashore asked him to go on a patrol. My father asked if they ever ran into any Japanese and was reassured when the answer was no, so he went. He was issued a rifle and they split into four columns and set off into the jungle. After an hour or so of trudging along, somebody opened fire on them without causing any casualties. After hunkering down and checking on the other columns, the leader had them all return to base.

I was surprised by the letters I’ve read so far – no real mention of the war beyond general terms, one mention to burn a letter because of the information in it. Mostly he followed the same interests then he had when I was around – classical music, model railroading, gardening, smoking. He wrote in late 1944 urging his younger brother not to enlist but stay in college since the war would be over before he would be in it.

Then it was back to San Diego, and when the war ended, San Francisco. The S-45 was decommissioned and he moved on to a fleet boat until he was discharged. I always got the impression that he enjoyed, or at least didn’t mind the wartime Navy, but he made it clear he hated the peacetime Navy. There were way to many pointless regulations, like having to be in dress whites to draw from stores on the tender. No doubt there was a certain amount of feeling that now that the war was over he wanted to get on with his life, and being in the Navy wasn’t part of it.

My father did what his generation did – they went off to war. Most had mundane jobs and saw little or no “action”. Some never came back. But by and large they did what was asked of them, whether it was a little or a lot. And when they got home, they didn’t talk about it, except amongst themselves.

So to all of you who served, no matter how much was asked of you, thanks. And most especially to you, Pop.