People are dying from the heat; knowing the wet bulb temperature just might help save a life. A short Python program lets you easily calculate this number.

A hot desert might be safer than a humid suburb!
A hot desert might be safer than a humid suburb!
A hot desert might be safer than a humid suburb! — Photo by Sam Beasley on Unsplash

The news recently has been full of stories about wet bulb temperature, and how this measurement is important when it comes to keeping humans alive. (Do a news search on “wet bulb” to see a huge number of stories.) Simply put, hot air with high relative humidity is more dangerous to health than drier hot air. …


They won’t tell us everything, but we can take action for ourselves to learn what’s up.

You’ve probably seen several of the “tic-tac” videos and heard the commentary on the UAP encounters by Navy personnel; this article will not inundate you with more of those. They are all part of an obvious campaign to “disclose” to the public on the subject, with multiple authority figures from our military and industrial complex showing up repeatedly and thoroughly on TV and the internet over the past few months.

The Disclosure People

It’s interesting and informative to list a few of the key players in the…


Yes, Lewis & Clark really did take a side trip to investigate some possible ETs.

Lewis & Clark investigated possible extraterrestrials
Lewis & Clark investigated possible extraterrestrials
Photo Courtesy of Stephen Leonardi on Unsplash

A very interesting story about possible extraterrestrials is found in archived Government journals written up by Lewis & Clark in 1804. They took a side trip to check out possible ETs residing on a very strange hill in what is now South Dakota. I like to think Lewis & Clark were the original “Men in Black”, although “Men in Brown” might be a better description. Let’s take a close look at this curious part of their expedition.

Devils of Spirit Mound

Beginning several hundreds of years ago, in what…


Python’s mpmath module is a powerful tool for high accuracy calculation that you should know

You likely know that integers in Python can grow to any reasonable size. For example, here’s a short Python program that starts with 1 and multiplies by 256 with each step. After 20 steps the resulting integer is larger than many programming languages can handle:

n = 1
for i in range(20):
n *= 256
print(n)
# 256
# 65536
# 16777216
# 4294967296
# 1099511627776
# 281474976710656
# 72057594037927936
# 18446744073709551616
# 4722366482869645213696
# 1208925819614629174706176
# 309485009821345068724781056
# 79228162514264337593543950336
# 20282409603651670423947251286016
# 5192296858534827628530496329220096
# 1329227995784915872903807060280344576
# 340282366920938463463374607431768211456
# 87112285931760246646623899502532662132736
# 22300745198530623141535718272648361505980416
# 5708990770823839524233143877797980545530986496
# 1461501637330902918203684832716283019655932542976…

A new algorithm for customizable, fast pseudorandom bytes that passes the tests with flying colors.

Photo by Ryunosuke Kikuno on Unsplash

Randomness is too important to leave to chance. Donald Knuth said that, and it’s a good mantra for programmers to adhere to. Generating pseudorandom numbers is a notoriously error prone challenge, and getting it right is extremely important.


Most roofs do surprisingly well, even if they are not aimed south, or their pitch isn’t ideal. Here’s a short Python program to easily analyze any roof.

There’s a lot of misinformation, and disinformation about how well homeowner’s roofs will work with solar panels. The Python program presented here can help you decide if your roof can really save you money by going solar.

Why I Created This Python Tool

My wife is a top notch solar panels sales person. Together we’ve been involved with solar energy projects of all sizes ever since she and I were introduced to each other by her father, the best…


Here’s a concise Python program you can use to calculate the Sun’s position to 0.01 degree accuracy.

The author at the Carissa Plains Power Generation Facility

Here’s my favorite solar joke… “I stayed up all night trying to figure out where the Sun went. It finally dawned on me.”

Seriously though, knowing where the Sun is at in the sky is of great importance today as the world switches to solar and wind alternate energy sources. I’ve created software for many solar sites, such as the Carissa Plains project shown above, and sharing a core Python algorithm to calculate the Sun’s position feels like the right thing to do…


At least some of what NASA has shown us is bogus. Can we use Python to set things right?

Mars from a distance — courtesy NASA

Conspiracy theories are actually okay. However, buying into them outright is for the weak minded, and rejecting them offhand is for the closed minded. Hard facts, strong evidence, good research, and critical thinking provide the path forward to properly accepting or rejecting any interesting theories, whether of the conspiracy or of the scientific type. Having said all that, let’s take a look at one of my favorite conspiracy theories about Mars.

Spirit Rover Phones Home

Back in 2004, NASA released a fascinating panoramic photograph from…


Make a date with this short educational Python program!

Photo by Andres Jasso on Unsplash

Yes, this is all about a dating program, but no, it’s probably not what you think. It’s still a lot of fun though! (And the results can be quite useful.)

Python and the KISS Principle

Python is an amazing programming language, perfect for students and beginners, NASA Rocket Scientist types, and passionate lovers of logic of all ages. When learning programming concepts, Python goes hand-in-hand very well with the KISS principal (I prefer to refer to it as the “Keep It Stupidly Simple” principle), and that makes learning the core concepts fun and easy, minimizing distractions…


Think of it as an amazing programming language within a language

Photo by Danial Igdery on Unsplash

I discovered something very fun recently, while working on my next book, a collection of short Python programs for the Casio fx-9750GIII handheld calculator. I’ll share the resulting program here (it runs great in any version of Python) and explain how the amazing eval() function saved my bacon.

Language Within a Language

The program I was working on lets students find the roots of any function of x, or the points where the function crosses the x axis when it is graphed. Instead of having the user edit the program to define some…

John Clark Craig

Author, inventor, entrepreneur — passionate about alternate energy, technology, and how Python programming can help you hack your life.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store