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.