Thursday, February 1, 2024

Quartzfest Report

I am a relatively new amateur radio operator and my wife Mary and I have been RVing for a few years to provide recreation for our dog, Gia. So, we jumped at the opportunity to combine these interests and take a trip at a different time of year than we normally do. We combined the desert trek with a week-long trip down the California coast to visit all the dog beaches.

 

It rained our first two days in Quartzsite, which rendered our new solar system unusable. Fortunately, we camped next to our friends Dave (WD6CZY) and Judy (WD6DCD), who had a diesel generator big enough to power both their motorhome and our little trailer. Gia made good friends with their dog Molly.

 

Mary took some crochet classes from Marcia (KG6FIX) and we made new friends with her and Sam and their dog Nico. The YLRL group also welcomed Mary into their fold. We also learned about Handi Hams and we hope to share that information with our friends who have various disabilities, including my sisters, who are deaf.

 

I went to workshops about POTA, HF propagation, DXing, antenna grounding, teaching Ham courses via Zoom, grounding and bonding. Unfortunately, due to weather, dog care, and other interruptions, we were unable to participate in the longer activities such as POTA, SOTA, and off-road trip. We’ll do all those next year.

 

We found a dog park on the north side of town where we made friends with some of the locals and with all the doggies. We got some good advice about local services, including a dog groomer, and the local pizza joint (Silly Al’s). 

 

Eric (WB7OYL) walked me through the steps to make my first HF contact on 15 meters using the event station (W7Q, temporary). (All my previous contacts had been on VHF repeaters using an HT.)

 

Brent (N7SKV) helped dial in the settings on my new Yaesu 710 radio so that I could actually hear some signals and see the waterfall display. (The Yaesu radios are powerful but not at all intuitive.) I also followed Brent’s advice to snap up a good deal on an external antenna tuner at the swap meet.


A highlight of the week is when Mary passed the Technician license test on the very last day at the ARRL testing area. She had been studying all week and was quite stressed. She was able to enter the final raffle drawing and her number drew a copy of the ARRL Operations Manual.

 

On the way home, we happened to camp next to Eric (N6OIM) who was also returning to his home from Quartzfest. That was an unexpected surprise.

 

We came home with many new friends and a shared appreciation of our hobby.

 

73,

Mark K9GIA

 



Sunday, September 24, 2023

Summer Trip Stop 2: Eureka

We like to stay near Eureka because some of our favorite beaches are here. Last year, we spent four night in Fortuna and four nights in Eureka. This year, we did the same. We stayed in the same places we stayed last year, because we liked both of them.

Stayed at: Redwood Coast Cabins and RV Resort

Beaches:

We have several favorite beaches in Eureka. Gia's most favorite is Samoa Dunes. There is a small beach on the inside (not ocean facing) that is calm and has a gentle slope. 

Our next favorite is Mad River Beach. It is on the north side of town, probably really in Arcata.

We stopped at a new beach this time, and we really liked it. Clam Beach. I think it may really be in McKinleyville.

All three of these beaches are a good 15–20 minute drive from Eureka. But Gia was excited to visit any of them.

Dinner: Our favorite restaurant in Eureka is the Humboldt Bay Bistro. It is amazing food, but they are pretty expensive. Because of the expense, we mostly made our own dinners in camp on the other days. We missed going here last year because I tried to contact them about bringing the dog, and we never heard back. This year, we made contact and they offered to set us up in the patio with a heater.

I had the catch of the day, which was halibut. Mary had filet mignon. They brought steak tips for Gia. We also ordered the Caesar salad, which they make from scratch right at your table. He explains everything and is quite entertaining. We topped it off with creme brulee, one of the best we've ever had.

Gas: The best price on gas in Eureka is at Costco. We usually get gas the day before we leave town. We have sometimes get gas with the trailer attached, but we're particular about the stations where we will do that. On another trip two years ago, we damaged the rental trailer slightly while navigating a crowded Costco parking lot. 

On the way from Cloverdale to Eureka, we got gas at the casino in Redwood Valley. They have a special RV section that is usually not crowded. And they have the best gas prices in the Ukiah area, not counting the Ukiah Costco, which has an easy parking lot, but the store itself is hard to get to.


Summer Trip Stop 1: Cloverdale

We stayed here just one night. The goals were 

  • to have a relatively short drive, 
  • to stay somewhere we can get to before dark, and 
  • to gain forward momentum toward the rest of our stops. 

Typical road trip protocol is to get as far as you can the first day, but we had a few limitations. When renting a travel trailer, it can take some time to wait in line, sign everything, then get connected. Sometimes this takes a while. So we didn’t know exactly what time we’d be leaving. (We got to Cruise America around 11:30 am and we were on the road by 1:00 pm.) 

Also, we had to drive through the Oakland maze, which we always find disorienting. And we had the dog with us, which sometimes means we have to make extra stops for her to go pee or take a breather.

Also, when hauling a trailer, you definitely want to arrive at your destination well before dark so you have time to set up. Have you heard of the 222 rule for RVing? Limit your travel to 200 miles per day, check in to your campground by 2 pm, and camp in the same spot for at least 2 days. 

On our first trip with a trailer two years ago, we didn't leave the rental company until almost 6 pm, and we had a three hour drive ahead of us. We arrived around 9 pm and it got dark as I was setting up the trailer. No fun.

Stayed at: Cloverdale Citrus Fair. We held PACE square dances at this location in the early 1990s. So I knew the area. We stayed in a large fenced parking lot that had a gate with a code. It was all paved so easy setup. They have full hookups, restrooms, and showers. They had a doggy lawn where Gia could do her thing. 

Ate at:  Zini’s Diner. I couldn't find any suitable restaurants in the gluten free app, so I just looked on Google Maps for something promising. This diner had Joe's Special on the menu, so I called them. Most diners will make you a breakfast that has gluten ingredients. But can we bring the dog? The temperature was in the 90s. They let Gia come inside, which surprised us. The employees all loved her. She had a hamburger patty. They seated us in a part of the restaurant where there were no other customers.





Saturday, September 23, 2023

Summer Trip 2023 – Overview

We traveled from our home in the Bay Area to halfway up the Oregon coast and back. We fell into the same routine every day: 

  • Make coffee and breakfast, 
  • Take Gia to the beach, 
  • Come back to camp and have lunch, 
  • Take a nap or run errands, 
  • Take Gia to the beach in the late afternoon / early evening, 
  • Have dinner in camp or somewhere fun.

We rented a travel trailer from Cruise America in Newark, California. We towed the trailer behind my Toyota Tundra.

Our two tasks each day were to 

  1. Find a suitable beach where Gia can run “off leash,” and to 
  2. Find a place in town where we can have a nice gluten free dinner. 
For finding dog activities, we use apps like Dog Trekker and Bring Fido. For finding gluten free food, we use an app called Find Me Gluten Free.

This is just an outline of our trip. I hope to add details in subsequent posts.

South to North portion:

  • Cloverdale
  • Eureka
  • Crescent City
  • Coos Bay
  • Newport

Leaving Newport, we turned around and headed back south. We traveled the same highway to get home, passing many familiar sights, until we turned off at Willits to get to Fort Bragg. Later we turned off again at Santa Rosa to get to Bodega Bay.

North to South portion:

  • Florence
  • Port Orford
  • Klamath
  • Fortuna
  • Fort Bragg
  • Bodega Bay

Mostly we stayed four nights in each location. 



Monday, March 13, 2023

Debugging JavaScript, Part 3

 

General Debugging Tips

Top 7 Most Common Errors in Programming

https://www.learnacademy.org/blog/what-considered-common-programming-errors/

 

The 7 Most Common Types of Errors in Programming and How to Avoid Them

https://textexpander.com/blog/the-7-most-common-types-of-errors-in-programming-and-how-to-avoid-them

 

The Most Common Coding Errors

https://www.parkersoftware.com/blog/the-most-common-coding-errors/

 

JavaScript Debugging in Particular

JavaScript Debugging, W3Schools

https://www.w3schools.com/js/js_debugging.asp

 

16 JavaScript Debugging Tips You Probably Didn't Know (Advanced)

https://raygun.com/learn/javascript-debugging-tips

 

Strict Mode

W3 Schools

https://www.w3schools.com/js/js_strict.asp

 

MDN

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode

 

console.table

MDN

https://developer.mozilla.org/en-US/docs/Web/API/console/table

 

W3Schools

https://www.w3schools.com/jsref/met_console_table.asp

Debugging JavaScript, Part 2

JavaScript Lint Alternatives

JSLint is a very difficult tool to use. It is very picky. The author is very picky and opinionated about what he considers good JavaScript vs. bad JavaScript. He even wrote a book called JavaScript: The Good Parts. Anyway, his tool is not very configurable for beginner use even though it has a lot of options. I have found some lint alternatives that you may like to try.

1. ES Lint Online

ESLint is primarily a tool that you use as an application you install on your computer. However, there is a "playground" version where you can paste your code into an online form.

2. Validate JavaScript

ValidateJavaScript is an online validating (or linting) tool that will automatically find basic errors and help prevent potentially destructive bugs in JavaScript and JSX (React.js) code. Copy and paste or directly input your code into the editor, click the 'Find & Fix Errors' button, and the tool will parse your code and list all errors allowing you to fix them systematically.

 

3. JS Hint

Simply enter some JavaScript anywhere on the page. Your report will appear on the right side.

 
4. Prettier

This is just a code formatter, but it can do wonders for indenting your JavaScript properly, which makes it easier to find many different kinds of bugs.

 

5. ES Lint VSC Extension

You can get ESLint in the form of an extension you can add to Visual Studio Code. Unfortunately, this requires that you have installed ESLint as an application on your computer. This, in turn, requires npm (Node Package Manager) to do the install. So if you don't have npm, you'd have to install that first. This sounds like a good option, but I haven't had time to install everything myself.

https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint 

 

Debugging JavaScript, Part 1

Sometimes, perhaps often, we write code that has problems or just doesn't work. This module explores strategies for figuring out what's wrong and fixing it.

In general, we have two kinds of tools for exploring errors.

  • The console, which we can use to print messages at various points along the way in an effort to isolate the problems.
  • Debuggers, which help automate the task of find the errors. Debuggers fall into two categories:
    • The debugger built into the console, which may show you compile-time errors in your code.
    • Alternative debuggers, such as Firebug for Firefox, which may help you find errors in your code as it's running, known as run-time errors.

We may encounter two different kinds of errors as we're attempting to put a project together.

  • Compile-time errors are also known as syntax errors and they can be such mistakes as spelling errors, misplaced or missing parentheses, semicolons, commas, etc. These kinds of errors often prevent the program from running at all.
  • Run-time errors are not due to syntax mistakes but instead due to logic mistakes. So the program may run, but it may not do the right thing.

Compile-Time Errors

Compile-time errors include anything that is a violation of project JavaScript syntax. Common syntax errors include:

  • Spelling errors
    • Misspelled keywords, such as for, while, function, if, switch.
    • Misspelled library function and property names, such as getElementByID instead of getElementById, etc.
    • Mismatched variable names, such as colorswatches in one place, and colorSwatches in another place.
    • Note that like most programming langauges, JavaScript is case-sensitive, so mismatches in upper case vs. lower case letters can have a big impact.
  • Brackets errors
    • Extra or missing or mismatched brackets: parentheses ( ), square brackets [ ], curly brackets { }, angle brackets < > (usually in HTML, not JavaScript).
    • Using the wrong kind of brackets, particularly in
      • functions, which use both parentheses and curly brackets in different places,
      • arrays, which use square brackets,
      • objects, which use curly brackets, and
      • arrays of objects, which use both square brackets and curly brackets in different places.
  • Missing semicolons and commas.

Run Time Errors

Run time errors are hard to detect before running the program. There may not be any spelling errors that might be a warning that something is wrong. So when you run the program, it either

  • does the wrong thing, or
  • crashes, or
  • both.

Examples of common run-time errors include:

  • Forgetting to update the condition variable in a for or while loop, which can cause an infinite loop. (This can eventually cause a crash if the computer runs out of memory, or it may just lock up your computer until you quit and restart the browser.)
  • Trying to access an array index that is out of bounds (beyond the end of the array), which can cause a crash.
  • Trying to divide by zero, which can cause a crash. No one does this on purpose, but what if the user enters zero (0) and you try to use their input in a math calculation?
  • Not paying attention to operator precedence (PEMDAS), which can cause a calculation to return the wrong result, such as the wrong bank balance.
  • Wrong logic for if, &&, and ||, which can cause you, for example, to go outside if it is cold and rainy.

Saturday, September 17, 2022

JavaScript Crash Course Code


<!DOCTYPE html>
<html lang="en">
<head>
    <!--
    Mr. Brautigam
    JavaScript Crash Course
    -->
    <meta charset='utf-8' />
    <title>JavaScript Crash Course</title>
    <style>
    
        body { background-color: #438; 
            font-family: Courier, monospace;
        }
        h1 { text-align: center; color: lavender; 
            font-size: 1.75em;
        }
        div#console {
            background-color: lavender;
            padding: 0.5em;
            min-height: 10em;
            width: 75%;
            max-width: 1000px;
            margin: 1em auto;
            white-space: pre;
        }

    </style>
    <script>
        // do not change anything here
        function print (s) {
            document.getElementById("console").innerHTML += s;
        }
        
        function println (s) {
            if (typeof s !== 'undefined') {
                print (s)
            } 
            print ("\n");
        }
    </script>
</head>

<body>
    <h1>JavaScript Crash Course</h1>
    
    <div id='console'></div>

    <script type='text/javascript'>
    // your scripts will go here

        println ('This is the first line');

    </script>
</body>
</html>


Sunday, January 30, 2022

Advice for buying a Mac - January 2022 Edition

This is an update to my 2015 edition. Please read it first:

The quick version:

  • Your friend who works at Apple may be able to get you a discount.
  • Buy refurbished.
    • https://www.apple.com/
      • Scroll to bottom of page
      • Look for Refurbished and Clearance
    • Tech Restore, Small Dog, Mac Connection, and Mega Macs are all still in business.
    • Amazon? Just be sure to buy from Amazon or a reputable third party, not an individual.

How much memory?

  • The low end Apple models always come with 8 GB of RAM. This is never enough.
  • If you wish to run Xcode, get at least 16 GB of RAM.

How much disk?

  • The low end Apple models always come with 256 GB of SSD. This is usually enough for Xcode alone.
  • If you wish to subscribe to Adobe products or do audio processing, consider upgrading to 512 GB of SSD. This allows room for all the Adobe programs, which take up a lot of space.
  • If you wish do do video processing in the future or just make videos in general, consider upgrading to 1 TB of SSD. Video files can be very large.
  • Upgrading to 1 TB of internal SSD may cost $400 more than 256 GB. As an alternative, many choose to buy 1 TB of external spinning disk (around $50) or SSD (around $100). This can be effective if you expect to have a lot of video files. But it's better to keep large programs like Adobe on the internal drive.
  • The latest models come with a USB-C connector that may not connect to your USB-A devices. You may need to buy an inexpensive adapter (about $10).

Upgrades? On the Macs since around 2015, doing your own upgrades is rarely possible. Choose the most memory and disk you can afford at the time you buy it, and assume you won't be able to upgrade either RAM or SSD in the future.

Keyboard. Mac laptop keyboards from late 2015 until early 2018 (called "butterfly") are known to have problems. Don't buy a computer from before 2015; they are good, but not good enough for Xcode. Buy a computer from late 2018 or later and if it's a laptop, make sure to get a "scissor" keyboard.

Operating system and Xcode. 

  •  You can run Xcode 12.4 on "Catalina," vintage 2019. We have this in the classroom. You may need a computer made after 2014 or so to run this. You can talk to a device running up to iOS 14.4 with this setup.
  • You can run Xcode 12.5 or 13+ on "Big Sur," vintage 2020. You may need a computer made after 2015 or so. You can talk to a device running iOS 14.6 or later.
  • The latest Macs come with "Monterey," which came out in Fall 2021. You can talk to the latest versions of iPhones and iPads.

Comparison of models:

  • Mac Mini requires you supply your own monitor, keyboard, and mouse. Also requires adapter cables for all those. Suitable for intense work for 3–4 years.
  • Mac Book Air is suitable for intense work for 3–4 years. 
  • Mac Book Pro can last for 8–10 years. The more powerful processor will keep going longer.
  • The latest models (2021–2022) all have the new M1 chip, instead of the older Intel i5 or i7 chip.

Current prices for 16 GB of RAM:

Model256 GB512 GB256 EDUC512 EDUC
Mac Mini90011008301030
Mac Book Air1200140010801260
Mac Book Pro1500170013801580

At the top of each product page, I see a link that says Shop Education Store. I see lower prices when I click on that link. You can see those lower prices above. Save about $70 (7%) on Mac Mini. Save about $120 (10%) on Mac Books.


Thursday, June 27, 2019

Summer Cruise Reading

While on a cruise, it's much easier to make time to read, especially when you have three weeks! I brought six small books with us, of which I read four. I found five other books in the ship's library (and many more of interest to my wife). I bought one in a public library we visited on land in Homer, Alaska.


After Daybreak. The Liberation of Bergen-Belsen, 1945
Ben Shephard

From the ship's library. How and why did it took so long to get medical aid for the survivors of the first concentration camp liberated just before the end of World War II in Europe? 

Considers racism, battlefield logistics, medical training, and military bureaucracy. Frankly discusses the condition of the camps and their inhabitants; not for those with weak stomachs. Also discusses the long-term mental health issues faced by the survivors based on interviews taken decades later.



The Fred Factor
Mark Sanborn

Our school gives it to all the teachers. You can go above and beyond expectations with just a little effort. It's a quick read with many examples and anecdotes, but one wonders how many of the stories were invented to make a point.

Our school gives out "Fred awards" at the faculty meetings every month.



Holy Lands: One Place, Three Faiths
Thomas Cahill

The first book I found in the ship's library. It is mostly a pictorial book. It describes what we know of the histories of Abraham, Moses, David, Jesus, Mohammed, and others. Then it discusses the history of the region beginning with Zionist immigration in the late 19th century until the current day.

Reflections of Ireland
Photos by Bernard McCabe and Alain Le Garsmeur
Text by James Joyce

I found this book in the ship's library. It is a picture book with images accompanied by passages from the books of James Joyce. We intend to visit Ireland later this summer. I thought this book might show us a little of the Dublin mindset. Reading Joyce was a bit depressing. It seems his intent is to show how Dubliners act and speak, but they don't seem too happy. We'll soon find out if they are really unhappy or if that's just Joyce projecting his own world view onto everyone.



The Principles of Object-Oriented JavaScript
Nicholas C. Zakas

I brought this short book with us. It's basically JavaScript for those who are used to or prefer the C++ object model. It covers types, functions, objects, constructors, prototypes, inheritance, and object patterns. My own coding doesn't usually need to go that deep into objects, but I did learn a lot.



Messages from Earth. Nature and the human prospect in Alaska
Robert B. Weeden

I bought this book from the public library in Homer, Alaska. I thought I would learn a lot about the Alaska mindset. However, this book, by a professor of ecology retired from University of Alaska at Fairbanks, is written from the standpoint of an ardent environmentalist. So his thoughts aren't necessarily those of many Alaska inhabitants. 

I was put off by two things in this book. First, the writer's vocabulary is huge, and because he's a biologist, much of his vocabulary is unfamiliar to me. Sometimes it seems as if he's in a pissing contest to see how many big words he can use, and will you understand? This was definitely the most difficult book of all that I read, and at sea, I didn't have Google to look up the big words.

Second, the author uses charged language. For example, to describe how the government at Juneau dictates policy in faraway northern Alaska, and how the government in Washington dictates policy in faraway Alaska, Weeden uses the word "colonialism." To describe any business interest at all, Weeden uses the word "capitalism" in a pejorative way. This will not endear him to readers who don't buy unto his ideas 100%.



The History of the New Testament in Plain Language
Clayton Harrop

This book discusses transmission (how the manuscripts were written and copied) and canonicity (how it was decided which documents would go into the New Testament). Although I'm familiar with the topics already, I did learn a few things. I would recommend this book as an easy read for anyone interested in the topic.

If I were to teach a class on this topic (and that may happen soon), I would choose this as a textbook because it is short, accessible, and inexpensive.



Race Across Alaska
Libby Riddles with Tim Jones

I found this book in the ship's library and got it for my wife, who loved it. I didn't intend to at first, but I read it after she was done. Libby Riddles wrote the story of the journey and her preparation. Tim Jones wrote sections where he describes the race rules and history.

The race is a lonely event, one person and their dogs with occasional fleeting human interaction at the checkpoints. It is an excellent introduction to the race, its history and its challenges. 



Oaxaca Journal
Oliver Sacks

From the ship's library. Dr. Sacks delivers his actual journal from a ten-day trip to Oaxaca to study ferns with a group of amateur botanists. It's amazing that he could write this much in just the breaks during a busy trip that lasted little more than a week. 

As always, Dr. Sacks is delightful as he discusses Cortes and the conquistadors; tobacco and smoking; Columbus; the Inquisition; chiles; cacao and the history of chocolate; the amino acids in beans and corn; fern reproduction; crop rotation, nitrogen depletion, and synthetic fertilizers; Benito Juarez and the Mexican war of independence; Zapotec vs. Aztec culture; chemistry jokes; Flatland; castor beans, Castrol, and castor oil; police corruption; and the Catholic church. 

If you are interested in any of these topics, or even if not, this is a quick and insightful read.



Dr. Steve's Almanac of Christian Trivia
Steve Wilkens

Dr. Wilkens is a professor of theology at Azusa. This mad romp carries you through 2000 years of history in no particular order and with tongue in cheek. Sample topics include how to pronounce God's name, snake handling, the Gideons, Henry VIII, St. Patrick, the Serenity Prayer, the Amish, the origins of Sunday School, Michelangelo and the Sistine Chapel, the Salvation Army, Martin Luther and Katie, and when is Easter.

Every day on the ship, there was a meeting for "Friends of Bill W." In this book, I learned who those friends are.