Marcus Schuff

The Computer Guy

Notable Quote: “Shouldn’t have been standing there.”

Likes: Scuba diving, computers, movies, family.

Dislikes: Pickles, Olives, Canned Green Beans.

Marcus's Blog

Get Weather App

By: Marcus Schuff

Thursday, December 30, 2021, 8:33 PM

Today I wrote my first cross platform .NET Core console application. It started out as all first apps do, with a hello world, or in this case, Hola Mundo. 

And it worked flawlessly on Windows, Linux, and Mac! 

Ok, but that's boring! 

What I had to do next was come up with an idea for a simple application that would be usefull on any operating system. Since it has been raining here all week, I thought, why not a weather app? What's more exciting than weather? ;-) 

So I started working....

The "GetCoordinates" method below takes the user input as an argument, and sends the user input to Microsoft's Bing Maps API. The response from the server includes the GPS coordinates of the location requested. 

and working.....

The "GetGridPoints" method takes the coordinates produced from Bing Maps, and sends a web request to the US National Weather Service. The server response includes the weather station and grid points of the GPS coordinates provided. Here I wrap that resposne in a class called, "GridPoints". The method returns the GridPoints object so we can request the forecast of that grid point. 

and working....

The "GetForecast" method takes the GridPoints object that was created using the "GetGridPoints" method and sends a request asking for the forecast to the US National Weather Service. The response from the server includes the 10+ day forecast for the requested grid points. 

Until it was just right! 

The GetWeather method shown below is the primary function of the program. All three of the above described methods are called from the GetWeather method. 

First, we ask the user to enter a city, state, or zip code to get the weather report for that location. We URL encode the user input in order to specify our request in the URL. Using the user input, we send off a request to Bing Maps and ask it to send us back the GPS coordinates of our requested location. Next, we take those cooridinates, and send them to the National Weather Service and ask them to send us back the grid points that correspond to the GPS coordinates we sent them. Finally, we ask the National Weather Service to pretty please send us the forecast for those gird points, and print out the forecast for the user to read. 

The Main method below is the entry point of the program. GetWeather is a recursive functions that will continue to loop until the user exits the program via the escape key.

I published the GetWeather app to three different folders. GetWeather_Linux, GetWeather_MacOS, and GetWeather_Win for each of the corresponding operating systems (Linux, Macintosh OS, and Windows). 

You can download the GetWeather program here (current release version 4):

To make sure you downloaded the right file, you can use CheckSum. Here is the SHA256 Hash for the zip file: 6804733BE862F52F8AE076E852C4AB26451C7B52A4A75B46289536D9A84B1E3E

Download the zip folder to your computer. Once you have download the program, extract the contents to a convenient location on your computer. 

To run the program, open a command terminal or console window on your computer of choice, and change the directory to the location where you extracted the contents of the folder, and run the GetWeather program. 

For example, on Linux, in a terminal window use the command: "cd /dir/where/you/saved/GetWeather_Linux"

Alternatively, in most Linux GUIs you can right-click on the folder, the click on "Open in Terminal" to open a terminal to that directory.  

You will likely have to change the permissions of the "GetWeather" program file in order to run it. To do so, type: "sudo chmod 777 ./GetWeather"

Then type: "./GetWeather" 

The process should be similar on an Apple Macintosh computer. You can also double-click on the "GetWeather" file in the "GetWeather_MacOS" folder that you extracted to your computer. 

On Windows, you can double-click on the GetWeather.exe file in the "GetWeather_Win" folder that you extracted to your desired location.

Alternatively, on Windows you would use a similar command: "cd C:\users\<your_username>\desktop\GetWeather_Win" 

Then run the executable by typing: "GetWeather.exe"

Then follow the isntructions on the screen. 

That's it! Let me know what you think! Happy new year! 

Scuba Diving in La Paz

By: Marcus Schuff

Saturday, October 30, 2021, 11:23 AM

Today is the final day in La Paz, Baja California Sur, Mexico. I am in town with a friend to go scuba diving. We did 11 dives in 5 days with The Cortez Club. It was a wonderful experience, and we made some great new friends! The best part, by far, was playing with the Sea Lions! Check out the video below!


Royalty free music provided by: https://www.bensound.com/

For more pictures and videos, check out my Google Photos Album at this link: La Paz, Mexico 2021

La Paz is the capital city of the State of Baja California Sur, in Mexico. It is approximately a two hour car ride north of Cabo San Lucas. It is a beautiful city in a warm, dry climate. The people are extremely friendly and will go out of their way to help you in any way that they can.

We are styaing in the Costa Baja Resort and Spa located about 15 minutes north of La Paz by taxi, south of the port of Pichilinque.

Most of our dives were done close to Isla Espiritu Santo (Holy Spirit Island), and Isla Partida (Split Island). The boat rides out to the dive sites were fairly long, at about one to two hours each way, but the long rides were well worth it. The long rides gave us a chance to get to know the people we were diving with. We met wonderful people from Germany, France, Austria, and of course, Mexico and the United States. One of the divers that has been diving all over the world said that La Paz, Mexico her favorite place to dive on the entire planet. 

For this trip, I travelled using the Cross Border Xpress (CBX) Terminal at the Tijuana Airport. By flying out of Tijuana instead of San Diego, the airline ticket was about half price. By crossing at the CBX land crossing, rather than flying international, you are not required to carry proof of Covid-19 vaccination, nor do you have to show proof of a negative Covid-19 test within 3 days of returning to the United States. I found this method of travel to be very fast and convenient. The next time I travel in Mexico, I will be using the CBX Terminal at the Tijuana airport! 

CBX San Diego

 

Inflation in Healthcare and Education

By: Marcus

Tuesday, February 16, 2021, 9:02 AM

I had a conversation on Facebook today that I thought was interesting, so I thought I would share it here on my blog.

I follow a Facebook group called: Tulsi for America 2024 (link: https://www.facebook.com/groups/439978646728664/). As you can probably tell, I am a fan of former Congresswoman (D-HI) and US Army Major Tulsi Gabbard of the Hawaii National Guard. I agree with the good Major on many things, but not all. As you can imagine, Major Gabbard has a wide variety of supporters that have very differing views.

Today, in the Facebook group, someone posted this screenshot:

While I can certainly identify with the sentiment of all of the above, I do not agree all of it should be US policy. I primarily disagree with programs that cost tax payers money when it should be the users of those programs that pay for those programs: such as Medicare, student loans, college education, and housing. But I digress.

The real point of this post is to highlight a sub-conversation in this thread. One of the followers posed the following question:

Here was my response to the comment:

The prices of education and healthcare rise faster than prices in other industries because there is no downward pressure on those prices.

Since there are almost always third parties (insurance companies & governments) involved in paying for healthcare or education, the consumer is therefore insulated from the actual cost of healthcare and education. This insulation is good for major medical emergencies, such as car accidents, or cancer. No one wants to go broke because they get sick or are innocently injured. However, when the consumer is insulated from the cost of a doctor’s appointment for the sniffles, or for instance, a computer programming class or a welding class, then the consumer has no information (in the form of prices) to determine which is the best way to spend their money.

In other industries, prices are used as a signal to consumers to roughly determine the quality of a product, as well as the current supply available, and the rough demand for any good or service. A $1,000 TV usually performs much better than a $100 TV. If the TV industry were the same as healthcare or education, all TVs would cost $500, and it would be less obvious to the uneducated consumer which TVs are good and which are bad.

In order to put downward pressure on the prices of education and healthcare, there must be less third-party intervention (insurance & government) and more direct interaction with the consumer. This would mean the consumer would be more directly responsible for paying for the goods and services they consume in education and healthcare, but it would also mean more downward pressure on prices. The cost of healthcare and education would drop dramatically almost immediately.

So, what are your thoughts? Why do prices rise in some areas of the economy and not in others? Why do some products get cheaper and better over time, and other get more and more expensive?

My Puppy, Shelby

By: Marcus

Saturday, February 13, 2021, 6:11 PM

This is my puppy Shelby! 

Shelby is a 2 year old black Labrador retriever. She loves to play fetch and tug-o-war. She also loves to shred any all all sticks, logs, and plants of all kinds. 

These are some of my favorite pictures and videos of Shelby!

Here is Shelby when she was just a little puppy, not even big enough to jump up on the couch. 

Flash forward to late summer 2020!