Intel's Ronler Acres Plant

Silicon Forest
If the type is too small, Ctrl+ is your friend

Showing posts with label Spreadsheet antics. Show all posts
Showing posts with label Spreadsheet antics. Show all posts

Monday, January 12, 2026

Victorian Spaceflight

Ancillary Justice by Anne Leckie

I've been trying to spend more time reading science fiction and less time surfing the net. It's not working great, but I am making some progress. I read Ancillary Justice by Anne Leckie last month and it's pretty great. Galaxy spanning adventure with a roboticized human who is ostensibly under the absolute control of his/her masters. The sex of any of the characters is never made clear, but it doesn't really matter. Anyway, about halfway through the story you realize he/she is lying. Ack! Now the story becomes very interesting. I think I read this once once before, like a zillion years ago. The part that stuck in my mind is a group of evil masters destroys a large military starship filled with thousands of troops AND THEMSELVES to keep some vital information from getting out. Fortunately for us, and unfortunately for them, our hero manages to escape before the ship explodes. Think that might have impacted her ability to be truthful?

Hillsboro Library Friends Shop

On a recent visit to downtown Hillsboro, I stopped by the Hillsboro Library Friends Shop, a tiny little bookstore next to the Max commuter rail line. They seem to be stocked with surplus from the library, books that are no longer in fashion, maybe. Anyway, I picked up a couple of science fiction novels for cheap, like a couple of bucks each, less than the price of a candy bar. 

One of them is The City Who Fought by Anne McCaffrey and S. M. Sterling. It's not great, but it's not too terrible, so I'm plugging along. 

Anyway about a third of the way through, this giant spaceship comes hurtling out of depths, headed right for giant space station. Through masterful machinations, our heroes manage to avoid a collision. Bah, humbug. Makes for great drama, but statistically speaking it is nonsense.

Any star fairing civilization, as a matter of course, is going to maintain a scan of their entire sphere of view for possible interlopers. Shoot, we are barely getting off the ground and we are doing that now. That's how we detected the recent interstellar asteroid that came through our system.

If a starship was approaching Earth, decelerating at one gravity, and we just detected it by the time it crossed Pluto's orbit, it would still take 9 (nine) days to get here, which should give us plenty of time to move our space station out of the way. Even if it were decelerating at ten gravities, it would still take three days to get here.

Average Radius of Pluto's orbit40Astronomical Units
times93,000,000Mles per Astronomical Unit
equals3,720,000,000Mles
times5,280Feet per Mile
equals19,641,600,000,000Feet
Formula
Distance = (1/2) times Acceleration times time squared
Formula solved for time
Time = Square root of (Distance divided by Acceleration)
Acceleration32feet per second per second
Time783,454Seconds
divided by86,400Seconds per Day
equals9Days
Formula
Velocity = Acceleration times Time
Velocity25,070,525Feet per Second
divided by5,280Feet per Mile
equals4,748Miles per Second
equals2.6% Speed of Light

I want to see more science fiction stories about space flight WITHOUT warp drives. Stories about voyages that take months or years. Kind of like Patrick O'Brian's stories about commander Jack Aubrey.

Monday, December 15, 2025

Low Wages

Visual Capitalist posted a chart showing number of working people making less than $20 an hour. It lists the states in order of the number of people. I thought that was not particularly useful, I wanted the list in order of the percentage of the workforce earning those wages, so I asked Google to extract the text from the image and put it in a spreadsheet. Mostly I did this just to get a little mental exercise. Google does a good job of extracting the text, but it puts each item on a separate line, and I want all items pertaining to one state on the same line. I could do this by hand with any text editor, but being who I am, I went with using spreadsheet formulas. Was it any faster? Maybe, maybe not, but it was not tedious and I refreshed my spreadsheet skills.

Original RankPercentage RankStateThousands of PeoplePercentage of Workforce
271Mississippi58152%
202Louisiana78145%
303Arkansas54143%
394West Virginia29343%
225Oklahoma73542%
216Kentucky73941%
367New Mexico35241%
58North Carolina1,80040%
189Alabama82139%
110Texas5,10038%
311Florida3,50038%
4812Wyoming9238%
713Georgia1,70037%
1514Missouri1,00037%
1715South Carolina82437%
2916lowa54737%
1117Indiana1,10036%
3218Nevada51136%
3719Idaho31136%
3320Kansas47435%
1421Tennessee1,00034%
1022Michigan1,40033%
3123Utah51133%
924Ohio1,60032%
3825Nebraska29832%
4026Hawaii18132%
4427South Dakota13732%
1628Arizona96331%
4329Montana14431%
630Pennsylvania1,70030%
4531Delaware13530%
832Illinois1,60029%
1933Wisconsin80829%
4134Maine17129%
4735North Dakota10328%
1336Virginia1,00027%
437New York2,20026%
1238New Jersey1,10026%
4639Rhode Island13126%
2340Minnesota65925%
241California4,00024%
4242New Hampshire16124%
3443Oregon41623%
3544Connecticut38023%
4945Vermont6723%
2546Maryland63022%
2847Colorado55321%
5048Alaska16120%
2449Washington63919%
2650Massachusetts60518%
5151D.C.14111%

Saturday, February 22, 2025

Permutations

Factoring and Permutations Spreadsheet

Talking at lunch Tuesday*, Dennis mentioned he was playing with numbers, specifically looking for interesting patterns in permutations of a four digit number. Why? Because it's there, that's why.

I got to wondering if you could factor a number using a spreadsheet. Since we are limiting ourselves to four digit numbers, there will be no factors greater than 100. There are only 25 prime numbers under 100, so it shouldn't be too bad.

The spreadsheet is full of formulas, but I only had to figure out a couple of them and then copy and paste them to make the whole sheet.

The spreadsheet is not very smart. The largest number of factors a 4 digit number can have is 13. Two to the 13th power is 8192. Add a 14th factor and the product will have 5 digits. So 13 is the largest number of times we will have to divide.

We simply divide our starting number by our chosen factor and then count the number of times the division came out even. Our quotient becomes the starting value for the next line and the next factor.

Next I tried my hand at generating permutations. This one didn't work out quite so well. I ended up generating the permutations by hand (there are 24 permutations of 4 character strings) and then using those values to extract digits from the original 4-digit number.

Today I worked on a way to generate permutations automatically. It works, but criminently, it took a bunch of equations. 

I used string functions to cut up the number which means it should work for any four characters. It could probably be done using mathematical operations. I don't know if that would be any simpler.

*Tuesday three months ago.

Friday, December 20, 2024

Distance to the Sun


The Strange Sound That The Sun Makes
magnify

13 years for sound to travel from the Sun to the Earth, if sound could travel in space! Kind of puts that distance in a different light.

Are his numbers correct? Let's check. The sun is 93 million miles away, which translates into about 8 minutes at the speed of light. Since light travels at about one foot per nanosecond, we get:

Time for light to travel from the Sun to Earth8minutes
times60secondsper minute
times1billionnanosecondsper second
equals480billionnanoseconds
divided by1nanosecondper foot
Distance to the Sunequals480billionfeet
divided by5,280feetper mile
Distance to the Sunequals90millionmiles

My 90 million mile distance is not bad considering I started with 8 minutes which is not a precise time. Now we calculate how long sound would take to travel that distance:

Distance to the Suntake480billionfeet
Speed of sounddivide by1,125feetper second
equals427millionseconds
divided by22,791,600secondsper year
Time for sound to travel from Sun to Earthequals14years

The difference between his time of 13 years and my time of 14 years can be easily explained by the different temperatures when measuring the speed of sound.

Monday, July 8, 2024

Slice of Pie

Slice of Pie Graph

Poking around on YouTube this morning and I noticed a video about taking progressively larger slices of pie and the question was which slice would be the largest? You start by taking a slice that is one percent of the whole pie, and then you take two percent of the remaining pie, and then three percent of what's left all the way up to one hundred. I couldn't come up with an equation that I could graph on Desmos, so off to the spreadsheet I go. Only had to make three little equations and then copy and paste to fill the rest of the sheet.

The size of the slice (the yellow line) goes up until you get to 10%. That's when you get the largest piece of pie. After that each slice gets progressively smaller. By the time you have reached the 35th slice, all that's left is 1/1000th of the whole pie.

Never did watch the video. Went back and looked for it but could not find it. Funny how I was able to get the whole problem from a one line blurb, but it took me a paragraph to explain it.


Tuesday, May 14, 2024

Heater Repair, Revised

Heater Controls

Last November I took the Mitsubishi to the mechanic to get the heater fixed. The first problem was the controller so I bought a couple of used control panels off of E-Bay. Took them into the shop and find they are the wrong parts. What it needs is new actuators that CONTROL the flapper valves in the heater box. So I order a couple of actuators and find they don't fit. The old, defunct actuator has a seven pin electrical connector and one of the new ones has five pins and the other has three pins. Wonderful. Search the internet and find nothing. Find a list of junk yards and start calling. I called a dozen and found nothing. I even posted a note on the national junk yard board but got no reply.

Actuator Internals
All the lines on the gear wheel are wear marks, there are actually only three wide lines of conductive paint.

Okay, let's take a look at this actuator and see what's going on. Open it up and I find a small electric motor turning a gear train. That part looks simple enough, but why do we have seven pins? Take out the big gear and I find some some brass brushes that contact the underside of the big gear. There is a spiral of something on the gear. It looks kind of erratic and my immediate impression is that it is some kind of pattern that encodes the position of the wheel.
Circuit Scribe Conductive Ink Pen

I take it to lunch and confer with my cronies and Jack suggests that it is resistive paint. The erratic pattern is simply where the paint has worn off. So I order a conduction paint pen and fill in the worn spots and put it back together. Put it back in the car and it seems to be working okay.

Electrical Testing

Test Leads Kit

Before I got to the paint, I thought I would see if one of the other actuators could be made to work. They all used the same case and the same drive shaft, just the electrical connectors were different. Though mine has seven pins it only uses five. Looking inside the 5-pin actuator, it seems to be very similar, so I thought to hook it up to a meter and see how it behaved. I have a collection of test leads, but none that were small enough to connect to these pins, so I bought a kit. Still had to drill holes in the shell surrounding the connector on the actuator, but I got them all connected. Hooked them up to the meter and a battery from a drill, and ran the actuator through it's whole range of motion. The resistance on the original actuator ran from zero up to 8K ohms, on the new actuator it varied from 0 to 6K ohms. Six is almost the same as 8, right? Or so I reasoned. I tried it but it would not go through it's full range of motion, so we're back to the original.

Lever Wire Nuts

I cut the wires to conduct that test, so now I need to reconnect them. I found these little lever action connectors on Amazon. They worked very well. They are just a little over an inch long, so they fit in the available space.

Mounting Screws

The two screws that were holding the actuator in place had gone missing, so I looked through my collection of screws and found a couple that seemed to be just right, except they were just a fraction of an inch two long. I used a couple of nuts as spacers and they worked fine.

The screws are like sheet metal screws, so anything that was approximately the same size would of worked, except one of the screws was buried way back in the dash so getting any kind of driver in there was difficult. So I wanted a screw that was as near to correct as I could find.

Right side underdash panel

The actuator wasn't hard to get to in spite of being buried in the dashboard. Just pull out the glove box which is held in place with four screws that are easy to get to. I ran into a little problem when I was putting in the screws holding the actuator. I was using a little screwdriver bit about two inches long to get one of the screws started and I dropped it and it disappears. Bah. There is a panel on the underside of the dash that is held in place with another four screws. Take those out, the panel comes out and there's my screwdriver bit. Get the actuator installed and now we have to put that underdash panel back in. This is a real struggle. With the panel in place you can't see where the screws go, and I can't get my head in the footwell far enough to see anything. I probably spent an hour getting those four screws into their holes.

Expenses:

DateItemVendorAmount
Nov. 22, 2023Control PanelEbay125.00
Nov. 22, 2023Control PanelEbay68.99
Dec 4, 2023ActuatorPuente Hills Mitsubishi141.45
Jan 19, 2024ActuatorAmazon24.99
Feb 5, 2024Test LeadsAmazon20.99
Mar 2, 2024ConnectorsAmazon9.99
Mar 8, 2024PaintAmazon15.49
Total406.90

I could have returned some of those parts, but I fumbled around and now it's probably too late.
I also paid the mechanic $300, but he did some other work, so maybe $100 went to investigating the heater problem. It was kind of a drag spending $400 on stuff I didn't need, but I was able to put off buying a new car for at least a year. Maybe ten. We won't count all the time it was out of service. Fortunately the Hyundai had returned so we still had two working vehicles.

Notes: 

  • I started this post on March 15, 2024. Then I got distracted, but now I've finished it.
  • I've tried several different ways of including a table in a blog post but none of them worked very well. Today I thought I would just try copying the data from the spreadsheet and pasting them here and it worked very well. Just highlight the rectangular area you want and press Control-C to copy it, move over to the blog and press Control-V. Worked very well.


Wednesday, February 14, 2024

Maserati Mostro

2016 Maserati Mostro

This Maserati is a real Italian hot rod. They built five of them to celebrate Maserati's 100th year anniversary. The company was founded by five brothers sometime around 1920. A couple of those brothers lived very long lives. Some of them didn't.


Sunday, September 17, 2023

Seconds


I am still reading A Deepness In The Sky by Vernor Vinge. I'm kind of slow, I read maybe a chapter a day, which I feel is about ten pages. It's a big book, and there's lots of chapters, so it's taking me a while.

Throughout the book Vern tells time by the number of seconds, be it hundred or a thousand or a million. I'm comfortable with numbers, so I can generally figure out the amount of time we are talking about. Unfortunately I never remember those values so every time I run into a time, if I care about the amount of time, I have to do those calculations again. I wanted a scale that had both our conventional times and Vern's base-10 devoted system. It would need to be a logarithmic scale in order to accommodate all of our values. So I went prowling the net - and found bupkis. I did find one suggestion on how it might be done in javascript and html, but that's a lot of work, and I've already got a stack of obscure stuff to wade through. So I just compiled a list to see what I'm dealing with.

Some useful approximations:
  • One thousand seconds, a Ksec, is about a quarter of an hour.
  • One hundred thousand seconds is a little more than a day, 
  • a million seconds is like a week and a half, 
  • two and half million makes a month
  • 30 million makes a year
  • 300 million makes a decade
  • 3 billion makes a century
  • 30 billion makes a millenium
P. S. The list at the top is an embedded Google spreadsheet. I'm not sure whether embedding a list from a spreadsheet is worthwhile. It's great if that spreadsheet is going to get updated. If that happens, the blog post will show the new stuff, but I don't think that's going to happen here. The problem with embedding the spreadsheet is having to manually adjust the height and width parameters to show all of the data and nothing else. As you can see, there is still some white space on the right side and the bottom. I probably went back and forth a dozen times between the html and Blogger's preview. Pain in the neck. The other way is to just take a screenshot and embed it as an image. That has its own set of hoops to jump through, but I am familiar with them.

P. P. S. Kind of funny that everyone uses the same time standard of seconds, minutes and hours. The second is kind of universal - it's a heartbeat. The minutes and hours part though, I wonder where it came from. I suspect it came from European clock makers during the Renaissance (Bayou, I'm looking at you), but who knows? Maybe they got it from Chinese clock makers a zillion years ago. Someone should investigate.

P. P. P. S. Editing a spreadsheet to get it to 'look' like you want takes me a lot of fiddling around, but Google does offer lots of options. I know how to find most of what I want, changes appear immediately, you don't have to go look at a 'preview', and it's useful for things besides lists.


Friday, July 15, 2022

More Fun with Numbers

I've been kicking this idea around for a while, and I should probably put some numbers to it and see if it's even feasible.

The basic idea is to use a linear accelerator to launch a stream of iron particles at very high velocities, like half the speed of light, and use that to generate thrust to propel a spaceship. A little fooling with the rocket equation shows that with an exhaust velocity that high you should easily be able to reach the speed of light. The rocket equation doesn't take relativity into account, but the Newtonian math at least  sounds promising.

If you were to accelerate at one gravity for one year you would reach the speed of light, at least in Newtons universe. So boost for one year, coast for two or three, turn around and use your particle beam thruster to slow down till you reach Alpha Centauri. Easy peasy, lemon squeezy.

There are all kinds of problems with this idea, but the first one that came to me is the reaction mass. How many tons of iron particles would you need? I dunno, how about a million? Suppose you got your reaction mass in BBs, how many BBs would you need? And how fast would you need to feed them into your particle accelerator?

To the Bat-sheet, Robin. I took the idea I used last time and expanded it to use named variables. It makes it a little cumbersome to display in Bloggers narrow format, but we'll give it a try.


As you can see, that stream of BBs would need to be flying into order to shoot the entire one million tons worth in one year. Even if we were to draw it out to ten years, it would still be traveling at rifle bullet speeds. Perhaps we should look at using cannonballs instead of BBs.

Naming all the constants was a little annoying, but I think it makes it easier to understand and verify.

P.S. I need to start putting disclaimers on the draft versions of my posts. You start embedding things and Blogger's preview function doesn't always cooperate, so in order to see what it's going to look like, you have to publish it. We'll see if I remember next time.