Category Archives: Books

Automate The Boring Stuff with Python Coding

Spread the love

If everyone in the world understood and had a working command of regular expressions, everything would run smoothly. Especially if all of our interfaces to text allowed for their use. This has been pointed out. And, Automate the Boring Stuff with Python, 2nd Edition: Practical Programming for Total Beginners has a whole chapter on this.

What is a regular expression? We can talk about that in detail some other time. Briefly, it is a string of symbols that is designed to match a specified set of symbols, or a range of a set of symbols, in a larger body or stream of text. For example, if you pass a stream of information (say, all your emails) through a filter with the regular expression:

‘\d\d\d-\d\d\d-\d\d\d\d’

then any part of that stream of information that looks like a phone number (not using parens), such as 636-555-3226, will be isolated.

Automate the Boring Stuff with Python is a book that teaches beginning Python computer Augean programming focusing on examples from day to day life, including but well beyond REs.

The new edition includes pattern matching with regular expressions, input validation, reading and writing files, organizing files, web scraping, manipulating Excel spreadsheets and Google Sheets, PDF and Word documents, CSV and JSON files, email, images, and automating your keyboard and mouse.

The great benefit of a book like this is that you learn Python (the first part of the book gives you all you need to know to program in Python) in the context of things you actually want to do with Python. If you are interested in learning Python, or coding in general, this can be your first book.

The book is well done, as all in this series are, and fun. There are strong on line resources including all the code, and that information is regularly updated. Generally, “No Starch” press books are great, and this is one of those!

I would like to have seen at least sidebars on manipulating things using Libreoffice software, but note that the book focuses on documents, and OpenSource software does work with normal Excel and Word documents, so it is there.

The second edition adds a new chapter on input validation. The Gmail and Google Sheets sections, and the information on CSV files is also new. I plan on using the software tips and tricks to develop my own highly specialized and targeted search software. I’m often looking for files that have specific extensions, and certain kinds of content, in certain locations. Just the ability to hard-wire where to search for files will save me a lot of time and trouble.

Author Al Sweigart is a professional software developer who teaches programming to kids and adults, and who is author of Invent Your Own Computer Games with Python, Cracking Codes with Python, and Coding with Minecraft, all of which are quite nice. We need a new edition of Coding with Minecraft, by the way, that looks at a wider range of coding options and keeps up with the major advances in that software environment! So, get to work, Al!


Spread the love

Your Cranky Uncle vs Climate Change

Spread the love

It is said that scientists are lousy at communication, lousy at telling everyone else about their science, in understandable and compelling terms.

This is of course absurd. There are tens of millions of scientists, and dozens of them are really excellent communicators!

This IS the book you are looking for.
Among the many sciences, there is a science of science communication. It overlaps, unironically, with the science of conspiracy ideation, and borrows a great deal from the broader communication fields.

One of the leading science communicators of the day is cognitive scientist John Cook. John is at George Mason University. He is so tightly linked to the founding and development of the Skeptical Science project that “Skeptical Science” is the name of his Wikipedia entry. This binds John and his mission to a lot of us. Where we once might have said, “I am Spartacus,” we now say, “I am Skeptical. Science!” For John, it is just “I am SkepticalScience.”

Cook is likely known to you for the Consensus project. There were two main projects, a few years back, in which scientist attempted to measure the degree of consensus over the idea that anthropocentric climate change is real. (It is real, and the consensus is near 100% in both peer reviewed literature and the conclusions of actual scientists.) John and his colleagues did one of those, and beyond that, widely promoted the results so that everyone knows about it.

Guy from 1917 (left) and cognitive scientist John Cook (right). Whatever made me think about that sticking the head up out of the trench analogy?
Like I said above, there are tens of millions of scientists. Developing and disseminating the results of consensus research in climate scientist was equivalent to being the only guy sticking your head up out of the trench in that movie, 1917. Science deniers, both avocational and bought-and-paid-for, got all over cook like skin on a grape. Didn’t phase him, though. He continued to develop a series of new projects including a massive online course (Making Sense of Climate Science Denial), an artificial intelligence system for detecting fake science, and most recently, the Cranky Uncle project.

Cranky Uncle vs. Climate Change: How to Understand and Respond to Climate Science Deniers” is a crowdsourced book (and an app). There will be a book launch on March 4th in Arlington. This book gives us the whole ball of wax that is the science of climate science denial in a very funny, really well produced, and compelling wrapping. It will amuse you, and it will advise you. Your cranky uncle is done for.

I don’t have a cranky uncle anymore (he died). But I do have a lot of neighbors who like to write in ALL CAPS. They show up when I give a talk on climate change, and they bring their conspiracy theories, logical fallacies, cherry picked “facts”, absurd expectations, and references to fake research done by fake experts. It is a lot to deal with. But now, I can use the Lewis Black technique for dealing with evolution deniers, but instead of pulling out a trilobite, holding it up and saying “Fossil!” I can pull out a copy of Cranky Uncle vs. Climate Change and say “Oh yeah? Imma look up what you just said in this BOOK!” or words to that effect.

Cranky Uncle vs. Climate Change: How to Understand and Respond to Climate Science Deniers is the book now. Pre-order it!

For completeness, here is Lewis Black demonstrating the fossil technique:


Spread the love

Books I read this year.

Spread the love

Everybody is doing it, so here is mine.

This list does not include children’s books (usually STEM) that I reviewed, books Huxley and I have read (which is mainly Lord of the Rings this year, frankly… taking forever), computer or technology books, or video game references or books. It also does not include manuscripts or books that pre-date 1900 and you probably can’t find anywhere, unpublished material, and racist volumes that I read because I hate them but wont’ link to them (and similar). I list one John Sanford book to represent several that I read (I decided to read them all over, in order … yes, I had a reason for that, and it was great fun. But that was like 20 books.)

I’ve read 100% of 80% of these books, substantial parts of others. I have not included books I only read a few chapters of, such as a biography of FDR and one of Washington, and some books on Minnesota history.

They are not in any particular order. I probably missed a few. One I finished during the current year but I started it in 2019.

What Do We Need Men For?: A Modest Proposal

Free Market Environmentalism for the Next Generation by Anderson, Terry L., Leal, Donald R. (2015) Paperback

Fire and Fury: Inside the Trump White House

Time in Ecology: A Theoretical Framework [MPB 61] (Monographs in Population Biology)

The Field of Blood: Violence in Congress and the Road to Civil War

Lethal White (A Cormoran Strike Novel)

Language Myths, Mysteries and Magic

The British Are Coming: The War for America, Lexington to Princeton, 1775-1777 (The Revolution Trilogy)

Junction City, Off the Record: Tales From Ogden, Utah’s Notorious Underworld in the Roaring ‘Twenties

Junction City, Off the Record: Tales From Ogden, Utah’s Notorious Underworld in the Roaring ‘Twenties

The Importance of Small Decisions (Simplicity: Design, Technology, Business, Life)

Postwar: A History of Europe Since 1945

Red Sparrow: A Novel (The Red Sparrow Trilogy Book 1)

Grant

The Blizzard of 88

Presidents of War: The Epic Story, from 1807 to Modern Times

Hidden Prey (The Prey Series Book 15)

Fear: Trump in the White House

The Skeptics’ Guide to the Universe: How to Know What’s Really Real in a World Increasingly Full of Fake

How To Go Viral and Reach Millions: Top Persuasion Secrets from Social Media Superstars, Jesus, Shakespeare, Oprah, and Even Donald Trump

A Higher Loyalty: Truth, Lies, and Leadership

Russian Roulette: The Inside Story of Putin’s War on America and the Election of Donald Trump

American Indian Stories, Legends, and Other Writings (Penguin Classics)

A Taste for the Beautiful: The Evolution of Attraction

Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth

Harbinger

Drawdown: The Most Comprehensive Plan Ever Proposed to Reverse Global Warming

Superlative: The Biology of Extremes

Food or War

Our Changing Earth: Why Climate Change Matters to Young People

In Search of Sungudogo


Spread the love

Chernow’s Rockefeller Bio So Cheap JD Rockefeller would Buy It

Spread the love

JD Rockefeller believed himself to be something of a gift from god, a gift to capitalism. I’m not big on the god thing, but Ron Chernow is a gift of some kind to the art of biography. He writes big thick books that are actually about 25% less thick than they look because the last quarter is footnotes. He is famous for writing the biography that became the famous musical known as Hamilton. You know of whom I speak.

I recently read Rachel Maddow’s excellent and compelling, must read Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth. You must read it. Rockefeller’s story is an important part of the contextual lead-up that Dr. Maddow does so well, and for this she leans, appropriately, on Chernow’s Titan: The Life of John D. Rockefeller, Sr. So, when I saw that Titan was available on the Kindle, cheap, I thought you should know too, and now you do!


Spread the love

Impeach: The Case Against Donald Trump

Spread the love

I am recommending this new title by Neal Katyal and Sam Koppelman. Katyal is a former Acting Solicitor General for the US, and law professors at Georgetown, and you know him as a frequent contributor on various MSNBC shows.


Impeach: The Case Against Donald Trump
*

Why President Trump has left us with no choice but to remove him from office, as explained by celebrated Supreme Court lawyer and former Acting Solicitor General Neal Katyal.

No one is above the law. This belief is as American as freedom of speech and turkey on Thanksgiving—held sacred by Democrats and Republicans alike. But as celebrated Supreme Court lawyer and former Acting Solicitor General Neal Katyal argues in Impeach, if President Trump is not held accountable for repeatedly asking foreign powers to interfere in the 2020 presidential election, this could very well mark the end of our democracy. To quote President George Washington’s Farewell Address: “Foreign influence is one of the most baneful foes of republican government.” Impeachment should always be our last resort, explains Katyal, but our founders, our principles, and our Constitution leave us with no choice but to impeach President Trump—before it’s too late.


Spread the love

Do Not Miss Rachel Maddow’s New Book: Blowout

Spread the love

Rachel Maddow is the Charles Darwin of Cable News.

Darwin’s most important unsung contribution to science (even more important than his monograph on earthworms) was to figure out how to most effectively put together multiple sources into a single argument — combining description, explanation, and theory — of a complex phenomenon in nature. His first major work, on coral reefs, brought together historical and anecdotal information, prior observation and theory from earlier researchers, his own direct observations of many kinds of reefs, quasi experimental work in the field, and a good measure of deductive thinking. It took a while for this standard to emerge, but eventually it did, and this approach was to become the normal way to write a PhD thesis or major monograph in science.

Take any major modern news theme. Deutsche Bank. Trump-Nato-Putin. Election tampering. Go to the standard news sources and you’ll find Chuck Todd following the path of “both sides have a point.” Fox News will be mixing conspiracy theory and right wing talking points. The most respected mainstream news anchors, Lester Holt, Christiane Amanpour, or Brian Williams perhaps, will be giving a fair airing of the facts but moving quickly from story to story. Dig deeper, and find Chris Hayes with sharp analysis, Joy Reid contextualizing stories with social justice, and Lawrence O’Donnell applying his well earned in the trenches biker wisdom.

But if you really want to Darwin the news, and sink your natural teeth and claws into a story, go to Maddow. Continue reading Do Not Miss Rachel Maddow’s New Book: Blowout


Spread the love

Harbinger by Louis du Toit and CL Raven

Spread the love

I’m an American who has spent considerable time in South Africa, so I enjoy a good novel that is set there. Harbinger by Louis du Toit and CL Raven is set, instead, in the memory of that fraught and beautiful country, written by a South African author. I live in a place where racial tension, especially anti-Muslim or anti-Middle Eastern feelings rest at a low level below the surface, and this is also a place where I accompany my son to the bus stop where he is the only child who is NOT an immigrant, a Muslim, a Hindu, or, egads, a French Canadian Catholic. I consider us both lucky to be among such diverse friends. Continue reading Harbinger by Louis du Toit and CL Raven


Spread the love

Climate Change Reading and Resources

Spread the love

Dire Predictions: The Visual Guide to the Findings of the IPCC by Michael Mann summarizes the IPCC Report on climate change (scientific basis) in a clear and understandable way without sacrificing important detail and nuance.

One test of the legitimacy of claims about scientific matters is time. Over time, if a proposal about how nature works that buck the consensus is valid, it will be shown to be valid. If it is not, it will fail the test of time. Climatology Versus Pseudoscience: Exposing the Failed Predictions of Global Warming Skeptics by Dana Nuccitelli looks at the predictions of those who have been denying the reality of climate change, comparing those predictions made by mainstream science. Read the book to find out who won!

Even though this is not specifically about climate science, I always recommend that people read Sean Otto’s The War on Science: Who’s Waging It, Why It Matters, What We Can Do About It to understand why we are not simply and directly dealing with climate change. Along the same lines, Michael Mann’s The Hockey Stick and the Climate Wars: Dispatches from the Front Lines chronicles the denier-science fight at its high water mark, a few years back.

Drawdown: The Most Comprehensive Plan Ever Proposed to Reverse Global Warming is a pretty good book, and at this moment very current, to read about how to address climate change.


Spread the love

The Biology of Extremes: Superlative by Matthew D. LaPlante

Spread the love

Superlative: The Biology of Extremes by Matthew D. LaPlante is not just about extremes, but about all the things in between that make the extremes extreme. LaPlante looks at size, speed, age, intelligence. For all the various subtopics that come up in such an exploration, LaPlante does a great job of bringing in the latest research. Mostly, this is a collection of interesting evolutionary and biological stories that happen to involve tiny things, giant things, old things, fast things, or things that are in some other way — superlative.

Go for a swim with a ghost shark, the slowest-evolving creature known to humankind, which is teaching us new ways to think about immunity. Get to know the axolotl, which has the longest-known genome and may hold the secret to cellular regeneration. Learn about Monorhaphis chuni, the oldest discovered animal, which is providing insights into the connection between our terrestrial and aquatic worlds.

I’m not endorsing every idea or story in this book. One can not write a book about adaptations and have any evolutionary biologist worth their salt not bump on things. But the author does an honest and straightforward job of representing the research, and you’ll learn quite a bit that is new, see new perspectives on things you’ve considered in the past, and you’ll enjoy LaPlante’s writing.

I will probably be recommending this volume as a holiday gift for the Uncle who has everything or the teenager who likes natural history. Teachers of wildlife biology, evolution, or related topics will be able to mine this volume for stories. The use of footnotes is notable.* I recommend Superlative


  • … and well done.

Spread the love

Food Or War by Julian Cribb: Excellent new book

Spread the love

For many years, scientists who studied biology, behavior, and ecology (under the name of various disciplines) looked at resources, including and especially food, as a major determinant of social structure in social animals, herd structure in herd animals, and so on. Then, there was a revolution and it quickly became apparent that sex, not food, underlies everything and is the ultimate explanation for the variation we see in nature. That pair of dimes lasted for a while, then the other penny dropped and thanks to key research done by a handful of people (including me, in relation to human evolution), it became apparent that there was a third significant factor, that ultimately trumped sex as an organizing force. Food. Continue reading Food Or War by Julian Cribb: Excellent new book


Spread the love

Our Changing Earth: New Climate Change Book

Spread the love

Our Changing Earth: Why Climate Change Matters to Young People by Arjun Marwaha is a book for young people, about why climate change should matter to young people, and it is written by an actual young person! Marwaha is a high school junior from California, decorated for his excellent essay writing, who has a passion for helping people understand climate change. The book does that well. Continue reading Our Changing Earth: New Climate Change Book


Spread the love

Two Amazing Books Set In Africa

Spread the love

Right now, for a limited time only, The Poisonwood Bible: A Novel by Barbara Kingsolver, is available cheap in Kindle format. You probably know the book.

The novel is set against one of the most dramatic political chronicles of the twentieth century: the Congo’s fight for independence from Belgium, the murder of its first elected prime minister, the CIA coup to install his replacement, and the insidious progress of a world economic order that robs the fledgling African nation of its autonomy. Against this backdrop, Orleanna Price reconstructs the story of her evangelist husband’s part in the Western assault on Africa, a tale indelibly darkened by her own losses and unanswerable questions about her own culpability. Also narrating the story, by turns, are her four daughters—the self-centered, teenaged Rachel; shrewd adolescent twins Leah and Adah; and Ruth May, a prescient five-year-old. These sharply observant girls, who arrive in the Congo with racial preconceptions forged in 1950s Georgia, will be marked in surprisingly different ways by their father’s intractable mission, and by Africa itself. Ultimately each must strike her own separate path to salvation. Their passionately intertwined stories become a compelling exploration of moral risk and personal responsibility.

The other amazing book is this extended novella, or shortish novel, mixing compelling and hilarious fiction with thinly veiled actual observations and experiences on the OTHER side of the Congo, in and alongside the Western Rift Valley, as an enigmatic primatologist and a partly clued-in explorer-guy search for an elusive creature that might or might not exist. If you are a member of the Skeptics movement and want to know more about your own origins, In Search of Sungudogo by Greg Laden is a must read.

I’m sure that either one of these authors would appreciate a nice review once you’ve read the book!

“You know how to review a book, don’t you? Just put your lips together and click on something.:” — Archer Mallows, explorer-guy


Spread the love

In Search of Sungudogo: A Novel

Spread the love

I wrote a novel called In Search of Sungudogo.

I wrote this novel, really, a novella, a few years ago as part of a publicity and fundraising stunt several bloggers were doing all at once. Some bloggers shaved their beards or got Mohawks while live streaming, others did other things (nobody can really remember) and I live blogged the construction of a novel by putting out one chapter an hour until I was done.

The final product was rough, especially the beginning and the end. And the middle. As you might expect.

But a heavy revision resulted in what I think is a pretty good story. Those of you who saw the previously Kindle-published version are familiar, but it is further updated since then, not a lot, but with some helpful improvements.

The story started out as a take-off on the Heart of Darkness by Conrad. Other than certain personality shades shared between Archer Mallow (of Sungudogo) and Conrad’s protagonist, Captain Marlow, the similarities are no longer there. It is the story about a search for an as yet unverified form of ape, by a primatologist and a logistical expert familiar (more or less) with the region.

The setting is a part of Africa I am very familiar with. Many of the scenes in the novel are based on things that I’ve experienced, seen, or heard about in my work there. There really is a restaurant that has everything yet nothing, the park guards really are issued one bullet at a time, the volcanoes really do eat small planes. Also accurate are the geography and geology of the area, except where the story veers off into science fiction. And yes, this is science fiction.

In Search of Sungudogo is available in Kindle form now, and will be available in print form very soon, just a matter of days. I’ll let you know when that happens.

Feel free to put a review on Amazon if you like it!


Spread the love

What do we need men for? Including Donald Trump?

Spread the love

My FBFF E. Jean Carroll has a new book coming out, What Do We Need Men For? A Modest Proposal. You’ve heard about her, and the book, and related matters because Donald Trump’s apparent first degree rape of Ms. Carroll, several years ago, is in the news today, and for a story about Trump to vie for bigness among all the other stories, let alone being noticed at all, it must be amazing. Continue reading What do we need men for? Including Donald Trump?


Spread the love